Class SubscriptionContractInner
- java.lang.Object
-
- com.azure.core.management.ProxyResource
-
- com.azure.resourcemanager.apimanagement.fluent.models.SubscriptionContractInner
-
public final class SubscriptionContractInner extends com.azure.core.management.ProxyResource
Subscription details.
-
-
Constructor Summary
Constructors Constructor Description SubscriptionContractInner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Boolean
allowTracing()
Get the allowTracing property: Determines whether tracing is enabled.OffsetDateTime
createdDate()
Get the createdDate property: Subscription creation date.String
displayName()
Get the displayName property: The name of the subscription, or null if the subscription has no name.OffsetDateTime
endDate()
Get the endDate property: Date when subscription was cancelled or expired.OffsetDateTime
expirationDate()
Get the expirationDate property: Subscription expiration date.OffsetDateTime
notificationDate()
Get the notificationDate property: Upcoming subscription expiration notification date.String
ownerId()
Get the ownerId property: The user resource identifier of the subscription owner.String
primaryKey()
Get the primaryKey property: Subscription primary key.String
scope()
Get the scope property: Scope like /products/{productId} or /apis or /apis/{apiId}.String
secondaryKey()
Get the secondaryKey property: Subscription secondary key.OffsetDateTime
startDate()
Get the startDate property: Subscription activation date.SubscriptionState
state()
Get the state property: Subscription state.String
stateComment()
Get the stateComment property: Optional subscription comment added by an administrator when the state is changed to the 'rejected'.void
validate()
Validates the instance.SubscriptionContractInner
withAllowTracing(Boolean allowTracing)
Set the allowTracing property: Determines whether tracing is enabled.SubscriptionContractInner
withDisplayName(String displayName)
Set the displayName property: The name of the subscription, or null if the subscription has no name.SubscriptionContractInner
withEndDate(OffsetDateTime endDate)
Set the endDate property: Date when subscription was cancelled or expired.SubscriptionContractInner
withExpirationDate(OffsetDateTime expirationDate)
Set the expirationDate property: Subscription expiration date.SubscriptionContractInner
withNotificationDate(OffsetDateTime notificationDate)
Set the notificationDate property: Upcoming subscription expiration notification date.SubscriptionContractInner
withOwnerId(String ownerId)
Set the ownerId property: The user resource identifier of the subscription owner.SubscriptionContractInner
withPrimaryKey(String primaryKey)
Set the primaryKey property: Subscription primary key.SubscriptionContractInner
withScope(String scope)
Set the scope property: Scope like /products/{productId} or /apis or /apis/{apiId}.SubscriptionContractInner
withSecondaryKey(String secondaryKey)
Set the secondaryKey property: Subscription secondary key.SubscriptionContractInner
withStartDate(OffsetDateTime startDate)
Set the startDate property: Subscription activation date.SubscriptionContractInner
withState(SubscriptionState state)
Set the state property: Subscription state.SubscriptionContractInner
withStateComment(String stateComment)
Set the stateComment property: Optional subscription comment added by an administrator when the state is changed to the 'rejected'.
-
-
-
Method Detail
-
ownerId
public String ownerId()
Get the ownerId property: The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId} where {userId} is a user identifier.- Returns:
- the ownerId value.
-
withOwnerId
public SubscriptionContractInner withOwnerId(String ownerId)
Set the ownerId property: The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId} where {userId} is a user identifier.- Parameters:
ownerId
- the ownerId value to set.- Returns:
- the SubscriptionContractInner 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 SubscriptionContractInner 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 SubscriptionContractInner object itself.
-
displayName
public String displayName()
Get the displayName property: The name of the subscription, or null if the subscription has no name.- Returns:
- the displayName value.
-
withDisplayName
public SubscriptionContractInner withDisplayName(String displayName)
Set the displayName property: The name of the subscription, or null if the subscription has no name.- Parameters:
displayName
- the displayName value to set.- Returns:
- the SubscriptionContractInner 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 SubscriptionContractInner 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 SubscriptionContractInner object itself.
-
createdDate
public OffsetDateTime createdDate()
Get the createdDate property: Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.- Returns:
- the createdDate value.
-
startDate
public OffsetDateTime startDate()
Get the startDate property: Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. 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 startDate value.
-
withStartDate
public SubscriptionContractInner withStartDate(OffsetDateTime startDate)
Set the startDate property: Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. 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:
startDate
- the startDate value to set.- Returns:
- the SubscriptionContractInner 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 SubscriptionContractInner 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 SubscriptionContractInner object itself.
-
endDate
public OffsetDateTime endDate()
Get the endDate property: Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. 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 endDate value.
-
withEndDate
public SubscriptionContractInner withEndDate(OffsetDateTime endDate)
Set the endDate property: Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. 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:
endDate
- the endDate value to set.- Returns:
- the SubscriptionContractInner object itself.
-
notificationDate
public OffsetDateTime notificationDate()
Get the notificationDate property: Upcoming subscription expiration notification date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.- Returns:
- the notificationDate value.
-
withNotificationDate
public SubscriptionContractInner withNotificationDate(OffsetDateTime notificationDate)
Set the notificationDate property: Upcoming subscription expiration notification date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.- Parameters:
notificationDate
- the notificationDate value to set.- Returns:
- the SubscriptionContractInner object itself.
-
primaryKey
public String primaryKey()
Get the primaryKey property: Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.- Returns:
- the primaryKey value.
-
withPrimaryKey
public SubscriptionContractInner withPrimaryKey(String primaryKey)
Set the primaryKey property: Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.- Parameters:
primaryKey
- the primaryKey value to set.- Returns:
- the SubscriptionContractInner object itself.
-
secondaryKey
public String secondaryKey()
Get the secondaryKey property: Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.- Returns:
- the secondaryKey value.
-
withSecondaryKey
public SubscriptionContractInner withSecondaryKey(String secondaryKey)
Set the secondaryKey property: Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.- Parameters:
secondaryKey
- the secondaryKey value to set.- Returns:
- the SubscriptionContractInner object itself.
-
stateComment
public String stateComment()
Get the stateComment property: Optional subscription comment added by an administrator when the state is changed to the 'rejected'.- Returns:
- the stateComment value.
-
withStateComment
public SubscriptionContractInner withStateComment(String stateComment)
Set the stateComment property: Optional subscription comment added by an administrator when the state is changed to the 'rejected'.- Parameters:
stateComment
- the stateComment value to set.- Returns:
- the SubscriptionContractInner object itself.
-
allowTracing
public Boolean allowTracing()
Get the allowTracing property: Determines whether tracing is enabled.- Returns:
- the allowTracing value.
-
withAllowTracing
public SubscriptionContractInner withAllowTracing(Boolean allowTracing)
Set the allowTracing property: Determines whether tracing is enabled.- Parameters:
allowTracing
- the allowTracing value to set.- Returns:
- the SubscriptionContractInner object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
-