Class: NutanixVmm::VmmV40ContentTemplateUser

Inherits:
ApiModelBase show all
Defined in:
lib/nutanix_vmm/models/vmm_v40_content_template_user.rb

Overview

Details for the user who created or modified the template.

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiModelBase

_deserialize, #_to_hash, #to_body, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ VmmV40ContentTemplateUser

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
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/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 201

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `NutanixVmm::VmmV40ContentTemplateUser` 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::VmmV40ContentTemplateUser`. 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?(:'username')
    self.username = attributes[:'username']
  else
    self.username = nil
  end

  if attributes.key?(:'user_type')
    self.user_type = attributes[:'user_type']
  else
    self.user_type = nil
  end

  if attributes.key?(:'idp_id')
    self.idp_id = attributes[:'idp_id']
  end

  if attributes.key?(:'display_name')
    self.display_name = attributes[:'display_name']
  end

  if attributes.key?(:'first_name')
    self.first_name = attributes[:'first_name']
  end

  if attributes.key?(:'middle_initial')
    self.middle_initial = attributes[:'middle_initial']
  end

  if attributes.key?(:'last_name')
    self.last_name = attributes[:'last_name']
  end

  if attributes.key?(:'email_id')
    self.email_id = attributes[:'email_id']
  end

  if attributes.key?(:'locale')
    self.locale = attributes[:'locale']
  end

  if attributes.key?(:'region')
    self.region = attributes[:'region']
  end

  if attributes.key?(:'password')
    self.password = attributes[:'password']
  end

  if attributes.key?(:'is_force_reset_password_enabled')
    self.is_force_reset_password_enabled = attributes[:'is_force_reset_password_enabled']
  end

  if attributes.key?(:'additional_attributes')
    if (value = attributes[:'additional_attributes']).is_a?(Array)
      self.additional_attributes = value
    end
  end

  if attributes.key?(:'status')
    self.status = attributes[:'status']
  end

  if attributes.key?(:'buckets_access_keys')
    if (value = attributes[:'buckets_access_keys']).is_a?(Array)
      self.buckets_access_keys = value
    end
  end

  if attributes.key?(:'last_login_time')
    self. = attributes[:'last_login_time']
  end

  if attributes.key?(:'created_time')
    self.created_time = attributes[:'created_time']
  end

  if attributes.key?(:'last_updated_time')
    self.last_updated_time = attributes[:'last_updated_time']
  end

  if attributes.key?(:'created_by')
    self.created_by = attributes[:'created_by']
  end

  if attributes.key?(:'last_updated_by')
    self.last_updated_by = attributes[:'last_updated_by']
  end

  if attributes.key?(:'description')
    self.description = attributes[:'description']
  end

  if attributes.key?(:'creation_type')
    self.creation_type = attributes[:'creation_type']
  end
end

Instance Attribute Details

#additional_attributesObject

Indicates additional attributes of the user.



64
65
66
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 64

def additional_attributes
  @additional_attributes
end

#buckets_access_keysObject

Bucket access keys for the user.



69
70
71
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 69

def buckets_access_keys
  @buckets_access_keys
end

#created_byObject

User or Service who created the user.



81
82
83
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 81

def created_by
  @created_by
end

#created_timeObject

Creation time of the user.



75
76
77
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 75

def created_time
  @created_time
end

#creation_typeObject

Returns the value of attribute creation_type.



89
90
91
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 89

def creation_type
  @creation_type
end

#descriptionObject

Description of the user.



87
88
89
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 87

def description
  @description
end

#display_nameObject

Display name of the user. For LDAP and SAML users, this is set from AD config.



37
38
39
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 37

def display_name
  @display_name
end

#email_idObject

Email ID of the user.



49
50
51
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 49

def email_id
  @email_id
end

#ext_idObject

A globally unique identifier of an instance that is suitable for external consumption.



23
24
25
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 23

def ext_id
  @ext_id
end

#first_nameObject

First name of the user.



40
41
42
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 40

def first_name
  @first_name
end

#idp_idObject

Identifier of the IDP for the user.



34
35
36
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 34

def idp_id
  @idp_id
end

#is_force_reset_password_enabledObject

Flag to force the user to reset password.



61
62
63
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 61

def is_force_reset_password_enabled
  @is_force_reset_password_enabled
end

#last_login_timeObject

The last successful login time for the user.



72
73
74
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 72

def 
  @last_login_time
end

#last_nameObject

Last name of the user.



46
47
48
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 46

def last_name
  @last_name
end

#last_updated_byObject

Last updated by this user ID.



84
85
86
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 84

def last_updated_by
  @last_updated_by
end

#last_updated_timeObject

The last updated time for the user.



78
79
80
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 78

def last_updated_time
  @last_updated_time
end

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/vmm_v40_content_template_user.rb', line 26

def links
  @links
end

#localeObject

Default locale of the user.



52
53
54
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 52

def locale
  @locale
end

#middle_initialObject

Middle name of the user.



43
44
45
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 43

def middle_initial
  @middle_initial
end

#passwordObject

Password of the user.



58
59
60
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 58

def password
  @password
end

#regionObject

Default region of the user.



55
56
57
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 55

def region
  @region
end

#statusObject

Returns the value of attribute status.



66
67
68
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 66

def status
  @status
end

#tenant_idObject

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/vmm_v40_content_template_user.rb', line 20

def tenant_id
  @tenant_id
end

#user_typeObject

Returns the value of attribute user_type.



31
32
33
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 31

def user_type
  @user_type
end

#usernameObject

Identifier of the user.



29
30
31
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 29

def username
  @username
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



145
146
147
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 145

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



150
151
152
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 150

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 114

def self.attribute_map
  {
    :'tenant_id' => :'tenantId',
    :'ext_id' => :'extId',
    :'links' => :'links',
    :'username' => :'username',
    :'user_type' => :'userType',
    :'idp_id' => :'idpId',
    :'display_name' => :'displayName',
    :'first_name' => :'firstName',
    :'middle_initial' => :'middleInitial',
    :'last_name' => :'lastName',
    :'email_id' => :'emailId',
    :'locale' => :'locale',
    :'region' => :'region',
    :'password' => :'password',
    :'is_force_reset_password_enabled' => :'isForceResetPasswordEnabled',
    :'additional_attributes' => :'additionalAttributes',
    :'status' => :'status',
    :'buckets_access_keys' => :'bucketsAccessKeys',
    :'last_login_time' => :'lastLoginTime',
    :'created_time' => :'createdTime',
    :'last_updated_time' => :'lastUpdatedTime',
    :'created_by' => :'createdBy',
    :'last_updated_by' => :'lastUpdatedBy',
    :'description' => :'description',
    :'creation_type' => :'creationType'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 818

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_ofObject

List of class defined in allOf (OpenAPI v3)



193
194
195
196
197
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 193

def self.openapi_all_of
  [
  :'IamV40AuthnUser'
  ]
end

.openapi_nullableObject

List of attributes with nullable: true



186
187
188
189
190
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 186

def self.openapi_nullable
  Set.new([
    :'ext_id',
  ])
end

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 155

def self.openapi_types
  {
    :'tenant_id' => :'String',
    :'ext_id' => :'String',
    :'links' => :'Array<CommonV10ResponseApiLink>',
    :'username' => :'String',
    :'user_type' => :'IamV40AuthnUserType',
    :'idp_id' => :'String',
    :'display_name' => :'String',
    :'first_name' => :'String',
    :'middle_initial' => :'String',
    :'last_name' => :'String',
    :'email_id' => :'String',
    :'locale' => :'String',
    :'region' => :'String',
    :'password' => :'String',
    :'is_force_reset_password_enabled' => :'Boolean',
    :'additional_attributes' => :'Array<CommonV10ConfigKVPair>',
    :'status' => :'IamV40AuthnUserStatusType',
    :'buckets_access_keys' => :'Array<IamV40AuthnBucketsAccessKey>',
    :'last_login_time' => :'Time',
    :'created_time' => :'Time',
    :'last_updated_time' => :'Time',
    :'created_by' => :'String',
    :'last_updated_by' => :'String',
    :'description' => :'String',
    :'creation_type' => :'IamV40AuthnCreationType'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 773

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 &&
      username == o.username &&
      user_type == o.user_type &&
      idp_id == o.idp_id &&
      display_name == o.display_name &&
      first_name == o.first_name &&
      middle_initial == o.middle_initial &&
      last_name == o.last_name &&
      email_id == o.email_id &&
      locale == o.locale &&
      region == o.region &&
      password == o.password &&
      is_force_reset_password_enabled == o.is_force_reset_password_enabled &&
      additional_attributes == o.additional_attributes &&
      status == o.status &&
      buckets_access_keys == o.buckets_access_keys &&
       == o. &&
      created_time == o.created_time &&
      last_updated_time == o.last_updated_time &&
      created_by == o.created_by &&
      last_updated_by == o.last_updated_by &&
      description == o.description &&
      creation_type == o.creation_type
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


805
806
807
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 805

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



811
812
813
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 811

def hash
  [tenant_id, ext_id, links, username, user_type, idp_id, display_name, first_name, middle_initial, last_name, email_id, locale, region, password, is_force_reset_password_enabled, additional_attributes, status, buckets_access_keys, , created_time, last_updated_time, created_by, last_updated_by, description, creation_type].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 328

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 @username.nil?
    invalid_properties.push('invalid value for "username", username cannot be nil.')
  end

  if @username.to_s.length > 255
    invalid_properties.push('invalid value for "username", the character length must be smaller than or equal to 255.')
  end

  if @username.to_s.length < 1
    invalid_properties.push('invalid value for "username", the character length must be greater than or equal to 1.')
  end

  pattern = Regexp.new(/^[^<>;'()&+%\/\\"`]*$/)
  if @username !~ pattern
    invalid_properties.push("invalid value for \"username\", must conform to the pattern #{pattern}.")
  end

  if @user_type.nil?
    invalid_properties.push('invalid value for "user_type", user_type cannot be nil.')
  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 !@idp_id.nil? && @idp_id !~ pattern
    invalid_properties.push("invalid value for \"idp_id\", must conform to the pattern #{pattern}.")
  end

  if !@display_name.nil? && @display_name.to_s.length > 255
    invalid_properties.push('invalid value for "display_name", the character length must be smaller than or equal to 255.')
  end

  if !@display_name.nil? && @display_name.to_s.length < 1
    invalid_properties.push('invalid value for "display_name", the character length must be greater than or equal to 1.')
  end

  pattern = Regexp.new(/^[^<>;'()&+%\/\\"`]*$/)
  if !@display_name.nil? && @display_name !~ pattern
    invalid_properties.push("invalid value for \"display_name\", must conform to the pattern #{pattern}.")
  end

  if !@first_name.nil? && @first_name.to_s.length > 255
    invalid_properties.push('invalid value for "first_name", the character length must be smaller than or equal to 255.')
  end

  if !@first_name.nil? && @first_name.to_s.length < 1
    invalid_properties.push('invalid value for "first_name", the character length must be greater than or equal to 1.')
  end

  pattern = Regexp.new(/^[^<>;'()&+%\/\\"`]*$/)
  if !@first_name.nil? && @first_name !~ pattern
    invalid_properties.push("invalid value for \"first_name\", must conform to the pattern #{pattern}.")
  end

  if !@middle_initial.nil? && @middle_initial.to_s.length > 255
    invalid_properties.push('invalid value for "middle_initial", the character length must be smaller than or equal to 255.')
  end

  if !@middle_initial.nil? && @middle_initial.to_s.length < 1
    invalid_properties.push('invalid value for "middle_initial", the character length must be greater than or equal to 1.')
  end

  pattern = Regexp.new(/^[^<>;'()&+%\/\\"`]*$/)
  if !@middle_initial.nil? && @middle_initial !~ pattern
    invalid_properties.push("invalid value for \"middle_initial\", must conform to the pattern #{pattern}.")
  end

  if !@last_name.nil? && @last_name.to_s.length > 255
    invalid_properties.push('invalid value for "last_name", the character length must be smaller than or equal to 255.')
  end

  if !@last_name.nil? && @last_name.to_s.length < 1
    invalid_properties.push('invalid value for "last_name", the character length must be greater than or equal to 1.')
  end

  pattern = Regexp.new(/^[^<>;'()&+%\/\\"`]*$/)
  if !@last_name.nil? && @last_name !~ pattern
    invalid_properties.push("invalid value for \"last_name\", must conform to the pattern #{pattern}.")
  end

  if !@email_id.nil? && @email_id.to_s.length > 255
    invalid_properties.push('invalid value for "email_id", the character length must be smaller than or equal to 255.')
  end

  pattern = Regexp.new(/^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$/)
  if !@email_id.nil? && @email_id !~ pattern
    invalid_properties.push("invalid value for \"email_id\", must conform to the pattern #{pattern}.")
  end

  if !@additional_attributes.nil? && @additional_attributes.length > 10
    invalid_properties.push('invalid value for "additional_attributes", number of items must be less than or equal to 10.')
  end

  if !@additional_attributes.nil? && @additional_attributes.length < 0
    invalid_properties.push('invalid value for "additional_attributes", number of items must be greater than or equal to 0.')
  end

  if !@buckets_access_keys.nil? && @buckets_access_keys.length > 5
    invalid_properties.push('invalid value for "buckets_access_keys", number of items must be less than or equal to 5.')
  end

  if !@buckets_access_keys.nil? && @buckets_access_keys.length < 0
    invalid_properties.push('invalid value for "buckets_access_keys", number of items must be greater than or equal to 0.')
  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

  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

  invalid_properties
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



840
841
842
843
844
845
846
847
848
849
850
851
852
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 840

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

Returns:

  • (Boolean)

    true if the model is valid



467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
# File 'lib/nutanix_vmm/models/vmm_v40_content_template_user.rb', line 467

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 @username.nil?
  return false if @username.to_s.length > 255
  return false if @username.to_s.length < 1
  return false if @username !~ Regexp.new(/^[^<>;'()&+%\/\\"`]*$/)
  return false if @user_type.nil?
  return false if !@idp_id.nil? && @idp_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 !@display_name.nil? && @display_name.to_s.length > 255
  return false if !@display_name.nil? && @display_name.to_s.length < 1
  return false if !@display_name.nil? && @display_name !~ Regexp.new(/^[^<>;'()&+%\/\\"`]*$/)
  return false if !@first_name.nil? && @first_name.to_s.length > 255
  return false if !@first_name.nil? && @first_name.to_s.length < 1
  return false if !@first_name.nil? && @first_name !~ Regexp.new(/^[^<>;'()&+%\/\\"`]*$/)
  return false if !@middle_initial.nil? && @middle_initial.to_s.length > 255
  return false if !@middle_initial.nil? && @middle_initial.to_s.length < 1
  return false if !@middle_initial.nil? && @middle_initial !~ Regexp.new(/^[^<>;'()&+%\/\\"`]*$/)
  return false if !@last_name.nil? && @last_name.to_s.length > 255
  return false if !@last_name.nil? && @last_name.to_s.length < 1
  return false if !@last_name.nil? && @last_name !~ Regexp.new(/^[^<>;'()&+%\/\\"`]*$/)
  return false if !@email_id.nil? && @email_id.to_s.length > 255
  return false if !@email_id.nil? && @email_id !~ Regexp.new(/^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$/)
  return false if !@additional_attributes.nil? && @additional_attributes.length > 10
  return false if !@additional_attributes.nil? && @additional_attributes.length < 0
  return false if !@buckets_access_keys.nil? && @buckets_access_keys.length > 5
  return false if !@buckets_access_keys.nil? && @buckets_access_keys.length < 0
  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}$/)
  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}$/)
  true
end