public final class HttpCheck
extends com.google.api.client.json.GenericJson
This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the Cloud Monitoring API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json
com.google.api.client.util.GenericData.FlagsAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
HttpCheck() |
| Modifier and Type | Method and Description |
|---|---|
HttpCheck |
clone() |
byte[] |
decodeBody()
The request body associated with the HTTP POST request.
|
HttpCheck |
encodeBody(byte[] body)
The request body associated with the HTTP POST request.
|
List<ResponseStatusCode> |
getAcceptedResponseStatusCodes()
If present, the check will only pass if the HTTP response status code is in this set of status
codes.
|
BasicAuthentication |
getAuthInfo()
The authentication information.
|
String |
getBody()
The request body associated with the HTTP POST request.
|
String |
getContentType()
The content type header to use for the check.
|
String |
getCustomContentType()
A user provided content type header to use for the check.
|
Map<String,String> |
getHeaders()
The list of headers to send as part of the Uptime check request.
|
Boolean |
getMaskHeaders()
Boolean specifying whether to encrypt the header information.
|
String |
getPath()
Optional (defaults to "/").
|
PingConfig |
getPingConfig()
Contains information needed to add pings to an HTTP check.
|
Integer |
getPort()
Optional (defaults to 80 when use_ssl is false, and 443 when use_ssl is true).
|
String |
getRequestMethod()
The HTTP request method to use for the check.
|
ServiceAgentAuthentication |
getServiceAgentAuthentication()
If specified, Uptime will generate and attach an OIDC JWT token for the Monitoring service
agent service account as an Authorization header in the HTTP request when probing.
|
Boolean |
getUseSsl()
If true, use HTTPS instead of HTTP to run the check.
|
Boolean |
getValidateSsl()
Boolean specifying whether to include SSL certificate validation as a part of the Uptime check.
|
HttpCheck |
set(String fieldName,
Object value) |
HttpCheck |
setAcceptedResponseStatusCodes(List<ResponseStatusCode> acceptedResponseStatusCodes)
If present, the check will only pass if the HTTP response status code is in this set of status
codes.
|
HttpCheck |
setAuthInfo(BasicAuthentication authInfo)
The authentication information.
|
HttpCheck |
setBody(String body)
The request body associated with the HTTP POST request.
|
HttpCheck |
setContentType(String contentType)
The content type header to use for the check.
|
HttpCheck |
setCustomContentType(String customContentType)
A user provided content type header to use for the check.
|
HttpCheck |
setHeaders(Map<String,String> headers)
The list of headers to send as part of the Uptime check request.
|
HttpCheck |
setMaskHeaders(Boolean maskHeaders)
Boolean specifying whether to encrypt the header information.
|
HttpCheck |
setPath(String path)
Optional (defaults to "/").
|
HttpCheck |
setPingConfig(PingConfig pingConfig)
Contains information needed to add pings to an HTTP check.
|
HttpCheck |
setPort(Integer port)
Optional (defaults to 80 when use_ssl is false, and 443 when use_ssl is true).
|
HttpCheck |
setRequestMethod(String requestMethod)
The HTTP request method to use for the check.
|
HttpCheck |
setServiceAgentAuthentication(ServiceAgentAuthentication serviceAgentAuthentication)
If specified, Uptime will generate and attach an OIDC JWT token for the Monitoring service
agent service account as an Authorization header in the HTTP request when probing.
|
HttpCheck |
setUseSsl(Boolean useSsl)
If true, use HTTPS instead of HTTP to run the check.
|
HttpCheck |
setValidateSsl(Boolean validateSsl)
Boolean specifying whether to include SSL certificate validation as a part of the Uptime check.
|
getFactory, setFactory, toPrettyString, toStringentrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeysclear, containsKey, containsValue, isEmpty, keySet, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic List<ResponseStatusCode> getAcceptedResponseStatusCodes()
null for nonepublic HttpCheck setAcceptedResponseStatusCodes(List<ResponseStatusCode> acceptedResponseStatusCodes)
acceptedResponseStatusCodes - acceptedResponseStatusCodes or null for nonepublic BasicAuthentication getAuthInfo()
null for nonepublic HttpCheck setAuthInfo(BasicAuthentication authInfo)
authInfo - authInfo or null for nonepublic String getBody()
null for nonedecodeBody()public byte[] decodeBody()
null for nonegetBody()public HttpCheck setBody(String body)
body - body or null for none#encodeBody()public HttpCheck encodeBody(byte[] body)
The value is encoded Base64 or {@code null} for none.
public String getContentType()
null for nonepublic HttpCheck setContentType(String contentType)
contentType - contentType or null for nonepublic String getCustomContentType()
null for nonepublic HttpCheck setCustomContentType(String customContentType)
customContentType - customContentType or null for nonepublic Map<String,String> getHeaders()
null for nonepublic HttpCheck setHeaders(Map<String,String> headers)
headers - headers or null for nonepublic Boolean getMaskHeaders()
null for nonepublic HttpCheck setMaskHeaders(Boolean maskHeaders)
maskHeaders - maskHeaders or null for nonepublic String getPath()
null for nonepublic HttpCheck setPath(String path)
path - path or null for nonepublic PingConfig getPingConfig()
null for nonepublic HttpCheck setPingConfig(PingConfig pingConfig)
pingConfig - pingConfig or null for nonepublic Integer getPort()
null for nonepublic HttpCheck setPort(Integer port)
port - port or null for nonepublic String getRequestMethod()
null for nonepublic HttpCheck setRequestMethod(String requestMethod)
requestMethod - requestMethod or null for nonepublic ServiceAgentAuthentication getServiceAgentAuthentication()
null for nonepublic HttpCheck setServiceAgentAuthentication(ServiceAgentAuthentication serviceAgentAuthentication)
serviceAgentAuthentication - serviceAgentAuthentication or null for nonepublic Boolean getUseSsl()
null for nonepublic HttpCheck setUseSsl(Boolean useSsl)
useSsl - useSsl or null for nonepublic Boolean getValidateSsl()
null for nonepublic HttpCheck setValidateSsl(Boolean validateSsl)
validateSsl - validateSsl or null for nonepublic HttpCheck set(String fieldName, Object value)
set in class com.google.api.client.json.GenericJsonpublic HttpCheck clone()
clone in class com.google.api.client.json.GenericJsonCopyright © 2011–2025 Google. All rights reserved.