Class: AsposeEmailCloud::ContactDto

Inherits:
Object
  • Object
show all
Defined in:
lib/aspose-email-cloud/models/contact_dto.rb

Overview

VCard document representation.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(associated_persons: nil, attachments: nil, company_name: nil, computer_network_name: nil, customer_id: nil, department_name: nil, display_name: nil, email_addresses: nil, events: nil, file_as: nil, file_as_mapping: nil, free_busy_location: nil, gender: nil, given_name: nil, government_id_number: nil, hobbies: nil, initials: nil, instant_messengers: nil, job_title: nil, language: nil, location: nil, middle_name: nil, nickname: nil, notes: nil, notes_format: nil, office_location: nil, organizational_id_number: nil, phone_numbers: nil, photo: nil, physical_addresses: nil, preferred_text_encoding: nil, prefix: nil, profession: nil, suffix: nil, surname: nil, urls: nil) ⇒ ContactDto

Initializes the object

Parameters:

  • associated_persons (Array<AssociatedPerson>) (defaults to: nil)

    Associated persons.

  • attachments (Array<Attachment>) (defaults to: nil)

    Document attachments.

  • company_name (String) (defaults to: nil)

    Company name.

  • computer_network_name (String) (defaults to: nil)

    Computer network.

  • customer_id (String) (defaults to: nil)

    Customer id.

  • department_name (String) (defaults to: nil)

    Department name.

  • display_name (String) (defaults to: nil)

    Display name.

  • email_addresses (Array<EmailAddress>) (defaults to: nil)

    Person’s email addresses.

  • events (Array<CustomerEvent>) (defaults to: nil)

    Person’s events.

  • file_as (String) (defaults to: nil)

    A name used for sorting.

  • file_as_mapping (String) (defaults to: nil)

    Specifies how to generate and recompute the value of the dispidFileAs property when other contact name properties change. Coincides MS-OXPROPS revision 16.2 from 7/31/2014. Enum, available values: Empty, DisplayName, FirstName, LastName, Organization, LastFirstMiddle, OrgLastFirstMiddle, LastFirstMiddleOrg, LastFirstMiddle2, LastFirstMiddle3, OrgLastFirstMiddle2, OrgLastFirstMiddle3, LastFirstMiddleOrg2, LastFirstMiddleOrg3, LastFirstMiddleGen, FirstMiddleLastGen, LastFirstMiddleGen2, BestMatch, AccordingToLocale, None

  • free_busy_location (String) (defaults to: nil)

    URL path from which a client can retrieve free/busy information for the contact as an iCal file.

  • gender (String) (defaults to: nil)

    Enum defines gender of a person. Enum, available values: Unspecified, Female, Male

  • given_name (String) (defaults to: nil)

    Person’s given name.

  • government_id_number (String) (defaults to: nil)

    Government id number.

  • hobbies (String) (defaults to: nil)

    Person’s hobbies.

  • initials (String) (defaults to: nil)

    Person’s initials.

  • instant_messengers (Array<InstantMessengerAddress>) (defaults to: nil)

    Person’s instant messenger addresses.

  • job_title (String) (defaults to: nil)

    Person’s job title.

  • language (String) (defaults to: nil)

    Language.

  • location (String) (defaults to: nil)

    Person’s location.

  • middle_name (String) (defaults to: nil)

    Person’s middle name.

  • nickname (String) (defaults to: nil)

    Person’s nickname.

  • notes (String) (defaults to: nil)

    Notes.

  • notes_format (String) (defaults to: nil)

    Defines format of a text. Enum, available values: Text, Html

  • office_location (String) (defaults to: nil)

    Office location.

  • organizational_id_number (String) (defaults to: nil)

    Contains an identifier for the mail user used within the mail user’s organization.

  • phone_numbers (Array<PhoneNumber>) (defaults to: nil)

    Person’s phone numbers.

  • photo (ContactPhoto) (defaults to: nil)

    Person’s photo.

  • physical_addresses (Array<PostalAddress>) (defaults to: nil)

    Person’s physical addresses.

  • preferred_text_encoding (String) (defaults to: nil)

    Encoding for all text properties.

  • prefix (String) (defaults to: nil)

    A prefix of a full name such like Mr.(mister), Dr.(doctor) and so on.

  • profession (String) (defaults to: nil)

    A job position of a person in a company.

  • suffix (String) (defaults to: nil)

    A suffix of a full name such like Jr.(junior), Sr.(senior) and so on.

  • surname (String) (defaults to: nil)

    Person’s surname.

  • urls (Array<Url>) (defaults to: nil)

    Person’s urls.



