HttpHeader Class

  • java.lang.Object
    • com.azure.resourcemanager.containerinstance.models.HttpHeader

Implements

public final class HttpHeader
implements JsonSerializable<HttpHeader>

The HTTP header.

Constructor Summary

Constructor Description
HttpHeader()

Creates an instance of HttpHeader class.

Method Summary

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

Reads an instance of HttpHeader from the JsonReader.

String name()

Get the name property: The header name.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

String value()

Get the value property: The header value.

HttpHeader withName(String name)

Set the name property: The header name.

HttpHeader withValue(String value)

Set the value property: The header value.

Methods inherited from java.lang.Object

Constructor Details

HttpHeader

public HttpHeader()

Creates an instance of HttpHeader class.

Method Details

fromJson

public static HttpHeader fromJson(JsonReader jsonReader)

Reads an instance of HttpHeader from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

name

public String name()

Get the name property: The header name.

Returns:

the name 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 header value.

Returns:

the value value.

withName

public HttpHeader withName(String name)

Set the name property: The header name.

Parameters:

name - the name value to set.

Returns:

the HttpHeader object itself.

withValue

public HttpHeader withValue(String value)

Set the value property: The header value.

Parameters:

value - the value value to set.

Returns:

the HttpHeader object itself.

Applies to