Class CredHubRequest.CredHubRequestBuilder<T,R extends CredHubRequest<T>,B extends CredHubRequest.CredHubRequestBuilder<T,R,B>>
java.lang.Object
org.springframework.credhub.support.CredHubRequest.CredHubRequestBuilder<T,R,B>
- Type Parameters:
T
- the type of CredHub credentialR
- the type of the concreteCredHubRequest
B
- the type of the concrete builder
- Direct Known Subclasses:
CertificateCredentialRequest.CertificateCredentialRequestBuilder
,CertificateParametersRequest.CertificateParametersRequestBuilder
,JsonCredentialRequest.JsonCredentialRequestBuilder
,PasswordCredentialRequest.PasswordCredentialRequestBuilder
,PasswordParametersRequest.PasswordParametersRequestBuilder
,RsaCredentialRequest.RsaCredentialRequestBuilder
,RsaParametersRequest.RsaParametersRequestBuilder
,SshCredentialRequest.SshCredentialRequestBuilder
,SshParametersRequest.SshParametersRequestBuilder
,UserCredentialRequest.UserCredentialRequestBuilder
,UserParametersRequest.UserParametersRequestBuilder
,ValueCredentialRequest.ValueCredentialRequestBuilder
- Enclosing class:
- CredHubRequest<T>
protected abstract static class CredHubRequest.CredHubRequestBuilder<T,R extends CredHubRequest<T>,B extends CredHubRequest.CredHubRequestBuilder<T,R,B>>
extends Object
A builder that provides a fluent API for constructing
CredHubRequest
s.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Create aCredHubRequest
from the provided values.protected abstract B
Provide the concrete builder.protected abstract R
Provide the concrete object to build.Sets a value indicating the action CredHub should take when a credential being written or generated already exists.name
(CredentialName name) Set theCredentialName
for the credential.
-
Field Details
-
targetObj
-
-
Constructor Details
-
CredHubRequestBuilder
protected CredHubRequestBuilder()Create aCredHubRequest.CredHubRequestBuilder
. Intended for internal use.
-
-
Method Details
-
createTarget
Provide the concrete object to build.- Returns:
- the target object
-
createBuilder
Provide the concrete builder.- Returns:
- the builder
-
name
Set theCredentialName
for the credential.- Parameters:
name
- the credential name; must not be null- Returns:
- the builder
-
mode
Sets a value indicating the action CredHub should take when a credential being written or generated already exists. As of CredHub 2.0, this value must not be set on write requests (write requests always overwrite the credential that already exists) but may be set on generate requests.- Parameters:
mode
- theWriteMode
to use when a credential exists- Returns:
- the builder
-
build
Create aCredHubRequest
from the provided values.- Returns:
- a
CredHubRequest
-