Class: MicrosoftGraph::Models::ConversationMember

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/conversation_member.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 conversationMember and sets the default values.



23
24
25
# File 'lib/models/conversation_member.rb', line 23

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 conversation_member

Raises:

  • (StandardError)


31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/models/conversation_member.rb', line 31

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    mapping_value_node = parse_node.get_child_node("@odata.type")
    unless mapping_value_node.nil? then
        mapping_value = mapping_value_node.get_string_value
        case mapping_value
            when "#microsoft.graph.aadUserConversationMember"
                return AadUserConversationMember.new
            when "#microsoft.graph.anonymousGuestConversationMember"
                return AnonymousGuestConversationMember.new
            when "#microsoft.graph.azureCommunicationServicesUserConversationMember"
                return AzureCommunicationServicesUserConversationMember.new
            when "#microsoft.graph.microsoftAccountUserConversationMember"
                return MicrosoftAccountUserConversationMember.new
            when "#microsoft.graph.skypeForBusinessUserConversationMember"
                return SkypeForBusinessUserConversationMember.new
            when "#microsoft.graph.skypeUserConversationMember"
                return SkypeUserConversationMember.new
        end
    end
    return ConversationMember.new
end

Instance Method Details

#display_nameObject

Gets the displayName property value. The display name of the user.

Returns:

  • a string



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

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. The display name of the user.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



65
66
67
# File 'lib/models/conversation_member.rb', line 65

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



72
73
74
75
76
77
78
# File 'lib/models/conversation_member.rb', line 72

def get_field_deserializers()
    return super.merge({
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "roles" => lambda {|n| @roles = n.get_collection_of_primitive_values(String) },
        "visibleHistoryStartDateTime" => lambda {|n| @visible_history_start_date_time = n.get_date_time_value() },
    })
end

#rolesObject

Gets the roles property value. The roles for that user. This property contains additional qualifiers only when relevant - for example, if the member has owner privileges, the roles property contains owner as one of the values. Similarly, if the member is an in-tenant guest, the roles property contains guest as one of the values. A basic member should not have any values specified in the roles property. An Out-of-tenant external member is assigned the owner role.

Returns:

  • a string



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

def roles
    return @roles
end

#roles=(value) ⇒ Object

Sets the roles property value. The roles for that user. This property contains additional qualifiers only when relevant - for example, if the member has owner privileges, the roles property contains owner as one of the values. Similarly, if the member is an in-tenant guest, the roles property contains guest as one of the values. A basic member should not have any values specified in the roles property. An Out-of-tenant external member is assigned the owner role.

Parameters:

  • value

    Value to set for the roles property.

Returns:

  • a void



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

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


99
100
101
102
103
104
105
# File 'lib/models/conversation_member.rb', line 99

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("displayName", @display_name)
    writer.write_collection_of_primitive_values("roles", @roles)
    writer.write_date_time_value("visibleHistoryStartDateTime", @visible_history_start_date_time)
end

#visible_history_start_date_timeObject

Gets the visibleHistoryStartDateTime property value. The timestamp denoting how far back a conversation’s history is shared with the conversation member. This property is settable only for members of a chat.

Returns:

  • a date_time



110
111
112
# File 'lib/models/conversation_member.rb', line 110

def visible_history_start_date_time
    return @visible_history_start_date_time
end

#visible_history_start_date_time=(value) ⇒ Object

Sets the visibleHistoryStartDateTime property value. The timestamp denoting how far back a conversation’s history is shared with the conversation member. This property is settable only for members of a chat.

Parameters:

  • value

    Value to set for the visibleHistoryStartDateTime property.

Returns:

  • a void



118
119
120
# File 'lib/models/conversation_member.rb', line 118

def visible_history_start_date_time=(value)
    @visible_history_start_date_time = value
end