class AsposeEmailCloud::MapiContactTelephonePropertySetDto

Specify optional telephone numbers for the contact.

Attributes

assistant_telephone_number[RW]

Gets or sets the telephone number of the contact's assistant

@return [String]

business2_telephone_number[RW]

Gets or sets the second business telephone number

@return [String]

business_telephone_number[RW]

Gets or sets the business telephone number

@return [String]

callback_telephone_number[RW]

Gets or sets the callback telephone number

@return [String]

car_telephone_number[RW]

Gets or sets the car telephone number

@return [String]

company_main_telephone_number[RW]

Gets or sets the company phone number

@return [String]

default_telephone_number[RW]

Default value of electronic address Uses when user does not set any electronic address if UseAutocomplete property is set 'true'

@return [String]

home2_telephone_number[RW]

Gets or sets a second home telephone number

@return [String]

home_telephone_number[RW]

Gets or sets the home telephone number

@return [String]

is_empty[RW]

Shows if MapiContactTelephonePropertySet is empty

@return [BOOLEAN]

isdn_number[RW]

Gets or sets the integrated services digital network (ISDN) number

@return [String]

mobile_telephone_number[RW]

Gets or sets the mobile telephone number

@return [String]

other_telephone_number[RW]

Gets or sets an alternate telephone number

@return [String]

pager_telephone_number[RW]

Gets or sets a pager telephone number

@return [String]

primary_telephone_number[RW]

Gets or sets the primary telephone number

@return [String]

radio_telephone_number[RW]

Gets or sets the radio telephone number

@return [String]

telex_number[RW]

Gets or sets the telex number

@return [String]

tty_tdd_phone_number[RW]

Gets or sets the telephone number for the contact's text telephone (TTY) or telecommunication device for the deaf (TDD)

@return [String]

use_autocomplete[RW]

Indicates that one electronic address is completed automatically in case if user does not set any electronic address

@return [BOOLEAN]

Public Class Methods

attribute_map() click to toggle source

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

# File lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb, line 89
def self.attribute_map
  {
    :'is_empty' => :'isEmpty',
    :'default_telephone_number' => :'defaultTelephoneNumber',
    :'use_autocomplete' => :'useAutocomplete',
    :'callback_telephone_number' => :'callbackTelephoneNumber',
    :'business_telephone_number' => :'businessTelephoneNumber',
    :'home_telephone_number' => :'homeTelephoneNumber',
    :'primary_telephone_number' => :'primaryTelephoneNumber',
    :'business2_telephone_number' => :'business2TelephoneNumber',
    :'mobile_telephone_number' => :'mobileTelephoneNumber',
    :'radio_telephone_number' => :'radioTelephoneNumber',
    :'car_telephone_number' => :'carTelephoneNumber',
    :'other_telephone_number' => :'otherTelephoneNumber',
    :'assistant_telephone_number' => :'assistantTelephoneNumber',
    :'home2_telephone_number' => :'home2TelephoneNumber',
    :'tty_tdd_phone_number' => :'ttyTddPhoneNumber',
    :'company_main_telephone_number' => :'companyMainTelephoneNumber',
    :'telex_number' => :'telexNumber',
    :'isdn_number' => :'isdnNumber',
    :'pager_telephone_number' => :'pagerTelephoneNumber'
  }
end
new( is_empty: nil, default_telephone_number: nil, use_autocomplete: nil, callback_telephone_number: nil, business_telephone_number: nil, home_telephone_number: nil, primary_telephone_number: nil, business2_telephone_number: nil, mobile_telephone_number: nil, radio_telephone_number: nil, car_telephone_number: nil, other_telephone_number: nil, assistant_telephone_number: nil, home2_telephone_number: nil, tty_tdd_phone_number: nil, company_main_telephone_number: nil, telex_number: nil, isdn_number: nil, pager_telephone_number: nil) click to toggle source

Initializes the object @param [BOOLEAN] is_empty Shows if MapiContactTelephonePropertySet is empty

@param [String] default_telephone_number Default value of electronic address Uses when user does not set any electronic address if UseAutocomplete property is set 'true'

@param [BOOLEAN] use_autocomplete Indicates that one electronic address is completed automatically in case if user does not set any electronic address

@param [String] callback_telephone_number Gets or sets the callback telephone number

@param [String] business_telephone_number Gets or sets the business telephone number

@param [String] home_telephone_number Gets or sets the home telephone number

@param [String] primary_telephone_number Gets or sets the primary telephone number

@param [String] business2_telephone_number Gets or sets the second business telephone number

@param [String] mobile_telephone_number Gets or sets the mobile telephone number

@param [String] radio_telephone_number Gets or sets the radio telephone number

@param [String] car_telephone_number Gets or sets the car telephone number

@param [String] other_telephone_number Gets or sets an alternate telephone number

@param [String] assistant_telephone_number Gets or sets the telephone number of the contact's assistant

@param [String] home2_telephone_number Gets or sets a second home telephone number

@param [String] tty_tdd_phone_number Gets or sets the telephone number for the contact's text telephone (TTY) or telecommunication device for the deaf (TDD)

@param [String] company_main_telephone_number Gets or sets the company phone number

@param [String] telex_number Gets or sets the telex number

@param [String] isdn_number Gets or sets the integrated services digital network (ISDN) number

@param [String] pager_telephone_number Gets or sets a pager telephone number

