Class RestHealthCheck
java.lang.Object
com.azure.resourcemanager.deploymentmanager.models.RestHealthCheck
A REST based health check.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionname()Get the name property: A unique name for this check.request()Get the request property: The request to the health provider.response()Get the response property: The expected response from the health provider.voidvalidate()Validates the instance.Set the name property: A unique name for this check.withRequest(RestRequest request) Set the request property: The request to the health provider.withResponse(RestResponse response) Set the response property: The expected response from the health provider.
-
Constructor Details
-
RestHealthCheck
public RestHealthCheck()Creates an instance of RestHealthCheck class.
-
-
Method Details
-
name
Get the name property: A unique name for this check.- Returns:
- the name value.
-
withName
Set the name property: A unique name for this check.- Parameters:
name- the name value to set.- Returns:
- the RestHealthCheck object itself.
-
request
Get the request property: The request to the health provider.- Returns:
- the request value.
-
withRequest
Set the request property: The request to the health provider.- Parameters:
request- the request value to set.- Returns:
- the RestHealthCheck object itself.
-
response
Get the response property: The expected response from the health provider. If no expected response is provided, the default is to expect the received response to have an HTTP status code of 200 OK.- Returns:
- the response value.
-
withResponse
Set the response property: The expected response from the health provider. If no expected response is provided, the default is to expect the received response to have an HTTP status code of 200 OK.- Parameters:
response- the response value to set.- Returns:
- the RestHealthCheck object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-