KubernetesLabel Class

  • java.lang.Object
    • com.azure.resourcemanager.networkcloud.models.KubernetesLabel

Implements

public final class KubernetesLabel
implements JsonSerializable<KubernetesLabel>

KubernetesLabel represents a single entry for a Kubernetes label or taint such as those used on a node or pod.

Constructor Summary

Constructor Description
KubernetesLabel()

Creates an instance of KubernetesLabel class.

Method Summary

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

Reads an instance of KubernetesLabel from the JsonReader.

String key()

Get the key property: The name of the label or taint.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

String value()

Get the value property: The value of the label or taint.

KubernetesLabel withKey(String key)

Set the key property: The name of the label or taint.

KubernetesLabel withValue(String value)

Set the value property: The value of the label or taint.

Methods inherited from java.lang.Object

Constructor Details

KubernetesLabel

public KubernetesLabel()

Creates an instance of KubernetesLabel class.

Method Details

fromJson

public static KubernetesLabel fromJson(JsonReader jsonReader)

Reads an instance of KubernetesLabel from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of KubernetesLabel 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.

key

public String key()

Get the key property: The name of the label or taint.

Returns:

the key value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

value

public String value()

Get the value property: The value of the label or taint.

Returns:

the value value.

withKey

public KubernetesLabel withKey(String key)

Set the key property: The name of the label or taint.

Parameters:

key - the key value to set.

Returns:

the KubernetesLabel object itself.

withValue

public KubernetesLabel withValue(String value)

Set the value property: The value of the label or taint.

Parameters:

value - the value value to set.

Returns:

the KubernetesLabel object itself.

Applies to