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 concreteCredHubRequestB- 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
CredHubRequests.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Create aCredHubRequestfrom the provided values.protected abstract BProvide the concrete builder.protected abstract RProvide 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 theCredentialNamefor 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 theCredentialNamefor 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- theWriteModeto use when a credential exists- Returns:
- the builder
-
build
Create aCredHubRequestfrom the provided values.- Returns:
- a
CredHubRequest
-