ConnectionMonitorHttpConfiguration Class

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

Implements

public final class ConnectionMonitorHttpConfiguration
implements JsonSerializable<ConnectionMonitorHttpConfiguration>

Describes the HTTP configuration.

Constructor Summary

Constructor Description
ConnectionMonitorHttpConfiguration()

Creates an instance of ConnectionMonitorHttpConfiguration class.

Method Summary

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

Reads an instance of ConnectionMonitorHttpConfiguration from the JsonReader.

HttpConfigurationMethod method()

Get the method property: The HTTP method to use.

String path()

Get the path property: The path component of the URI.

Integer port()

Get the port property: The port to connect to.

Boolean preferHttps()

Get the preferHttps property: Value indicating whether HTTPS is preferred over HTTP in cases where the choice is not explicit.

List<HttpHeader> requestHeaders()

Get the requestHeaders property: The HTTP headers to transmit with the request.

JsonWriter toJson(JsonWriter jsonWriter)
List<String> validStatusCodeRanges()

Get the validStatusCodeRanges property: HTTP status codes to consider successful.

void validate()

Validates the instance.

ConnectionMonitorHttpConfiguration withMethod(HttpConfigurationMethod method)

Set the method property: The HTTP method to use.

ConnectionMonitorHttpConfiguration withPath(String path)

Set the path property: The path component of the URI.

ConnectionMonitorHttpConfiguration withPort(Integer port)

Set the port property: The port to connect to.

ConnectionMonitorHttpConfiguration withPreferHttps(Boolean preferHttps)

Set the preferHttps property: Value indicating whether HTTPS is preferred over HTTP in cases where the choice is not explicit.

ConnectionMonitorHttpConfiguration withRequestHeaders(List<HttpHeader> requestHeaders)

Set the requestHeaders property: The HTTP headers to transmit with the request.

ConnectionMonitorHttpConfiguration withValidStatusCodeRanges(List<String> validStatusCodeRanges)

Set the validStatusCodeRanges property: HTTP status codes to consider successful.

Methods inherited from java.lang.Object

Constructor Details

ConnectionMonitorHttpConfiguration

public ConnectionMonitorHttpConfiguration()

Creates an instance of ConnectionMonitorHttpConfiguration class.

Method Details

fromJson

public static ConnectionMonitorHttpConfiguration fromJson(JsonReader jsonReader)

Reads an instance of ConnectionMonitorHttpConfiguration from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

method

public HttpConfigurationMethod method()

Get the method property: The HTTP method to use.

Returns:

the method value.

path

public String path()

Get the path property: The path component of the URI. For instance, "/dir1/dir2".

Returns:

the path value.

port

public Integer port()

Get the port property: The port to connect to.

Returns:

the port value.

preferHttps

public Boolean preferHttps()

Get the preferHttps property: Value indicating whether HTTPS is preferred over HTTP in cases where the choice is not explicit.

Returns:

the preferHttps value.

requestHeaders

public List requestHeaders()

Get the requestHeaders property: The HTTP headers to transmit with the request.

Returns:

the requestHeaders value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validStatusCodeRanges

public List validStatusCodeRanges()

Get the validStatusCodeRanges property: HTTP status codes to consider successful. For instance, "2xx,301-304,418".

Returns:

the validStatusCodeRanges value.

validate

public void validate()

Validates the instance.

withMethod

public ConnectionMonitorHttpConfiguration withMethod(HttpConfigurationMethod method)

Set the method property: The HTTP method to use.

Parameters:

method - the method value to set.

Returns:

the ConnectionMonitorHttpConfiguration object itself.

withPath

public ConnectionMonitorHttpConfiguration withPath(String path)

Set the path property: The path component of the URI. For instance, "/dir1/dir2".

Parameters:

path - the path value to set.

Returns:

the ConnectionMonitorHttpConfiguration object itself.

withPort

public ConnectionMonitorHttpConfiguration withPort(Integer port)

Set the port property: The port to connect to.

Parameters:

port - the port value to set.

Returns:

the ConnectionMonitorHttpConfiguration object itself.

withPreferHttps

public ConnectionMonitorHttpConfiguration withPreferHttps(Boolean preferHttps)

Set the preferHttps property: Value indicating whether HTTPS is preferred over HTTP in cases where the choice is not explicit.

Parameters:

preferHttps - the preferHttps value to set.

Returns:

the ConnectionMonitorHttpConfiguration object itself.

withRequestHeaders

public ConnectionMonitorHttpConfiguration withRequestHeaders(List requestHeaders)

Set the requestHeaders property: The HTTP headers to transmit with the request.

Parameters:

requestHeaders - the requestHeaders value to set.

Returns:

the ConnectionMonitorHttpConfiguration object itself.

withValidStatusCodeRanges

public ConnectionMonitorHttpConfiguration withValidStatusCodeRanges(List validStatusCodeRanges)

Set the validStatusCodeRanges property: HTTP status codes to consider successful. For instance, "2xx,301-304,418".

Parameters:

validStatusCodeRanges - the validStatusCodeRanges value to set.

Returns:

the ConnectionMonitorHttpConfiguration object itself.

Applies to