Class Resource

java.lang.Object
com.azure.core.management.ProxyResource
com.azure.core.management.Resource
All Implemented Interfaces:
com.azure.json.JsonSerializable<ProxyResource>

public class Resource extends ProxyResource
The Resource model.
  • Constructor Details

    • Resource

      public Resource()
      Creates an instance of Resource.
  • Method Details

    • location

      public String location()
      Get the location value.
      Returns:
      the geolocation where the resource live.
    • withLocation

      public Resource withLocation(String location)
      Set the location value.
      Parameters:
      location - the geolocation where the resource live.
      Returns:
      the resource itself.
    • tags

      public Map<String,String> tags()
      Get the tags value.
      Returns:
      the tags of the resource.
    • withTags

      public Resource withTags(Map<String,String> tags)
      Set the tags value.
      Parameters:
      tags - the tags of the resource.
      Returns:
      the resource itself.
    • toJson

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

      public static Resource fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads a JSON stream into a Resource.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      The Resource that the JSON stream represented, may return null.
      Throws:
      IOException - If a Resource fails to be read from the jsonReader.