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
    Constructor
    Description
    Creates an instance of UnitSystemsInfo class.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(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.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    Get the values property: List of unit systems supported by this data provider.
    Set the key property: UnitSystem key sent as part of ProviderInput.
    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, wait

    Methods 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

      public String key()
      Get the key property: UnitSystem key sent as part of ProviderInput.
      Returns:
      the key value.
    • withKey

      public UnitSystemsInfo withKey(String key)
      Set the key property: UnitSystem key sent as part of ProviderInput.
      Parameters:
      key - the key value to set.
      Returns:
      the UnitSystemsInfo object itself.
    • values

      public List<String> values()
      Get the values property: List of unit systems supported by this data provider.
      Returns:
      the values value.
    • withValues

      public UnitSystemsInfo withValues(List<String> values)
      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

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

      public static UnitSystemsInfo fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.