Class: MicrosoftGraph::Models::Subscription
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/subscription.rb
Class Method Summary collapse
-
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value.
Instance Method Summary collapse
-
#application_id ⇒ Object
Gets the applicationId property value.
-
#application_id=(value) ⇒ Object
Sets the applicationId property value.
-
#change_type ⇒ Object
Gets the changeType property value.
-
#change_type=(value) ⇒ Object
Sets the changeType property value.
-
#client_state ⇒ Object
Gets the clientState property value.
-
#client_state=(value) ⇒ Object
Sets the clientState property value.
-
#creator_id ⇒ Object
Gets the creatorId property value.
-
#creator_id=(value) ⇒ Object
Sets the creatorId property value.
-
#encryption_certificate ⇒ Object
Gets the encryptionCertificate property value.
-
#encryption_certificate=(value) ⇒ Object
Sets the encryptionCertificate property value.
-
#encryption_certificate_id ⇒ Object
Gets the encryptionCertificateId property value.
-
#encryption_certificate_id=(value) ⇒ Object
Sets the encryptionCertificateId property value.
-
#expiration_date_time ⇒ Object
Gets the expirationDateTime property value.
-
#expiration_date_time=(value) ⇒ Object
Sets the expirationDateTime property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#include_resource_data ⇒ Object
Gets the includeResourceData property value.
-
#include_resource_data=(value) ⇒ Object
Sets the includeResourceData property value.
-
#initialize ⇒ Object
constructor
Instantiates a new subscription and sets the default values.
-
#latest_supported_tls_version ⇒ Object
Gets the latestSupportedTlsVersion property value.
-
#latest_supported_tls_version=(value) ⇒ Object
Sets the latestSupportedTlsVersion property value.
-
#lifecycle_notification_url ⇒ Object
Gets the lifecycleNotificationUrl property value.
-
#lifecycle_notification_url=(value) ⇒ Object
Sets the lifecycleNotificationUrl property value.
-
#notification_query_options ⇒ Object
Gets the notificationQueryOptions property value.
-
#notification_query_options=(value) ⇒ Object
Sets the notificationQueryOptions property value.
-
#notification_url ⇒ Object
Gets the notificationUrl property value.
-
#notification_url=(value) ⇒ Object
Sets the notificationUrl property value.
-
#notification_url_app_id ⇒ Object
Gets the notificationUrlAppId property value.
-
#notification_url_app_id=(value) ⇒ Object
Sets the notificationUrlAppId property value.
-
#resource ⇒ Object
Gets the resource property value.
-
#resource=(value) ⇒ Object
Sets the resource property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
Instantiates a new subscription and sets the default values.
101 102 103 |
# File 'lib/models/subscription.rb', line 101 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
109 110 111 112 |
# File 'lib/models/subscription.rb', line 109 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return Subscription.new end |
Instance Method Details
#application_id ⇒ Object
Gets the applicationId property value. Optional. Identifier of the application used to create the subscription. Read-only.
56 57 58 |
# File 'lib/models/subscription.rb', line 56 def application_id return @application_id end |
#application_id=(value) ⇒ Object
Sets the applicationId property value. Optional. Identifier of the application used to create the subscription. Read-only.
64 65 66 |
# File 'lib/models/subscription.rb', line 64 def application_id=(value) @application_id = value end |
#change_type ⇒ Object
Gets the changeType property value. Required. Indicates the type of change in the subscribed resource that will raise a change notification. The supported values are: created, updated, deleted. Multiple values can be combined using a comma-separated list. Note: Drive root item and list change notifications support only the updated changeType. User and group change notifications support updated and deleted changeType. Use updated to receive notifications when user or group is created, updated or soft deleted. Use deleted to receive notifications when user or group is permanently deleted.
71 72 73 |
# File 'lib/models/subscription.rb', line 71 def change_type return @change_type end |
#change_type=(value) ⇒ Object
Sets the changeType property value. Required. Indicates the type of change in the subscribed resource that will raise a change notification. The supported values are: created, updated, deleted. Multiple values can be combined using a comma-separated list. Note: Drive root item and list change notifications support only the updated changeType. User and group change notifications support updated and deleted changeType. Use updated to receive notifications when user or group is created, updated or soft deleted. Use deleted to receive notifications when user or group is permanently deleted.
79 80 81 |
# File 'lib/models/subscription.rb', line 79 def change_type=(value) @change_type = value end |
#client_state ⇒ Object
Gets the clientState property value. Required. Specifies the value of the clientState property sent by the service in each change notification. The maximum length is 128 characters. The client can check that the change notification came from the service by comparing the value of the clientState property sent with the subscription with the value of the clientState property received with each change notification.
86 87 88 |
# File 'lib/models/subscription.rb', line 86 def client_state return @client_state end |
#client_state=(value) ⇒ Object
Sets the clientState property value. Required. Specifies the value of the clientState property sent by the service in each change notification. The maximum length is 128 characters. The client can check that the change notification came from the service by comparing the value of the clientState property sent with the subscription with the value of the clientState property received with each change notification.
94 95 96 |
# File 'lib/models/subscription.rb', line 94 def client_state=(value) @client_state = value end |
#creator_id ⇒ Object
Gets the creatorId property value. Optional. Identifier of the user or service principal that created the subscription. If the app used delegated permissions to create the subscription, this field contains the id of the signed-in user the app called on behalf of. If the app used application permissions, this field contains the id of the service principal corresponding to the app. Read-only.
117 118 119 |
# File 'lib/models/subscription.rb', line 117 def creator_id return @creator_id end |
#creator_id=(value) ⇒ Object
Sets the creatorId property value. Optional. Identifier of the user or service principal that created the subscription. If the app used delegated permissions to create the subscription, this field contains the id of the signed-in user the app called on behalf of. If the app used application permissions, this field contains the id of the service principal corresponding to the app. Read-only.
125 126 127 |
# File 'lib/models/subscription.rb', line 125 def creator_id=(value) @creator_id = value end |
#encryption_certificate ⇒ Object
Gets the encryptionCertificate property value. Optional. A base64-encoded representation of a certificate with a public key used to encrypt resource data in change notifications. Optional but required when includeResourceData is true.
132 133 134 |
# File 'lib/models/subscription.rb', line 132 def encryption_certificate return @encryption_certificate end |
#encryption_certificate=(value) ⇒ Object
Sets the encryptionCertificate property value. Optional. A base64-encoded representation of a certificate with a public key used to encrypt resource data in change notifications. Optional but required when includeResourceData is true.
140 141 142 |
# File 'lib/models/subscription.rb', line 140 def encryption_certificate=(value) @encryption_certificate = value end |
#encryption_certificate_id ⇒ Object
Gets the encryptionCertificateId property value. Optional. A custom app-provided identifier to help identify the certificate needed to decrypt resource data.
147 148 149 |
# File 'lib/models/subscription.rb', line 147 def encryption_certificate_id return @encryption_certificate_id end |
#encryption_certificate_id=(value) ⇒ Object
Sets the encryptionCertificateId property value. Optional. A custom app-provided identifier to help identify the certificate needed to decrypt resource data.
155 156 157 |
# File 'lib/models/subscription.rb', line 155 def encryption_certificate_id=(value) @encryption_certificate_id = value end |
#expiration_date_time ⇒ Object
Gets the expirationDateTime property value. Required. Specifies the date and time when the webhook subscription expires. The time is in UTC, and can be an amount of time from subscription creation that varies for the resource subscribed to. For the maximum supported subscription length of time, see the table below.
162 163 164 |
# File 'lib/models/subscription.rb', line 162 def expiration_date_time return @expiration_date_time end |
#expiration_date_time=(value) ⇒ Object
Sets the expirationDateTime property value. Required. Specifies the date and time when the webhook subscription expires. The time is in UTC, and can be an amount of time from subscription creation that varies for the resource subscribed to. For the maximum supported subscription length of time, see the table below.
170 171 172 |
# File 'lib/models/subscription.rb', line 170 def expiration_date_time=(value) @expiration_date_time = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/models/subscription.rb', line 177 def get_field_deserializers() return super.merge({ "applicationId" => lambda {|n| @application_id = n.get_string_value() }, "changeType" => lambda {|n| @change_type = n.get_string_value() }, "clientState" => lambda {|n| @client_state = n.get_string_value() }, "creatorId" => lambda {|n| @creator_id = n.get_string_value() }, "encryptionCertificate" => lambda {|n| @encryption_certificate = n.get_string_value() }, "encryptionCertificateId" => lambda {|n| @encryption_certificate_id = n.get_string_value() }, "expirationDateTime" => lambda {|n| @expiration_date_time = n.get_date_time_value() }, "includeResourceData" => lambda {|n| @include_resource_data = n.get_boolean_value() }, "latestSupportedTlsVersion" => lambda {|n| @latest_supported_tls_version = n.get_string_value() }, "lifecycleNotificationUrl" => lambda {|n| @lifecycle_notification_url = n.get_string_value() }, "notificationQueryOptions" => lambda {|n| @notification_query_options = n.get_string_value() }, "notificationUrl" => lambda {|n| @notification_url = n.get_string_value() }, "notificationUrlAppId" => lambda {|n| @notification_url_app_id = n.get_string_value() }, "resource" => lambda {|n| @resource = n.get_string_value() }, }) end |
#include_resource_data ⇒ Object
Gets the includeResourceData property value. Optional. When set to true, change notifications include resource data (such as content of a chat message).
199 200 201 |
# File 'lib/models/subscription.rb', line 199 def include_resource_data return @include_resource_data end |
#include_resource_data=(value) ⇒ Object
Sets the includeResourceData property value. Optional. When set to true, change notifications include resource data (such as content of a chat message).
207 208 209 |
# File 'lib/models/subscription.rb', line 207 def include_resource_data=(value) @include_resource_data = value end |
#latest_supported_tls_version ⇒ Object
Gets the latestSupportedTlsVersion property value. Optional. Specifies the latest version of Transport Layer Security (TLS) that the notification endpoint, specified by notificationUrl, supports. The possible values are: v10, v11, v12, v13. For subscribers whose notification endpoint supports a version lower than the currently recommended version (TLS 1.2), specifying this property by a set timeline allows them to temporarily use their deprecated version of TLS before completing their upgrade to TLS 1.2. For these subscribers, not setting this property per the timeline would result in subscription operations failing. For subscribers whose notification endpoint already supports TLS 1.2, setting this property is optional. In such cases, Microsoft Graph defaults the property to v1_2.
214 215 216 |
# File 'lib/models/subscription.rb', line 214 def latest_supported_tls_version return @latest_supported_tls_version end |
#latest_supported_tls_version=(value) ⇒ Object
Sets the latestSupportedTlsVersion property value. Optional. Specifies the latest version of Transport Layer Security (TLS) that the notification endpoint, specified by notificationUrl, supports. The possible values are: v10, v11, v12, v13. For subscribers whose notification endpoint supports a version lower than the currently recommended version (TLS 1.2), specifying this property by a set timeline allows them to temporarily use their deprecated version of TLS before completing their upgrade to TLS 1.2. For these subscribers, not setting this property per the timeline would result in subscription operations failing. For subscribers whose notification endpoint already supports TLS 1.2, setting this property is optional. In such cases, Microsoft Graph defaults the property to v1_2.
222 223 224 |
# File 'lib/models/subscription.rb', line 222 def latest_supported_tls_version=(value) @latest_supported_tls_version = value end |
#lifecycle_notification_url ⇒ Object
Gets the lifecycleNotificationUrl property value. Required for Teams resources if the expirationDateTime value is more than 1 hour from now; optional otherwise. The URL of the endpoint that receives lifecycle notifications, including subscriptionRemoved, reauthorizationRequired, and missed notifications. This URL must make use of the HTTPS protocol. For more information, see Reduce missing subscriptions and change notifications.
229 230 231 |
# File 'lib/models/subscription.rb', line 229 def lifecycle_notification_url return @lifecycle_notification_url end |
#lifecycle_notification_url=(value) ⇒ Object
Sets the lifecycleNotificationUrl property value. Required for Teams resources if the expirationDateTime value is more than 1 hour from now; optional otherwise. The URL of the endpoint that receives lifecycle notifications, including subscriptionRemoved, reauthorizationRequired, and missed notifications. This URL must make use of the HTTPS protocol. For more information, see Reduce missing subscriptions and change notifications.
237 238 239 |
# File 'lib/models/subscription.rb', line 237 def lifecycle_notification_url=(value) @lifecycle_notification_url = value end |
#notification_query_options ⇒ Object
Gets the notificationQueryOptions property value. Optional. OData query options for specifying value for the targeting resource. Clients receive notifications when resource reaches the state matching the query options provided here. With this new property in the subscription creation payload along with all existing properties, Webhooks will deliver notifications whenever a resource reaches the desired state mentioned in the notificationQueryOptions property. For example, when the print job is completed or when a print job resource isFetchable property value becomes true etc. Supported only for Universal Print Service. For more information, see Subscribe to change notifications from cloud printing APIs using Microsoft Graph.
244 245 246 |
# File 'lib/models/subscription.rb', line 244 def return @notification_query_options end |
#notification_query_options=(value) ⇒ Object
Sets the notificationQueryOptions property value. Optional. OData query options for specifying value for the targeting resource. Clients receive notifications when resource reaches the state matching the query options provided here. With this new property in the subscription creation payload along with all existing properties, Webhooks will deliver notifications whenever a resource reaches the desired state mentioned in the notificationQueryOptions property. For example, when the print job is completed or when a print job resource isFetchable property value becomes true etc. Supported only for Universal Print Service. For more information, see Subscribe to change notifications from cloud printing APIs using Microsoft Graph.
252 253 254 |
# File 'lib/models/subscription.rb', line 252 def (value) @notification_query_options = value end |
#notification_url ⇒ Object
Gets the notificationUrl property value. Required. The URL of the endpoint that will receive the change notifications. This URL must make use of the HTTPS protocol. Any query string parameter included in the notificationUrl property will be included in the HTTP POST request when Microsoft Graph sends the change notifications.
259 260 261 |
# File 'lib/models/subscription.rb', line 259 def notification_url return @notification_url end |
#notification_url=(value) ⇒ Object
Sets the notificationUrl property value. Required. The URL of the endpoint that will receive the change notifications. This URL must make use of the HTTPS protocol. Any query string parameter included in the notificationUrl property will be included in the HTTP POST request when Microsoft Graph sends the change notifications.
267 268 269 |
# File 'lib/models/subscription.rb', line 267 def notification_url=(value) @notification_url = value end |
#notification_url_app_id ⇒ Object
Gets the notificationUrlAppId property value. Optional. The app ID that the subscription service can use to generate the validation token. This allows the client to validate the authenticity of the notification received.
274 275 276 |
# File 'lib/models/subscription.rb', line 274 def notification_url_app_id return @notification_url_app_id end |
#notification_url_app_id=(value) ⇒ Object
Sets the notificationUrlAppId property value. Optional. The app ID that the subscription service can use to generate the validation token. This allows the client to validate the authenticity of the notification received.
282 283 284 |
# File 'lib/models/subscription.rb', line 282 def notification_url_app_id=(value) @notification_url_app_id = value end |
#resource ⇒ Object
Gets the resource property value. Required. Specifies the resource that will be monitored for changes. Do not include the base URL (graph.microsoft.com/v1.0/). See the possible resource path values for each supported resource.
289 290 291 |
# File 'lib/models/subscription.rb', line 289 def resource return @resource end |
#resource=(value) ⇒ Object
Sets the resource property value. Required. Specifies the resource that will be monitored for changes. Do not include the base URL (graph.microsoft.com/v1.0/). See the possible resource path values for each supported resource.
297 298 299 |
# File 'lib/models/subscription.rb', line 297 def resource=(value) @resource = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 |
# File 'lib/models/subscription.rb', line 305 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_string_value("applicationId", @application_id) writer.write_string_value("changeType", @change_type) writer.write_string_value("clientState", @client_state) writer.write_string_value("creatorId", @creator_id) writer.write_string_value("encryptionCertificate", @encryption_certificate) writer.write_string_value("encryptionCertificateId", @encryption_certificate_id) writer.write_date_time_value("expirationDateTime", @expiration_date_time) writer.write_boolean_value("includeResourceData", @include_resource_data) writer.write_string_value("latestSupportedTlsVersion", @latest_supported_tls_version) writer.write_string_value("lifecycleNotificationUrl", @lifecycle_notification_url) writer.write_string_value("notificationQueryOptions", @notification_query_options) writer.write_string_value("notificationUrl", @notification_url) writer.write_string_value("notificationUrlAppId", @notification_url_app_id) writer.write_string_value("resource", @resource) end |