Partager via


CommonTrackedResource Class

public class CommonTrackedResource
extends CommonResource

Tracked Resource The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'.

Constructor Summary

Constructor Description
CommonTrackedResource()

Creates an instance of CommonTrackedResource class.

Method Summary

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

Reads an instance of CommonTrackedResource from the JsonReader.

String id()

Get the id property: Fully qualified resource Id for the resource.

String location()

Get the location property: The geo-location where the resource lives.

String name()

Get the name property: The name of the resource.

SystemData systemData()

Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.

Map<String,String> tags()

Get the tags property: Resource tags.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: The type of the resource.

void validate()

Validates the instance.

CommonTrackedResource withLocation(String location)

Set the location property: The geo-location where the resource lives.

CommonTrackedResource withTags(Map<String,String> tags)

Set the tags property: Resource tags.

Methods inherited from CommonResource

Methods inherited from java.lang.Object

Constructor Details

CommonTrackedResource

public CommonTrackedResource()

Creates an instance of CommonTrackedResource class.

Method Details

fromJson

public static CommonTrackedResource fromJson(JsonReader jsonReader)

Reads an instance of CommonTrackedResource from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of CommonTrackedResource if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

id

public String id()

Get the id property: Fully qualified resource Id for the resource.

Overrides:

CommonTrackedResource.id()

Returns:

the id value.

location

public String location()

Get the location property: The geo-location where the resource lives.

Returns:

the location value.

name

public String name()

Get the name property: The name of the resource.

Overrides:

CommonTrackedResource.name()

Returns:

the name value.

systemData

public SystemData systemData()

Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.

Overrides:

CommonTrackedResource.systemData()

Returns:

the systemData value.

tags

public Map tags()

Get the tags property: Resource tags.

Returns:

the tags value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

CommonTrackedResource.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: The type of the resource.

Overrides:

CommonTrackedResource.type()

Returns:

the type value.

validate

public void validate()

Validates the instance.

Overrides:

CommonTrackedResource.validate()

withLocation

public CommonTrackedResource withLocation(String location)

Set the location property: The geo-location where the resource lives.

Parameters:

location - the location value to set.

Returns:

the CommonTrackedResource object itself.

withTags

public CommonTrackedResource withTags(Map tags)

Set the tags property: Resource tags.

Parameters:

tags - the tags value to set.

Returns:

the CommonTrackedResource object itself.

Applies to