Class: MicrosoftGraph::Me::Chats::Item::SendActivityNotification::SendActivityNotificationPostRequestBody

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/me/chats/item/send_activity_notification/send_activity_notification_post_request_body.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new sendActivityNotificationPostRequestBody and sets the default values.



89
90
91
# File 'lib/me/chats/item/send_activity_notification/send_activity_notification_post_request_body.rb', line 89

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 send_activity_notification_post_request_body

Raises:

  • (StandardError)


97
98
99
100
# File 'lib/me/chats/item/send_activity_notification/send_activity_notification_post_request_body.rb', line 97

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

Instance Method Details

#activity_typeObject

Gets the activityType property value. The activityType property

Returns:

  • a string



44
45
46
# File 'lib/me/chats/item/send_activity_notification/send_activity_notification_post_request_body.rb', line 44

def activity_type
    return @activity_type
end

#activity_type=(value) ⇒ Object

Sets the activityType property value. The activityType property

Parameters:

  • value

    Value to set for the activityType property.

Returns:

  • a void



52
53
54
# File 'lib/me/chats/item/send_activity_notification/send_activity_notification_post_request_body.rb', line 52

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



59
60
61
# File 'lib/me/chats/item/send_activity_notification/send_activity_notification_post_request_body.rb', line 59

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



67
68
69
# File 'lib/me/chats/item/send_activity_notification/send_activity_notification_post_request_body.rb', line 67

def additional_data=(value)
    @additional_data = value
end

#chain_idObject

Gets the chainId property value. The chainId property

Returns:

  • a int64



74
75
76
# File 'lib/me/chats/item/send_activity_notification/send_activity_notification_post_request_body.rb', line 74

def chain_id
    return @chain_id
end

#chain_id=(value) ⇒ Object

Sets the chainId property value. The chainId property

Parameters:

  • value

    Value to set for the chainId property.

Returns:

  • a void



82
83
84
# File 'lib/me/chats/item/send_activity_notification/send_activity_notification_post_request_body.rb', line 82

def chain_id=(value)
    @chain_id = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



105
106
107
108
109
110
111
112
113
114
# File 'lib/me/chats/item/send_activity_notification/send_activity_notification_post_request_body.rb', line 105

def get_field_deserializers()
    return {
        "activityType" => lambda {|n| @activity_type = n.get_string_value() },
        "chainId" => lambda {|n| @chain_id = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) },
        "previewText" => lambda {|n| @preview_text = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ItemBody.create_from_discriminator_value(pn) }) },
        "recipient" => lambda {|n| @recipient = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::TeamworkNotificationRecipient.create_from_discriminator_value(pn) }) },
        "templateParameters" => lambda {|n| @template_parameters = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::KeyValuePair.create_from_discriminator_value(pn) }) },
        "topic" => lambda {|n| @topic = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::TeamworkActivityTopic.create_from_discriminator_value(pn) }) },
    }
end

#preview_textObject

Gets the previewText property value. The previewText property

Returns:

  • a item_body



119
120
121
# File 'lib/me/chats/item/send_activity_notification/send_activity_notification_post_request_body.rb', line 119

def preview_text
    return @preview_text
end

#preview_text=(value) ⇒ Object

Sets the previewText property value. The previewText property

Parameters:

  • value

    Value to set for the previewText property.

Returns:

  • a void



127
128
129
# File 'lib/me/chats/item/send_activity_notification/send_activity_notification_post_request_body.rb', line 127

def preview_text=(value)
    @preview_text = value
end

#recipientObject

Gets the recipient property value. The recipient property

Returns:

  • a teamwork_notification_recipient



134
135
136
# File 'lib/me/chats/item/send_activity_notification/send_activity_notification_post_request_body.rb', line 134

def recipient
    return @recipient
end

#recipient=(value) ⇒ Object

Sets the recipient property value. The recipient property

Parameters:

  • value

    Value to set for the recipient property.

Returns:

  • a void



142
143
144
# File 'lib/me/chats/item/send_activity_notification/send_activity_notification_post_request_body.rb', line 142

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


150
151
152
153
154
155
156
157
158
159
# File 'lib/me/chats/item/send_activity_notification/send_activity_notification_post_request_body.rb', line 150

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_string_value("activityType", @activity_type)
    writer.write_object_value("chainId", @chain_id)
    writer.write_object_value("previewText", @preview_text)
    writer.write_object_value("recipient", @recipient)
    writer.write_collection_of_object_values("templateParameters", @template_parameters)
    writer.write_object_value("topic", @topic)
    writer.write_additional_data(@additional_data)
end

#template_parametersObject

Gets the templateParameters property value. The templateParameters property

Returns:

  • a key_value_pair



164
165
166
# File 'lib/me/chats/item/send_activity_notification/send_activity_notification_post_request_body.rb', line 164

def template_parameters
    return @template_parameters
end

#template_parameters=(value) ⇒ Object

Sets the templateParameters property value. The templateParameters property

Parameters:

  • value

    Value to set for the templateParameters property.

Returns:

  • a void



172
173
174
# File 'lib/me/chats/item/send_activity_notification/send_activity_notification_post_request_body.rb', line 172

def template_parameters=(value)
    @template_parameters = value
end

#topicObject

Gets the topic property value. The topic property

Returns:

  • a teamwork_activity_topic



179
180
181
# File 'lib/me/chats/item/send_activity_notification/send_activity_notification_post_request_body.rb', line 179

def topic
    return @topic
end

#topic=(value) ⇒ Object

Sets the topic property value. The topic property

Parameters:

  • value

    Value to set for the topic property.

Returns:

  • a void



187
188
189
# File 'lib/me/chats/item/send_activity_notification/send_activity_notification_post_request_body.rb', line 187

def topic=(value)
    @topic = value
end