Class: MicrosoftGraph::Models::RelatedContact

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/related_contact.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new relatedContact and sets the default values.



64
65
66
# File 'lib/models/related_contact.rb', line 64

def initialize()
    @additional_data = Hash.new
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 related_contact

Raises:

  • (StandardError)


72
73
74
75
# File 'lib/models/related_contact.rb', line 72

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

Instance Method Details

Gets the accessConsent property value. Indicates whether the user has been consented to access student data.

Returns:

  • a boolean



34
35
36
# File 'lib/models/related_contact.rb', line 34

def access_consent
    return @access_consent
end

#access_consent=(value) ⇒ Object

Sets the accessConsent property value. Indicates whether the user has been consented to access student data.

Parameters:

  • value

    Value to set for the accessConsent property.

Returns:

  • a void



42
43
44
# File 'lib/models/related_contact.rb', line 42

def access_consent=(value)
    @access_consent = value
end

#additional_dataObject

Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



49
50
51
# File 'lib/models/related_contact.rb', line 49

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the additionalData property.

Returns:

  • a void



57
58
59
# File 'lib/models/related_contact.rb', line 57

def additional_data=(value)
    @additional_data = value
end

#display_nameObject

Gets the displayName property value. Name of the contact. Required.

Returns:

  • a string



80
81
82
# File 'lib/models/related_contact.rb', line 80

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. Name of the contact. Required.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



88
89
90
# File 'lib/models/related_contact.rb', line 88

def display_name=(value)
    @display_name = value
end

#email_addressObject

Gets the emailAddress property value. Primary email address of the contact. Required.

Returns:

  • a string



95
96
97
# File 'lib/models/related_contact.rb', line 95

def email_address
    return @email_address
end

#email_address=(value) ⇒ Object

Sets the emailAddress property value. Primary email address of the contact. Required.

Parameters:

  • value

    Value to set for the emailAddress property.

Returns:

  • a void



103
104
105
# File 'lib/models/related_contact.rb', line 103

def email_address=(value)
    @email_address = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



110
111
112
113
114
115
116
117
118
119
# File 'lib/models/related_contact.rb', line 110

def get_field_deserializers()
    return {
        "accessConsent" => lambda {|n| @access_consent = n.get_boolean_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "emailAddress" => lambda {|n| @email_address = n.get_string_value() },
        "mobilePhone" => lambda {|n| @mobile_phone = n.get_string_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "relationship" => lambda {|n| @relationship = n.get_enum_value(MicrosoftGraph::Models::ContactRelationship) },
    }
end

#mobile_phoneObject

Gets the mobilePhone property value. Mobile phone number of the contact.

Returns:

  • a string



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

def mobile_phone
    return @mobile_phone
end

#mobile_phone=(value) ⇒ Object

Sets the mobilePhone property value. Mobile phone number of the contact.

Parameters:

  • value

    Value to set for the mobilePhone property.

Returns:

  • a void



132
133
134
# File 'lib/models/related_contact.rb', line 132

def mobile_phone=(value)
    @mobile_phone = value
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



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

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



147
148
149
# File 'lib/models/related_contact.rb', line 147

def odata_type=(value)
    @odata_type = value
end

#relationshipObject

Gets the relationship property value. The relationship property

Returns:

  • a contact_relationship



154
155
156
# File 'lib/models/related_contact.rb', line 154

def relationship
    return @relationship
end

#relationship=(value) ⇒ Object

Sets the relationship property value. The relationship property

Parameters:

  • value

    Value to set for the relationship property.

Returns:

  • a void



162
163
164
# File 'lib/models/related_contact.rb', line 162

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


170
171
172
173
174
175
176
177
178
179
# File 'lib/models/related_contact.rb', line 170

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_boolean_value("accessConsent", @access_consent)
    writer.write_string_value("displayName", @display_name)
    writer.write_string_value("emailAddress", @email_address)
    writer.write_string_value("mobilePhone", @mobile_phone)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_enum_value("relationship", @relationship)
    writer.write_additional_data(@additional_data)
end