你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Resource Class

public class Resource
extends ProxyResource

The Resource model.

Constructor Summary

Constructor Description
Resource()

Creates an instance of Resource.

Method Summary

Modifier and Type Method and Description
static Resource fromJson(JsonReader jsonReader)

Reads a JSON stream into a Resource.

String location()

Get the location value.

Map<String,String> tags()

Get the tags value.

JsonWriter toJson(JsonWriter jsonWriter)
Resource withLocation(String location)

Set the location value.

Resource withTags(Map<String,String> tags)

Set the tags value.

Methods inherited from ProxyResource

Methods inherited from java.lang.Object

Constructor Details

Resource

public Resource()

Creates an instance of Resource.

Method Details

fromJson

public static Resource fromJson(JsonReader jsonReader)

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.

location

public String location()

Get the location value.

Returns:

the geolocation where the resource live.

tags

public Map tags()

Get the tags value.

Returns:

the tags of the resource.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

Resource.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

withLocation

public Resource withLocation(String location)

Set the location value.

Parameters:

location - the geolocation where the resource live.

Returns:

the resource itself.

withTags

public Resource withTags(Map tags)

Set the tags value.

Parameters:

tags - the tags of the resource.

Returns:

the resource itself.

Applies to