Class: ZoomUs::Models::UserUpdate

Inherits:
Object
  • Object
show all
Defined in:
lib/zoom_us/models/user_update.rb

Overview

The user update object represents a user on Zoom.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ UserUpdate

Initializes the object

Parameters:

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

    Model attributes in the form of hash



113
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
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
# File 'lib/zoom_us/models/user_update.rb', line 113

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

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

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

  if attributes.has_key?(:'type')
    self.type = attributes[:'type']
  end

  if attributes.has_key?(:'pmi')
    self.pmi = attributes[:'pmi']
  end

  if attributes.has_key?(:'use_pmi')
    self.use_pmi = attributes[:'use_pmi']
  else
    self.use_pmi = false
  end

  if attributes.has_key?(:'timezone')
    self.timezone = attributes[:'timezone']
  end

  if attributes.has_key?(:'language')
    self.language = attributes[:'language']
  end

  if attributes.has_key?(:'dept')
    self.dept = attributes[:'dept']
  end

  if attributes.has_key?(:'vanity_name')
    self.vanity_name = attributes[:'vanity_name']
  end

  if attributes.has_key?(:'host_key')
    self.host_key = attributes[:'host_key']
  end

  if attributes.has_key?(:'cms_user_id')
    self.cms_user_id = attributes[:'cms_user_id']
  end

  if attributes.has_key?(:'job_title')
    self.job_title = attributes[:'job_title']
  end

  if attributes.has_key?(:'company')
    self.company = attributes[:'company']
  end

  if attributes.has_key?(:'location')
    self.location = attributes[:'location']
  end

  if attributes.has_key?(:'phone_number')
    self.phone_number = attributes[:'phone_number']
  end

  if attributes.has_key?(:'phone_country')
    self.phone_country = attributes[:'phone_country']
  end
end

Instance Attribute Details

#cms_user_idObject

Kaltura user ID.



50
51
52
# File 'lib/zoom_us/models/user_update.rb', line 50

def cms_user_id
  @cms_user_id
end

#companyObject

User’s company.



56
57
58
# File 'lib/zoom_us/models/user_update.rb', line 56

def company
  @company
end

#deptObject

Department for user profile: use for report.



41
42
43
# File 'lib/zoom_us/models/user_update.rb', line 41

def dept
  @dept
end

#first_nameObject

User’s first name. Cannot contain more than 5 Chinese characters.



20
21
22
# File 'lib/zoom_us/models/user_update.rb', line 20

def first_name
  @first_name
end

#host_keyObject

Host key. It should be a 6-10 digit number.



47
48
49
# File 'lib/zoom_us/models/user_update.rb', line 47

def host_key
  @host_key
end

#job_titleObject

User’s job title.



53
54
55
# File 'lib/zoom_us/models/user_update.rb', line 53

def job_title
  @job_title
end

#languageObject

language



38
39
40
# File 'lib/zoom_us/models/user_update.rb', line 38

def language
  @language
end

#last_nameObject

User’s last name. Cannot contain more than 5 Chinese characters.



23
24
25
# File 'lib/zoom_us/models/user_update.rb', line 23

def last_name
  @last_name
end

#locationObject

User’s location.



59
60
61
# File 'lib/zoom_us/models/user_update.rb', line 59

def location
  @location
end

#phone_countryObject

