Class UnitSystemsInfo
java.lang.Object
com.azure.resourcemanager.agrifood.models.UnitSystemsInfo
- All Implemented Interfaces:
com.azure.json.JsonSerializable<UnitSystemsInfo>
public final class UnitSystemsInfo
extends Object
implements com.azure.json.JsonSerializable<UnitSystemsInfo>
Unit systems info for the data provider.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic UnitSystemsInfofromJson(com.azure.json.JsonReader jsonReader) Reads an instance of UnitSystemsInfo from the JsonReader.key()Get the key property: UnitSystem key sent as part of ProviderInput.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.values()Get the values property: List of unit systems supported by this data provider.Set the key property: UnitSystem key sent as part of ProviderInput.withValues(List<String> values) Set the values property: List of unit systems supported by this data provider.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
-
UnitSystemsInfo
public UnitSystemsInfo()Creates an instance of UnitSystemsInfo class.
-
-
Method Details
-
key
Get the key property: UnitSystem key sent as part of ProviderInput.- Returns:
- the key value.
-
withKey
Set the key property: UnitSystem key sent as part of ProviderInput.- Parameters:
key- the key value to set.- Returns:
- the UnitSystemsInfo object itself.
-
values
Get the values property: List of unit systems supported by this data provider.- Returns:
- the values value.
-
withValues
Set the values property: List of unit systems supported by this data provider.- Parameters:
values- the values value to set.- Returns:
- the UnitSystemsInfo 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<UnitSystemsInfo>- Throws:
IOException
-
fromJson
Reads an instance of UnitSystemsInfo from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of UnitSystemsInfo 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 UnitSystemsInfo.
-