Class SubscriptionUpdateParameters
- java.lang.Object
-
- com.azure.resourcemanager.apimanagement.models.SubscriptionUpdateParameters
-
public final class SubscriptionUpdateParameters extends Object
Subscription update details.
-
-
Constructor Summary
Constructors Constructor Description SubscriptionUpdateParameters()
-
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.OffsetDateTime
expirationDate()
Get the expirationDate property: Subscription expiration date.String
ownerId()
Get the ownerId property: User identifier path: /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: Subscription state.String
stateComment()
Get the stateComment property: Comments describing subscription state change by the administrator when the state is changed to the 'rejected'.void
validate()
Validates the instance.SubscriptionUpdateParameters
withAllowTracing(Boolean allowTracing)
Set the allowTracing property: Determines whether tracing can be enabled.SubscriptionUpdateParameters
withDisplayName(String displayName)
Set the displayName property: Subscription name.SubscriptionUpdateParameters
withExpirationDate(OffsetDateTime expirationDate)
Set the expirationDate property: Subscription expiration date.SubscriptionUpdateParameters
withOwnerId(String ownerId)
Set the ownerId property: User identifier path: /users/{userId}.SubscriptionUpdateParameters
withPrimaryKey(String primaryKey)
Set the primaryKey property: Primary subscription key.SubscriptionUpdateParameters
withScope(String scope)
Set the scope property: Scope like /products/{productId} or /apis or /apis/{apiId}.SubscriptionUpdateParameters
withSecondaryKey(String secondaryKey)
Set the secondaryKey property: Secondary subscription key.SubscriptionUpdateParameters
withState(SubscriptionState state)
Set the state property: Subscription state.SubscriptionUpdateParameters
withStateComment(String stateComment)
Set the stateComment property: Comments describing subscription state change by the administrator when the state is changed to the 'rejected'.
-
-
-
Method Detail
-
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
public SubscriptionUpdateParameters withState(SubscriptionState state)
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.
-
-