Class SubscriptionCreateParameters


  • public final class SubscriptionCreateParameters
    extends Object
    Subscription create details.
    • Constructor Detail

      • SubscriptionCreateParameters

        public SubscriptionCreateParameters()
    • Method Detail

      • ownerId

        public String ownerId()
        Get the ownerId property: User (user id path) for whom subscription is being created in form /users/{userId}.
        Returns:
        the ownerId value.
      • withOwnerId

        public SubscriptionCreateParameters withOwnerId​(String ownerId)
        Set the ownerId property: User (user id path) for whom subscription is being created in form /users/{userId}.
        Parameters:
        ownerId - the ownerId value to set.
        Returns:
        the SubscriptionCreateParameters 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 SubscriptionCreateParameters 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 SubscriptionCreateParameters object itself.
      • displayName

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

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

        public String primaryKey()
        Get the primaryKey property: Primary subscription key. If not specified during request key will be generated automatically.
        Returns:
        the primaryKey value.
      • withPrimaryKey

        public SubscriptionCreateParameters withPrimaryKey​(String primaryKey)
        Set the primaryKey property: Primary subscription key. If not specified during request key will be generated automatically.
        Parameters:
        primaryKey - the primaryKey value to set.
        Returns:
        the SubscriptionCreateParameters object itself.
      • secondaryKey

        public String secondaryKey()
        Get the secondaryKey property: Secondary subscription key. If not specified during request key will be generated automatically.
        Returns:
        the secondaryKey value.
      • withSecondaryKey

        public SubscriptionCreateParameters withSecondaryKey​(String secondaryKey)
        Set the secondaryKey property: Secondary subscription key. If not specified during request key will be generated automatically.
        Parameters:
        secondaryKey - the secondaryKey value to set.
        Returns:
        the SubscriptionCreateParameters object itself.
      • state

        public SubscriptionState state()
        Get the state property: Initial subscription state. If no value is specified, subscription is created with Submitted 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

        public SubscriptionCreateParameters withState​(SubscriptionState state)
        Set the state property: Initial subscription state. If no value is specified, subscription is created with Submitted 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 SubscriptionCreateParameters object itself.
      • allowTracing

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

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

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