HttpConfiguration Class

  • java.lang.Object
    • com.azure.resourcemanager.network.models.HttpConfiguration

Implements

public final class HttpConfiguration
implements JsonSerializable<HttpConfiguration>

HTTP configuration of the connectivity check.

Constructor Summary

Constructor Description
HttpConfiguration()

Creates an instance of HttpConfiguration class.

Method Summary

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

Reads an instance of HttpConfiguration from the JsonReader.

List<HttpHeader> headers()

Get the headers property: List of HTTP headers.

HttpMethod method()

Get the method property: HTTP method.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

List<Integer> validStatusCodes()

Get the validStatusCodes property: Valid status codes.

HttpConfiguration withHeaders(List<HttpHeader> headers)

Set the headers property: List of HTTP headers.

HttpConfiguration withMethod(HttpMethod method)

Set the method property: HTTP method.

HttpConfiguration withValidStatusCodes(List<Integer> validStatusCodes)

Set the validStatusCodes property: Valid status codes.

Methods inherited from java.lang.Object

Constructor Details

HttpConfiguration

public HttpConfiguration()

Creates an instance of HttpConfiguration class.

Method Details

fromJson

public static HttpConfiguration fromJson(JsonReader jsonReader)

Reads an instance of HttpConfiguration from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

headers

public List<HttpHeader> headers()

Get the headers property: List of HTTP headers.

Returns:

the headers value.

method

public HttpMethod method()

Get the method property: HTTP method.

Returns:

the method value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

validStatusCodes

public List<Integer> validStatusCodes()

Get the validStatusCodes property: Valid status codes.

Returns:

the validStatusCodes value.

withHeaders

public HttpConfiguration withHeaders(List<HttpHeader> headers)

Set the headers property: List of HTTP headers.

Parameters:

headers - the headers value to set.

Returns:

the HttpConfiguration object itself.

withMethod

public HttpConfiguration withMethod(HttpMethod method)

Set the method property: HTTP method.

Parameters:

method - the method value to set.

Returns:

the HttpConfiguration object itself.

withValidStatusCodes

public HttpConfiguration withValidStatusCodes(List<Integer> validStatusCodes)

Set the validStatusCodes property: Valid status codes.

Parameters:

validStatusCodes - the validStatusCodes value to set.

Returns:

the HttpConfiguration object itself.

Applies to