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.
-
#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
131 132 133 134 135 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 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 131 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?(:'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 |
#error_code ⇒ Object
Returns the value of attribute error_code.
20 21 22 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 20 def error_code @error_code end |
#error_message ⇒ Object
Returns the value of attribute error_message.
22 23 24 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 22 def @error_message end |
#expire_time ⇒ Object
Returns the value of attribute expire_time.
24 25 26 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 24 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.
27 28 29 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 27 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.
30 31 32 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 30 def issuer @issuer end |
#key_id ⇒ Object
Returns the value of attribute key_id.
32 33 34 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 32 def key_id @key_id end |
#metadata ⇒ Object
metadata mirrors the metadata stored on the verified key. AIP-148 metadata field.
35 36 37 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 35 def @metadata end |
#rate_limit_policy ⇒ Object
Returns the value of attribute rate_limit_policy.
37 38 39 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 37 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).
40 41 42 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 40 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).
43 44 45 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 43 def rate_limit_reset_time @rate_limit_reset_time end |
#scopes ⇒ Object
Returns the value of attribute scopes.
45 46 47 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 45 def scopes @scopes end |
#status ⇒ Object
Returns the value of attribute status.
47 48 49 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 47 def status @status end |
#visibility ⇒ Object
Returns the value of attribute visibility.
49 50 51 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 49 def visibility @visibility end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
94 95 96 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 94 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
99 100 101 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 99 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 74 def self.attribute_map { :'actor_id' => :'actor_id', :'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
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 261 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
124 125 126 127 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 124 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 104 def self.openapi_types { :'actor_id' => :'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.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 227 def ==(o) return true if self.equal?(o) self.class == o.class && actor_id == o.actor_id && 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
248 249 250 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 248 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
254 255 256 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 254 def hash [actor_id, 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?
212 213 214 215 216 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 212 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
283 284 285 286 287 288 289 290 291 292 293 294 295 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 283 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
220 221 222 223 |
# File 'lib/ory-client/models/verify_api_key_response.rb', line 220 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |