Class: MicrosoftGraph::Models::OrgContact

Inherits:
DirectoryObject show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/org_contact.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DirectoryObject

#deleted_date_time, #deleted_date_time=

Methods inherited from Entity

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

Constructor Details

#initializeObject

Instantiates a new orgContact and sets the default values.



98
99
100
101
# File 'lib/models/org_contact.rb', line 98

def initialize()
    super
    @odata_type = "#microsoft.graph.orgContact"
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 org_contact

Raises:

  • (StandardError)


107
108
109
110
# File 'lib/models/org_contact.rb', line 107

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

Instance Method Details

#addressesObject

Gets the addresses property value. Postal addresses for this organizational contact. For now a contact can only have one physical address.

Returns:

  • a physical_office_address



68
69
70
# File 'lib/models/org_contact.rb', line 68

def addresses
    return @addresses
end

#addresses=(value) ⇒ Object

Sets the addresses property value. Postal addresses for this organizational contact. For now a contact can only have one physical address.

Parameters:

  • value

    Value to set for the addresses property.

Returns:

  • a void



76
77
78
# File 'lib/models/org_contact.rb', line 76

def addresses=(value)
    @addresses = value
end

#company_nameObject

Gets the companyName property value. Name of the company that this organizational contact belongs to. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).

Returns:

  • a string



83
84
85
# File 'lib/models/org_contact.rb', line 83

def company_name
    return @company_name
end

#company_name=(value) ⇒ Object

Sets the companyName property value. Name of the company that this organizational contact belongs to. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).

Parameters:

  • value

    Value to set for the companyName property.

Returns:

  • a void



91
92
93
# File 'lib/models/org_contact.rb', line 91

def company_name=(value)
    @company_name = value
end

#departmentObject

Gets the department property value. The name for the department in which the contact works. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).

Returns:

  • a string



115
116
117
# File 'lib/models/org_contact.rb', line 115

def department
    return @department
end

#department=(value) ⇒ Object

Sets the department property value. The name for the department in which the contact works. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).

Parameters:

  • value

    Value to set for the department property.

Returns:

  • a void



123
124
125
# File 'lib/models/org_contact.rb', line 123

def department=(value)
    @department = value
end

#direct_reportsObject

Gets the directReports property value. The contact’s direct reports. (The users and contacts that have their manager property set to this contact.) Read-only. Nullable. Supports $expand.

Returns:

  • a directory_object



130
131
132
# File 'lib/models/org_contact.rb', line 130

def direct_reports
    return @direct_reports
end

#direct_reports=(value) ⇒ Object

Sets the directReports property value. The contact’s direct reports. (The users and contacts that have their manager property set to this contact.) Read-only. Nullable. Supports $expand.

Parameters:

  • value

    Value to set for the directReports property.

Returns:

  • a void



138
139
140
# File 'lib/models/org_contact.rb', line 138

def direct_reports=(value)
    @direct_reports = value
end

#display_nameObject

Gets the displayName property value. Display name for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values), $search, and $orderBy.

Returns:

  • a string



145
146
147
# File 'lib/models/org_contact.rb', line 145

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. Display name for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values), $search, and $orderBy.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



153
154
155
# File 'lib/models/org_contact.rb', line 153

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# File 'lib/models/org_contact.rb', line 160

def get_field_deserializers()
    return super.merge({
        "addresses" => lambda {|n| @addresses = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::PhysicalOfficeAddress.create_from_discriminator_value(pn) }) },
        "companyName" => lambda {|n| @company_name = n.get_string_value() },
        "department" => lambda {|n| @department = n.get_string_value() },
        "directReports" => lambda {|n| @direct_reports = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "givenName" => lambda {|n| @given_name = n.get_string_value() },
        "jobTitle" => lambda {|n| @job_title = n.get_string_value() },
        "mail" => lambda {|n| @mail = n.get_string_value() },
        "mailNickname" => lambda {|n| @mail_nickname = n.get_string_value() },
        "manager" => lambda {|n| @manager = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) },
        "memberOf" => lambda {|n| @member_of = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) },
        "onPremisesLastSyncDateTime" => lambda {|n| @on_premises_last_sync_date_time = n.get_date_time_value() },
        "onPremisesProvisioningErrors" => lambda {|n| @on_premises_provisioning_errors = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::OnPremisesProvisioningError.create_from_discriminator_value(pn) }) },
        "onPremisesSyncEnabled" => lambda {|n| @on_premises_sync_enabled = n.get_boolean_value() },
        "phones" => lambda {|n| @phones = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Phone.create_from_discriminator_value(pn) }) },
        "proxyAddresses" => lambda {|n| @proxy_addresses = n.get_collection_of_primitive_values(String) },
        "surname" => lambda {|n| @surname = n.get_string_value() },
        "transitiveMemberOf" => lambda {|n| @transitive_member_of = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) },
    })
end

#given_nameObject

Gets the givenName property value. First name for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).

Returns:

  • a string



186
187
188
# File 'lib/models/org_contact.rb', line 186

def given_name
    return @given_name
end

#given_name=(value) ⇒ Object

Sets the givenName property value. First name for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).

Parameters:

  • value

    Value to set for the givenName property.

Returns:

  • a void



194
195
196
# File 'lib/models/org_contact.rb', line 194

def given_name=(value)
    @given_name = value
end

#job_titleObject

Gets the jobTitle property value. Job title for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).

Returns:

  • a string



201
202
203
# File 'lib/models/org_contact.rb', line 201

def job_title
    return @job_title
end

#job_title=(value) ⇒ Object

Sets the jobTitle property value. Job title for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).

Parameters:

  • value

    Value to set for the jobTitle property.

Returns:

  • a void



209
210
211
# File 'lib/models/org_contact.rb', line 209

def job_title=(value)
    @job_title = value
end

#mailObject

Gets the mail property value. The SMTP address for the contact, for example, ‘[email protected]’. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).

Returns:

  • a string



216
217
218
# File 'lib/models/org_contact.rb', line 216

def mail
    return @mail
end

#mail=(value) ⇒ Object

Sets the mail property value. The SMTP address for the contact, for example, ‘[email protected]’. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).

Parameters:

  • value

    Value to set for the mail property.

Returns:

  • a void



224
225
226
# File 'lib/models/org_contact.rb', line 224

def mail=(value)
    @mail = value
end

#mail_nicknameObject

Gets the mailNickname property value. Email alias (portion of email address pre-pending the @ symbol) for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).

Returns:

  • a string



231
232
233
# File 'lib/models/org_contact.rb', line 231

def mail_nickname
    return @mail_nickname
end

#mail_nickname=(value) ⇒ Object

Sets the mailNickname property value. Email alias (portion of email address pre-pending the @ symbol) for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).

Parameters:

  • value

    Value to set for the mailNickname property.

Returns:

  • a void



239
240
241
# File 'lib/models/org_contact.rb', line 239

def mail_nickname=(value)
    @mail_nickname = value
end

#managerObject

Gets the manager property value. The user or contact that is this contact’s manager. Read-only. Supports $expand and $filter (eq) by id.

Returns:

  • a directory_object



246
247
248
# File 'lib/models/org_contact.rb', line 246

def manager
    return @manager
end

#manager=(value) ⇒ Object

Sets the manager property value. The user or contact that is this contact’s manager. Read-only. Supports $expand and $filter (eq) by id.

Parameters:

  • value

    Value to set for the manager property.

Returns:

  • a void



254
255
256
# File 'lib/models/org_contact.rb', line 254

def manager=(value)
    @manager = value
end

#member_ofObject

Gets the memberOf property value. Groups that this contact is a member of. Read-only. Nullable. Supports $expand.

Returns:

  • a directory_object



261
262
263
# File 'lib/models/org_contact.rb', line 261

def member_of
    return @member_of
end

#member_of=(value) ⇒ Object

Sets the memberOf property value. Groups that this contact is a member of. Read-only. Nullable. Supports $expand.

Parameters:

  • value

    Value to set for the memberOf property.

Returns:

  • a void



269
270
271
# File 'lib/models/org_contact.rb', line 269

def member_of=(value)
    @member_of = value
end

#on_premises_last_sync_date_timeObject

Gets the onPremisesLastSyncDateTime property value. Date and time when this organizational contact was last synchronized from on-premises AD. This date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, not, ge, le, in).

Returns:

  • a date_time



276
277
278
# File 'lib/models/org_contact.rb', line 276

def on_premises_last_sync_date_time
    return @on_premises_last_sync_date_time
end

#on_premises_last_sync_date_time=(value) ⇒ Object

Sets the onPremisesLastSyncDateTime property value. Date and time when this organizational contact was last synchronized from on-premises AD. This date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, not, ge, le, in).

Parameters:

  • value

    Value to set for the onPremisesLastSyncDateTime property.

Returns:

  • a void



284
285
286
# File 'lib/models/org_contact.rb', line 284

def on_premises_last_sync_date_time=(value)
    @on_premises_last_sync_date_time = value
end

#on_premises_provisioning_errorsObject

Gets the onPremisesProvisioningErrors property value. List of any synchronization provisioning errors for this organizational contact. Supports $filter (eq, not for category and propertyCausingError), /$count eq 0, /$count ne 0.

Returns:

  • a on_premises_provisioning_error



291
292
293
# File 'lib/models/org_contact.rb', line 291

def on_premises_provisioning_errors
    return @on_premises_provisioning_errors
end

#on_premises_provisioning_errors=(value) ⇒ Object

Sets the onPremisesProvisioningErrors property value. List of any synchronization provisioning errors for this organizational contact. Supports $filter (eq, not for category and propertyCausingError), /$count eq 0, /$count ne 0.

Parameters:

  • value

    Value to set for the onPremisesProvisioningErrors property.

Returns:

  • a void



299
300
301
# File 'lib/models/org_contact.rb', line 299

def on_premises_provisioning_errors=(value)
    @on_premises_provisioning_errors = value
end

#on_premises_sync_enabledObject

Gets the onPremisesSyncEnabled property value. true if this object is synced from an on-premises directory; false if this object was originally synced from an on-premises directory but is no longer synced and now mastered in Exchange; null if this object has never been synced from an on-premises directory (default). Supports $filter (eq, ne, not, in, and eq for null values).

Returns:

  • a boolean



306
307
308
# File 'lib/models/org_contact.rb', line 306

def on_premises_sync_enabled
    return @on_premises_sync_enabled
end

#on_premises_sync_enabled=(value) ⇒ Object

Sets the onPremisesSyncEnabled property value. true if this object is synced from an on-premises directory; false if this object was originally synced from an on-premises directory but is no longer synced and now mastered in Exchange; null if this object has never been synced from an on-premises directory (default). Supports $filter (eq, ne, not, in, and eq for null values).

Parameters:

  • value

    Value to set for the onPremisesSyncEnabled property.

Returns:

  • a void



314
315
316
# File 'lib/models/org_contact.rb', line 314

def on_premises_sync_enabled=(value)
    @on_premises_sync_enabled = value
end

#phonesObject

Gets the phones property value. List of phones for this organizational contact. Phone types can be mobile, business, and businessFax. Only one of each type can ever be present in the collection.

Returns:

  • a phone



321
322
323
# File 'lib/models/org_contact.rb', line 321

def phones
    return @phones
end

#phones=(value) ⇒ Object

Sets the phones property value. List of phones for this organizational contact. Phone types can be mobile, business, and businessFax. Only one of each type can ever be present in the collection.

Parameters:

  • value

    Value to set for the phones property.

Returns:

  • a void



329
330
331
# File 'lib/models/org_contact.rb', line 329

def phones=(value)
    @phones = value
end

#proxy_addressesObject

Gets the proxyAddresses property value. For example: ‘SMTP: [email protected]’, ‘smtp: [email protected]’. The any operator is required for filter expressions on multi-valued properties. Supports $filter (eq, not, ge, le, startsWith, /$count eq 0, /$count ne 0).

Returns:

  • a string



336
337
338
# File 'lib/models/org_contact.rb', line 336

def proxy_addresses
    return @proxy_addresses
end

#proxy_addresses=(value) ⇒ Object

Sets the proxyAddresses property value. For example: ‘SMTP: [email protected]’, ‘smtp: [email protected]’. The any operator is required for filter expressions on multi-valued properties. Supports $filter (eq, not, ge, le, startsWith, /$count eq 0, /$count ne 0).

Parameters:

  • value

    Value to set for the proxyAddresses property.

Returns:

  • a void



344
345
346
# File 'lib/models/org_contact.rb', line 344

def proxy_addresses=(value)
    @proxy_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)


352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
# File 'lib/models/org_contact.rb', line 352

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_collection_of_object_values("addresses", @addresses)
    writer.write_string_value("companyName", @company_name)
    writer.write_string_value("department", @department)
    writer.write_collection_of_object_values("directReports", @direct_reports)
    writer.write_string_value("displayName", @display_name)
    writer.write_string_value("givenName", @given_name)
    writer.write_string_value("jobTitle", @job_title)
    writer.write_string_value("mail", @mail)
    writer.write_string_value("mailNickname", @mail_nickname)
    writer.write_object_value("manager", @manager)
    writer.write_collection_of_object_values("memberOf", @member_of)
    writer.write_date_time_value("onPremisesLastSyncDateTime", @on_premises_last_sync_date_time)
    writer.write_collection_of_object_values("onPremisesProvisioningErrors", @on_premises_provisioning_errors)
    writer.write_boolean_value("onPremisesSyncEnabled", @on_premises_sync_enabled)
    writer.write_collection_of_object_values("phones", @phones)
    writer.write_collection_of_primitive_values("proxyAddresses", @proxy_addresses)
    writer.write_string_value("surname", @surname)
    writer.write_collection_of_object_values("transitiveMemberOf", @transitive_member_of)
end

#surnameObject

Gets the surname property value. Last name for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).

Returns:

  • a string



378
379
380
# File 'lib/models/org_contact.rb', line 378

def surname
    return @surname
end

#surname=(value) ⇒ Object

Sets the surname property value. Last name for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).

Parameters:

  • value

    Value to set for the surname property.

Returns:

  • a void



386
387
388
# File 'lib/models/org_contact.rb', line 386

def surname=(value)
    @surname = value
end

#transitive_member_ofObject

Gets the transitiveMemberOf property value. Groups that this contact is a member of, including groups that the contact is nested under. Read-only. Nullable.

Returns:

  • a directory_object



393
394
395
# File 'lib/models/org_contact.rb', line 393

def transitive_member_of
    return @transitive_member_of
end

#transitive_member_of=(value) ⇒ Object

Sets the transitiveMemberOf property value. Groups that this contact is a member of, including groups that the contact is nested under. Read-only. Nullable.

Parameters:

  • value

    Value to set for the transitiveMemberOf property.

Returns:

  • a void



401
402
403
# File 'lib/models/org_contact.rb', line 401

def transitive_member_of=(value)
    @transitive_member_of = value
end