Class: MicrosoftGraph::Models::Person

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/person.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new person and sets the default values.



100
101
102
# File 'lib/models/person.rb', line 100

def initialize()
    super
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a person

Raises:

  • (StandardError)


108
109
110
111
# File 'lib/models/person.rb', line 108

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return Person.new
end

Instance Method Details

#birthdayObject

Gets the birthday property value. The person’s birthday.

Returns:

  • a string



70
71
72
# File 'lib/models/person.rb', line 70

def birthday
    return @birthday
end

#birthday=(value) ⇒ Object

Sets the birthday property value. The person’s birthday.

Parameters:

  • value

    Value to set for the birthday property.

Returns:

  • a void



78
79
80
# File 'lib/models/person.rb', line 78

def birthday=(value)
    @birthday = value
end

#company_nameObject

Gets the companyName property value. The name of the person’s company.

Returns:

  • a string



85
86
87
# File 'lib/models/person.rb', line 85

def company_name
    return @company_name
end

#company_name=(value) ⇒ Object

Sets the companyName property value. The name of the person’s company.

Parameters:

  • value

    Value to set for the companyName property.

Returns:

  • a void



93
94
95
# File 'lib/models/person.rb', line 93

def company_name=(value)
    @company_name = value
end

#departmentObject

Gets the department property value. The person’s department.

Returns:

  • a string



116
117
118
# File 'lib/models/person.rb', line 116

def department
    return @department
end

#department=(value) ⇒ Object

Sets the department property value. The person’s department.

Parameters:

  • value

    Value to set for the department property.

Returns:

  • a void



124
125
126
# File 'lib/models/person.rb', line 124

def department=(value)
    @department = value
end

#display_nameObject

Gets the displayName property value. The person’s display name.

Returns:

  • a string



131
132
133
# File 'lib/models/person.rb', line 131

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. The person’s display name.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



139
140
141
# File 'lib/models/person.rb', line 139

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'lib/models/person.rb', line 146

def get_field_deserializers()
    return super.merge({
        "birthday" => lambda {|n| @birthday = n.get_string_value() },
        "companyName" => lambda {|n| @company_name = n.get_string_value() },
        "department" => lambda {|n| @department = n.get_string_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "givenName" => lambda {|n| @given_name = n.get_string_value() },
        "imAddress" => lambda {|n| @im_address = n.get_string_value() },
        "isFavorite" => lambda {|n| @is_favorite = n.get_boolean_value() },
        "jobTitle" => lambda {|n| @job_title = n.get_string_value() },
        "officeLocation" => lambda {|n| @office_location = n.get_string_value() },
        "personNotes" => lambda {|n| @person_notes = n.get_string_value() },
        "personType" => lambda {|n| @person_type = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::PersonType.create_from_discriminator_value(pn) }) },
        "phones" => lambda {|n| @phones = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Phone.create_from_discriminator_value(pn) }) },
        "postalAddresses" => lambda {|n| @postal_addresses = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Location.create_from_discriminator_value(pn) }) },
        "profession" => lambda {|n| @profession = n.get_string_value() },
        "scoredEmailAddresses" => lambda {|n| @scored_email_addresses = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ScoredEmailAddress.create_from_discriminator_value(pn) }) },
        "surname" => lambda {|n| @surname = n.get_string_value() },
        "userPrincipalName" => lambda {|n| @user_principal_name = n.get_string_value() },
        "websites" => lambda {|n| @websites = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Website.create_from_discriminator_value(pn) }) },
        "yomiCompany" => lambda {|n| @yomi_company = n.get_string_value() },
    })
end

#given_nameObject

Gets the givenName property value. The person’s given name.

Returns:

  • a string



173
174
175
# File 'lib/models/person.rb', line 173

def given_name
    return @given_name
end

#given_name=(value) ⇒ Object

Sets the givenName property value. The person’s given name.

Parameters:

  • value

    Value to set for the givenName property.

Returns:

  • a void



181
182
183
# File 'lib/models/person.rb', line 181

def given_name=(value)
    @given_name = value
end

#im_addressObject

Gets the imAddress property value. The instant message voice over IP (VOIP) session initiation protocol (SIP) address for the user. Read-only.

Returns:

  • a string



188
189
190
# File 'lib/models/person.rb', line 188

def im_address
    return @im_address
end

#im_address=(value) ⇒ Object

Sets the imAddress property value. The instant message voice over IP (VOIP) session initiation protocol (SIP) address for the user. Read-only.

Parameters:

  • value

    Value to set for the imAddress property.

Returns:

  • a void



196
197
198
# File 'lib/models/person.rb', line 196

def im_address=(value)
    @im_address = value
end

#is_favoriteObject

Gets the isFavorite property value. True if the user has flagged this person as a favorite.

Returns:

  • a boolean



203
204
205
# File 'lib/models/person.rb', line 203

def is_favorite
    return @is_favorite
end

#is_favorite=(value) ⇒ Object

Sets the isFavorite property value. True if the user has flagged this person as a favorite.

Parameters:

  • value

    Value to set for the isFavorite property.

Returns:

  • a void



211
212
213
# File 'lib/models/person.rb', line 211

def is_favorite=(value)
    @is_favorite = value
end

#job_titleObject

Gets the jobTitle property value. The person’s job title.

Returns:

  • a string



218
219
220
# File 'lib/models/person.rb', line 218

def job_title
    return @job_title
end

#job_title=(value) ⇒ Object

Sets the jobTitle property value. The person’s job title.

Parameters:

  • value

    Value to set for the jobTitle property.

Returns:

  • a void



226
227
228
# File 'lib/models/person.rb', line 226

def job_title=(value)
    @job_title = value
end

#office_locationObject

Gets the officeLocation property value. The location of the person’s office.

Returns:

  • a string



233
234
235
# File 'lib/models/person.rb', line 233

def office_location
    return @office_location
end

#office_location=(value) ⇒ Object

Sets the officeLocation property value. The location of the person’s office.

Parameters:

  • value

    Value to set for the officeLocation property.

Returns:

  • a void



241
242
243
# File 'lib/models/person.rb', line 241

def office_location=(value)
    @office_location = value
end

#person_notesObject

Gets the personNotes property value. Free-form notes that the user has taken about this person.

Returns:

  • a string



248
249
250
# File 'lib/models/person.rb', line 248

def person_notes
    return @person_notes
end

#person_notes=(value) ⇒ Object

Sets the personNotes property value. Free-form notes that the user has taken about this person.

Parameters:

  • value

    Value to set for the personNotes property.

Returns:

  • a void



256
257
258
# File 'lib/models/person.rb', line 256

def person_notes=(value)
    @person_notes = value
end

#person_typeObject

Gets the personType property value. The type of person.

Returns:

  • a person_type



263
264
265
# File 'lib/models/person.rb', line 263

def person_type
    return @person_type
end

#person_type=(value) ⇒ Object

Sets the personType property value. The type of person.

Parameters:

  • value

    Value to set for the personType property.

Returns:

  • a void



271
272
273
# File 'lib/models/person.rb', line 271

def person_type=(value)
    @person_type = value
end

#phonesObject

Gets the phones property value. The person’s phone numbers.

Returns:

  • a phone



278
279
280
# File 'lib/models/person.rb', line 278

def phones
    return @phones
end

#phones=(value) ⇒ Object

Sets the phones property value. The person’s phone numbers.

Parameters:

  • value

    Value to set for the phones property.

Returns:

  • a void



286
287
288
# File 'lib/models/person.rb', line 286

def phones=(value)
    @phones = value
end

#postal_addressesObject

Gets the postalAddresses property value. The person’s addresses.

Returns:

  • a location



293
294
295
# File 'lib/models/person.rb', line 293

def postal_addresses
    return @postal_addresses
end

#postal_addresses=(value) ⇒ Object

Sets the postalAddresses property value. The person’s addresses.

Parameters:

  • value

    Value to set for the postalAddresses property.

Returns:

  • a void



301
302
303
# File 'lib/models/person.rb', line 301

def postal_addresses=(value)
    @postal_addresses = value
end

#professionObject

Gets the profession property value. The person’s profession.

Returns:

  • a string



308
309
310
# File 'lib/models/person.rb', line 308

def profession
    return @profession
end

#profession=(value) ⇒ Object

Sets the profession property value. The person’s profession.

