Tag Class

  • java.lang.Object
    • com.azure.resourcemanager.consumption.models.Tag

Implements

public final class Tag
implements JsonSerializable<Tag>

The tag resource.

Constructor Summary

Constructor Description
Tag()

Creates an instance of Tag class.

Method Summary

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

Reads an instance of Tag from the JsonReader.

String key()

Get the key property: Tag key.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

List<String> value()

Get the value property: Tag values.

Tag withKey(String key)

Set the key property: Tag key.

Tag withValue(List<String> value)

Set the value property: Tag values.

Methods inherited from java.lang.Object

Constructor Details

Tag

public Tag()

Creates an instance of Tag class.

Method Details

fromJson

public static Tag fromJson(JsonReader jsonReader)

Reads an instance of Tag from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If an error occurs while reading the Tag.

key

public String key()

Get the key property: Tag key.

Returns:

the key value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

value

public List value()

Get the value property: Tag values.

Returns:

the value value.

withKey

public Tag withKey(String key)

Set the key property: Tag key.

Parameters:

key - the key value to set.

Returns:

the Tag object itself.

withValue

public Tag withValue(List value)

Set the value property: Tag values.

Parameters:

value - the value value to set.

Returns:

the Tag object itself.

Applies to