Class MicrosoftGraphSubscription

java.lang.Object
com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphEntity
com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphSubscription

public final class MicrosoftGraphSubscription extends MicrosoftGraphEntity
subscription.
  • Constructor Details

    • MicrosoftGraphSubscription

      public MicrosoftGraphSubscription()
      Creates an instance of MicrosoftGraphSubscription class.
  • Method Details

    • applicationId

      public String applicationId()
      Get the applicationId property: Identifier of the application used to create the subscription. Read-only.
      Returns:
      the applicationId value.
    • withApplicationId

      public MicrosoftGraphSubscription withApplicationId(String applicationId)
      Set the applicationId property: Identifier of the application used to create the subscription. Read-only.
      Parameters:
      applicationId - the applicationId value to set.
      Returns:
      the MicrosoftGraphSubscription object itself.
    • changeType

      public String changeType()
      Get the changeType property: 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.
      Returns:
      the changeType value.
    • withChangeType

      public MicrosoftGraphSubscription withChangeType(String changeType)
      Set the changeType property: 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.
      Parameters:
      changeType - the changeType value to set.
      Returns:
      the MicrosoftGraphSubscription object itself.
    • clientState

      public String clientState()
      Get the clientState property: 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:
      the clientState value.
    • withClientState

      public MicrosoftGraphSubscription withClientState(String clientState)
      Set the clientState property: 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:
      clientState - the clientState value to set.
      Returns:
      the MicrosoftGraphSubscription object itself.
    • creatorId

      public String creatorId()
      Get the creatorId property: 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:
      the creatorId value.
    • withCreatorId

      public MicrosoftGraphSubscription withCreatorId(String creatorId)
      Set the creatorId property: 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:
      creatorId - the creatorId value to set.
      Returns:
      the MicrosoftGraphSubscription object itself.
    • encryptionCertificate

      public String encryptionCertificate()
      Get the encryptionCertificate property: A base64-encoded representation of a certificate with a public key used to encrypt resource data in change notifications. Optional. Required when includeResourceData is true.
      Returns:
      the encryptionCertificate value.
    • withEncryptionCertificate

      public MicrosoftGraphSubscription withEncryptionCertificate(String encryptionCertificate)
      Set the encryptionCertificate property: A base64-encoded representation of a certificate with a public key used to encrypt resource data in change notifications. Optional. Required when includeResourceData is true.
      Parameters:
      encryptionCertificate - the encryptionCertificate value to set.
      Returns:
      the MicrosoftGraphSubscription object itself.
    • encryptionCertificateId

      public String encryptionCertificateId()
      Get the encryptionCertificateId property: A custom app-provided identifier to help identify the certificate needed to decrypt resource data. Optional.
      Returns:
      the encryptionCertificateId value.
    • withEncryptionCertificateId

      public MicrosoftGraphSubscription withEncryptionCertificateId(String encryptionCertificateId)
      Set the encryptionCertificateId property: A custom app-provided identifier to help identify the certificate needed to decrypt resource data. Optional.
      Parameters:
      encryptionCertificateId - the encryptionCertificateId value to set.
      Returns:
      the MicrosoftGraphSubscription object itself.
    • expirationDateTime

      public OffsetDateTime expirationDateTime()
      Get the expirationDateTime property: 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. See the table below for maximum supported subscription length of time.
      Returns:
      the expirationDateTime value.
    • withExpirationDateTime

      public MicrosoftGraphSubscription withExpirationDateTime(OffsetDateTime expirationDateTime)
      Set the expirationDateTime property: 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. See the table below for maximum supported subscription length of time.
      Parameters:
      expirationDateTime - the expirationDateTime value to set.
      Returns:
      the MicrosoftGraphSubscription object itself.
    • includeResourceData

      public Boolean includeResourceData()
      Get the includeResourceData property: When set to true, change notifications include resource data (such as content of a chat message). Optional.
      Returns:
      the includeResourceData value.
    • withIncludeResourceData

      public MicrosoftGraphSubscription withIncludeResourceData(Boolean includeResourceData)
      Set the includeResourceData property: When set to true, change notifications include resource data (such as content of a chat message). Optional.
      Parameters:
      includeResourceData - the includeResourceData value to set.
      Returns:
      the MicrosoftGraphSubscription object itself.
    • latestSupportedTlsVersion

      public String latestSupportedTlsVersion()
      Get the latestSupportedTlsVersion property: Specifies the latest version of Transport Layer Security (TLS) that the notification endpoint, specified by notificationUrl, supports. The possible values are: v1_0, v1_1, v1_2, v1_3. 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:
      the latestSupportedTlsVersion value.
    • withLatestSupportedTlsVersion

      public MicrosoftGraphSubscription withLatestSupportedTlsVersion(String latestSupportedTlsVersion)
      Set the latestSupportedTlsVersion property: Specifies the latest version of Transport Layer Security (TLS) that the notification endpoint, specified by notificationUrl, supports. The possible values are: v1_0, v1_1, v1_2, v1_3. 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:
      latestSupportedTlsVersion - the latestSupportedTlsVersion value to set.
      Returns:
      the MicrosoftGraphSubscription object itself.
    • lifecycleNotificationUrl

      public String lifecycleNotificationUrl()
      Get the lifecycleNotificationUrl property: The URL of the endpoint that receives lifecycle notifications, including subscriptionRemoved and missed notifications. This URL must make use of the HTTPS protocol. Optional. Read more about how Outlook resources use lifecycle notifications.
      Returns:
      the lifecycleNotificationUrl value.
    • withLifecycleNotificationUrl

      public MicrosoftGraphSubscription withLifecycleNotificationUrl(String lifecycleNotificationUrl)
      Set the lifecycleNotificationUrl property: The URL of the endpoint that receives lifecycle notifications, including subscriptionRemoved and missed notifications. This URL must make use of the HTTPS protocol. Optional. Read more about how Outlook resources use lifecycle notifications.
      Parameters:
      lifecycleNotificationUrl - the lifecycleNotificationUrl value to set.
      Returns:
      the MicrosoftGraphSubscription object itself.
    • notificationUrl

      public String notificationUrl()
      Get the notificationUrl property: Required. The URL of the endpoint that will receive the change notifications. This URL must make use of the HTTPS protocol.
      Returns:
      the notificationUrl value.
    • withNotificationUrl

      public MicrosoftGraphSubscription withNotificationUrl(String notificationUrl)
      Set the notificationUrl property: Required. The URL of the endpoint that will receive the change notifications. This URL must make use of the HTTPS protocol.
      Parameters:
      notificationUrl - the notificationUrl value to set.
      Returns:
      the MicrosoftGraphSubscription object itself.
    • resource

      public String resource()
      Get the resource property: 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.
      Returns:
      the resource value.
    • withResource

      public MicrosoftGraphSubscription withResource(String resource)
      Set the resource property: 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.
      Parameters:
      resource - the resource value to set.
      Returns:
      the MicrosoftGraphSubscription object itself.
    • additionalProperties

      public Map<String,Object> additionalProperties()
      Get the additionalProperties property: subscription.
      Overrides:
      additionalProperties in class MicrosoftGraphEntity
      Returns:
      the additionalProperties value.
    • withAdditionalProperties

      public MicrosoftGraphSubscription withAdditionalProperties(Map<String,Object> additionalProperties)
      Set the additionalProperties property: subscription.
      Overrides:
      withAdditionalProperties in class MicrosoftGraphEntity
      Parameters:
      additionalProperties - the additionalProperties value to set.
      Returns:
      the MicrosoftGraphSubscription object itself.
    • withId

      public MicrosoftGraphSubscription withId(String id)
      Set the id property: Read-only.
      Overrides:
      withId in class MicrosoftGraphEntity
      Parameters:
      id - the id value to set.
      Returns:
      the MicrosoftGraphEntity object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class MicrosoftGraphEntity
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.