Class HttpConfiguration
java.lang.Object
com.azure.resourcemanager.network.models.HttpConfiguration
- All Implemented Interfaces:
com.azure.json.JsonSerializable<HttpConfiguration>
public final class HttpConfiguration
extends Object
implements com.azure.json.JsonSerializable<HttpConfiguration>
HTTP configuration of the connectivity check.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpConfigurationfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of HttpConfiguration from the JsonReader.headers()Get the headers property: List of HTTP headers.method()Get the method property: HTTP method.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Get the validStatusCodes property: Valid status codes.withHeaders(List<HttpHeader> headers) Set the headers property: List of HTTP headers.withMethod(HttpMethod method) Set the method property: HTTP method.withValidStatusCodes(List<Integer> validStatusCodes) Set the validStatusCodes property: Valid status codes.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
-
HttpConfiguration
public HttpConfiguration()Creates an instance of HttpConfiguration class.
-
-
Method Details
-
method
Get the method property: HTTP method.- Returns:
- the method value.
-
withMethod
Set the method property: HTTP method.- Parameters:
method- the method value to set.- Returns:
- the HttpConfiguration object itself.
-
headers
Get the headers property: List of HTTP headers.- Returns:
- the headers value.
-
withHeaders
Set the headers property: List of HTTP headers.- Parameters:
headers- the headers value to set.- Returns:
- the HttpConfiguration object itself.
-
validStatusCodes
Get the validStatusCodes property: Valid status codes.- Returns:
- the validStatusCodes value.
-
withValidStatusCodes
Set the validStatusCodes property: Valid status codes.- Parameters:
validStatusCodes- the validStatusCodes value to set.- Returns:
- the HttpConfiguration 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<HttpConfiguration>- Throws:
IOException
-
fromJson
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.
-