Class: OryClient::AdminUpdateIssuedAPIKeyRequest
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- OryClient::AdminUpdateIssuedAPIKeyRequest
- Defined in:
- lib/ory-client/models/admin_update_issued_api_key_request.rb
Overview
IssuedAPIKey represents an API key issued (generated) by Talos. Root keys are opaque v1 format tokens stored in the database. Derived tokens (JWT/Macaroon) are created via DeriveToken and are stateless (not stored).
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#actor_id ⇒ Object
Returns the value of attribute actor_id.
-
#create_time ⇒ Object
Returns the value of attribute create_time.
-
#expire_time ⇒ Object
Returns the value of attribute expire_time.
-
#ip_restriction ⇒ Object
Returns the value of attribute ip_restriction.
-
#last_used_time ⇒ Object
Returns the value of attribute last_used_time.
-
#metadata ⇒ Object
metadata is a free-form JSON object for caller-defined attributes (e.g., source, environment, tags).
-
#name ⇒ Object
Returns the value of attribute name.
-
#rate_limit_policy ⇒ Object
Returns the value of attribute rate_limit_policy.
-
#revocation_description ⇒ Object
revocation_description provides free-form context for a revocation.
-
#revocation_reason ⇒ Object
Returns the value of attribute revocation_reason.
-
#scopes ⇒ Object
Returns the value of attribute scopes.
-
#status ⇒ Object
Returns the value of attribute status.
-
#update_time ⇒ Object
Returns the value of attribute update_time.
-
#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 = {}) ⇒ AdminUpdateIssuedAPIKeyRequest
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 = {}) ⇒ AdminUpdateIssuedAPIKeyRequest
Initializes the object
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 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 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 129 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `OryClient::AdminUpdateIssuedAPIKeyRequest` 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::AdminUpdateIssuedAPIKeyRequest`. 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?(:'create_time') self.create_time = attributes[:'create_time'] end if attributes.key?(:'expire_time') self.expire_time = attributes[:'expire_time'] end if attributes.key?(:'ip_restriction') self.ip_restriction = attributes[:'ip_restriction'] end if attributes.key?(:'last_used_time') self.last_used_time = attributes[:'last_used_time'] end if attributes.key?(:'metadata') self. = attributes[:'metadata'] end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'rate_limit_policy') self.rate_limit_policy = attributes[:'rate_limit_policy'] end if attributes.key?(:'revocation_description') self.revocation_description = attributes[:'revocation_description'] end if attributes.key?(:'revocation_reason') self.revocation_reason = attributes[:'revocation_reason'] else self.revocation_reason = 'REVOCATION_REASON_UNSPECIFIED' 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?(:'update_time') self.update_time = attributes[:'update_time'] 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.
19 20 21 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 19 def actor_id @actor_id end |
#create_time ⇒ Object
Returns the value of attribute create_time.
21 22 23 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 21 def create_time @create_time end |
#expire_time ⇒ Object
Returns the value of attribute expire_time.
23 24 25 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 23 def expire_time @expire_time end |
#ip_restriction ⇒ Object
Returns the value of attribute ip_restriction.
25 26 27 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 25 def ip_restriction @ip_restriction end |
#last_used_time ⇒ Object
Returns the value of attribute last_used_time.
27 28 29 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 27 def last_used_time @last_used_time end |
#metadata ⇒ Object
metadata is a free-form JSON object for caller-defined attributes (e.g., source, environment, tags). Values may be strings, numbers, booleans, arrays, objects, or null. Total serialized size is capped at 4KB. AIP-148 metadata field.
30 31 32 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 30 def @metadata end |
#name ⇒ Object
Returns the value of attribute name.
32 33 34 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 32 def name @name end |
#rate_limit_policy ⇒ Object
Returns the value of attribute rate_limit_policy.
34 35 36 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 34 def rate_limit_policy @rate_limit_policy end |
#revocation_description ⇒ Object
revocation_description provides free-form context for a revocation. Only set when revocation_reason is PRIVILEGE_WITHDRAWN. JSON API change: field was formerly revocation_reason_text. Field number 13 is unchanged so the change is wire-compatible for binary proto encoding.
37 38 39 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 37 def revocation_description @revocation_description end |
#revocation_reason ⇒ Object
Returns the value of attribute revocation_reason.
39 40 41 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 39 def revocation_reason @revocation_reason end |
#scopes ⇒ Object
Returns the value of attribute scopes.
41 42 43 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 41 def scopes @scopes end |
#status ⇒ Object
Returns the value of attribute status.
43 44 45 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 43 def status @status end |
#update_time ⇒ Object
Returns the value of attribute update_time.
45 46 47 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 45 def update_time @update_time end |
#visibility ⇒ Object
Returns the value of attribute visibility.
47 48 49 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 47 def visibility @visibility end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
92 93 94 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 92 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
97 98 99 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 97 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 72 def self.attribute_map { :'actor_id' => :'actor_id', :'create_time' => :'create_time', :'expire_time' => :'expire_time', :'ip_restriction' => :'ip_restriction', :'last_used_time' => :'last_used_time', :'metadata' => :'metadata', :'name' => :'name', :'rate_limit_policy' => :'rate_limit_policy', :'revocation_description' => :'revocation_description', :'revocation_reason' => :'revocation_reason', :'scopes' => :'scopes', :'status' => :'status', :'update_time' => :'update_time', :'visibility' => :'visibility' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 259 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
122 123 124 125 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 122 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 102 def self.openapi_types { :'actor_id' => :'String', :'create_time' => :'Time', :'expire_time' => :'Time', :'ip_restriction' => :'IPRestriction', :'last_used_time' => :'Time', :'metadata' => :'Object', :'name' => :'String', :'rate_limit_policy' => :'RateLimitPolicy', :'revocation_description' => :'String', :'revocation_reason' => :'RevocationReason', :'scopes' => :'Array<String>', :'status' => :'KeyStatus', :'update_time' => :'Time', :'visibility' => :'KeyVisibility' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 225 def ==(o) return true if self.equal?(o) self.class == o.class && actor_id == o.actor_id && create_time == o.create_time && expire_time == o.expire_time && ip_restriction == o.ip_restriction && last_used_time == o.last_used_time && == o. && name == o.name && rate_limit_policy == o.rate_limit_policy && revocation_description == o.revocation_description && revocation_reason == o.revocation_reason && scopes == o.scopes && status == o.status && update_time == o.update_time && visibility == o.visibility end |
#eql?(o) ⇒ Boolean
246 247 248 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 246 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
252 253 254 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 252 def hash [actor_id, create_time, expire_time, ip_restriction, last_used_time, , name, rate_limit_policy, revocation_description, revocation_reason, scopes, status, update_time, visibility].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
210 211 212 213 214 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 210 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
281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 281 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
218 219 220 221 |
# File 'lib/ory-client/models/admin_update_issued_api_key_request.rb', line 218 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |