Class Subscription

java.lang.Object
com.microsoft.graph.models.Entity
com.microsoft.graph.models.Subscription
All Implemented Interfaces:
com.microsoft.graph.serializer.IJsonBackedObject

public class Subscription extends Entity implements com.microsoft.graph.serializer.IJsonBackedObject
The class for the Subscription.
  • Field Details

    • applicationId

      @SerializedName(value="applicationId", alternate="ApplicationId") @Expose @Nullable public String applicationId
      The Application Id. Optional. Identifier of the application used to create the subscription. Read-only.
    • changeType

      @SerializedName(value="changeType", alternate="ChangeType") @Expose @Nullable public String changeType
      The Change Type. 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.
    • clientState

      @SerializedName(value="clientState", alternate="ClientState") @Expose @Nullable public String clientState
      The Client State. 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.
    • creatorId

      @SerializedName(value="creatorId", alternate="CreatorId") @Expose @Nullable public String creatorId
      The Creator Id. 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.
    • encryptionCertificate

      @SerializedName(value="encryptionCertificate", alternate="EncryptionCertificate") @Expose @Nullable public String encryptionCertificate
      The Encryption Certificate. 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.
    • encryptionCertificateId

      @SerializedName(value="encryptionCertificateId", alternate="EncryptionCertificateId") @Expose @Nullable public String encryptionCertificateId
      The Encryption Certificate Id. Optional. A custom app-provided identifier to help identify the certificate needed to decrypt resource data.
    • expirationDateTime

      @SerializedName(value="expirationDateTime", alternate="ExpirationDateTime") @Expose @Nullable public OffsetDateTime expirationDateTime
      The Expiration Date Time. 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.
    • includeResourceData

      @SerializedName(value="includeResourceData", alternate="IncludeResourceData") @Expose @Nullable public Boolean includeResourceData
      The Include Resource Data. Optional. When set to true, change notifications include resource data (such as content of a chat message).
    • latestSupportedTlsVersion

      @SerializedName(value="latestSupportedTlsVersion", alternate="LatestSupportedTlsVersion") @Expose @Nullable public String latestSupportedTlsVersion
      The Latest Supported Tls Version. 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.
    • lifecycleNotificationUrl

      @SerializedName(value="lifecycleNotificationUrl", alternate="LifecycleNotificationUrl") @Expose @Nullable public String lifecycleNotificationUrl
      The Lifecycle Notification Url. 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.
    • notificationQueryOptions

      @SerializedName(value="notificationQueryOptions", alternate="NotificationQueryOptions") @Expose @Nullable public String notificationQueryOptions
      The Notification Query Options. 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.
    • notificationUrl

      @SerializedName(value="notificationUrl", alternate="NotificationUrl") @Expose @Nullable public String notificationUrl
      The Notification Url. 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.
    • notificationUrlAppId

      @SerializedName(value="notificationUrlAppId", alternate="NotificationUrlAppId") @Expose @Nullable public String notificationUrlAppId
      The Notification Url App Id. 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.
    • resource

      @SerializedName(value="resource", alternate="Resource") @Expose @Nullable public String resource
      The Resource. Required. Specifies the resource that will be monitored for changes. Do not include the base URL (https://graph.microsoft.com/v1.0/). See the possible resource path values for each supported resource.
  • Constructor Details

    • Subscription

      public Subscription()
  • Method Details

    • setRawObject

      public void setRawObject(@Nonnull com.microsoft.graph.serializer.ISerializer serializer, @Nonnull com.google.gson.JsonObject json)
      Sets the raw JSON object
      Specified by:
      setRawObject in interface com.microsoft.graph.serializer.IJsonBackedObject
      Overrides:
      setRawObject in class Entity
      Parameters:
      serializer - the serializer
      json - the JSON object to set this object to