# File lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb, line 158
def initialize(
  is_empty: nil,
  default_telephone_number: nil,
  use_autocomplete: nil,
  callback_telephone_number: nil,
  business_telephone_number: nil,
  home_telephone_number: nil,
  primary_telephone_number: nil,
  business2_telephone_number: nil,
  mobile_telephone_number: nil,
  radio_telephone_number: nil,
  car_telephone_number: nil,
  other_telephone_number: nil,
  assistant_telephone_number: nil,
  home2_telephone_number: nil,
  tty_tdd_phone_number: nil,
  company_main_telephone_number: nil,
  telex_number: nil,
  isdn_number: nil,
  pager_telephone_number: nil)
  self.is_empty = is_empty if is_empty
  self.default_telephone_number = default_telephone_number if default_telephone_number
  self.use_autocomplete = use_autocomplete if use_autocomplete
  self.callback_telephone_number = callback_telephone_number if callback_telephone_number
  self.business_telephone_number = business_telephone_number if business_telephone_number
  self.home_telephone_number = home_telephone_number if home_telephone_number
  self.primary_telephone_number = primary_telephone_number if primary_telephone_number
  self.business2_telephone_number = business2_telephone_number if business2_telephone_number
  self.mobile_telephone_number = mobile_telephone_number if mobile_telephone_number
  self.radio_telephone_number = radio_telephone_number if radio_telephone_number
  self.car_telephone_number = car_telephone_number if car_telephone_number
  self.other_telephone_number = other_telephone_number if other_telephone_number
  self.assistant_telephone_number = assistant_telephone_number if assistant_telephone_number
  self.home2_telephone_number = home2_telephone_number if home2_telephone_number
  self.tty_tdd_phone_number = tty_tdd_phone_number if tty_tdd_phone_number
  self.company_main_telephone_number = company_main_telephone_number if company_main_telephone_number
  self.telex_number = telex_number if telex_number
  self.isdn_number = isdn_number if isdn_number
  self.pager_telephone_number = pager_telephone_number if pager_telephone_number
end
swagger_types() click to toggle source

Attribute type mapping.

# File lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb, line 114
def self.swagger_types
  {
    :'is_empty' => :'BOOLEAN',
    :'default_telephone_number' => :'String',
    :'use_autocomplete' => :'BOOLEAN',
    :'callback_telephone_number' => :'String',
    :'business_telephone_number' => :'String',
    :'home_telephone_number' => :'String',
    :'primary_telephone_number' => :'String',
    :'business2_telephone_number' => :'String',
    :'mobile_telephone_number' => :'String',
    :'radio_telephone_number' => :'String',
    :'car_telephone_number' => :'String',
    :'other_telephone_number' => :'String',
    :'assistant_telephone_number' => :'String',
    :'home2_telephone_number' => :'String',
    :'tty_tdd_phone_number' => :'String',
    :'company_main_telephone_number' => :'String',
    :'telex_number' => :'String',
    :'isdn_number' => :'String',
    :'pager_telephone_number' => :'String'
  }
end

Public Instance Methods

==(o) click to toggle source

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

# File lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb, line 224
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      is_empty == o.is_empty &&
      default_telephone_number == o.default_telephone_number &&
      use_autocomplete == o.use_autocomplete &&
      callback_telephone_number == o.callback_telephone_number &&
      business_telephone_number == o.business_telephone_number &&
      home_telephone_number == o.home_telephone_number &&
      primary_telephone_number == o.primary_telephone_number &&
      business2_telephone_number == o.business2_telephone_number &&
      mobile_telephone_number == o.mobile_telephone_number &&
      radio_telephone_number == o.radio_telephone_number &&
      car_telephone_number == o.car_telephone_number &&
      other_telephone_number == o.other_telephone_number &&
      assistant_telephone_number == o.assistant_telephone_number &&
      home2_telephone_number == o.home2_telephone_number &&
      tty_tdd_phone_number == o.tty_tdd_phone_number &&
      company_main_telephone_number == o.company_main_telephone_number &&
      telex_number == o.telex_number &&
      isdn_number == o.isdn_number &&
      pager_telephone_number == o.pager_telephone_number
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/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb, line 286
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
    sub_type = value[:type] || value[:discriminator] || type
    if AsposeEmailCloud.const_defined?(sub_type)
      type = sub_type
    end
    temp_model = AsposeEmailCloud.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/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb, line 356
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) 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/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb, line 263
def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    attribute_key = self.class.attribute_map[key]
    attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
    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[attribute_key].is_a?(Array)
        self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[attribute_key].nil?
      self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end
eql?(o) click to toggle source

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

# File lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb, line 250
def eql?(o)
  self == o
end
hash() click to toggle source

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

# File lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb, line 256
def hash
  [is_empty, default_telephone_number, use_autocomplete, callback_telephone_number, business_telephone_number, home_telephone_number, primary_telephone_number, business2_telephone_number, mobile_telephone_number, radio_telephone_number, car_telephone_number, other_telephone_number, assistant_telephone_number, home2_telephone_number, tty_tdd_phone_number, company_main_telephone_number, telex_number, isdn_number, pager_telephone_number].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/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb, line 201
def list_invalid_properties
  invalid_properties = Array.new
  if @is_empty.nil?
    invalid_properties.push('invalid value for "is_empty", is_empty cannot be nil.')
  end

  if @use_autocomplete.nil?
    invalid_properties.push('invalid value for "use_autocomplete", use_autocomplete cannot be nil.')
  end

  invalid_properties
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/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb, line 336
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/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb, line 342
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/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb, line 330
def to_s
  to_hash.to_s
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/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb, line 216
def valid?
  return false if @is_empty.nil?
  return false if @use_autocomplete.nil?
  true
end