Class MetadataValueInner

java.lang.Object
com.azure.resourcemanager.monitor.fluent.models.MetadataValueInner
All Implemented Interfaces:
com.azure.json.JsonSerializable<MetadataValueInner>

public final class MetadataValueInner extends Object implements com.azure.json.JsonSerializable<MetadataValueInner>
Represents a metric metadata value.
  • Constructor Details

    • MetadataValueInner

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

    • name

      public LocalizableStringInner name()
      Get the name property: the name of the metadata.
      Returns:
      the name value.
    • withName

      Set the name property: the name of the metadata.
      Parameters:
      name - the name value to set.
      Returns:
      the MetadataValueInner object itself.
    • value

      public String value()
      Get the value property: the value of the metadata.
      Returns:
      the value value.
    • withValue

      public MetadataValueInner withValue(String value)
      Set the value property: the value of the metadata.
      Parameters:
      value - the value value to set.
      Returns:
      the MetadataValueInner 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<MetadataValueInner>
      Throws:
      IOException
    • fromJson

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