260
261
262
263
264
265
266
267
268
269
270
271
272
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
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
327
328
329
330
331
332
333
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 260

def initialize(
  associated_persons: nil,
  attachments: nil,
  company_name: nil,
  computer_network_name: nil,
  customer_id: nil,
  department_name: nil,
  display_name: nil,
  email_addresses: nil,
  events: nil,
  file_as: nil,
  file_as_mapping: nil,
  free_busy_location: nil,
  gender: nil,
  given_name: nil,
  government_id_number: nil,
  hobbies: nil,
  initials: nil,
  instant_messengers: nil,
  job_title: nil,
  language: nil,
  location: nil,
  middle_name: nil,
  nickname: nil,
  notes: nil,
  notes_format: nil,
  office_location: nil,
  organizational_id_number: nil,
  phone_numbers: nil,
  photo: nil,
  physical_addresses: nil,
  preferred_text_encoding: nil,
  prefix: nil,
  profession: nil,
  suffix: nil,
  surname: nil,
  urls: nil)
  self.associated_persons = associated_persons if associated_persons
  self.attachments = attachments if attachments
  self.company_name = company_name if company_name
  self.computer_network_name = computer_network_name if computer_network_name
  self.customer_id = customer_id if customer_id
  self.department_name = department_name if department_name
  self.display_name = display_name if display_name
  self.email_addresses = email_addresses if email_addresses
  self.events = events if events
  self.file_as = file_as if file_as
  self.file_as_mapping = file_as_mapping if file_as_mapping
  self.free_busy_location = free_busy_location if free_busy_location
  self.gender = gender if gender
  self.given_name = given_name if given_name
  self.government_id_number = government_id_number if government_id_number
  self.hobbies = hobbies if hobbies
  self.initials = initials if initials
  self.instant_messengers = instant_messengers if instant_messengers
  self.job_title = job_title if job_title
  self.language = language if language
  self.location = location if location
  self.middle_name = middle_name if middle_name
  self.nickname = nickname if nickname
  self.notes = notes if notes
  self.notes_format = notes_format if notes_format
  self.office_location = office_location if office_location
  self.organizational_id_number = organizational_id_number if organizational_id_number
  self.phone_numbers = phone_numbers if phone_numbers
  self.photo = photo if photo
  self.physical_addresses = physical_addresses if physical_addresses
  self.preferred_text_encoding = preferred_text_encoding if preferred_text_encoding
  self.prefix = prefix if prefix
  self.profession = profession if profession
  self.suffix = suffix if suffix
  self.surname = surname if surname
  self.urls = urls if urls
end

Instance Attribute Details

#associated_personsArray<AssociatedPerson>

Associated persons.

Returns:



33
34
35
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 33

def associated_persons
  @associated_persons
end

#attachmentsArray<Attachment>

Document attachments.

Returns:



36
37
38
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 36

def attachments
  @attachments
end

#company_nameString

Company name.

Returns:

  • (String)


39
40
41
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 39

def company_name
  @company_name
end

#computer_network_nameString

Computer network.

Returns:

  • (String)


42
43
44
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 42

def computer_network_name
  @computer_network_name
end

#customer_idString

Customer id.

Returns:

  • (String)


45
46
47
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 45

def customer_id
  @customer_id
end

#department_nameString

Department name.

Returns:

  • (String)


48
49
50
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 48

def department_name
  @department_name
end

#display_nameString

Display name.

Returns:

  • (String)


51
52
53
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 51

def display_name
  @display_name
end

#email_addressesArray<EmailAddress>

Person’s email addresses.

Returns:



54
55
56
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 54

def email_addresses
  @email_addresses
end

#eventsArray<CustomerEvent>

Person’s events.

Returns:



57
58
59
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 57

def events
  @events
end

#file_asString

A name used for sorting.

Returns:

  • (String)


60
61
62
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 60

def file_as
  @file_as
end

#file_as_mappingString

Specifies how to generate and recompute the value of the dispidFileAs property when other contact name properties change. Coincides MS-OXPROPS revision 16.2 from 7/31/2014. Enum, available values: Empty, DisplayName, FirstName, LastName, Organization, LastFirstMiddle, OrgLastFirstMiddle, LastFirstMiddleOrg, LastFirstMiddle2, LastFirstMiddle3, OrgLastFirstMiddle2, OrgLastFirstMiddle3, LastFirstMiddleOrg2, LastFirstMiddleOrg3, LastFirstMiddleGen, FirstMiddleLastGen, LastFirstMiddleGen2, BestMatch, AccordingToLocale, None

Returns:

  • (String)


63
64
65
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 63

def file_as_mapping
  @file_as_mapping
end

#free_busy_locationString

