Class RestResponse
java.lang.Object
com.azure.resourcemanager.deploymentmanager.models.RestResponse
The properties that make up the expected REST response.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionregex()
Get the regex property: The regular expressions to match the response content with.Get the successStatusCodes property: The HTTP status codes expected in a successful health check response.void
validate()
Validates the instance.withRegex
(RestResponseRegex regex) Set the regex property: The regular expressions to match the response content with.withSuccessStatusCodes
(List<String> successStatusCodes) Set the successStatusCodes property: The HTTP status codes expected in a successful health check response.
-
Constructor Details
-
RestResponse
public RestResponse()Creates an instance of RestResponse class.
-
-
Method Details
-
successStatusCodes
Get the successStatusCodes property: The HTTP status codes expected in a successful health check response. The response is expected to match one of the given status codes. If no expected status codes are provided, default expected status code is 200 OK.- Returns:
- the successStatusCodes value.
-
withSuccessStatusCodes
Set the successStatusCodes property: The HTTP status codes expected in a successful health check response. The response is expected to match one of the given status codes. If no expected status codes are provided, default expected status code is 200 OK.- Parameters:
successStatusCodes
- the successStatusCodes value to set.- Returns:
- the RestResponse object itself.
-
regex
Get the regex property: The regular expressions to match the response content with.- Returns:
- the regex value.
-
withRegex
Set the regex property: The regular expressions to match the response content with.- Parameters:
regex
- the regex value to set.- Returns:
- the RestResponse object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-