Class ConnectionMonitorHttpConfiguration
java.lang.Object
com.azure.resourcemanager.network.models.ConnectionMonitorHttpConfiguration
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ConnectionMonitorHttpConfiguration>
public final class ConnectionMonitorHttpConfiguration
extends Object
implements com.azure.json.JsonSerializable<ConnectionMonitorHttpConfiguration>
Describes the HTTP configuration.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ConnectionMonitorHttpConfiguration class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ConnectionMonitorHttpConfiguration from the JsonReader.method()Get the method property: The HTTP method to use.path()Get the path property: The path component of the URI.port()Get the port property: The port to connect to.Get the preferHttps property: Value indicating whether HTTPS is preferred over HTTP in cases where the choice is not explicit.Get the requestHeaders property: The HTTP headers to transmit with the request.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Get the validStatusCodeRanges property: HTTP status codes to consider successful.withMethod(HttpConfigurationMethod method) Set the method property: The HTTP method to use.Set the path property: The path component of the URI.Set the port property: The port to connect to.withPreferHttps(Boolean preferHttps) Set the preferHttps property: Value indicating whether HTTPS is preferred over HTTP in cases where the choice is not explicit.withRequestHeaders(List<HttpHeader> requestHeaders) Set the requestHeaders property: The HTTP headers to transmit with the request.withValidStatusCodeRanges(List<String> validStatusCodeRanges) Set the validStatusCodeRanges property: HTTP status codes to consider successful.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ConnectionMonitorHttpConfiguration
public ConnectionMonitorHttpConfiguration()Creates an instance of ConnectionMonitorHttpConfiguration class.
-
-
Method Details
-
port
Get the port property: The port to connect to.- Returns:
- the port value.
-
withPort
Set the port property: The port to connect to.- Parameters:
port- the port value to set.- Returns:
- the ConnectionMonitorHttpConfiguration object itself.
-
method
Get the method property: The HTTP method to use.- Returns:
- the method value.
-
withMethod
Set the method property: The HTTP method to use.- Parameters:
method- the method value to set.- Returns:
- the ConnectionMonitorHttpConfiguration object itself.
-
path
Get the path property: The path component of the URI. For instance, "/dir1/dir2".- Returns:
- the path value.
-
withPath
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.
-
requestHeaders
Get the requestHeaders property: The HTTP headers to transmit with the request.- Returns:
- the requestHeaders value.
-
withRequestHeaders
Set the requestHeaders property: The HTTP headers to transmit with the request.- Parameters:
requestHeaders- the requestHeaders value to set.- Returns:
- the ConnectionMonitorHttpConfiguration object itself.
-
validStatusCodeRanges
Get the validStatusCodeRanges property: HTTP status codes to consider successful. For instance, "2xx,301-304,418".- Returns:
- the validStatusCodeRanges value.
-
withValidStatusCodeRanges
public ConnectionMonitorHttpConfiguration withValidStatusCodeRanges(List<String> 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.
-
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.
-
withPreferHttps
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.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ConnectionMonitorHttpConfiguration>- Throws:
IOException
-
fromJson
public static ConnectionMonitorHttpConfiguration fromJson(com.azure.json.JsonReader jsonReader) throws IOException 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.
-