Class: AsposeEmailCloud::MapiContactPersonalInfoPropertySetDto

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

Overview

Specify other additional contact information.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(spouse_name: nil, personal_home_page: nil, language: nil, notes: nil, hobbies: nil, location: nil, instant_messaging_address: nil, organizational_id_number: nil, customer_id: nil, government_id_number: nil, free_busy_location: nil, account: nil, html: nil, business_home_page: nil, ftp_site: nil, computer_network_name: nil, gender: nil, referred_by_name: nil, children: nil) ⇒ MapiContactPersonalInfoPropertySetDto

Initializes the object

Parameters:

  • spouse_name (String) (defaults to: nil)

    Specifies the name of the contact’s spouse/partner

  • personal_home_page (String) (defaults to: nil)

    Specifies the contact’s personal web page URL

  • language (String) (defaults to: nil)

    Specifies the language that the contact uses

  • notes (String) (defaults to: nil)

    Specifies the additional notes

  • hobbies (String) (defaults to: nil)

    Specifies the hobbies of the contact

  • location (String) (defaults to: nil)

    Specifies the location of the contact

  • instant_messaging_address (String) (defaults to: nil)

    Specifies the contact’s instant messaging address

  • organizational_id_number (String) (defaults to: nil)

    Specifies an organizational ID number for the contact

  • customer_id (String) (defaults to: nil)

    Specifies the contact’s customer ID number

  • government_id_number (String) (defaults to: nil)

    Specifies the contact’s government ID number

  • free_busy_location (String) (defaults to: nil)

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

  • account (String) (defaults to: nil)

    Specifies the account name of the contact

  • html (String) (defaults to: nil)

    Specifies the contact’s business web page URL

  • business_home_page (String) (defaults to: nil)

    Specifies the contact’s business web page URL

  • ftp_site (String) (defaults to: nil)

    Specifies the contact’s File Transfer Protocol (FTP) URL

  • computer_network_name (String) (defaults to: nil)

    Specifies the name of the network to which the contact’s computer is connected

  • gender (String) (defaults to: nil)

    Gender of the contact. Enum, available values: Unspecified, Female, Male

  • referred_by_name (String) (defaults to: nil)

    Specifies the name of the person who referred this contact to the user

  • children (Array<String>) (defaults to: nil)

    Contains a list of names of children.



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_personal_info_property_set_dto.rb', line 158

def initialize(
  spouse_name: nil,
  personal_home_page: nil,
  language: nil,
  notes: nil,
  hobbies: nil,
  location: nil,
  instant_messaging_address: nil,
  organizational_id_number: nil,
  customer_id: nil,
  government_id_number: nil,
  free_busy_location: nil,
  account: nil,
  html: nil,
  business_home_page: nil,
  ftp_site: nil,
  computer_network_name: nil,
  gender: nil,
  referred_by_name: nil,
  children: nil)
  self.spouse_name = spouse_name if spouse_name
  self.personal_home_page = personal_home_page if personal_home_page
  self.language = language if language
  self.notes = notes if notes
  self.hobbies = hobbies if hobbies
  self.location = location if location
  self.instant_messaging_address = instant_messaging_address if instant_messaging_address
  self.organizational_id_number = organizational_id_number if organizational_id_number
  self.customer_id = customer_id if customer_id
  self.government_id_number = government_id_number if government_id_number
  self.free_busy_location = free_busy_location if free_busy_location
  self. =  if 
  self.html = html if html
  self.business_home_page = business_home_page if business_home_page
  self.ftp_site = ftp_site if ftp_site
  self.computer_network_name = computer_network_name if computer_network_name
  self.gender = gender if gender
  self.referred_by_name = referred_by_name if referred_by_name
  self.children = children if children
end

Instance Attribute Details

#accountString

Specifies the account name of the contact

Returns:

  • (String)


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

def 
  @account
end

#business_home_pageString

Specifies the contact’s business web page URL

Returns:

  • (String)


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

def business_home_page
  @business_home_page
end

#childrenArray<String>

Contains a list of names of children.

Returns:

  • (Array<String>)


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

def children
  @children
end

#computer_network_nameString

Specifies the name of the network to which the contact’s computer is connected

Returns:

  • (String)


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

def computer_network_name
  @computer_network_name
end

#customer_idString

Specifies the contact’s customer ID number

Returns:

  • (String)


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

def customer_id
  @customer_id
end

#free_busy_locationString

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

Returns:

  • (String)


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

def free_busy_location
  @free_busy_location
end

#ftp_siteString

Specifies the contact’s File Transfer Protocol (FTP) URL

Returns:

  • (String)


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

def ftp_site
  @ftp_site
end

#genderString

Gender of the contact. Enum, available values: Unspecified, Female, Male

Returns:

  • (String)


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

def gender
  @gender
end

#government_id_numberString

Specifies the contact’s government ID number

Returns:

  • (String)


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

def government_id_number
  @government_id_number
end

#hobbiesString

Specifies the hobbies of the contact

Returns:

  • (String)


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

def hobbies
  @hobbies
end

#htmlString

Specifies the contact’s business web page URL

Returns:

  • (String)


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

def html
  @html
end

#instant_messaging_addressString

Specifies the contact’s instant messaging address