Parameters:

  • value

    Value to set for the profession property.

Returns:

  • a void



316
317
318
# File 'lib/models/person.rb', line 316

def profession=(value)
    @profession = value
end

#scored_email_addressesObject

Gets the scoredEmailAddresses property value. The person’s email addresses.

Returns:

  • a scored_email_address



323
324
325
# File 'lib/models/person.rb', line 323

def scored_email_addresses
    return @scored_email_addresses
end

#scored_email_addresses=(value) ⇒ Object

Sets the scoredEmailAddresses property value. The person’s email addresses.

Parameters:

  • value

    Value to set for the scoredEmailAddresses property.

Returns:

  • a void



331
332
333
# File 'lib/models/person.rb', line 331

def scored_email_addresses=(value)
    @scored_email_addresses = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
# File 'lib/models/person.rb', line 339

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("birthday", @birthday)
    writer.write_string_value("companyName", @company_name)
    writer.write_string_value("department", @department)
    writer.write_string_value("displayName", @display_name)
    writer.write_string_value("givenName", @given_name)
    writer.write_string_value("imAddress", @im_address)
    writer.write_boolean_value("isFavorite", @is_favorite)
    writer.write_string_value("jobTitle", @job_title)
    writer.write_string_value("officeLocation", @office_location)
    writer.write_string_value("personNotes", @person_notes)
    writer.write_object_value("personType", @person_type)
    writer.write_collection_of_object_values("phones", @phones)
    writer.write_collection_of_object_values("postalAddresses", @postal_addresses)
    writer.write_string_value("profession", @profession)
    writer.write_collection_of_object_values("scoredEmailAddresses", @scored_email_addresses)
    writer.write_string_value("surname", @surname)
    writer.write_string_value("userPrincipalName", @user_principal_name)
    writer.write_collection_of_object_values("websites", @websites)
    writer.write_string_value("yomiCompany", @yomi_company)
end

#surnameObject

Gets the surname property value. The person’s surname.

Returns:

  • a string



366
367
368
# File 'lib/models/person.rb', line 366

def surname
    return @surname
end

#surname=(value) ⇒ Object

Sets the surname property value. The person’s surname.

Parameters:

  • value

    Value to set for the surname property.

Returns:

  • a void



374
375
376
# File 'lib/models/person.rb', line 374

def surname=(value)
    @surname = value
end

#user_principal_nameObject

Gets the userPrincipalName property value. The user principal name (UPN) of the person. The UPN is an Internet-style login name for the person based on the Internet standard RFC 822. By convention, this should map to the person’s email name. The general format is alias@domain.

Returns:

  • a string



381
382
383
# File 'lib/models/person.rb', line 381

def user_principal_name
    return @user_principal_name
end

#user_principal_name=(value) ⇒ Object

Sets the userPrincipalName property value. The user principal name (UPN) of the person. The UPN is an Internet-style login name for the person based on the Internet standard RFC 822. By convention, this should map to the person’s email name. The general format is alias@domain.

Parameters:

  • value

    Value to set for the userPrincipalName property.

Returns:

  • a void



389
390
391
# File 'lib/models/person.rb', line 389

def user_principal_name=(value)
    @user_principal_name = value
end

#websitesObject

Gets the websites property value. The person’s websites.

Returns:

  • a website



396
397
398
# File 'lib/models/person.rb', line 396

def websites
    return @websites
end

#websites=(value) ⇒ Object

Sets the websites property value. The person’s websites.

Parameters:

  • value

    Value to set for the websites property.

Returns:

  • a void



404
405
406
# File 'lib/models/person.rb', line 404

def websites=(value)
    @websites = value
end

#yomi_companyObject

Gets the yomiCompany property value. The phonetic Japanese name of the person’s company.

Returns:

  • a string



411
412
413
# File 'lib/models/person.rb', line 411

def yomi_company
    return @yomi_company
end

#yomi_company=(value) ⇒ Object

Sets the yomiCompany property value. The phonetic Japanese name of the person’s company.

Parameters:

  • value

    Value to set for the yomiCompany property.

Returns:

  • a void



419
420
421
# File 'lib/models/person.rb', line 419

def yomi_company=(value)
    @yomi_company = value
end