Class: ZoomUs::Models::Body1
- Inherits:
-
Object
- Object
- ZoomUs::Models::Body1
- Defined in:
- lib/zoom_us/models/body_1.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#authorization_name ⇒ Object
Authorization name of the user registered for SIP Phone.
-
#domain ⇒ Object
The name or IP address of your provider’s SIP domain.
-
#password ⇒ Object
The password generated for the user in the SIP account.
-
#proxy_server ⇒ Object
IP address of the proxy server for SIP requests.
-
#proxy_server2 ⇒ Object
IP address of the proxy server for SIP requests.
-
#proxy_server3 ⇒ Object
IP address of the proxy server for SIP requests.
-
#register_server ⇒ Object
IP address of the server that accepts REGISTER requests.
-
#register_server2 ⇒ Object
IP address of the server that accepts REGISTER requests.
-
#register_server3 ⇒ Object
IP address of the server that accepts REGISTER requests.
-
#registration_expire_time ⇒ Object
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.
-
#transport_protocol ⇒ Object
Protocols supported by the SIP provider.
The value must be either ‘UDP`, `TCP`, `TLS`, `AUTO`. -
#transport_protocol2 ⇒ Object
Protocols supported by the SIP provider.
The value must be either ‘UDP`, `TCP`, `TLS`, `AUTO`. -
#transport_protocol3 ⇒ Object
Protocols supported by the SIP provider.
The value must be either ‘UDP`, `TCP`, `TLS`, `AUTO`. -
#user_name ⇒ Object
The phone number associated with the user in the SIP account.
-
#voice_mail ⇒ Object
The number to dial for checking voicemail.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Body1
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ Body1
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 |
# File 'lib/zoom_us/models/body_1.rb', line 129 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?(:'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. = attributes[:'authorization_name'] end if attributes.has_key?(:'voice_mail') self.voice_mail = attributes[:'voice_mail'] end end |
Instance Attribute Details
#authorization_name ⇒ Object
Authorization name of the user registered for SIP Phone.
58 59 60 |
# File 'lib/zoom_us/models/body_1.rb', line 58 def @authorization_name end |
#domain ⇒ Object
The name or IP address of your provider’s SIP domain. (example: CDC.WEB).
19 20 21 |
# File 'lib/zoom_us/models/body_1.rb', line 19 def domain @domain end |
#password ⇒ Object
The password generated for the user in the SIP account.
55 56 57 |
# File 'lib/zoom_us/models/body_1.rb', line 55 def password @password end |
#proxy_server ⇒ Object
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.
28 29 30 |
# File 'lib/zoom_us/models/body_1.rb', line 28 def proxy_server @proxy_server end |
#proxy_server2 ⇒ Object
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.
37 38 39 |
# File 'lib/zoom_us/models/body_1.rb', line 37 def proxy_server2 @proxy_server2 end |
#proxy_server3 ⇒ Object
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.
46 47 48 |
# File 'lib/zoom_us/models/body_1.rb', line 46 def proxy_server3 @proxy_server3 end |
#register_server ⇒ Object
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.
22 23 24 |
# File 'lib/zoom_us/models/body_1.rb', line 22 def register_server @register_server end |
#register_server2 ⇒ Object
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.
31 32 33 |
# File 'lib/zoom_us/models/body_1.rb', line 31 def register_server2 @register_server2 end |
#register_server3 ⇒ Object
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.
40 41 42 |
# File 'lib/zoom_us/models/body_1.rb', line 40 def register_server3 @register_server3 end |
#registration_expire_time ⇒ Object
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.
49 50 51 |
# File 'lib/zoom_us/models/body_1.rb', line 49 def registration_expire_time @registration_expire_time end |
#transport_protocol ⇒ Object
Protocols supported by the SIP provider.
The value must be either ‘UDP`, `TCP`, `TLS`, `AUTO`.
25 26 27 |
# File 'lib/zoom_us/models/body_1.rb', line 25 def transport_protocol @transport_protocol end |
#transport_protocol2 ⇒ Object
Protocols supported by the SIP provider.
The value must be either ‘UDP`, `TCP`, `TLS`, `AUTO`.
34 35 36 |
# File 'lib/zoom_us/models/body_1.rb', line 34 def transport_protocol2 @transport_protocol2 end |
#transport_protocol3 ⇒ Object
Protocols supported by the SIP provider.
The value must be either ‘UDP`, `TCP`, `TLS`, `AUTO`.
43 44 45 |
# File 'lib/zoom_us/models/body_1.rb', line 43 def transport_protocol3 @transport_protocol3 end |
#user_name ⇒ Object
The phone number associated with the user in the SIP account.
52 53 54 |
# File 'lib/zoom_us/models/body_1.rb', line 52 def user_name @user_name end |
#voice_mail ⇒ Object
The number to dial for checking voicemail.
61 62 63 |
# File 'lib/zoom_us/models/body_1.rb', line 61 def voice_mail @voice_mail end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/zoom_us/models/body_1.rb', line 86 def self.attribute_map { :'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_types ⇒ Object
Attribute type mapping.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/zoom_us/models/body_1.rb', line 107 def self.swagger_types { :'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.
402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 |
# File 'lib/zoom_us/models/body_1.rb', line 402 def ==(o) return true if self.equal?(o) self.class == o.class && 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 && == o. && voice_mail == o.voice_mail end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
458 459 460 461 462 463 464 465 466 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 |
# File 'lib/zoom_us/models/body_1.rb', line 458 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
524 525 526 527 528 529 530 531 532 533 534 535 536 |
# File 'lib/zoom_us/models/body_1.rb', line 524 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
437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 |
# File 'lib/zoom_us/models/body_1.rb', line 437 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
424 425 426 |
# File 'lib/zoom_us/models/body_1.rb', line 424 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
430 431 432 |
# File 'lib/zoom_us/models/body_1.rb', line 430 def hash [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, , voice_mail].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
198 199 200 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 |
# File 'lib/zoom_us/models/body_1.rb', line 198 def list_invalid_properties invalid_properties = Array.new if @domain.nil? invalid_properties.push('invalid value for "domain", domain cannot be nil.') end if @domain.to_s.length > 64 invalid_properties.push('invalid value for "domain", the character length must be smaller than or equal to 64.') end if @register_server.nil? invalid_properties.push('invalid value for "register_server", register_server cannot be nil.') end if @proxy_server.nil? invalid_properties.push('invalid value for "proxy_server", proxy_server cannot be nil.') end if @register_server2.nil? invalid_properties.push('invalid value for "register_server2", register_server2 cannot be nil.') end if @proxy_server2.nil? invalid_properties.push('invalid value for "proxy_server2", proxy_server2 cannot be nil.') end if @register_server3.nil? invalid_properties.push('invalid value for "register_server3", register_server3 cannot be nil.') end if @proxy_server3.nil? invalid_properties.push('invalid value for "proxy_server3", proxy_server3 cannot be nil.') end if !@registration_expire_time.nil? && @registration_expire_time > 127 invalid_properties.push('invalid value for "registration_expire_time", must be smaller than or equal to 127.') end if !@registration_expire_time.nil? && @registration_expire_time < 1 invalid_properties.push('invalid value for "registration_expire_time", must be greater than or equal to 1.') end if @user_name.nil? invalid_properties.push('invalid value for "user_name", user_name cannot be nil.') end if @user_name.to_s.length > 64 invalid_properties.push('invalid value for "user_name", the character length must be smaller than or equal to 64.') end if @password.nil? invalid_properties.push('invalid value for "password", password cannot be nil.') end if @authorization_name.nil? invalid_properties.push('invalid value for "authorization_name", authorization_name cannot be nil.') end if @authorization_name.to_s.length > 64 invalid_properties.push('invalid value for "authorization_name", the character length must be smaller than or equal to 64.') end if @voice_mail.nil? invalid_properties.push('invalid value for "voice_mail", voice_mail cannot be nil.') end if @voice_mail.to_s.length > 255 invalid_properties.push('invalid value for "voice_mail", the character length must be smaller than or equal to 255.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
504 505 506 |
# File 'lib/zoom_us/models/body_1.rb', line 504 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
510 511 512 513 514 515 516 517 518 |
# File 'lib/zoom_us/models/body_1.rb', line 510 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_s ⇒ String
Returns the string representation of the object
498 499 500 |
# File 'lib/zoom_us/models/body_1.rb', line 498 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
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 |
# File 'lib/zoom_us/models/body_1.rb', line 273 def valid? return false if @domain.nil? return false if @domain.to_s.length > 64 return false if @register_server.nil? transport_protocol_validator = EnumAttributeValidator.new('String', ['UDP', 'TCP', 'TLS', 'AUTO']) return false unless transport_protocol_validator.valid?(@transport_protocol) return false if @proxy_server.nil? return false if @register_server2.nil? transport_protocol2_validator = EnumAttributeValidator.new('String', ['UDP', 'TCP', 'TLS', 'AUTO']) return false unless transport_protocol2_validator.valid?(@transport_protocol2) return false if @proxy_server2.nil? return false if @register_server3.nil? transport_protocol3_validator = EnumAttributeValidator.new('String', ['UDP', 'TCP', 'TLS', 'AUTO']) return false unless transport_protocol3_validator.valid?(@transport_protocol3) return false if @proxy_server3.nil? return false if !@registration_expire_time.nil? && @registration_expire_time > 127 return false if !@registration_expire_time.nil? && @registration_expire_time < 1 return false if @user_name.nil? return false if @user_name.to_s.length > 64 return false if @password.nil? return false if @authorization_name.nil? return false if @authorization_name.to_s.length > 64 return false if @voice_mail.nil? return false if @voice_mail.to_s.length > 255 true end |