java.lang.Object
com.azure.resourcemanager.apimanagement.models.SubscriptionCreateParameters
Constructor Summary
Constructors
Creates an instance of SubscriptionCreateParameters class.
Method Summary
All Methods Static Methods Instance Methods Concrete Methods
Get the allowTracing property: Determines whether tracing can be enabled.
Get the displayName property: Subscription name.
fromJson (com.azure.json.JsonReader jsonReader)
Reads an instance of SubscriptionCreateParameters from the JsonReader.
Get the ownerId property: User (user id path) for whom subscription is being created in form /users/{userId}.
Get the primaryKey property: Primary subscription key.
Get the scope property: Scope like /products/{productId} or /apis or /apis/{apiId}.
Get the secondaryKey property: Secondary subscription key.
Get the state property: Initial subscription state.
com.azure.json.JsonWriter
toJson (com.azure.json.JsonWriter jsonWriter)
void
Set the allowTracing property: Determines whether tracing can be enabled.
Set the displayName property: Subscription name.
Set the ownerId property: User (user id path) for whom subscription is being created in form /users/{userId}.
Set the primaryKey property: Primary subscription key.
Set the scope property: Scope like /products/{productId} or /apis or /apis/{apiId}.
Set the secondaryKey property: Secondary subscription key.
Set the state property: Initial subscription state.
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
Constructor Details
SubscriptionCreateParameters
public SubscriptionCreateParameters ()
Creates an instance of SubscriptionCreateParameters class.
Method Details
ownerId
Get the ownerId property: User (user id path) for whom subscription is being created in form /users/{userId}.
Returns:
the ownerId value.
withOwnerId
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
Get the scope property: Scope like /products/{productId} or /apis or /apis/{apiId}.
Returns:
the scope value.
withScope
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
Get the displayName property: Subscription name.
Returns:
the displayName value.
withDisplayName
Set the displayName property: Subscription name.
Parameters:
displayName - the displayName value to set.
Returns:
the SubscriptionCreateParameters object itself.
primaryKey
Get the primaryKey property: Primary subscription key. If not specified during request key will be generated
automatically.
Returns:
the primaryKey value.
withPrimaryKey
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
Get the secondaryKey property: Secondary subscription key. If not specified during request key will be generated
automatically.
Returns:
the secondaryKey value.
withSecondaryKey
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
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
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
Get the allowTracing property: Determines whether tracing can be enabled.
Returns:
the allowTracing value.
withAllowTracing
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.
fromJson
Reads an instance of SubscriptionCreateParameters from the JsonReader.
Parameters:
jsonReader - The JsonReader being read.
Returns:
An instance of SubscriptionCreateParameters 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 SubscriptionCreateParameters.