Class ProductUpdateProperties

java.lang.Object
com.azure.resourcemanager.apimanagement.models.ProductEntityBaseParameters
com.azure.resourcemanager.apimanagement.fluent.models.ProductUpdateProperties
All Implemented Interfaces:
com.azure.json.JsonSerializable<ProductEntityBaseParameters>

public final class ProductUpdateProperties extends ProductEntityBaseParameters
Parameters supplied to the Update Product operation.
  • Constructor Details

    • ProductUpdateProperties

      public ProductUpdateProperties()
      Creates an instance of ProductUpdateProperties class.
  • Method Details

    • displayName

      public String displayName()
      Get the displayName property: Product name.
      Returns:
      the displayName value.
    • withDisplayName

      public ProductUpdateProperties withDisplayName(String displayName)
      Set the displayName property: Product name.
      Parameters:
      displayName - the displayName value to set.
      Returns:
      the ProductUpdateProperties object itself.
    • withDescription

      public ProductUpdateProperties withDescription(String description)
      Set the description property: Product description. May include HTML formatting tags.
      Overrides:
      withDescription in class ProductEntityBaseParameters
      Parameters:
      description - the description value to set.
      Returns:
      the ProductEntityBaseParameters object itself.
    • withTerms

      public ProductUpdateProperties 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.
      Overrides:
      withTerms in class ProductEntityBaseParameters
      Parameters:
      terms - the terms value to set.
      Returns:
      the ProductEntityBaseParameters object itself.
    • withSubscriptionRequired

      public ProductUpdateProperties 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.
      Overrides:
      withSubscriptionRequired in class ProductEntityBaseParameters
      Parameters:
      subscriptionRequired - the subscriptionRequired value to set.
      Returns:
      the ProductEntityBaseParameters object itself.
    • withApprovalRequired

      public ProductUpdateProperties 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.
      Overrides:
      withApprovalRequired in class ProductEntityBaseParameters
      Parameters:
      approvalRequired - the approvalRequired value to set.
      Returns:
      the ProductEntityBaseParameters object itself.
    • withSubscriptionsLimit

      public ProductUpdateProperties 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.
      Overrides:
      withSubscriptionsLimit in class ProductEntityBaseParameters
      Parameters:
      subscriptionsLimit - the subscriptionsLimit value to set.
      Returns:
      the ProductEntityBaseParameters object itself.
    • withState

      public ProductUpdateProperties 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.
      Overrides:
      withState in class ProductEntityBaseParameters
      Parameters:
      state - the state value to set.
      Returns:
      the ProductEntityBaseParameters object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class ProductEntityBaseParameters
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ProductEntityBaseParameters>
      Overrides:
      toJson in class ProductEntityBaseParameters
      Throws:
      IOException
    • fromJson

      public static ProductUpdateProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ProductUpdateProperties from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ProductUpdateProperties 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 ProductUpdateProperties.