Package io.helidon.integrations.vault
Class VaultOptionalResponse<R>
java.lang.Object
io.helidon.integrations.common.rest.ApiJsonParser
io.helidon.integrations.common.rest.ApiResponse
io.helidon.integrations.common.rest.ApiOptionalResponse<R>
io.helidon.integrations.vault.VaultOptionalResponse<R>
- Type Parameters:
R
- type of the response - a subclass of this class
Response for Vault operations that may contain entity.
The entity is present for successful requests (returning
Http.Status.OK_200
;
entity is not present if the response was Http.Status.NOT_FOUND_404
).-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Fluent API builder forVaultOptionalResponse
.static class
Base builder class for subclasses ofVaultOptionalResponse
. -
Constructor Summary
ModifierConstructorDescriptionprotected
VaultOptionalResponse
(VaultOptionalResponse.BuilderBase<?, ?, R> builder, Optional<R> entity) Construct a new optional response from the builder and an entity. -
Method Summary
Modifier and TypeMethodDescriptionerrors()
List of errors (if any) as returned by Vault.static <R,
X> VaultOptionalResponse.Builder<X, R> A builder to create an optional response.Methods inherited from class io.helidon.integrations.common.rest.ApiOptionalResponse
apiResponseBuilder, entity, map
Methods inherited from class io.helidon.integrations.common.rest.ApiResponse
headers, requestId, status
Methods inherited from class io.helidon.integrations.common.rest.ApiJsonParser
isPresent, stringValue, toBoolean, toBytesBase64, toDouble, toInstant, toInt, toList, toLong, toMap, toObject, toString
-
Constructor Details
-
VaultOptionalResponse
protected VaultOptionalResponse(VaultOptionalResponse.BuilderBase<?, ?, R> builder, Optional<R> entity) Construct a new optional response from the builder and an entity.- Parameters:
builder
- subclass of builder of vault optional responseentity
- entity (if mapped from HTTP entity)
-
-
Method Details
-
vaultResponseBuilder
A builder to create an optional response. Method name is notbuilder
to allow subclasses to define their own builder methods.- Type Parameters:
X
- expected entity (such asJsonObject
R
- type of object used to represent the entity- Returns:
- a new builder
-
errors
List of errors (if any) as returned by Vault. This list may contain errors when we get aHttp.Status.NOT_FOUND_404
.- Returns:
- list of errors from Vault
-