Package com.microsoft.graph.models
Class Subscription
java.lang.Object
com.microsoft.graph.models.Entity
com.microsoft.graph.models.Subscription
- All Implemented Interfaces:
com.microsoft.kiota.serialization.AdditionalDataHolder
,com.microsoft.kiota.serialization.Parsable
,com.microsoft.kiota.store.BackedModel
@Generated("com.microsoft.kiota")
public class Subscription
extends Entity
implements com.microsoft.kiota.serialization.Parsable
-
Field Summary
Fields inherited from class com.microsoft.graph.models.Entity
backingStore
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Subscription
createFromDiscriminatorValue
(com.microsoft.kiota.serialization.ParseNode parseNode) Creates a new instance of the appropriate class based on discriminator valueGets the applicationId property value.Gets the changeType property value.Gets the clientState property value.Gets the creatorId property value.Gets the encryptionCertificate property value.Gets the encryptionCertificateId property value.Gets the expirationDateTime property value.The deserialization information for the current modelGets the includeResourceData property value.Gets the latestSupportedTlsVersion property value.Gets the lifecycleNotificationUrl property value.Gets the notificationQueryOptions property value.Gets the notificationUrl property value.Gets the notificationUrlAppId property value.Gets the resource property value.void
serialize
(com.microsoft.kiota.serialization.SerializationWriter writer) Serializes information the current objectvoid
setApplicationId
(String value) Sets the applicationId property value.void
setChangeType
(String value) Sets the changeType property value.void
setClientState
(String value) Sets the clientState property value.void
setCreatorId
(String value) Sets the creatorId property value.void
setEncryptionCertificate
(String value) Sets the encryptionCertificate property value.void
setEncryptionCertificateId
(String value) Sets the encryptionCertificateId property value.void
Sets the expirationDateTime property value.void
setIncludeResourceData
(Boolean value) Sets the includeResourceData property value.void
Sets the latestSupportedTlsVersion property value.void
Sets the lifecycleNotificationUrl property value.void
Sets the notificationQueryOptions property value.void
setNotificationUrl
(String value) Sets the notificationUrl property value.void
setNotificationUrlAppId
(String value) Sets the notificationUrlAppId property value.void
setResource
(String value) Sets the resource property value.Methods inherited from class com.microsoft.graph.models.Entity
getAdditionalData, getBackingStore, getId, getOdataType, setAdditionalData, setBackingStore, setId, setOdataType
-
Constructor Details
-
Subscription
public Subscription()Instantiates a newSubscription
and sets the default values.
-
-
Method Details
-
createFromDiscriminatorValue
@Nonnull public static Subscription createFromDiscriminatorValue(@Nonnull com.microsoft.kiota.serialization.ParseNode parseNode) Creates a new instance of the appropriate class based on discriminator value- Parameters:
parseNode
- The parse node to use to read the discriminator value and create the object- Returns:
- a
Subscription
-
getApplicationId
Gets the applicationId property value. Optional. Identifier of the application used to create the subscription. Read-only.- Returns:
- a
String
-
getChangeType
Gets the changeType property value. Required. Indicates the type of change in the subscribed resource that raises 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.- Returns:
- a
String
-
getClientState
Gets the clientState property value. Optional. 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.- Returns:
- a
String
-
getCreatorId
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.- Returns:
- a
String
-
getEncryptionCertificate
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.- Returns:
- a
String
-
getEncryptionCertificateId
Gets the encryptionCertificateId property value. Optional. A custom app-provided identifier to help identify the certificate needed to decrypt resource data.- Returns:
- a
String
-
getExpirationDateTime
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 Subscription lifetime.- Returns:
- a
OffsetDateTime
-
getFieldDeserializers
@Nonnull public Map<String,Consumer<com.microsoft.kiota.serialization.ParseNode>> getFieldDeserializers()The deserialization information for the current model- Specified by:
getFieldDeserializers
in interfacecom.microsoft.kiota.serialization.Parsable
- Overrides:
getFieldDeserializers
in classEntity
- Returns:
- a
Map<String,
Consumer<com.microsoft.kiota.serialization.ParseNode>>
-
getIncludeResourceData
Gets the includeResourceData property value. Optional. When set to true, change notifications include resource data (such as content of a chat message).- Returns:
- a
Boolean
-
getLatestSupportedTlsVersion
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.- Returns:
- a
String
-
getLifecycleNotificationUrl
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.- Returns:
- a
String
-
getNotificationQueryOptions
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 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.- Returns:
- a
String
-
getNotificationUrl
Gets the notificationUrl property value. Required. The URL of the endpoint that receives the change notifications. This URL must make use of the HTTPS protocol. Any query string parameter included in the notificationUrl property is included in the HTTP POST request when Microsoft Graph sends the change notifications.- Returns:
- a
String
-
getNotificationUrlAppId
Gets the notificationUrlAppId property value. Optional. The app ID that the subscription service can use to generate the validation token. The value allows the client to validate the authenticity of the notification received.- Returns:
- a
String
-
getResource
Gets the resource property value. Required. Specifies the resource that is monitored for changes. Don't include the base URL (https://graph.microsoft.com/v1.0/). See the possible resource path values for each supported resource.- Returns:
- a
String
-
serialize
public void serialize(@Nonnull com.microsoft.kiota.serialization.SerializationWriter writer) Serializes information the current object -
setApplicationId
Sets the applicationId property value. Optional. Identifier of the application used to create the subscription. Read-only.- Parameters:
value
- Value to set for the applicationId property.
-
setChangeType
Sets the changeType property value. Required. Indicates the type of change in the subscribed resource that raises 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.- Parameters:
value
- Value to set for the changeType property.
-
setClientState
Sets the clientState property value. Optional. 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.- Parameters:
value
- Value to set for the clientState property.
-
setCreatorId
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.- Parameters:
value
- Value to set for the creatorId property.
-
setEncryptionCertificate
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.- Parameters:
value
- Value to set for the encryptionCertificate property.
-
setEncryptionCertificateId
Sets the encryptionCertificateId property value. Optional. A custom app-provided identifier to help identify the certificate needed to decrypt resource data.- Parameters:
value
- Value to set for the encryptionCertificateId property.
-
setExpirationDateTime
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 Subscription lifetime.- Parameters:
value
- Value to set for the expirationDateTime property.
-
setIncludeResourceData
Sets the includeResourceData property value. Optional. When set to true, change notifications include resource data (such as content of a chat message).- Parameters:
value
- Value to set for the includeResourceData property.
-
setLatestSupportedTlsVersion
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.- Parameters:
value
- Value to set for the latestSupportedTlsVersion property.
-
setLifecycleNotificationUrl
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.- Parameters:
value
- Value to set for the lifecycleNotificationUrl property.
-
setNotificationQueryOptions
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 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.- Parameters:
value
- Value to set for the notificationQueryOptions property.
-
setNotificationUrl
Sets the notificationUrl property value. Required. The URL of the endpoint that receives the change notifications. This URL must make use of the HTTPS protocol. Any query string parameter included in the notificationUrl property is included in the HTTP POST request when Microsoft Graph sends the change notifications.- Parameters:
value
- Value to set for the notificationUrl property.
-
setNotificationUrlAppId
Sets the notificationUrlAppId property value. Optional. The app ID that the subscription service can use to generate the validation token. The value allows the client to validate the authenticity of the notification received.- Parameters:
value
- Value to set for the notificationUrlAppId property.
-
setResource
Sets the resource property value. Required. Specifies the resource that is monitored for changes. Don't include the base URL (https://graph.microsoft.com/v1.0/). See the possible resource path values for each supported resource.- Parameters:
value
- Value to set for the resource property.
-