Class SubscriptionUpdateParameters

java.lang.Object
com.azure.resourcemanager.apimanagement.models.SubscriptionUpdateParameters
All Implemented Interfaces:
com.azure.json.JsonSerializable<SubscriptionUpdateParameters>

public final class SubscriptionUpdateParameters extends Object implements com.azure.json.JsonSerializable<SubscriptionUpdateParameters>
Subscription update details.
  • Constructor Details

    • SubscriptionUpdateParameters

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

    • ownerId

      public String ownerId()
      Get the ownerId property: User identifier path: /users/{userId}.
      Returns:
      the ownerId value.
    • withOwnerId

      public SubscriptionUpdateParameters withOwnerId(String ownerId)
      Set the ownerId property: User identifier path: /users/{userId}.
      Parameters:
      ownerId - the ownerId value to set.
      Returns:
      the SubscriptionUpdateParameters object itself.
    • scope

      public String scope()
      Get the scope property: Scope like /products/{productId} or /apis or /apis/{apiId}.
      Returns:
      the scope value.
    • withScope

      public SubscriptionUpdateParameters withScope(String scope)
      Set the scope property: Scope like /products/{productId} or /apis or /apis/{apiId}.
      Parameters:
      scope - the scope value to set.
      Returns:
      the SubscriptionUpdateParameters object itself.
    • expirationDate

      public OffsetDateTime expirationDate()
      Get the expirationDate property: Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
      Returns:
      the expirationDate value.
    • withExpirationDate

      public SubscriptionUpdateParameters withExpirationDate(OffsetDateTime expirationDate)
      Set the expirationDate property: Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
      Parameters:
      expirationDate - the expirationDate value to set.
      Returns:
      the SubscriptionUpdateParameters object itself.
    • displayName

      public String displayName()
      Get the displayName property: Subscription name.
      Returns:
      the displayName value.
    • withDisplayName

      public SubscriptionUpdateParameters withDisplayName(String displayName)
      Set the displayName property: Subscription name.
      Parameters:
      displayName - the displayName value to set.
      Returns:
      the SubscriptionUpdateParameters object itself.
    • primaryKey

      public String primaryKey()
      Get the primaryKey property: Primary subscription key.
      Returns:
      the primaryKey value.
    • withPrimaryKey

      public SubscriptionUpdateParameters withPrimaryKey(String primaryKey)
      Set the primaryKey property: Primary subscription key.
      Parameters:
      primaryKey - the primaryKey value to set.
      Returns:
      the SubscriptionUpdateParameters object itself.
    • secondaryKey

      public String secondaryKey()
      Get the secondaryKey property: Secondary subscription key.
      Returns:
      the secondaryKey value.
    • withSecondaryKey

      public SubscriptionUpdateParameters withSecondaryKey(String secondaryKey)
      Set the secondaryKey property: Secondary subscription key.
      Parameters:
      secondaryKey - the secondaryKey value to set.
      Returns:
      the SubscriptionUpdateParameters object itself.
    • state

      public SubscriptionState state()
      Get the state property: Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.
      Returns:
      the state value.
    • withState

      Set the state property: Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.
      Parameters:
      state - the state value to set.
      Returns:
      the SubscriptionUpdateParameters object itself.
    • stateComment

      public String stateComment()
      Get the stateComment property: Comments describing subscription state change by the administrator when the state is changed to the 'rejected'.
      Returns:
      the stateComment value.
    • withStateComment

      public SubscriptionUpdateParameters withStateComment(String stateComment)
      Set the stateComment property: Comments describing subscription state change by the administrator when the state is changed to the 'rejected'.
      Parameters:
      stateComment - the stateComment value to set.
      Returns:
      the SubscriptionUpdateParameters object itself.
    • allowTracing

      public Boolean allowTracing()
      Get the allowTracing property: Determines whether tracing can be enabled.
      Returns:
      the allowTracing value.
    • withAllowTracing

      public SubscriptionUpdateParameters withAllowTracing(Boolean allowTracing)
      Set the allowTracing property: Determines whether tracing can be enabled.
      Parameters:
      allowTracing - the allowTracing value to set.
      Returns:
      the SubscriptionUpdateParameters object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<SubscriptionUpdateParameters>
      Throws:
      IOException
    • fromJson

      public static SubscriptionUpdateParameters fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of SubscriptionUpdateParameters from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of SubscriptionUpdateParameters if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the SubscriptionUpdateParameters.