[Country ID](marketplace.zoom.us/docs/api-reference/other-references/abbreviation-lists#countries) of the phone number. For example, if the phone number provided in the ‘phone_number` field is a Brazil based number, the value of the `phone_country` field should be `BR`.



65
66
67
# File 'lib/zoom_us/models/user_update.rb', line 65

def phone_country
  @phone_country
end

#phone_numberObject

Phone number of the user. To update a phone number, you must also provide the ‘phone_country` field.



62
63
64
# File 'lib/zoom_us/models/user_update.rb', line 62

def phone_number
  @phone_number
end

#pmiObject

Personal meeting ID: length must be 10.



29
30
31
# File 'lib/zoom_us/models/user_update.rb', line 29

def pmi
  @pmi
end

#timezoneObject

The time zone ID for a user profile. For this parameter value please refer to the ID value in the [timezone](marketplace.zoom.us/docs/api-reference/other-references/abbreviation-lists#timezones) list.



35
36
37
# File 'lib/zoom_us/models/user_update.rb', line 35

def timezone
  @timezone
end

#typeObject

User types:
‘1` - Basic.
`2` - Licensed.
`3` - On-prem.



26
27
28
# File 'lib/zoom_us/models/user_update.rb', line 26

def type
  @type
end

#use_pmiObject

Use Personal Meeting ID for instant meetings.



32
33
34
# File 'lib/zoom_us/models/user_update.rb', line 32

def use_pmi
  @use_pmi
end

#vanity_nameObject

Personal meeting room name.



44
45
46
# File 'lib/zoom_us/models/user_update.rb', line 44

def vanity_name
  @vanity_name
end

Class Method Details

.attribute_mapObject

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



68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/zoom_us/models/user_update.rb', line 68

def self.attribute_map
  {
    :'first_name' => :'first_name',
    :'last_name' => :'last_name',
    :'type' => :'type',
    :'pmi' => :'pmi',
    :'use_pmi' => :'use_pmi',
    :'timezone' => :'timezone',
    :'language' => :'language',
    :'dept' => :'dept',
    :'vanity_name' => :'vanity_name',
    :'host_key' => :'host_key',
    :'cms_user_id' => :'cms_user_id',
    :'job_title' => :'job_title',
    :'company' => :'company',
    :'location' => :'location',
    :'phone_number' => :'phone_number',
    :'phone_country' => :'phone_country'
  }
end

.swagger_typesObject

Attribute type mapping.



90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/zoom_us/models/user_update.rb', line 90

def self.swagger_types
  {
    :'first_name' => :'String',
    :'last_name' => :'String',
    :'type' => :'Integer',
    :'pmi' => :'Integer',
    :'use_pmi' => :'BOOLEAN',
    :'timezone' => :'String',
    :'language' => :'String',
    :'dept' => :'String',
    :'vanity_name' => :'String',
    :'host_key' => :'String',
    :'cms_user_id' => :'String',
    :'job_title' => :'String',
    :'company' => :'String',
    :'location' => :'String',
    :'phone_number' => :'String',
    :'phone_country' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
# File 'lib/zoom_us/models/user_update.rb', line 300

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
    first_name == o.first_name &&
    last_name == o.last_name &&
    type == o.type &&
    pmi == o.pmi &&
    use_pmi == o.use_pmi &&
    timezone == o.timezone &&
    language == o.language &&
    dept == o.dept &&
    vanity_name == o.vanity_name &&
    host_key == o.host_key &&
    cms_user_id == o.cms_user_id &&
    job_title == o.job_title &&
    company == o.company &&
    location == o.location &&
    phone_number == o.phone_number &&
    phone_country == o.phone_country
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



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
# File 'lib/zoom_us/models/user_update.rb', line 357

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    ::DateTime.parse(value)
  when :Date
    ::Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :BOOLEAN
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = Models.const_get(type).new
    temp_model.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



423
424
425
426
427
428
429
430
431
432
433
434
435
# File 'lib/zoom_us/models/user_update.rb', line 423

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
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



336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
# File 'lib/zoom_us/models/user_update.rb', line 336

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


323
324
325
# File 'lib/zoom_us/models/user_update.rb', line 323

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



329
330
331
# File 'lib/zoom_us/models/user_update.rb', line 329

def hash
  [first_name, last_name, type, pmi, use_pmi, timezone, language, dept, vanity_name, host_key, cms_user_id, job_title, company, location, phone_number, phone_country].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



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/zoom_us/models/user_update.rb', line 188

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

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

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

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

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

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

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

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



403
404
405
# File 'lib/zoom_us/models/user_update.rb', line 403

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



409
410
411
412
413
414
415
416
417
# File 'lib/zoom_us/models/user_update.rb', line 409

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



397
398
399
# File 'lib/zoom_us/models/user_update.rb', line 397

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



223
224
225
226
227
228
229
230
231
232
# File 'lib/zoom_us/models/user_update.rb', line 223

def valid?
  return false if !@first_name.nil? && @first_name.to_s.length > 64
  return false if !@last_name.nil? && @last_name.to_s.length > 64
  return false if !@host_key.nil? && @host_key.to_s.length > 10
  return false if !@host_key.nil? && @host_key.to_s.length < 6
  return false if !@job_title.nil? && @job_title.to_s.length > 128
  return false if !@company.nil? && @company.to_s.length > 255
  return false if !@location.nil? && @location.to_s.length > 256
  true
end