Class: OryClient::VerifyApiKeyResponse
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- OryClient::VerifyApiKeyResponse
- Defined in:
- lib/ory-client/models/verify_api_key_response.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#actor_id ⇒ Object
Returns the value of attribute actor_id.
-
#audiences ⇒ Object
audiences lists the recipients the verified credential names.
-
#error_code ⇒ Object
Returns the value of attribute error_code.
-
#error_message ⇒ Object
Returns the value of attribute error_message.
-
#expire_time ⇒ Object
Returns the value of attribute expire_time.
-
#is_valid ⇒ Object
is_valid reports whether verification succeeded.
-
#issuer ⇒ Object
The configured token issuer for this project.
-
#key_id ⇒ Object
Returns the value of attribute key_id.
-
#metadata ⇒ Object
metadata mirrors the metadata stored on the verified key.
-
#rate_limit_policy ⇒ Object
Returns the value of attribute rate_limit_policy.
-
#rate_limit_remaining ⇒ Object
Approximate number of requests available before the rate limit is reached (commercial-only, only set when enforcement is active).
-
#rate_limit_reset_time ⇒ Object
Time when the rate limiter returns to full capacity (all quota recovered).
-
#scopes ⇒ Object
Returns the value of attribute scopes.
-
#status ⇒ Object
Returns the value of attribute status.
-
#visibility ⇒ Object
Returns the value of attribute visibility.
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 = {}) ⇒ VerifyApiKeyResponse
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 = {}) ⇒ VerifyApiKeyResponse
Initializes the object
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 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 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 136 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `OryClient::VerifyApiKeyResponse` 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 `OryClient::VerifyApiKeyResponse`. 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?(:'actor_id') self.actor_id = attributes[:'actor_id'] end if attributes.key?(:'audiences') if (value = attributes[:'audiences']).is_a?(Array) self.audiences = value end end if attributes.key?(:'error_code') self.error_code = attributes[:'error_code'] else self.error_code = 'VERIFICATION_ERROR_UNSPECIFIED' end if attributes.key?(:'error_message') self. = attributes[:'error_message'] end if attributes.key?(:'expire_time') self.expire_time = attributes[:'expire_time'] end if attributes.key?(:'is_valid') self.is_valid = attributes[:'is_valid'] end if attributes.key?(:'issuer') self.issuer = attributes[:'issuer'] end if attributes.key?(:'key_id') self.key_id = attributes[:'key_id'] end if attributes.key?(:'metadata') self. = attributes[:'metadata'] end if attributes.key?(:'rate_limit_policy') self.rate_limit_policy = attributes[:'rate_limit_policy'] end if attributes.key?(:'rate_limit_remaining') self.rate_limit_remaining = attributes[:'rate_limit_remaining'] end if attributes.key?(:'rate_limit_reset_time') self.rate_limit_reset_time = attributes[:'rate_limit_reset_time'] end if attributes.key?(:'scopes') if (value = attributes[:'scopes']).is_a?(Array) self.scopes = value end end if attributes.key?(:'status') self.status = attributes[:'status'] else self.status = 'KEY_STATUS_UNSPECIFIED' end if attributes.key?(:'visibility') self.visibility = attributes[:'visibility'] else self.visibility = 'KEY_VISIBILITY_UNSPECIFIED' end end |
Instance Attribute Details
#actor_id ⇒ Object
Returns the value of attribute actor_id.
18 19 20 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 18 def actor_id @actor_id end |
#audiences ⇒ Object
audiences lists the recipients the verified credential names. Empty for credentials that name none, including every API key.
21 22 23 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 21 def audiences @audiences end |
#error_code ⇒ Object
Returns the value of attribute error_code.
23 24 25 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 23 def error_code @error_code end |
#error_message ⇒ Object
Returns the value of attribute error_message.
25 26 27 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 25 def @error_message end |
#expire_time ⇒ Object
Returns the value of attribute expire_time.
27 28 29 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 27 def expire_time @expire_time end |
#is_valid ⇒ Object
is_valid reports whether verification succeeded. It is true only when the credential parses, the signature checks out, the key was found, all policy gates (expiry, revocation, IP allowlist, rate limit) pass, and the key's status is KEY_STATUS_ACTIVE. When false, error_code and error_message describe the reason. Use this field for authentication decisions; use status to inspect lifecycle state independently.
30 31 32 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 30 def is_valid @is_valid end |
#issuer ⇒ Object
The configured token issuer for this project. For derived tokens (JWT/macaroon), this matches the iss claim embedded in the verified token.
33 34 35 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 33 def issuer @issuer end |
#key_id ⇒ Object
Returns the value of attribute key_id.
35 36 37 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 35 def key_id @key_id end |
#metadata ⇒ Object
metadata mirrors the metadata stored on the verified key. AIP-148 metadata field.
38 39 40 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 38 def @metadata end |
#rate_limit_policy ⇒ Object
Returns the value of attribute rate_limit_policy.
40 41 42 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 40 def rate_limit_policy @rate_limit_policy end |
#rate_limit_remaining ⇒ Object
Approximate number of requests available before the rate limit is reached (commercial-only, only set when enforcement is active).
43 44 45 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 43 def rate_limit_remaining @rate_limit_remaining end |
#rate_limit_reset_time ⇒ Object
Time when the rate limiter returns to full capacity (all quota recovered).
46 47 48 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 46 def rate_limit_reset_time @rate_limit_reset_time end |
#scopes ⇒ Object
Returns the value of attribute scopes.
48 49 50 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 48 def scopes @scopes end |
#status ⇒ Object
Returns the value of attribute status.
50 51 52 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 50 def status @status end |
#visibility ⇒ Object
Returns the value of attribute visibility.
52 53 54 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 52 def visibility @visibility end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
98 99 100 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 98 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
103 104 105 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 103 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 77 def self.attribute_map { :'actor_id' => :'actor_id', :'audiences' => :'audiences', :'error_code' => :'error_code', :'error_message' => :'error_message', :'expire_time' => :'expire_time', :'is_valid' => :'is_valid', :'issuer' => :'issuer', :'key_id' => :'key_id', :'metadata' => :'metadata', :'rate_limit_policy' => :'rate_limit_policy', :'rate_limit_remaining' => :'rate_limit_remaining', :'rate_limit_reset_time' => :'rate_limit_reset_time', :'scopes' => :'scopes', :'status' => :'status', :'visibility' => :'visibility' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 273 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
129 130 131 132 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 129 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 108 def self.openapi_types { :'actor_id' => :'String', :'audiences' => :'Array<String>', :'error_code' => :'VerificationErrorCode', :'error_message' => :'String', :'expire_time' => :'Time', :'is_valid' => :'Boolean', :'issuer' => :'String', :'key_id' => :'String', :'metadata' => :'Object', :'rate_limit_policy' => :'RateLimitPolicy', :'rate_limit_remaining' => :'String', :'rate_limit_reset_time' => :'Time', :'scopes' => :'Array<String>', :'status' => :'KeyStatus', :'visibility' => :'KeyVisibility' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 238 def ==(o) return true if self.equal?(o) self.class == o.class && actor_id == o.actor_id && audiences == o.audiences && error_code == o.error_code && == o. && expire_time == o.expire_time && is_valid == o.is_valid && issuer == o.issuer && key_id == o.key_id && == o. && rate_limit_policy == o.rate_limit_policy && rate_limit_remaining == o.rate_limit_remaining && rate_limit_reset_time == o.rate_limit_reset_time && scopes == o.scopes && status == o.status && visibility == o.visibility end |
#eql?(o) ⇒ Boolean
260 261 262 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 260 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
266 267 268 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 266 def hash [actor_id, audiences, error_code, , expire_time, is_valid, issuer, key_id, , rate_limit_policy, rate_limit_remaining, rate_limit_reset_time, scopes, status, visibility].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
223 224 225 226 227 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 223 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
295 296 297 298 299 300 301 302 303 304 305 306 307 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 295 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
231 232 233 234 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 231 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |