Class ConnectivityCheckRequestProtocolConfigurationHttpConfiguration
java.lang.Object
com.azure.resourcemanager.apimanagement.models.ConnectivityCheckRequestProtocolConfigurationHttpConfiguration
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ConnectivityCheckRequestProtocolConfigurationHttpConfiguration>
public final class ConnectivityCheckRequestProtocolConfigurationHttpConfiguration
extends Object
implements com.azure.json.JsonSerializable<ConnectivityCheckRequestProtocolConfigurationHttpConfiguration>
Configuration for HTTP or HTTPS requests.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ConnectivityCheckRequestProtocolConfigurationHttpConfiguration class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ConnectivityCheckRequestProtocolConfigurationHttpConfiguration from the JsonReader.headers()Get the headers property: List of headers to be included in the request.method()Get the method property: The HTTP method to be used.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Get the validStatusCodes property: List of HTTP status codes considered valid for the request response.withHeaders(List<HttpHeader> headers) Set the headers property: List of headers to be included in the request.withMethod(Method method) Set the method property: The HTTP method to be used.withValidStatusCodes(List<Long> validStatusCodes) Set the validStatusCodes property: List of HTTP status codes considered valid for the request response.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
-
ConnectivityCheckRequestProtocolConfigurationHttpConfiguration
public ConnectivityCheckRequestProtocolConfigurationHttpConfiguration()Creates an instance of ConnectivityCheckRequestProtocolConfigurationHttpConfiguration class.
-
-
Method Details
-
method
Get the method property: The HTTP method to be used.- Returns:
- the method value.
-
withMethod
Set the method property: The HTTP method to be used.- Parameters:
method- the method value to set.- Returns:
- the ConnectivityCheckRequestProtocolConfigurationHttpConfiguration object itself.
-
validStatusCodes
Get the validStatusCodes property: List of HTTP status codes considered valid for the request response.- Returns:
- the validStatusCodes value.
-
withValidStatusCodes
public ConnectivityCheckRequestProtocolConfigurationHttpConfiguration withValidStatusCodes(List<Long> validStatusCodes) Set the validStatusCodes property: List of HTTP status codes considered valid for the request response.- Parameters:
validStatusCodes- the validStatusCodes value to set.- Returns:
- the ConnectivityCheckRequestProtocolConfigurationHttpConfiguration object itself.
-
headers
Get the headers property: List of headers to be included in the request.- Returns:
- the headers value.
-
withHeaders
public ConnectivityCheckRequestProtocolConfigurationHttpConfiguration withHeaders(List<HttpHeader> headers) Set the headers property: List of headers to be included in the request.- Parameters:
headers- the headers value to set.- Returns:
- the ConnectivityCheckRequestProtocolConfigurationHttpConfiguration 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<ConnectivityCheckRequestProtocolConfigurationHttpConfiguration>- Throws:
IOException
-
fromJson
public static ConnectivityCheckRequestProtocolConfigurationHttpConfiguration fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ConnectivityCheckRequestProtocolConfigurationHttpConfiguration from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ConnectivityCheckRequestProtocolConfigurationHttpConfiguration 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 ConnectivityCheckRequestProtocolConfigurationHttpConfiguration.
-