Package com.azure.core.management
Class Resource
java.lang.Object
com.azure.core.management.ProxyResource
com.azure.core.management.Resource
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ProxyResource>
The Resource model.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourcefromJson(com.azure.json.JsonReader jsonReader) Reads a JSON stream into aResource.location()Get the location value.tags()Get the tags value.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) withLocation(String location) Set the location value.Set the tags value.Methods inherited from class com.azure.core.management.ProxyResource
id, name, type
-
Constructor Details
-
Resource
public Resource()Creates an instance ofResource.
-
-
Method Details
-
location
Get the location value.- Returns:
- the geolocation where the resource live.
-
withLocation
Set the location value.- Parameters:
location- the geolocation where the resource live.- Returns:
- the resource itself.
-
tags
Get the tags value.- Returns:
- the tags of the resource.
-
withTags
Set the tags value.- Parameters:
tags- the tags of the resource.- Returns:
- the resource itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ProxyResource>- Overrides:
toJsonin classProxyResource- Throws:
IOException
-
fromJson
Reads a JSON stream into aResource.- Parameters:
jsonReader- TheJsonReaderbeing read.- Returns:
- The
Resourcethat the JSON stream represented, may return null. - Throws:
IOException- If aResourcefails to be read from thejsonReader.
-