Class: NutanixVmm::IamV40AuthnBucketsAccessKey
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- NutanixVmm::IamV40AuthnBucketsAccessKey
- Defined in:
- lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb
Overview
Information of bucket access key.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#access_key_name ⇒ Object
Name of the bucket access key.
-
#assigned_to ⇒ Object
External client to whom this key is allocated.
-
#created_by ⇒ Object
Service account user who created the buckets access key.
-
#created_time ⇒ Object
Creation time for the bucket access key.
-
#creation_type ⇒ Object
Returns the value of attribute creation_type.
-
#expiry_time ⇒ Object
The expiry time of the buckets access Key.
-
#ext_id ⇒ Object
A globally unique identifier of an instance that is suitable for external consumption.
-
#last_updated_by ⇒ Object
Entity that updated the buckets access key.
-
#last_updated_time ⇒ Object
Creation time for the bucket access key.
-
#links ⇒ Object
A HATEOAS style link for the response.
-
#secret_access_key ⇒ Object
This represents secret access key, which will be returned only during access key creation.
-
#status ⇒ Object
Returns the value of attribute status.
-
#tenant_id ⇒ Object
A globally unique identifier that represents the tenant that owns this entity.
-
#user_id ⇒ Object
User identifier who owns the bucket access key.
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_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3).
-
.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 = {}) ⇒ IamV40AuthnBucketsAccessKey
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 = {}) ⇒ IamV40AuthnBucketsAccessKey
Initializes the object
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 220 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 147 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `NutanixVmm::IamV40AuthnBucketsAccessKey` 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 `NutanixVmm::IamV40AuthnBucketsAccessKey`. 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?(:'tenant_id') self.tenant_id = attributes[:'tenant_id'] end if attributes.key?(:'ext_id') self.ext_id = attributes[:'ext_id'] end if attributes.key?(:'links') if (value = attributes[:'links']).is_a?(Array) self.links = value end end if attributes.key?(:'access_key_name') self.access_key_name = attributes[:'access_key_name'] else self.access_key_name = nil end if attributes.key?(:'secret_access_key') self.secret_access_key = attributes[:'secret_access_key'] end if attributes.key?(:'user_id') self.user_id = attributes[:'user_id'] end if attributes.key?(:'created_time') self.created_time = attributes[:'created_time'] end if attributes.key?(:'last_updated_by') self.last_updated_by = attributes[:'last_updated_by'] end if attributes.key?(:'assigned_to') self.assigned_to = attributes[:'assigned_to'] end if attributes.key?(:'creation_type') self.creation_type = attributes[:'creation_type'] end if attributes.key?(:'expiry_time') self.expiry_time = attributes[:'expiry_time'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'created_by') self.created_by = attributes[:'created_by'] end if attributes.key?(:'last_updated_time') self.last_updated_time = attributes[:'last_updated_time'] end end |
Instance Attribute Details
#access_key_name ⇒ Object
Name of the bucket access key.
29 30 31 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 29 def access_key_name @access_key_name end |
#assigned_to ⇒ Object
External client to whom this key is allocated.
44 45 46 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 44 def assigned_to @assigned_to end |
#created_by ⇒ Object
Service account user who created the buckets access key.
54 55 56 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 54 def created_by @created_by end |
#created_time ⇒ Object
Creation time for the bucket access key.
38 39 40 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 38 def created_time @created_time end |
#creation_type ⇒ Object
Returns the value of attribute creation_type.
46 47 48 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 46 def creation_type @creation_type end |
#expiry_time ⇒ Object
The expiry time of the buckets access Key.
49 50 51 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 49 def expiry_time @expiry_time end |
#ext_id ⇒ Object
A globally unique identifier of an instance that is suitable for external consumption.
23 24 25 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 23 def ext_id @ext_id end |
#last_updated_by ⇒ Object
Entity that updated the buckets access key.
41 42 43 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 41 def last_updated_by @last_updated_by end |
#last_updated_time ⇒ Object
Creation time for the bucket access key.
57 58 59 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 57 def last_updated_time @last_updated_time end |
#links ⇒ Object
A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource.
26 27 28 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 26 def links @links end |
#secret_access_key ⇒ Object
This represents secret access key, which will be returned only during access key creation.
32 33 34 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 32 def secret_access_key @secret_access_key end |
#status ⇒ Object
Returns the value of attribute status.
51 52 53 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 51 def status @status end |
#tenant_id ⇒ Object
A globally unique identifier that represents the tenant that owns this entity. The system automatically assigns it, and it and is immutable from an API consumer perspective (some use cases may cause this Id to change - For instance, a use case may require the transfer of ownership of the entity, but these cases are handled automatically on the server).
20 21 22 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 20 def tenant_id @tenant_id end |
#user_id ⇒ Object
User identifier who owns the bucket access key.
35 36 37 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 35 def user_id @user_id end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
102 103 104 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 102 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
107 108 109 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 107 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 82 def self.attribute_map { :'tenant_id' => :'tenantId', :'ext_id' => :'extId', :'links' => :'links', :'access_key_name' => :'accessKeyName', :'secret_access_key' => :'secretAccessKey', :'user_id' => :'userId', :'created_time' => :'createdTime', :'last_updated_by' => :'lastUpdatedBy', :'assigned_to' => :'assignedTo', :'creation_type' => :'creationType', :'expiry_time' => :'expiryTime', :'status' => :'status', :'created_by' => :'createdBy', :'last_updated_time' => :'lastUpdatedTime' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 474 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_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3)
139 140 141 142 143 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 139 def self.openapi_all_of [ :'CommonV10ResponseExternalizableAbstractModel' ] end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
132 133 134 135 136 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 132 def self.openapi_nullable Set.new([ :'ext_id', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 112 def self.openapi_types { :'tenant_id' => :'String', :'ext_id' => :'String', :'links' => :'Array<CommonV10ResponseApiLink>', :'access_key_name' => :'String', :'secret_access_key' => :'String', :'user_id' => :'String', :'created_time' => :'Time', :'last_updated_by' => :'String', :'assigned_to' => :'String', :'creation_type' => :'IamV40AuthnCreationType', :'expiry_time' => :'Time', :'status' => :'IamV40AuthnBucketsAccessKeyStatusType', :'created_by' => :'String', :'last_updated_time' => :'Time' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 440 def ==(o) return true if self.equal?(o) self.class == o.class && tenant_id == o.tenant_id && ext_id == o.ext_id && links == o.links && access_key_name == o.access_key_name && secret_access_key == o.secret_access_key && user_id == o.user_id && created_time == o.created_time && last_updated_by == o.last_updated_by && assigned_to == o.assigned_to && creation_type == o.creation_type && expiry_time == o.expiry_time && status == o.status && created_by == o.created_by && last_updated_time == o.last_updated_time end |
#eql?(o) ⇒ Boolean
461 462 463 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 461 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
467 468 469 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 467 def hash [tenant_id, ext_id, links, access_key_name, secret_access_key, user_id, created_time, last_updated_by, assigned_to, creation_type, expiry_time, status, created_by, last_updated_time].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 224 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if !@tenant_id.nil? && @tenant_id !~ pattern invalid_properties.push("invalid value for \"tenant_id\", must conform to the pattern #{pattern}.") end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if !@ext_id.nil? && @ext_id !~ pattern invalid_properties.push("invalid value for \"ext_id\", must conform to the pattern #{pattern}.") end if !@links.nil? && @links.length > 20 invalid_properties.push('invalid value for "links", number of items must be less than or equal to 20.') end if !@links.nil? && @links.length < 0 invalid_properties.push('invalid value for "links", number of items must be greater than or equal to 0.') end if @access_key_name.nil? invalid_properties.push('invalid value for "access_key_name", access_key_name cannot be nil.') end if @access_key_name.to_s.length > 255 invalid_properties.push('invalid value for "access_key_name", the character length must be smaller than or equal to 255.') end if @access_key_name.to_s.length < 1 invalid_properties.push('invalid value for "access_key_name", the character length must be greater than or equal to 1.') end pattern = Regexp.new(/^[^<>;'()&+%\/\\"`]*$/) if @access_key_name !~ pattern invalid_properties.push("invalid value for \"access_key_name\", must conform to the pattern #{pattern}.") end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if !@user_id.nil? && @user_id !~ pattern invalid_properties.push("invalid value for \"user_id\", must conform to the pattern #{pattern}.") end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if !@last_updated_by.nil? && @last_updated_by !~ pattern invalid_properties.push("invalid value for \"last_updated_by\", must conform to the pattern #{pattern}.") end if !@assigned_to.nil? && @assigned_to.to_s.length > 255 invalid_properties.push('invalid value for "assigned_to", the character length must be smaller than or equal to 255.') end if !@assigned_to.nil? && @assigned_to.to_s.length < 3 invalid_properties.push('invalid value for "assigned_to", the character length must be greater than or equal to 3.') end pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) if !@created_by.nil? && @created_by !~ pattern invalid_properties.push("invalid value for \"created_by\", must conform to the pattern #{pattern}.") end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
496 497 498 499 500 501 502 503 504 505 506 507 508 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 496 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
290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 |
# File 'lib/nutanix_vmm/models/iam_v40_authn_buckets_access_key.rb', line 290 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if !@tenant_id.nil? && @tenant_id !~ Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) return false if !@ext_id.nil? && @ext_id !~ Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) return false if !@links.nil? && @links.length > 20 return false if !@links.nil? && @links.length < 0 return false if @access_key_name.nil? return false if @access_key_name.to_s.length > 255 return false if @access_key_name.to_s.length < 1 return false if @access_key_name !~ Regexp.new(/^[^<>;'()&+%\/\\"`]*$/) return false if !@user_id.nil? && @user_id !~ Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) return false if !@last_updated_by.nil? && @last_updated_by !~ Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) return false if !@assigned_to.nil? && @assigned_to.to_s.length > 255 return false if !@assigned_to.nil? && @assigned_to.to_s.length < 3 return false if !@created_by.nil? && @created_by !~ Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/) true end |