Class ProductTagResourceContractProperties
java.lang.Object
com.azure.resourcemanager.apimanagement.models.ProductEntityBaseParameters
com.azure.resourcemanager.apimanagement.models.ProductTagResourceContractProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ProductEntityBaseParameters>
Product profile.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ProductTagResourceContractProperties class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ProductTagResourceContractProperties from the JsonReader.id()Get the id property: Identifier of the product in the form of /products/{productId}.name()Get the name property: Product name.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withApprovalRequired(Boolean approvalRequired) Set the approvalRequired property: whether subscription approval is required.withDescription(String description) Set the description property: Product description.Set the id property: Identifier of the product in the form of /products/{productId}.Set the name property: Product name.withState(ProductState state) Set the state property: whether product is published or not.withSubscriptionRequired(Boolean subscriptionRequired) Set the subscriptionRequired property: Whether a product subscription is required for accessing APIs included in this product.withSubscriptionsLimit(Integer subscriptionsLimit) Set the subscriptionsLimit property: Whether the number of subscriptions a user can have to this product at the same time.Set the terms property: Product terms of use.Methods inherited from class com.azure.resourcemanager.apimanagement.models.ProductEntityBaseParameters
approvalRequired, description, state, subscriptionRequired, subscriptionsLimit, termsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ProductTagResourceContractProperties
public ProductTagResourceContractProperties()Creates an instance of ProductTagResourceContractProperties class.
-
-
Method Details
-
id
Get the id property: Identifier of the product in the form of /products/{productId}.- Returns:
- the id value.
-
withId
Set the id property: Identifier of the product in the form of /products/{productId}.- Parameters:
id- the id value to set.- Returns:
- the ProductTagResourceContractProperties object itself.
-
name
Get the name property: Product name.- Returns:
- the name value.
-
withName
Set the name property: Product name.- Parameters:
name- the name value to set.- Returns:
- the ProductTagResourceContractProperties object itself.
-
withDescription
Set the description property: Product description. May include HTML formatting tags.- Overrides:
withDescriptionin classProductEntityBaseParameters- Parameters:
description- the description value to set.- Returns:
- the ProductEntityBaseParameters object itself.
-
withTerms
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.- Overrides:
withTermsin classProductEntityBaseParameters- Parameters:
terms- the terms value to set.- Returns:
- the ProductEntityBaseParameters object itself.
-
withSubscriptionRequired
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.- Overrides:
withSubscriptionRequiredin classProductEntityBaseParameters- Parameters:
subscriptionRequired- the subscriptionRequired value to set.- Returns:
- the ProductEntityBaseParameters object itself.
-
withApprovalRequired
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.- Overrides:
withApprovalRequiredin classProductEntityBaseParameters- Parameters:
approvalRequired- the approvalRequired value to set.- Returns:
- the ProductEntityBaseParameters object itself.
-
withSubscriptionsLimit
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.- Overrides:
withSubscriptionsLimitin classProductEntityBaseParameters- Parameters:
subscriptionsLimit- the subscriptionsLimit value to set.- Returns:
- the ProductEntityBaseParameters object itself.
-
withState
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.- Overrides:
withStatein classProductEntityBaseParameters- Parameters:
state- the state value to set.- Returns:
- the ProductEntityBaseParameters object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validatein classProductEntityBaseParameters- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ProductEntityBaseParameters>- Overrides:
toJsonin classProductEntityBaseParameters- Throws:
IOException
-
fromJson
public static ProductTagResourceContractProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ProductTagResourceContractProperties from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ProductTagResourceContractProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the ProductTagResourceContractProperties.
-