Class: MicrosoftGraph::Models::ServiceUpdateMessage

Inherits:
ServiceAnnouncementBase show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/service_update_message.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ServiceAnnouncementBase

#details, #details=, #end_date_time, #end_date_time=, #last_modified_date_time, #last_modified_date_time=, #start_date_time, #start_date_time=, #title, #title=

Methods inherited from Entity

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

Constructor Details

#initializeObject

Instantiates a new serviceUpdateMessage and sets the default values.



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

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

Raises:

  • (StandardError)


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

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

Instance Method Details

#action_required_by_date_timeObject

Gets the actionRequiredByDateTime property value. The expected deadline of the action for the message.

Returns:

  • a date_time



47
48
49
# File 'lib/models/service_update_message.rb', line 47

def action_required_by_date_time
    return @action_required_by_date_time
end

#action_required_by_date_time=(value) ⇒ Object

Sets the actionRequiredByDateTime property value. The expected deadline of the action for the message.

Parameters:

  • value

    Value to set for the actionRequiredByDateTime property.

Returns:

  • a void



55
56
57
# File 'lib/models/service_update_message.rb', line 55

def action_required_by_date_time=(value)
    @action_required_by_date_time = value
end

#attachmentsObject

Gets the attachments property value. A collection of serviceAnnouncementAttachments.

Returns:

  • a service_announcement_attachment



62
63
64
# File 'lib/models/service_update_message.rb', line 62

def attachments
    return @attachments
end

#attachments=(value) ⇒ Object

Sets the attachments property value. A collection of serviceAnnouncementAttachments.

Parameters:

  • value

    Value to set for the attachments property.

Returns:

  • a void



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

def attachments=(value)
    @attachments = value
end

#attachments_archiveObject

Gets the attachmentsArchive property value. The zip file that contains all attachments for a message.

Returns:

  • a base64url



77
78
79
# File 'lib/models/service_update_message.rb', line 77

def attachments_archive
    return @attachments_archive
end

#attachments_archive=(value) ⇒ Object

Sets the attachmentsArchive property value. The zip file that contains all attachments for a message.

Parameters:

  • value

    Value to set for the attachmentsArchive property.

Returns:

  • a void



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

def attachments_archive=(value)
    @attachments_archive = value
end

#bodyObject

Gets the body property value. The body property

Returns:

  • a item_body



92
93
94
# File 'lib/models/service_update_message.rb', line 92

def body
    return @body
end

#body=(value) ⇒ Object

Sets the body property value. The body property

Parameters:

  • value

    Value to set for the body property.

Returns:

  • a void



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

def body=(value)
    @body = value
end

#categoryObject

Gets the category property value. The category property

Returns:

  • a service_update_category



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

def category
    return @category
end

#category=(value) ⇒ Object

Sets the category property value. The category property

Parameters:

  • value

    Value to set for the category property.

Returns:

  • a void



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

def category=(value)
    @category = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# File 'lib/models/service_update_message.rb', line 139

def get_field_deserializers()
    return super.merge({
        "actionRequiredByDateTime" => lambda {|n| @action_required_by_date_time = n.get_date_time_value() },
        "attachments" => lambda {|n| @attachments = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ServiceAnnouncementAttachment.create_from_discriminator_value(pn) }) },
        "attachmentsArchive" => lambda {|n| @attachments_archive = n.get_object_value(lambda {|pn| Base64url.create_from_discriminator_value(pn) }) },
        "body" => lambda {|n| @body = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ItemBody.create_from_discriminator_value(pn) }) },
        "category" => lambda {|n| @category = n.get_enum_value(MicrosoftGraph::Models::ServiceUpdateCategory) },
        "hasAttachments" => lambda {|n| @has_attachments = n.get_boolean_value() },
        "isMajorChange" => lambda {|n| @is_major_change = n.get_boolean_value() },
        "services" => lambda {|n| @services = n.get_collection_of_primitive_values(String) },
        "severity" => lambda {|n| @severity = n.get_enum_value(MicrosoftGraph::Models::ServiceUpdateSeverity) },
        "tags" => lambda {|n| @tags = n.get_collection_of_primitive_values(String) },
        "viewPoint" => lambda {|n| @view_point = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ServiceUpdateMessageViewpoint.create_from_discriminator_value(pn) }) },
    })
