Class: AsposeEmailCloud::MapiContactTelephonePropertySetDto
- Inherits:
-
Object
- Object
- AsposeEmailCloud::MapiContactTelephonePropertySetDto
- Defined in:
- lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb
Overview
Specify optional telephone numbers for the contact.
Instance Attribute Summary collapse
-
#assistant_telephone_number ⇒ String
Gets or sets the telephone number of the contact’s assistant.
-
#business2_telephone_number ⇒ String
Gets or sets the second business telephone number.
-
#business_telephone_number ⇒ String
Gets or sets the business telephone number.
-
#callback_telephone_number ⇒ String
Gets or sets the callback telephone number.
-
#car_telephone_number ⇒ String
Gets or sets the car telephone number.
-
#company_main_telephone_number ⇒ String
Gets or sets the company phone number.
-
#default_telephone_number ⇒ String
Default value of electronic address Uses when user does not set any electronic address if UseAutocomplete property is set ‘true’.
-
#home2_telephone_number ⇒ String
Gets or sets a second home telephone number.
-
#home_telephone_number ⇒ String
Gets or sets the home telephone number.
-
#is_empty ⇒ BOOLEAN
Shows if MapiContactTelephonePropertySet is empty.
-
#isdn_number ⇒ String
Gets or sets the integrated services digital network (ISDN) number.
-
#mobile_telephone_number ⇒ String
Gets or sets the mobile telephone number.
-
#other_telephone_number ⇒ String
Gets or sets an alternate telephone number.
-
#pager_telephone_number ⇒ String
Gets or sets a pager telephone number.
-
#primary_telephone_number ⇒ String
Gets or sets the primary telephone number.
-
#radio_telephone_number ⇒ String
Gets or sets the radio telephone number.
-
#telex_number ⇒ String
Gets or sets the telex number.
-
#tty_tdd_phone_number ⇒ String
Gets or sets the telephone number for the contact’s text telephone (TTY) or telecommunication device for the deaf (TDD).
-
#use_autocomplete ⇒ BOOLEAN
Indicates that one electronic address is completed automatically in case if user does not set any electronic address.
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(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) ⇒ MapiContactTelephonePropertySetDto
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(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) ⇒ MapiContactTelephonePropertySetDto
Initializes the object
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 |
# 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 |
Instance Attribute Details
#assistant_telephone_number ⇒ String
Gets or sets the telephone number of the contact’s assistant
69 70 71 |
# File 'lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb', line 69 def assistant_telephone_number @assistant_telephone_number end |
#business2_telephone_number ⇒ String
Gets or sets the second business telephone number
54 55 56 |
# File 'lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb', line 54 def business2_telephone_number @business2_telephone_number end |
#business_telephone_number ⇒ String
Gets or sets the business telephone number
45 46 47 |
# File 'lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb', line 45 def business_telephone_number @business_telephone_number end |
#callback_telephone_number ⇒ String
Gets or sets the callback telephone number
42 43 44 |
# File 'lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb', line 42 def callback_telephone_number @callback_telephone_number end |
#car_telephone_number ⇒ String
Gets or sets the car telephone number
63 64 65 |
# File 'lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb', line 63 def car_telephone_number @car_telephone_number end |
#company_main_telephone_number ⇒ String
Gets or sets the company phone number
78 79 80 |
# File 'lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb', line 78 def company_main_telephone_number @company_main_telephone_number end |
#default_telephone_number ⇒ String
Default value of electronic address Uses when user does not set any electronic address if UseAutocomplete property is set ‘true’
36 37 38 |
# File 'lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb', line 36 def default_telephone_number @default_telephone_number end |
#home2_telephone_number ⇒ String
Gets or sets a second home telephone number
72 73 74 |
# File 'lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb', line 72 def home2_telephone_number @home2_telephone_number end |
#home_telephone_number ⇒ String
Gets or sets the home telephone number
48 49 50 |
# File 'lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb', line 48 def home_telephone_number @home_telephone_number end |
#is_empty ⇒ BOOLEAN
Shows if MapiContactTelephonePropertySet is empty
33 34 35 |
# File 'lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb', line 33 def is_empty @is_empty end |
#isdn_number ⇒ String
Gets or sets the integrated services digital network (ISDN) number
84 85 86 |
# File 'lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb', line 84 def isdn_number @isdn_number end |
#mobile_telephone_number ⇒ String
Gets or sets the mobile telephone number
57 58 59 |
# File 'lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb', line 57 def mobile_telephone_number @mobile_telephone_number end |
#other_telephone_number ⇒ String
Gets or sets an alternate telephone number
66 67 68 |
# File 'lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb', line 66 def other_telephone_number @other_telephone_number end |
#pager_telephone_number ⇒ String
Gets or sets a pager telephone number
87 88 89 |
# File 'lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb', line 87 def pager_telephone_number @pager_telephone_number end |
#primary_telephone_number ⇒ String
Gets or sets the primary telephone number
51 52 53 |
# File 'lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb', line 51 def primary_telephone_number @primary_telephone_number end |
#radio_telephone_number ⇒ String
Gets or sets the radio telephone number
60 61 62 |
# File 'lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb', line 60 def radio_telephone_number @radio_telephone_number end |
#telex_number ⇒ String
Gets or sets the telex number
81 82 83 |
# File 'lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb', line 81 def telex_number @telex_number end |
#tty_tdd_phone_number ⇒ String
Gets or sets the telephone number for the contact’s text telephone (TTY) or telecommunication device for the deaf (TDD)
75 76 77 |
# File 'lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb', line 75 def tty_tdd_phone_number @tty_tdd_phone_number end |
#use_autocomplete ⇒ BOOLEAN
Indicates that one electronic address is completed automatically in case if user does not set any electronic address
39 40 41 |
# File 'lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb', line 39 def use_autocomplete @use_autocomplete end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# 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 |
.swagger_types ⇒ Object
Attribute type mapping.
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# 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 |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
# 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) ⇒ Object
Deserializes the data based on type
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
# 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) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
356 357 358 359 360 361 362 363 364 365 366 367 368 |
# 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) ⇒ Object
Builds the object from hash
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
# 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) ⇒ Boolean
250 251 252 |
# File 'lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb', line 250 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
256 257 258 |
# 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 ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
201 202 203 204 205 206 207 208 209 210 211 212 |
# 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 ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
336 337 338 |
# File 'lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb', line 336 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
342 343 344 345 346 347 348 349 350 |
# 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 ⇒ String
Returns the string representation of the object
330 331 332 |
# File 'lib/aspose-email-cloud/models/mapi_contact_telephone_property_set_dto.rb', line 330 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
216 217 218 219 220 |
# 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 |