Class ProductContractInner
- java.lang.Object
-
- com.azure.core.management.ProxyResource
-
- com.azure.resourcemanager.apimanagement.fluent.models.ProductContractInner
-
public final class ProductContractInner extends com.azure.core.management.ProxyResource
Product details.
-
-
Constructor Summary
Constructors Constructor Description ProductContractInner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Boolean
approvalRequired()
Get the approvalRequired property: whether subscription approval is required.String
description()
Get the description property: Product description.String
displayName()
Get the displayName property: Product name.ProductState
state()
Get the state property: whether product is published or not.Boolean
subscriptionRequired()
Get the subscriptionRequired property: Whether a product subscription is required for accessing APIs included in this product.Integer
subscriptionsLimit()
Get the subscriptionsLimit property: Whether the number of subscriptions a user can have to this product at the same time.String
terms()
Get the terms property: Product terms of use.void
validate()
Validates the instance.ProductContractInner
withApprovalRequired(Boolean approvalRequired)
Set the approvalRequired property: whether subscription approval is required.ProductContractInner
withDescription(String description)
Set the description property: Product description.ProductContractInner
withDisplayName(String displayName)
Set the displayName property: Product name.ProductContractInner
withState(ProductState state)
Set the state property: whether product is published or not.ProductContractInner
withSubscriptionRequired(Boolean subscriptionRequired)
Set the subscriptionRequired property: Whether a product subscription is required for accessing APIs included in this product.ProductContractInner
withSubscriptionsLimit(Integer subscriptionsLimit)
Set the subscriptionsLimit property: Whether the number of subscriptions a user can have to this product at the same time.ProductContractInner
withTerms(String terms)
Set the terms property: Product terms of use.
-
-
-
Method Detail
-
displayName
public String displayName()
Get the displayName property: Product name.- Returns:
- the displayName value.
-
withDisplayName
public ProductContractInner withDisplayName(String displayName)
Set the displayName property: Product name.- Parameters:
displayName
- the displayName value to set.- Returns:
- the ProductContractInner object itself.
-
description
public String description()
Get the description property: Product description. May include HTML formatting tags.- Returns:
- the description value.
-
withDescription
public ProductContractInner withDescription(String description)
Set the description property: Product description. May include HTML formatting tags.- Parameters:
description
- the description value to set.- Returns:
- the ProductContractInner object itself.
-
terms
public String terms()
Get the terms property: Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.- Returns:
- the terms value.
-
withTerms
public ProductContractInner withTerms(String terms)
Set the terms property: Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.- Parameters:
terms
- the terms value to set.- Returns:
- the ProductContractInner object itself.
-
subscriptionRequired
public Boolean subscriptionRequired()
Get the subscriptionRequired property: Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true.- Returns:
- the subscriptionRequired value.
-
withSubscriptionRequired
public ProductContractInner withSubscriptionRequired(Boolean subscriptionRequired)
Set the subscriptionRequired property: Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true.- Parameters:
subscriptionRequired
- the subscriptionRequired value to set.- Returns:
- the ProductContractInner object itself.
-
approvalRequired
public Boolean approvalRequired()
Get the approvalRequired property: whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false.- Returns:
- the approvalRequired value.
-
withApprovalRequired
public ProductContractInner withApprovalRequired(Boolean approvalRequired)
Set the approvalRequired property: whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false.- Parameters:
approvalRequired
- the approvalRequired value to set.- Returns:
- the ProductContractInner object itself.
-
subscriptionsLimit
public Integer subscriptionsLimit()
Get the subscriptionsLimit property: Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false.- Returns:
- the subscriptionsLimit value.
-
withSubscriptionsLimit
public ProductContractInner withSubscriptionsLimit(Integer subscriptionsLimit)
Set the subscriptionsLimit property: Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false.- Parameters:
subscriptionsLimit
- the subscriptionsLimit value to set.- Returns:
- the ProductContractInner object itself.
-
state
public ProductState state()
Get the state property: whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.- Returns:
- the state value.
-
withState
public ProductContractInner withState(ProductState state)
Set the state property: whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.- Parameters:
state
- the state value to set.- Returns:
- the ProductContractInner object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
-