URL path from which a client can retrieve free/busy information for the contact as an iCal file.

Returns:

  • (String)


66
67
68
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 66

def free_busy_location
  @free_busy_location
end

#genderString

Enum defines gender of a person. Enum, available values: Unspecified, Female, Male

Returns:

  • (String)


69
70
71
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 69

def gender
  @gender
end

#given_nameString

Person’s given name.

Returns:

  • (String)


72
73
74
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 72

def given_name
  @given_name
end

#government_id_numberString

Government id number.

Returns:

  • (String)


75
76
77
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 75

def government_id_number
  @government_id_number
end

#hobbiesString

Person’s hobbies.

Returns:

  • (String)


78
79
80
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 78

def hobbies
  @hobbies
end

#initialsString

Person’s initials.

Returns:

  • (String)


81
82
83
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 81

def initials
  @initials
end

#instant_messengersArray<InstantMessengerAddress>

Person’s instant messenger addresses.

Returns:



84
85
86
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 84

def instant_messengers
  @instant_messengers
end

#job_titleString

Person’s job title.

Returns:

  • (String)


87
88
89
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 87

def job_title
  @job_title
end

#languageString

Language.

Returns:

  • (String)


90
91
92
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 90

def language
  @language
end

#locationString

Person’s location.

Returns:

  • (String)


93
94
95
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 93

def location
  @location
end

#middle_nameString

Person’s middle name.

Returns:

  • (String)


96
97
98
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 96

def middle_name
  @middle_name
end

#nicknameString

Person’s nickname.

Returns:

  • (String)


99
100
101
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 99

def nickname
  @nickname
end

#notesString

Notes.

Returns:

  • (String)


102
103
104
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 102

def notes
  @notes
end

#notes_formatString

Defines format of a text. Enum, available values: Text, Html

Returns:

  • (String)


105
106
107
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 105

def notes_format
  @notes_format
end

#office_locationString

Office location.

Returns:

  • (String)


108
109
110
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 108

def office_location
  @office_location
end

#organizational_id_numberString

Contains an identifier for the mail user used within the mail user’s organization.

Returns:

  • (String)


111
112
113
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 111

def organizational_id_number
  @organizational_id_number
end

#phone_numbersArray<PhoneNumber>

Person’s phone numbers.

Returns:



114
115
116
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 114

def phone_numbers
  @phone_numbers
end

#photoContactPhoto

Person’s photo.

Returns:



117
118
119
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 117

def photo
  @photo
end

#physical_addressesArray<PostalAddress>

Person’s physical addresses.

Returns:



120
121
122
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 120

def physical_addresses
  @physical_addresses
end

#preferred_text_encodingString

Encoding for all text properties.

Returns:

  • (String)


123
124
125
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 123

def preferred_text_encoding
  @preferred_text_encoding
end

#prefixString

A prefix of a full name such like Mr.(mister), Dr.(doctor) and so on.

Returns:

  • (String)


126
127
128
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 126

def prefix
  @prefix
end

#professionString

A job position of a person in a company.

Returns:

  • (String)


129
130
131
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 129

def profession
  @profession
end

#suffixString

A suffix of a full name such like Jr.(junior), Sr.(senior) and so on.

Returns:

  • (String)


132
133
134
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 132

def suffix
  @suffix
end

#surnameString

Person’s surname.

Returns:

  • (String)


135
136
137
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 135

def surname
  @surname
end

#urlsArray<Url>

Person’s urls.

Returns:



138
139
140
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 138

def urls
  @urls
end

Class Method Details

.attribute_mapObject

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



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
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 140

def self.attribute_map
  {
    :'associated_persons' => :'associatedPersons',
    :'attachments' => :'attachments',
    :'company_name' => :'companyName',
    :'computer_network_name' => :'computerNetworkName',
    :'customer_id' => :'customerId',
    :'department_name' => :'departmentName',
    :'display_name' => :'displayName',
    :'email_addresses' => :'emailAddresses',
    :'events' => :'events',
    :'file_as' => :'fileAs',
    :'file_as_mapping' => :'fileAsMapping',
    :'free_busy_location' => :'freeBusyLocation',
    :'gender' => :'gender',
    :'given_name' => :'givenName',
    :'government_id_number' => :'governmentIdNumber',
    :'hobbies' => :'hobbies',
    :'initials' => :'initials',
    :'instant_messengers' => :'instantMessengers',
    :'job_title' => :'jobTitle',
    :'language' => :'language',
    :'location' => :'location',
    :'middle_name' => :'middleName',
    :'nickname' => :'nickname',
    :'notes' => :'notes',
    :'notes_format' => :'notesFormat',
    :'office_location' => :'officeLocation',
    :'organizational_id_number' => :'organizationalIdNumber',
    :'phone_numbers' => :'phoneNumbers',
    :'photo' => :'photo',
    :'physical_addresses' => :'physicalAddresses',
    :'preferred_text_encoding' => :'preferredTextEncoding',
    :'prefix' => :'prefix',
    :'profession' => :'profession',
    :'suffix' => :'suffix',
    :'surname' => :'surname',
    :'urls' => :'urls'
  }