end

#has_attachmentsObject

Gets the hasAttachments property value. Indicates whether the message has any attachment.

Returns:

  • a boolean



158
159
160
# File 'lib/models/service_update_message.rb', line 158

def has_attachments
    return @has_attachments
end

#has_attachments=(value) ⇒ Object

Sets the hasAttachments property value. Indicates whether the message has any attachment.

Parameters:

  • value

    Value to set for the hasAttachments property.

Returns:

  • a void



166
167
168
# File 'lib/models/service_update_message.rb', line 166

def has_attachments=(value)
    @has_attachments = value
end

#is_major_changeObject

Gets the isMajorChange property value. Indicates whether the message describes a major update for the service.

Returns:

  • a boolean



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

def is_major_change
    return @is_major_change
end

#is_major_change=(value) ⇒ Object

Sets the isMajorChange property value. Indicates whether the message describes a major update for the service.

Parameters:

  • value

    Value to set for the isMajorChange property.

Returns:

  • a void



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

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


189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# File 'lib/models/service_update_message.rb', line 189

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_date_time_value("actionRequiredByDateTime", @action_required_by_date_time)
    writer.write_collection_of_object_values("attachments", @attachments)
    writer.write_object_value("attachmentsArchive", @attachments_archive)
    writer.write_object_value("body", @body)
    writer.write_enum_value("category", @category)
    writer.write_boolean_value("hasAttachments", @has_attachments)
    writer.write_boolean_value("isMajorChange", @is_major_change)
    writer.write_collection_of_primitive_values("services", @services)
    writer.write_enum_value("severity", @severity)
    writer.write_collection_of_primitive_values("tags", @tags)
    writer.write_object_value("viewPoint", @view_point)
end

#servicesObject

Gets the services property value. The affected services by the service message.

Returns:

  • a string



208
209
210
# File 'lib/models/service_update_message.rb', line 208

def services
    return @services
end

#services=(value) ⇒ Object

Sets the services property value. The affected services by the service message.

Parameters:

  • value

    Value to set for the services property.

Returns:

  • a void



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

def services=(value)
    @services = value
end

#severityObject

Gets the severity property value. The severity property

Returns:

  • a service_update_severity



223
224
225
# File 'lib/models/service_update_message.rb', line 223

def severity
    return @severity
end

#severity=(value) ⇒ Object

Sets the severity property value. The severity property

Parameters:

  • value

    Value to set for the severity property.

Returns:

  • a void



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

def severity=(value)
    @severity = value
end

#tagsObject

Gets the tags property value. A collection of tags for the service message. Tags are provided by the service team/support team who post the message to tell whether this message contains privacy data, or whether this message is for a service new feature update, and so on.

Returns:

  • a string



238
239
240
# File 'lib/models/service_update_message.rb', line 238

def tags
    return @tags
end

#tags=(value) ⇒ Object

Sets the tags property value. A collection of tags for the service message. Tags are provided by the service team/support team who post the message to tell whether this message contains privacy data, or whether this message is for a service new feature update, and so on.

Parameters:

  • value

    Value to set for the tags property.

Returns:

  • a void



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

def tags=(value)
    @tags = value
end

#view_pointObject

Gets the viewPoint property value. Represents user viewpoints data of the service message. This data includes message status such as whether the user has archived, read, or marked the message as favorite. This property is null when accessed with application permissions.

Returns:

  • a service_update_message_viewpoint



253
254
255
# File 'lib/models/service_update_message.rb', line 253

def view_point
    return @view_point
end

#view_point=(value) ⇒ Object

Sets the viewPoint property value. Represents user viewpoints data of the service message. This data includes message status such as whether the user has archived, read, or marked the message as favorite. This property is null when accessed with application permissions.

Parameters:

  • value

    Value to set for the viewPoint property.

Returns:

  • a void



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

def view_point=(value)
    @view_point = value
end