Class: MicrosoftGraph::Models::ChangeNotification

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new changeNotification and sets the default values.



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

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 change_notification

Raises:

  • (StandardError)


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

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

Instance Method Details

#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



50
51
52
# File 'lib/models/change_notification.rb', line 50

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



58
59
60
# File 'lib/models/change_notification.rb', line 58

def additional_data=(value)
    @additional_data = value
end

#change_typeObject

Gets the changeType property value. The changeType property

Returns:

  • a change_type



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

def change_type
    return @change_type
end

#change_type=(value) ⇒ Object

Sets the changeType property value. The changeType property

Parameters:

  • value

    Value to set for the change_type property.

Returns:

  • a void



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

def change_type=(value)
    @change_type = value
end

#client_stateObject

Gets the clientState property value. Value of the clientState property sent in the subscription request (if any). The maximum length is 255 characters. The client can check whether the change notification came from the service by comparing the values of the clientState property. The value of the clientState property sent with the subscription is compared with the value of the clientState property received with each change notification. Optional.

Returns:

  • a string



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

def client_state
    return @client_state
end

#client_state=(value) ⇒ Object

Sets the clientState property value. Value of the clientState property sent in the subscription request (if any). The maximum length is 255 characters. The client can check whether the change notification came from the service by comparing the values of the clientState property. The value of the clientState property sent with the subscription is compared with the value of the clientState property received with each change notification. Optional.

Parameters:

  • value

    Value to set for the client_state property.

Returns:

  • a void



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

def client_state=(value)
    @client_state = value
end

#encrypted_contentObject

Gets the encryptedContent property value. (Preview) Encrypted content attached with the change notification. Only provided if encryptionCertificate and includeResourceData were defined during the subscription request and if the resource supports it. Optional.

Returns:

  • a change_notification_encrypted_content



111
112
113
# File 'lib/models/change_notification.rb', line 111

def encrypted_content
    return @encrypted_content
end

#encrypted_content=(value) ⇒ Object

Sets the encryptedContent property value. (Preview) Encrypted content attached with the change notification. Only provided if encryptionCertificate and includeResourceData were defined during the subscription request and if the resource supports it. Optional.

Parameters:

  • value

    Value to set for the encrypted_content property.

Returns:

  • a void



119
120
121
# File 'lib/models/change_notification.rb', line 119

def encrypted_content=(value)
    @encrypted_content = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# File 'lib/models/change_notification.rb', line 126

def get_field_deserializers()
    return {
        "changeType" => lambda {|n| @change_type = n.get_enum_value(MicrosoftGraph::Models::ChangeType) },
        "clientState" => lambda {|n| @client_state = n.get_string_value() },
        "encryptedContent" => lambda {|n| @encrypted_content = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ChangeNotificationEncryptedContent.create_from_discriminator_value(pn) }) },
        "id" => lambda {|n| @id = n.get_string_value() },
        "lifecycleEvent" => lambda {|n| @lifecycle_event = n.get_enum_value(MicrosoftGraph::Models::LifecycleEventType) },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "resource" => lambda {|n| @resource = n.get_string_value() },
        "resourceData" => lambda {|n| @resource_data = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ResourceData.create_from_discriminator_value(pn) }) },
        "subscriptionExpirationDateTime" => lambda {|n| @subscription_expiration_date_time = n.get_date_time_value() },
        "subscriptionId" => lambda {|n| @subscription_id = n.get_guid_value() },
        "tenantId" => lambda {|n| @tenant_id = n.get_guid_value() },
    }
end

#idObject

Gets the id property value. Unique ID for the notification. Optional.

Returns:

  • a string



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

def id
    return @id
end

#id=(value) ⇒ Object

Sets the id property value. Unique ID for the notification. Optional.

Parameters:

  • value

    Value to set for the id property.

Returns:

  • a void



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

def id=(value)
    @id = value
end

#lifecycle_eventObject

Gets the lifecycleEvent property value. The type of lifecycle notification if the current notification is a lifecycle notification. Optional. Supported values are missed, subscriptionRemoved, reauthorizationRequired. Optional.

Returns:

  • a lifecycle_event_type



160
161
162
# File 'lib/models/change_notification.rb', line 160

def lifecycle_event
    return @lifecycle_event
end

#lifecycle_event=(value) ⇒ Object