Returns:

  • (String)


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

def instant_messaging_address
  @instant_messaging_address
end

#languageString

Specifies the language that the contact uses

Returns:

  • (String)


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

def language
  @language
end

#locationString

Specifies the location of the contact

Returns:

  • (String)


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

def location
  @location
end

#notesString

Specifies the additional notes

Returns:

  • (String)


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

def notes
  @notes
end

#organizational_id_numberString

Specifies an organizational ID number for the contact

Returns:

  • (String)


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

def organizational_id_number
  @organizational_id_number
end

#personal_home_pageString

Specifies the contact’s personal web page URL

Returns:

  • (String)


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

def personal_home_page
  @personal_home_page
end

#referred_by_nameString

Specifies the name of the person who referred this contact to the user

Returns:

  • (String)


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

def referred_by_name
  @referred_by_name
end

#spouse_nameString

Specifies the name of the contact’s spouse/partner

Returns:

  • (String)


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

def spouse_name
  @spouse_name
end

Class Method Details

.attribute_mapObject

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_personal_info_property_set_dto.rb', line 89

def self.attribute_map
  {
    :'spouse_name' => :'spouseName',
    :'personal_home_page' => :'personalHomePage',
    :'language' => :'language',
    :'notes' => :'notes',
    :'hobbies' => :'hobbies',
    :'location' => :'location',
    :'instant_messaging_address' => :'instantMessagingAddress',
    :'organizational_id_number' => :'organizationalIdNumber',
    :'customer_id' => :'customerId',
    :'government_id_number' => :'governmentIdNumber',
    :'free_busy_location' => :'freeBusyLocation',
    :'account' => :'account',
    :'html' => :'html',
    :'business_home_page' => :'businessHomePage',
    :'ftp_site' => :'ftpSite',
    :'computer_network_name' => :'computerNetworkName',
    :'gender' => :'gender',
    :'referred_by_name' => :'referredByName',
    :'children' => :'children'
  }
end

.swagger_typesObject

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_personal_info_property_set_dto.rb', line 114

def self.swagger_types
  {
    :'spouse_name' => :'String',
    :'personal_home_page' => :'String',
    :'language' => :'String',
    :'notes' => :'String',
    :'hobbies' => :'String',
    :'location' => :'String',
    :'instant_messaging_address' => :'String',
    :'organizational_id_number' => :'String',
    :'customer_id' => :'String',
    :'government_id_number' => :'String',
    :'free_busy_location' => :'String',
    :'account' => :'String',
    :'html' => :'String',
    :'business_home_page' => :'String',
    :'ftp_site' => :'String',
    :'computer_network_name' => :'String',
    :'gender' => :'String',
    :'referred_by_name' => :'String',
    :'children' => :'Array<String>'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
# File 'lib/aspose-email-cloud/models/mapi_contact_personal_info_property_set_dto.rb', line 219

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      spouse_name == o.spouse_name &&
      personal_home_page == o.personal_home_page &&
      language == o.language &&
      notes == o.notes &&
      hobbies == o.hobbies &&
      location == o.location &&
      instant_messaging_address == o.instant_messaging_address &&
      organizational_id_number == o.organizational_id_number &&
      customer_id == o.customer_id &&
      government_id_number == o.government_id_number &&
      free_busy_location == o.free_busy_location &&
       == o. &&
      html == o.html &&
      business_home_page == o.business_home_page &&
      ftp_site == o.ftp_site &&
      computer_network_name == o.computer_network_name &&
      gender == o.gender &&
      referred_by_name == o.referred_by_name &&
      children == o.children
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



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

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



351
352
353
354
355
356
357
358
359
360
361
362
363
# File 'lib/aspose-email-cloud/models/mapi_contact_personal_info_property_set_dto.rb', line 351

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



258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
# File 'lib/aspose-email-cloud/models/mapi_contact_personal_info_property_set_dto.rb', line 258

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


245
246
247
# File 'lib/aspose-email-cloud/models/mapi_contact_personal_info_property_set_dto.rb', line 245

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



251
252
253
# File 'lib/aspose-email-cloud/models/mapi_contact_personal_info_property_set_dto.rb', line 251

def hash
  [spouse_name, personal_home_page, language, notes, hobbies, location, instant_messaging_address, organizational_id_number, customer_id, government_id_number, free_busy_location, , html, business_home_page, ftp_site, computer_network_name, gender, referred_by_name, children].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



201
202
203
204
205
206
207
208
# File 'lib/aspose-email-cloud/models/mapi_contact_personal_info_property_set_dto.rb', line 201

def list_invalid_properties
  invalid_properties = Array.new
  if @gender.nil?
    invalid_properties.push('invalid value for "gender", gender 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



331
332
333
# File 'lib/aspose-email-cloud/models/mapi_contact_personal_info_property_set_dto.rb', line 331

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



337
338
339
340
341
342
343
344
345
# File 'lib/aspose-email-cloud/models/mapi_contact_personal_info_property_set_dto.rb', line 337

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



325
326
327
# File 'lib/aspose-email-cloud/models/mapi_contact_personal_info_property_set_dto.rb', line 325

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



212
213
214
215
# File 'lib/aspose-email-cloud/models/mapi_contact_personal_info_property_set_dto.rb', line 212

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