Share via


NameValuePair Class

  • java.lang.Object
    • com.azure.compute.batch.models.NameValuePair

Implements

public final class NameValuePair
implements JsonSerializable<NameValuePair>

Represents a name-value pair.

Method Summary

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

Reads an instance of NameValuePair from the JsonReader.

String getName()

Get the name property: The name in the name-value pair.

String getValue()

Get the value property: The value in the name-value pair.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static NameValuePair fromJson(JsonReader jsonReader)

Reads an instance of NameValuePair from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

getName

public String getName()

Get the name property: The name in the name-value pair.

Returns:

the name value.

getValue

public String getValue()

Get the value property: The value in the name-value pair.

Returns:

the value value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to