Class: ZoomUs::Models::InlineResponse2001Phones

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

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ InlineResponse2001Phones

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
209
210
211
212
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 139

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?(:'id')
    self.id = attributes[:'id']
  end

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#authorization_nameObject

Authorization name of the user registered for SIP Phone.



64
65
66
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 64

def authorization_name
  @authorization_name
end

#domainObject

The name or IP address of your provider’s SIP domain. (example: CDC.WEB).



25
26
27
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 25

def domain
  @domain
end

#idObject

Unique Identifier of the SIP Phone.



19
20
21
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 19

def id
  @id
end

#passwordObject

The password generated for the user in the SIP account.



61
62
63
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 61

def password
  @password
end

#proxy_serverObject

IP address of the proxy server for SIP requests. Note that if you are using the UDP transport protocol, the default port is 5060. If you are using UDP with a different port number, that port number must be included with the IP address. If you are not using a proxy server, this value can be the same as the Register Server, or empty.



34
35
36
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 34

def proxy_server
  @proxy_server
end

#proxy_server2Object

IP address of the proxy server for SIP requests. Note that if you are using the UDP transport protocol, the default port is 5060. If you are using UDP with a different port number, that port number must be included with the IP address. If you are not using a proxy server, this value can be the same as the Register Server, or empty.



43
44
45
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 43

def proxy_server2
  @proxy_server2
end

#proxy_server3Object

IP address of the proxy server for SIP requests. Note that if you are using the UDP transport protocol, the default port is 5060. If you are using UDP with a different port number, that port number must be included with the IP address. If you are not using a proxy server, this value can be the same as the Register Server, or empty.



52
53
54
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 52

def proxy_server3
  @proxy_server3
end

#register_serverObject

IP address of the server that accepts REGISTER requests. Note that if you are using the UDP transport protocol, the default port is 5060. If you are using UDP with a different port number, that port number must be included with the IP address.



28
29
30
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 28

def register_server
  @register_server
end

#register_server2Object

IP address of the server that accepts REGISTER requests. Note that if you are using the UDP transport protocol, the default port is 5060. If you are using UDP with a different port number, that port number must be included with the IP address.



37
38
39
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 37

def register_server2
  @register_server2
end

#register_server3Object

IP address of the server that accepts REGISTER requests. Note that if you are using the UDP transport protocol, the default port is 5060. If you are using UDP with a different port number, that port number must be included with the IP address.



46
47
48
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 46

def register_server3
  @register_server3
end

#registration_expire_timeObject

The number of minutes after which the SIP registration of the Zoom client user will expire, and the client will auto register to the SIP server.



55
56
57
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 55

def registration_expire_time
  @registration_expire_time
end

#transport_protocolObject

Protocols supported by the SIP provider.
The value must be either ‘UDP`, `TCP`, `TLS`, `AUTO`.



31
32
33
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 31

def transport_protocol
  @transport_protocol
end

#transport_protocol2Object

Protocols supported by the SIP provider.
The value must be either ‘UDP`, `TCP`, `TLS`, `AUTO`.



40
41
42
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 40

def transport_protocol2
  @transport_protocol2
end

#transport_protocol3Object

Protocols supported by the SIP provider.
The value must be either ‘UDP`, `TCP`, `TLS`, `AUTO`.



49
50
51
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 49

def transport_protocol3
  @transport_protocol3
end

#user_emailObject

The email address of the user to associate with the SIP Phone. Can add [.win, .mac, .android, .ipad, .iphone, .linux, .pc, .mobile, .pad] at the end of the email (ex. [email protected]) to add accounts for different platforms for the same user.



22
23
24
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 22

def user_email
  @user_email
end

#user_nameObject

The phone number associated with the user in the SIP account.



58
59
60
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 58

def user_name
  @user_name
end

#voice_mailObject

The number to dial for checking voicemail.



67
68
69
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 67

def voice_mail
  @voice_mail
end

Class Method Details

.attribute_mapObject

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



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

def self.attribute_map
  {
    :'id' => :'id',
    :'user_email' => :'user_email',
    :'domain' => :'domain',
    :'register_server' => :'register_server',
    :'transport_protocol' => :'transport_protocol',
    :'proxy_server' => :'proxy_server',
    :'register_server2' => :'register_server2',
    :'transport_protocol2' => :'transport_protocol2',
    :'proxy_server2' => :'proxy_server2',
    :'register_server3' => :'register_server3',
    :'transport_protocol3' => :'transport_protocol3',
    :'proxy_server3' => :'proxy_server3',
    :'registration_expire_time' => :'registration_expire_time',
    :'user_name' => :'user_name',
    :'password' => :'password',
    :'authorization_name' => :'authorization_name',
    :'voice_mail' => :'voice_mail'
  }
end

.swagger_typesObject

Attribute type mapping.



115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 115

def self.swagger_types
  {
    :'id' => :'String',
    :'user_email' => :'String',
    :'domain' => :'String',
    :'register_server' => :'String',
    :'transport_protocol' => :'String',
    :'proxy_server' => :'String',
    :'register_server2' => :'String',
    :'transport_protocol2' => :'String',
    :'proxy_server2' => :'String',
    :'register_server3' => :'String',
    :'transport_protocol3' => :'String',
    :'proxy_server3' => :'String',
    :'registration_expire_time' => :'Integer',
    :'user_name' => :'String',
    :'password' => :'String',
    :'authorization_name' => :'String',
    :'voice_mail' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 265

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
    id == o.id &&
    user_email == o.user_email &&
    domain == o.domain &&
    register_server == o.register_server &&
    transport_protocol == o.transport_protocol &&
    proxy_server == o.proxy_server &&
    register_server2 == o.register_server2 &&
    transport_protocol2 == o.transport_protocol2 &&
    proxy_server2 == o.proxy_server2 &&
    register_server3 == o.register_server3 &&
    transport_protocol3 == o.transport_protocol3 &&
    proxy_server3 == o.proxy_server3 &&
    registration_expire_time == o.registration_expire_time &&
    user_name == o.user_name &&
    password == o.password &&
    authorization_name == o.authorization_name &&
    voice_mail == o.voice_mail
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



323
324
325
326
327
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
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 323

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



389
390
391
392
393
394
395
396
397
398
399
400
401
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 389

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



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

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


289
290
291
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 289

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



295
296
297
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 295

def hash
  [id, user_email, domain, register_server, transport_protocol, proxy_server, register_server2, transport_protocol2, proxy_server2, register_server3, transport_protocol3, proxy_server3, registration_expire_time, user_name, password, authorization_name, voice_mail].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



216
217
218
219
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 216

def list_invalid_properties
  invalid_properties = Array.new
  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



369
370
371
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 369

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



375
376
377
378
379
380
381
382
383
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 375

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



363
364
365
# File 'lib/zoom_us/models/inline_response_200_1_phones.rb', line 363

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

def valid?
  transport_protocol_validator = EnumAttributeValidator.new('String', ['UDP', 'TCP', 'TLS', 'AUTO'])
  return false unless transport_protocol_validator.valid?(@transport_protocol)
  transport_protocol2_validator = EnumAttributeValidator.new('String', ['UDP', 'TCP', 'TLS', 'AUTO'])
  return false unless transport_protocol2_validator.valid?(@transport_protocol2)
  transport_protocol3_validator = EnumAttributeValidator.new('String', ['UDP', 'TCP', 'TLS', 'AUTO'])
  return false unless transport_protocol3_validator.valid?(@transport_protocol3)
  true
end