Class HealthResponse
- java.lang.Object
-
- com.styra.opa.openapi.models.operations.HealthResponse
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HealthResponse.Builder
-
Constructor Summary
Constructors Constructor Description HealthResponse(java.lang.String contentType, int statusCode, java.net.http.HttpResponse<java.io.InputStream> rawResponse)
HealthResponse(java.lang.String contentType, int statusCode, java.net.http.HttpResponse<java.io.InputStream> rawResponse, java.util.Optional<? extends HealthyServer> healthyServer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HealthResponse.Builder
builder()
java.lang.String
contentType()
HTTP response content type for this operationboolean
equals(java.lang.Object o)
int
hashCode()
java.util.Optional<HealthyServer>
healthyServer()
OPA service is healthy.java.net.http.HttpResponse<java.io.InputStream>
rawResponse()
Raw HTTP response; suitable for custom response parsingint
statusCode()
HTTP response status code for this operationjava.lang.String
toString()
HealthResponse
withContentType(java.lang.String contentType)
HTTP response content type for this operationHealthResponse
withHealthyServer(HealthyServer healthyServer)
OPA service is healthy.HealthResponse
withHealthyServer(java.util.Optional<? extends HealthyServer> healthyServer)
OPA service is healthy.HealthResponse
withRawResponse(java.net.http.HttpResponse<java.io.InputStream> rawResponse)
Raw HTTP response; suitable for custom response parsingHealthResponse
withStatusCode(int statusCode)
HTTP response status code for this operation
-
-
-
Constructor Detail
-
HealthResponse
public HealthResponse(java.lang.String contentType, int statusCode, java.net.http.HttpResponse<java.io.InputStream> rawResponse, java.util.Optional<? extends HealthyServer> healthyServer)
-
HealthResponse
public HealthResponse(java.lang.String contentType, int statusCode, java.net.http.HttpResponse<java.io.InputStream> rawResponse)
-
-
Method Detail
-
contentType
public java.lang.String contentType()
HTTP response content type for this operation- Specified by:
contentType
in interfaceResponse
-
statusCode
public int statusCode()
HTTP response status code for this operation- Specified by:
statusCode
in interfaceResponse
-
rawResponse
public java.net.http.HttpResponse<java.io.InputStream> rawResponse()
Raw HTTP response; suitable for custom response parsing- Specified by:
rawResponse
in interfaceResponse
-
healthyServer
public java.util.Optional<HealthyServer> healthyServer()
OPA service is healthy. If the bundles option is specified then all configured bundles have been activated. If the plugins option is specified then all plugins are in an OK state.
-
builder
public static final HealthResponse.Builder builder()
-
withContentType
public HealthResponse withContentType(java.lang.String contentType)
HTTP response content type for this operation
-
withStatusCode
public HealthResponse withStatusCode(int statusCode)
HTTP response status code for this operation
-
withRawResponse
public HealthResponse withRawResponse(java.net.http.HttpResponse<java.io.InputStream> rawResponse)
Raw HTTP response; suitable for custom response parsing
-
withHealthyServer
public HealthResponse withHealthyServer(HealthyServer healthyServer)
OPA service is healthy. If the bundles option is specified then all configured bundles have been activated. If the plugins option is specified then all plugins are in an OK state.
-
withHealthyServer
public HealthResponse withHealthyServer(java.util.Optional<? extends HealthyServer> healthyServer)
OPA service is healthy. If the bundles option is specified then all configured bundles have been activated. If the plugins option is specified then all plugins are in an OK state.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-