Class RegistryUsage
java.lang.Object
com.azure.resourcemanager.containerregistry.models.RegistryUsage
- All Implemented Interfaces:
com.azure.json.JsonSerializable<RegistryUsage>
public final class RegistryUsage
extends Object
implements com.azure.json.JsonSerializable<RegistryUsage>
The quota usage for a container registry.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the currentValue property: The current value of the usage.static RegistryUsagefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of RegistryUsage from the JsonReader.limit()Get the limit property: The limit of the usage.name()Get the name property: The name of the usage.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) unit()Get the unit property: The unit of measurement.voidvalidate()Validates the instance.withCurrentValue(Long currentValue) Set the currentValue property: The current value of the usage.Set the limit property: The limit of the usage.Set the name property: The name of the usage.withUnit(RegistryUsageUnit unit) Set the unit property: The unit of measurement.Methods 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
-
RegistryUsage
public RegistryUsage()Creates an instance of RegistryUsage class.
-
-
Method Details
-
name
Get the name property: The name of the usage.- Returns:
- the name value.
-
withName
Set the name property: The name of the usage.- Parameters:
name- the name value to set.- Returns:
- the RegistryUsage object itself.
-
limit
Get the limit property: The limit of the usage.- Returns:
- the limit value.
-
withLimit
Set the limit property: The limit of the usage.- Parameters:
limit- the limit value to set.- Returns:
- the RegistryUsage object itself.
-
currentValue
Get the currentValue property: The current value of the usage.- Returns:
- the currentValue value.
-
withCurrentValue
Set the currentValue property: The current value of the usage.- Parameters:
currentValue- the currentValue value to set.- Returns:
- the RegistryUsage object itself.
-
unit
Get the unit property: The unit of measurement.- Returns:
- the unit value.
-
withUnit
Set the unit property: The unit of measurement.- Parameters:
unit- the unit value to set.- Returns:
- the RegistryUsage object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<RegistryUsage>- Throws:
IOException
-
fromJson
Reads an instance of RegistryUsage from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of RegistryUsage 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 RegistryUsage.
-