Class QuotaProperties

java.lang.Object
com.azure.resourcemanager.reservations.models.QuotaProperties
All Implemented Interfaces:
com.azure.json.JsonSerializable<QuotaProperties>

public final class QuotaProperties extends Object implements com.azure.json.JsonSerializable<QuotaProperties>
Quota properties for the resource.
  • Constructor Details

    • QuotaProperties

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

    • limit

      public Integer limit()
      Get the limit property: Quota properties.
      Returns:
      the limit value.
    • withLimit

      public QuotaProperties withLimit(Integer limit)
      Set the limit property: Quota properties.
      Parameters:
      limit - the limit value to set.
      Returns:
      the QuotaProperties object itself.
    • currentValue

      public Integer currentValue()
      Get the currentValue property: Current usage value for the resource.
      Returns:
      the currentValue value.
    • unit

      public String unit()
      Get the unit property: The limit units, such as **count** and **bytes**. Use the unit field provided in the response of the GET quota operation.
      Returns:
      the unit value.
    • withUnit

      public QuotaProperties withUnit(String unit)
      Set the unit property: The limit units, such as **count** and **bytes**. Use the unit field provided in the response of the GET quota operation.
      Parameters:
      unit - the unit value to set.
      Returns:
      the QuotaProperties object itself.
    • name

      public ResourceName name()
      Get the name property: Name of the resource provide by the resource provider. Use this property for quotaRequests resource operations.
      Returns:
      the name value.
    • withName

      public QuotaProperties withName(ResourceName name)
      Set the name property: Name of the resource provide by the resource provider. Use this property for quotaRequests resource operations.
      Parameters:
      name - the name value to set.
      Returns:
      the QuotaProperties object itself.
    • resourceType

      public ResourceType resourceType()
      Get the resourceType property: The name of the resource type.
      Returns:
      the resourceType value.
    • withResourceType

      public QuotaProperties withResourceType(ResourceType resourceType)
      Set the resourceType property: The name of the resource type.
      Parameters:
      resourceType - the resourceType value to set.
      Returns:
      the QuotaProperties object itself.
    • quotaPeriod

      public String quotaPeriod()
      Get the quotaPeriod property: The time period over which the quota usage values are summarized. For example, P1D (per one day), PT1M (per one minute), and PT1S (per one second). This parameter is optional because, for some resources such as compute, the time period is irrelevant.
      Returns:
      the quotaPeriod value.
    • properties

      public Object properties()
      Get the properties property: Additional properties for the specified resource provider.
      Returns:
      the properties value.
    • withProperties

      public QuotaProperties withProperties(Object properties)
      Set the properties property: Additional properties for the specified resource provider.
      Parameters:
      properties - the properties value to set.
      Returns:
      the QuotaProperties object itself.
    • validate

      public void validate()
      Validates the instance.
      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<QuotaProperties>
      Throws:
      IOException
    • fromJson

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