Sets the lifecycleEvent property value. The type of lifecycle notification if the current notification is a lifecycle notification. Optional. Supported values are missed, subscriptionRemoved, reauthorizationRequired. Optional.

Parameters:

  • value

    Value to set for the lifecycle_event property.

Returns:

  • a void



168
169
170
# File 'lib/models/change_notification.rb', line 168

def lifecycle_event=(value)
    @lifecycle_event = value
end

#odata_typeObject

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

Returns:

  • a string



175
176
177
# File 'lib/models/change_notification.rb', line 175

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



183
184
185
# File 'lib/models/change_notification.rb', line 183

def odata_type=(value)
    @odata_type = value
end

#resourceObject

Gets the resource property value. The URI of the resource that emitted the change notification relative to https://graph.microsoft.com. Required.

Returns:

  • a string



190
191
192
# File 'lib/models/change_notification.rb', line 190

def resource
    return @resource
end

#resource=(value) ⇒ Object

Sets the resource property value. The URI of the resource that emitted the change notification relative to https://graph.microsoft.com. Required.

Parameters:

  • value

    Value to set for the resource property.

Returns:

  • a void



198
199
200
# File 'lib/models/change_notification.rb', line 198

def resource=(value)
    @resource = value
end

#resource_dataObject

Gets the resourceData property value. The content of this property depends on the type of resource being subscribed to. Optional.

Returns:

  • a resource_data



205
206
207
# File 'lib/models/change_notification.rb', line 205

def resource_data
    return @resource_data
end

#resource_data=(value) ⇒ Object

Sets the resourceData property value. The content of this property depends on the type of resource being subscribed to. Optional.

Parameters:

  • value

    Value to set for the resource_data property.

Returns:

  • a void



213
214
215
# File 'lib/models/change_notification.rb', line 213

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


221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/models/change_notification.rb', line 221

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_enum_value("changeType", @change_type)
    writer.write_string_value("clientState", @client_state)
    writer.write_object_value("encryptedContent", @encrypted_content)
    writer.write_string_value("id", @id)
    writer.write_enum_value("lifecycleEvent", @lifecycle_event)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_string_value("resource", @resource)
    writer.write_object_value("resourceData", @resource_data)
    writer.write_date_time_value("subscriptionExpirationDateTime", @subscription_expiration_date_time)
    writer.write_guid_value("subscriptionId", @subscription_id)
    writer.write_guid_value("tenantId", @tenant_id)
    writer.write_additional_data(@additional_data)
end

#subscription_expiration_date_timeObject

Gets the subscriptionExpirationDateTime property value. The expiration time for the subscription. Required.

Returns:

  • a date_time



240
241
242
# File 'lib/models/change_notification.rb', line 240

def subscription_expiration_date_time
    return @subscription_expiration_date_time
end

#subscription_expiration_date_time=(value) ⇒ Object

Sets the subscriptionExpirationDateTime property value. The expiration time for the subscription. Required.

Parameters:

  • value

    Value to set for the subscription_expiration_date_time property.

Returns:

  • a void



248
249
250
# File 'lib/models/change_notification.rb', line 248

def subscription_expiration_date_time=(value)
    @subscription_expiration_date_time = value
end

#subscription_idObject

Gets the subscriptionId property value. The unique identifier of the subscription that generated the notification.Required.

Returns:

  • a guid



255
256
257
# File 'lib/models/change_notification.rb', line 255

def subscription_id
    return @subscription_id
end

#subscription_id=(value) ⇒ Object

Sets the subscriptionId property value. The unique identifier of the subscription that generated the notification.Required.

Parameters:

  • value

    Value to set for the subscription_id property.

Returns:

  • a void



263
264
265
# File 'lib/models/change_notification.rb', line 263

def subscription_id=(value)
    @subscription_id = value
end

#tenant_idObject

Gets the tenantId property value. The unique identifier of the tenant from which the change notification originated. Required.

Returns:

  • a guid



270
271
272
# File 'lib/models/change_notification.rb', line 270

def tenant_id
    return @tenant_id
end

#tenant_id=(value) ⇒ Object

Sets the tenantId property value. The unique identifier of the tenant from which the change notification originated. Required.

Parameters:

  • value

    Value to set for the tenant_id property.

Returns:

  • a void



278
279
280
# File 'lib/models/change_notification.rb', line 278

def tenant_id=(value)
    @tenant_id = value
end