end

.swagger_typesObject

Attribute type mapping.



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
213
214
215
216
217
218
219
220
221
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 182

def self.swagger_types
  {
    :'associated_persons' => :'Array<AssociatedPerson>',
    :'attachments' => :'Array<Attachment>',
    :'company_name' => :'String',
    :'computer_network_name' => :'String',
    :'customer_id' => :'String',
    :'department_name' => :'String',
    :'display_name' => :'String',
    :'email_addresses' => :'Array<EmailAddress>',
    :'events' => :'Array<CustomerEvent>',
    :'file_as' => :'String',
    :'file_as_mapping' => :'String',
    :'free_busy_location' => :'String',
    :'gender' => :'String',
    :'given_name' => :'String',
    :'government_id_number' => :'String',
    :'hobbies' => :'String',
    :'initials' => :'String',
    :'instant_messengers' => :'Array<InstantMessengerAddress>',
    :'job_title' => :'String',
    :'language' => :'String',
    :'location' => :'String',
    :'middle_name' => :'String',
    :'nickname' => :'String',
    :'notes' => :'String',
    :'notes_format' => :'String',
    :'office_location' => :'String',
    :'organizational_id_number' => :'String',
    :'phone_numbers' => :'Array<PhoneNumber>',
    :'photo' => :'ContactPhoto',
    :'physical_addresses' => :'Array<PostalAddress>',
    :'preferred_text_encoding' => :'String',
    :'prefix' => :'String',
    :'profession' => :'String',
    :'suffix' => :'String',
    :'surname' => :'String',
    :'urls' => :'Array<Url>'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 365

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      associated_persons == o.associated_persons &&
      attachments == o.attachments &&
      company_name == o.company_name &&
      computer_network_name == o.computer_network_name &&
      customer_id == o.customer_id &&
      department_name == o.department_name &&
      display_name == o.display_name &&
      email_addresses == o.email_addresses &&
      events == o.events &&
      file_as == o.file_as &&
      file_as_mapping == o.file_as_mapping &&
      free_busy_location == o.free_busy_location &&
      gender == o.gender &&
      given_name == o.given_name &&
      government_id_number == o.government_id_number &&
      hobbies == o.hobbies &&
      initials == o.initials &&
      instant_messengers == o.instant_messengers &&
      job_title == o.job_title &&
      language == o.language &&
      location == o.location &&
      middle_name == o.middle_name &&
      nickname == o.nickname &&
      notes == o.notes &&
      notes_format == o.notes_format &&
      office_location == o.office_location &&
      organizational_id_number == o.organizational_id_number &&
      phone_numbers == o.phone_numbers &&
      photo == o.photo &&
      physical_addresses == o.physical_addresses &&
      preferred_text_encoding == o.preferred_text_encoding &&
      prefix == o.prefix &&
      profession == o.profession &&
      suffix == o.suffix &&
      surname == o.surname &&
      urls == o.urls
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



444
445
446
447
448
449
450
451
452
453
454
455
456
457
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
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 444

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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



514
515
516
517
518
519
520
521
522
523
524
525
526
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 514

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



421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 421

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

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


408
409
410
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 408

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



414
415
416
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 414

def hash
  [associated_persons, attachments, company_name, computer_network_name, customer_id, department_name, display_name, email_addresses, events, file_as, file_as_mapping, free_busy_location, gender, given_name, government_id_number, hobbies, initials, instant_messengers, job_title, language, location, middle_name, nickname, notes, notes_format, office_location, organizational_id_number, phone_numbers, photo, physical_addresses, preferred_text_encoding, prefix, profession, suffix, surname, urls].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 337

def list_invalid_properties
  invalid_properties = Array.new
  if @file_as_mapping.nil?
    invalid_properties.push('invalid value for "file_as_mapping", file_as_mapping cannot be nil.')
  end

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

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

  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



494
495
496
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 494

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



500
501
502
503
504
505
506
507
508
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 500

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



488
489
490
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 488

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



356
357
358
359
360
361
# File 'lib/aspose-email-cloud/models/contact_dto.rb', line 356

def valid?
  return false if @file_as_mapping.nil?
  return false if @gender.nil?
  return false if @notes_format.nil?
  true
end