class ZoomUs::Models::Body1

Attributes

authorization_name[RW]

Authorization name of the user registered for SIP Phone.

domain[RW]

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

password[RW]

The password generated for the user in the SIP account.

proxy_server[RW]

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.

proxy_server2[RW]

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.

proxy_server3[RW]

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.

register_server[RW]

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.

register_server2[RW]

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.

register_server3[RW]

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.

registration_expire_time[RW]

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[RW]

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

transport_protocol2[RW]

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

transport_protocol3[RW]

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

user_name[RW]

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

voice_mail[RW]

The number to dial for checking voicemail.

Public Class Methods

attribute_map() click to toggle source

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

# 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
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash

# 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.authorization_name = attributes[:'authorization_name']
  end

  if attributes.has_key?(:'voice_mail')
    self.voice_mail = attributes[:'voice_mail']
  end
end
swagger_types() click to toggle source

Attribute type mapping.

# 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

Public Instance Methods

==(o) click to toggle source

Checks equality by comparing each attribute. @param [Object] Object to be compared

# 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 &&
    authorization_name == o.authorization_name &&
    voice_mail == o.voice_mail
end
_deserialize(type, value) click to toggle source

Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data

# 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) click to toggle source

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash

# 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
authorization_name=(authorization_name) click to toggle source

Custom attribute writer method with validation @param [Object] authorization_name Value to be assigned

# File lib/zoom_us/models/body_1.rb, line 374
def authorization_name=(authorization_name)
  if authorization_name.nil?
    fail ArgumentError, 'authorization_name cannot be nil'
  end

  if authorization_name.to_s.length > 64
    fail ArgumentError, 'invalid value for "authorization_name", the character length must be smaller than or equal to 64.'
  end

  @authorization_name = authorization_name
end
build_from_hash(attributes) click to toggle source

Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself

# 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
domain=(domain) click to toggle source

Custom attribute writer method with validation @param [Object] domain Value to be assigned

# File lib/zoom_us/models/body_1.rb, line 302
def domain=(domain)
  if domain.nil?
    fail ArgumentError, 'domain cannot be nil'
  end

  if domain.to_s.length > 64
    fail ArgumentError, 'invalid value for "domain", the character length must be smaller than or equal to 64.'
  end

  @domain = domain
end
eql?(o) click to toggle source

@see the `==` method @param [Object] Object to be compared

# File lib/zoom_us/models/body_1.rb, line 424
def eql?(o)
  self == o
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Fixnum] Hash code

# 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, authorization_name, voice_mail].hash
end
list_invalid_properties() click to toggle source

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

# 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
registration_expire_time=(registration_expire_time) click to toggle source

Custom attribute writer method with validation @param [Object] registration_expire_time Value to be assigned

# File lib/zoom_us/models/body_1.rb, line 346
def registration_expire_time=(registration_expire_time)
  if !registration_expire_time.nil? && registration_expire_time > 127
    fail ArgumentError, 'invalid value for "registration_expire_time", must be smaller than or equal to 127.'
  end

  if !registration_expire_time.nil? && registration_expire_time < 1
    fail ArgumentError, 'invalid value for "registration_expire_time", must be greater than or equal to 1.'
  end

  @registration_expire_time = registration_expire_time
end
to_body() click to toggle source

to_body is an alias to to_hash (backward compatibility) @return [Hash] Returns the object in the form of hash

# File lib/zoom_us/models/body_1.rb, line 504
def to_body
  to_hash
end
to_hash() click to toggle source

Returns the object in the form of hash @return [Hash] Returns the object in the form of hash

# 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() click to toggle source

Returns the string representation of the object @return [String] String presentation of the object

# File lib/zoom_us/models/body_1.rb, line 498
def to_s
  to_hash.to_s
end
transport_protocol2=(transport_protocol2) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] transport_protocol2 Object to be assigned

# File lib/zoom_us/models/body_1.rb, line 326
def transport_protocol2=(transport_protocol2)
  validator = EnumAttributeValidator.new('String', ['UDP', 'TCP', 'TLS', 'AUTO'])
  unless validator.valid?(transport_protocol2)
    fail ArgumentError, 'invalid value for "transport_protocol2", must be one of #{validator.allowable_values}.'
  end
  @transport_protocol2 = transport_protocol2
end
transport_protocol3=(transport_protocol3) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] transport_protocol3 Object to be assigned

# File lib/zoom_us/models/body_1.rb, line 336
def transport_protocol3=(transport_protocol3)
  validator = EnumAttributeValidator.new('String', ['UDP', 'TCP', 'TLS', 'AUTO'])
  unless validator.valid?(transport_protocol3)
    fail ArgumentError, 'invalid value for "transport_protocol3", must be one of #{validator.allowable_values}.'
  end
  @transport_protocol3 = transport_protocol3
end
transport_protocol=(transport_protocol) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] transport_protocol Object to be assigned

# File lib/zoom_us/models/body_1.rb, line 316
def transport_protocol=(transport_protocol)
  validator = EnumAttributeValidator.new('String', ['UDP', 'TCP', 'TLS', 'AUTO'])
  unless validator.valid?(transport_protocol)
    fail ArgumentError, 'invalid value for "transport_protocol", must be one of #{validator.allowable_values}.'
  end
  @transport_protocol = transport_protocol
end
user_name=(user_name) click to toggle source

Custom attribute writer method with validation @param [Object] user_name Value to be assigned

# File lib/zoom_us/models/body_1.rb, line 360
def user_name=(user_name)
  if user_name.nil?
    fail ArgumentError, 'user_name cannot be nil'
  end

  if user_name.to_s.length > 64
    fail ArgumentError, 'invalid value for "user_name", the character length must be smaller than or equal to 64.'
  end

  @user_name = user_name
end
valid?() click to toggle source

Check to see if the all the properties in the model are valid @return true if the model is valid

# 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
voice_mail=(voice_mail) click to toggle source

Custom attribute writer method with validation @param [Object] voice_mail Value to be assigned

# File lib/zoom_us/models/body_1.rb, line 388
def voice_mail=(voice_mail)
  if voice_mail.nil?
    fail ArgumentError, 'voice_mail cannot be nil'
  end

  if voice_mail.to_s.length > 255
    fail ArgumentError, 'invalid value for "voice_mail", the character length must be smaller than or equal to 255.'
  end

  @voice_mail = voice_mail
end