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

public final class LocationData extends Object implements com.azure.json.JsonSerializable<LocationData>
Metadata pertaining to the geographic location of the resource.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of LocationData class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the city property: The city or locality where the resource is located.
    Get the countryOrRegion property: The country or region where the resource is located.
    Get the district property: The district, state, or province where the resource is located.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of LocationData from the JsonReader.
    Get the name property: A canonical name for the geographic or physical location.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    Set the city property: The city or locality where the resource is located.
    withCountryOrRegion(String countryOrRegion)
    Set the countryOrRegion property: The country or region where the resource is located.
    withDistrict(String district)
    Set the district property: The district, state, or province where the resource is located.
    Set the name property: A canonical name for the geographic or physical location.

    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

    • LocationData

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

    • name

      public String name()
      Get the name property: A canonical name for the geographic or physical location.
      Returns:
      the name value.
    • withName

      public LocationData withName(String name)
      Set the name property: A canonical name for the geographic or physical location.
      Parameters:
      name - the name value to set.
      Returns:
      the LocationData object itself.
    • city

      public String city()
      Get the city property: The city or locality where the resource is located.
      Returns:
      the city value.
    • withCity

      public LocationData withCity(String city)
      Set the city property: The city or locality where the resource is located.
      Parameters:
      city - the city value to set.
      Returns:
      the LocationData object itself.
    • district

      public String district()
      Get the district property: The district, state, or province where the resource is located.
      Returns:
      the district value.
    • withDistrict

      public LocationData withDistrict(String district)
      Set the district property: The district, state, or province where the resource is located.
      Parameters:
      district - the district value to set.
      Returns:
      the LocationData object itself.
    • countryOrRegion

      public String countryOrRegion()
      Get the countryOrRegion property: The country or region where the resource is located.
      Returns:
      the countryOrRegion value.
    • withCountryOrRegion

      public LocationData withCountryOrRegion(String countryOrRegion)
      Set the countryOrRegion property: The country or region where the resource is located.
      Parameters:
      countryOrRegion - the countryOrRegion value to set.
      Returns:
      the LocationData 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<LocationData>
      Throws:
      IOException
    • fromJson

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