Class: Weft::SearchEndpointHit
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Weft::SearchEndpointHit
- Defined in:
- lib/weft/generated/models/search_endpoint_hit.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#access_methods ⇒ Object
Returns the value of attribute access_methods.
-
#call ⇒ Object
Returns the value of attribute call.
-
#callability ⇒ Object
Returns the value of attribute callability.
-
#compatibility ⇒ Object
Returns the value of attribute compatibility.
-
#endpoint_id ⇒ Object
Returns the value of attribute endpoint_id.
-
#execution ⇒ Object
Returns the value of attribute execution.
-
#last_verified_at ⇒ Object
When Weft last CONFIRMED this endpoint answers — the most recent conclusive probe.
-
#latency_p50_ms ⇒ Object
Median time-to-first-byte in ms across the endpoint's probe call set.
-
#operated_by_id ⇒ Object
Returns the value of attribute operated_by_id.
-
#operation ⇒ Object
Returns the value of attribute operation.
-
#operator_type ⇒ Object
Who you are actually paying.
-
#output ⇒ Object
Returns the value of attribute output.
-
#output_schema ⇒ Object
Returns the value of attribute output_schema.
-
#payment ⇒ Object
The settlement routes this endpoint's own 402 challenge published — one entry per rail × network × asset × payee it accepts.
-
#price ⇒ Object
Returns the value of attribute price.
-
#primary_protocol ⇒ Object
Returns the value of attribute primary_protocol.
-
#resource_type ⇒ Object
Returns the value of attribute resource_type.
-
#service ⇒ Object
Returns the value of attribute service.
-
#settled_via_facilitator_id ⇒ Object
Returns the value of attribute settled_via_facilitator_id.
-
#settlements ⇒ Object
Count of payments observed settling against this endpoint by ANYONE (chain-indexed), not just by Weft — the reliability signal a caller can act on.
-
#source ⇒ Object
Returns the value of attribute source.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ SearchEndpointHit
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ SearchEndpointHit
Initializes the object
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 163 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Weft::SearchEndpointHit` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Weft::SearchEndpointHit`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'endpoint_id') self.endpoint_id = attributes[:'endpoint_id'] end if attributes.key?(:'url') self.url = attributes[:'url'] end if attributes.key?(:'resource_type') self.resource_type = attributes[:'resource_type'] end if attributes.key?(:'primary_protocol') self.primary_protocol = attributes[:'primary_protocol'] end if attributes.key?(:'call') self.call = attributes[:'call'] end if attributes.key?(:'price') self.price = attributes[:'price'] end if attributes.key?(:'payment') if (value = attributes[:'payment']).is_a?(Array) self.payment = value end end if attributes.key?(:'access_methods') if (value = attributes[:'access_methods']).is_a?(Array) self.access_methods = value end end if attributes.key?(:'service') self.service = attributes[:'service'] end if attributes.key?(:'operation') self.operation = attributes[:'operation'] end if attributes.key?(:'output_schema') self.output_schema = attributes[:'output_schema'] end if attributes.key?(:'output') self.output = attributes[:'output'] end if attributes.key?(:'execution') self.execution = attributes[:'execution'] end if attributes.key?(:'callability') self.callability = attributes[:'callability'] end if attributes.key?(:'compatibility') self.compatibility = attributes[:'compatibility'] end if attributes.key?(:'source') self.source = attributes[:'source'] end if attributes.key?(:'operator_type') self.operator_type = attributes[:'operator_type'] end if attributes.key?(:'operated_by_id') self.operated_by_id = attributes[:'operated_by_id'] end if attributes.key?(:'settled_via_facilitator_id') self.settled_via_facilitator_id = attributes[:'settled_via_facilitator_id'] end if attributes.key?(:'settlements') self.settlements = attributes[:'settlements'] end if attributes.key?(:'last_verified_at') self.last_verified_at = attributes[:'last_verified_at'] end if attributes.key?(:'latency_p50_ms') self.latency_p50_ms = attributes[:'latency_p50_ms'] end end |
Instance Attribute Details
#access_methods ⇒ Object
Returns the value of attribute access_methods.
33 34 35 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 33 def access_methods @access_methods end |
#call ⇒ Object
Returns the value of attribute call.
26 27 28 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 26 def call @call end |
#callability ⇒ Object
Returns the value of attribute callability.
45 46 47 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 45 def callability @callability end |
#compatibility ⇒ Object
Returns the value of attribute compatibility.
47 48 49 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 47 def compatibility @compatibility end |
#endpoint_id ⇒ Object
Returns the value of attribute endpoint_id.
18 19 20 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 18 def endpoint_id @endpoint_id end |
#execution ⇒ Object
Returns the value of attribute execution.
43 44 45 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 43 def execution @execution end |
#last_verified_at ⇒ Object
When Weft last CONFIRMED this endpoint answers — the most recent conclusive probe. Null when never probed, or when the latest probe errored: an endpoint we last failed to reach has no current verification.
62 63 64 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 62 def last_verified_at @last_verified_at end |
#latency_p50_ms ⇒ Object
Median time-to-first-byte in ms across the endpoint's probe call set. First-byte latency, not full-response time. Null when unmeasured (never 0).
65 66 67 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 65 def latency_p50_ms @latency_p50_ms end |
#operated_by_id ⇒ Object
Returns the value of attribute operated_by_id.
54 55 56 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 54 def operated_by_id @operated_by_id end |
#operation ⇒ Object
Returns the value of attribute operation.
37 38 39 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 37 def operation @operation end |
#operator_type ⇒ Object
Who you are actually paying. first_party = operated by the provider that makes the capability; reseller = resold, so the price carries someone else's margin. Null until the platform resolves the operator.
52 53 54 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 52 def operator_type @operator_type end |
#output ⇒ Object
Returns the value of attribute output.
41 42 43 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 41 def output @output end |
#output_schema ⇒ Object
Returns the value of attribute output_schema.
39 40 41 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 39 def output_schema @output_schema end |
#payment ⇒ Object
The settlement routes this endpoint's own 402 challenge published — one entry per rail × network × asset × payee it accepts. Sibling of call: that block says how to shape the request, this says how to pay for it, so a caller can settle with its OWN x402/mpp SDK instead of guessing. A list because rails are irreducibly plural. Order is the provider's own preference order. Honest-empty when the pipeline observed no challenge.
31 32 33 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 31 def payment @payment end |
#price ⇒ Object
Returns the value of attribute price.
28 29 30 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 28 def price @price end |
#primary_protocol ⇒ Object
Returns the value of attribute primary_protocol.
24 25 26 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 24 def primary_protocol @primary_protocol end |
#resource_type ⇒ Object
Returns the value of attribute resource_type.
22 23 24 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 22 def resource_type @resource_type end |
#service ⇒ Object
Returns the value of attribute service.
35 36 37 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 35 def service @service end |
#settled_via_facilitator_id ⇒ Object
Returns the value of attribute settled_via_facilitator_id.
56 57 58 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 56 def settled_via_facilitator_id @settled_via_facilitator_id end |
#settlements ⇒ Object
Count of payments observed settling against this endpoint by ANYONE (chain-indexed), not just by Weft — the reliability signal a caller can act on. Null when unknown.
59 60 61 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 59 def settlements @settlements end |
#source ⇒ Object
Returns the value of attribute source.
49 50 51 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 49 def source @source end |
#url ⇒ Object
Returns the value of attribute url.
20 21 22 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 20 def url @url end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
118 119 120 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 118 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
123 124 125 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 123 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 90 def self.attribute_map { :'endpoint_id' => :'endpoint_id', :'url' => :'url', :'resource_type' => :'resource_type', :'primary_protocol' => :'primary_protocol', :'call' => :'call', :'price' => :'price', :'payment' => :'payment', :'access_methods' => :'access_methods', :'service' => :'service', :'operation' => :'operation', :'output_schema' => :'output_schema', :'output' => :'output', :'execution' => :'execution', :'callability' => :'callability', :'compatibility' => :'compatibility', :'source' => :'source', :'operator_type' => :'operator_type', :'operated_by_id' => :'operated_by_id', :'settled_via_facilitator_id' => :'settled_via_facilitator_id', :'settlements' => :'settlements', :'last_verified_at' => :'last_verified_at', :'latency_p50_ms' => :'latency_p50_ms' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 341 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
156 157 158 159 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 156 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 128 def self.openapi_types { :'endpoint_id' => :'String', :'url' => :'String', :'resource_type' => :'String', :'primary_protocol' => :'String', :'call' => :'SearchEndpointCall', :'price' => :'SearchEndpointPrice', :'payment' => :'Array<SearchPaymentOffer>', :'access_methods' => :'Array<SearchAccessMethod>', :'service' => :'SearchCuratedService', :'operation' => :'SearchCuratedOperation', :'output_schema' => :'Object', :'output' => :'Object', :'execution' => :'SearchCuratedExecution', :'callability' => :'SearchCuratedCallability', :'compatibility' => :'Object', :'source' => :'SearchCuratedSource', :'operator_type' => :'String', :'operated_by_id' => :'String', :'settled_via_facilitator_id' => :'String', :'settlements' => :'Integer', :'last_verified_at' => :'Time', :'latency_p50_ms' => :'Integer' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 299 def ==(o) return true if self.equal?(o) self.class == o.class && endpoint_id == o.endpoint_id && url == o.url && resource_type == o.resource_type && primary_protocol == o.primary_protocol && call == o.call && price == o.price && payment == o.payment && access_methods == o.access_methods && service == o.service && operation == o.operation && output_schema == o.output_schema && output == o.output && execution == o.execution && callability == o.callability && compatibility == o.compatibility && source == o.source && operator_type == o.operator_type && operated_by_id == o.operated_by_id && settled_via_facilitator_id == o.settled_via_facilitator_id && settlements == o.settlements && last_verified_at == o.last_verified_at && latency_p50_ms == o.latency_p50_ms end |
#eql?(o) ⇒ Boolean
328 329 330 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 328 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
334 335 336 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 334 def hash [endpoint_id, url, resource_type, primary_protocol, call, price, payment, access_methods, service, operation, output_schema, output, execution, callability, compatibility, source, operator_type, operated_by_id, settled_via_facilitator_id, settlements, last_verified_at, latency_p50_ms].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
272 273 274 275 276 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 272 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
363 364 365 366 367 368 369 370 371 372 373 374 375 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 363 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
280 281 282 283 284 285 |
# File 'lib/weft/generated/models/search_endpoint_hit.rb', line 280 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' operator_type_validator = EnumAttributeValidator.new('String', ["first_party", "reseller"]) return false unless operator_type_validator.valid?(@operator_type) true end |