Class ScopeProperties

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

public final class ScopeProperties extends Object implements com.azure.json.JsonSerializable<ScopeProperties>
The scope and whether it is valid.
  • Constructor Details

    • ScopeProperties

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

    • scope

      public String scope()
      Get the scope property: The scope property.
      Returns:
      the scope value.
    • withScope

      public ScopeProperties withScope(String scope)
      Set the scope property: The scope property.
      Parameters:
      scope - the scope value to set.
      Returns:
      the ScopeProperties object itself.
    • valid

      public Boolean valid()
      Get the valid property: The valid property.
      Returns:
      the valid value.
    • withValid

      public ScopeProperties withValid(Boolean valid)
      Set the valid property: The valid property.
      Parameters:
      valid - the valid value to set.
      Returns:
      the ScopeProperties 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<ScopeProperties>
      Throws:
      IOException
    • fromJson

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