Class SubscriptionCreateParameterProperties
- java.lang.Object
-
- com.azure.resourcemanager.apimanagement.fluent.models.SubscriptionCreateParameterProperties
-
public final class SubscriptionCreateParameterProperties extends Object
Parameters supplied to the Create subscription operation.
-
-
Constructor Summary
Constructors Constructor Description SubscriptionCreateParameterProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Boolean
allowTracing()
Get the allowTracing property: Determines whether tracing can be enabled.String
displayName()
Get the displayName property: Subscription name.String
ownerId()
Get the ownerId property: User (user id path) for whom subscription is being created in form /users/{userId}.String
primaryKey()
Get the primaryKey property: Primary subscription key.String
scope()
Get the scope property: Scope like /products/{productId} or /apis or /apis/{apiId}.String
secondaryKey()
Get the secondaryKey property: Secondary subscription key.SubscriptionState
state()
Get the state property: Initial subscription state.void
validate()
Validates the instance.SubscriptionCreateParameterProperties
withAllowTracing(Boolean allowTracing)
Set the allowTracing property: Determines whether tracing can be enabled.SubscriptionCreateParameterProperties
withDisplayName(String displayName)
Set the displayName property: Subscription name.SubscriptionCreateParameterProperties
withOwnerId(String ownerId)
Set the ownerId property: User (user id path) for whom subscription is being created in form /users/{userId}.SubscriptionCreateParameterProperties
withPrimaryKey(String primaryKey)
Set the primaryKey property: Primary subscription key.SubscriptionCreateParameterProperties
withScope(String scope)
Set the scope property: Scope like /products/{productId} or /apis or /apis/{apiId}.SubscriptionCreateParameterProperties
withSecondaryKey(String secondaryKey)
Set the secondaryKey property: Secondary subscription key.SubscriptionCreateParameterProperties
withState(SubscriptionState state)
Set the state property: Initial subscription state.
-
-
-
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 SubscriptionCreateParameterProperties 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 SubscriptionCreateParameterProperties 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 SubscriptionCreateParameterProperties 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 SubscriptionCreateParameterProperties object itself.
-
displayName
public String displayName()
Get the displayName property: Subscription name.- Returns:
- the displayName value.
-
withDisplayName
public SubscriptionCreateParameterProperties withDisplayName(String displayName)
Set the displayName property: Subscription name.- Parameters:
displayName
- the displayName value to set.- Returns:
- the SubscriptionCreateParameterProperties 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 SubscriptionCreateParameterProperties 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 SubscriptionCreateParameterProperties 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 SubscriptionCreateParameterProperties 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 SubscriptionCreateParameterProperties 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 SubscriptionCreateParameterProperties 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 SubscriptionCreateParameterProperties object itself.
-
allowTracing
public Boolean allowTracing()
Get the allowTracing property: Determines whether tracing can be enabled.- Returns:
- the allowTracing value.
-
withAllowTracing
public SubscriptionCreateParameterProperties withAllowTracing(Boolean allowTracing)
Set the allowTracing property: Determines whether tracing can be enabled.- Parameters:
allowTracing
- the allowTracing value to set.- Returns:
- the SubscriptionCreateParameterProperties object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
-