Class GoogleCloudCredential.Builder
java.lang.Object
co.yellowdog.platform.model.builders.ValidatedBuilder<GoogleCloudCredential>
co.yellowdog.platform.account.credentials.GoogleCloudCredential.Builder
- All Implemented Interfaces:
CredentialBuilder<GoogleCloudCredential>
- Enclosing class:
GoogleCloudCredential
public static class GoogleCloudCredential.Builder
extends ValidatedBuilder<GoogleCloudCredential>
implements CredentialBuilder<GoogleCloudCredential>
A builder that can be used to build a new GoogleCloudCredential that is automatically validated on build.
-
Method Summary
Modifier and TypeMethodDescriptionBuilds the object without enforcing validation constraints.description(String description) serviceAccountKeyJson(String serviceAccountKeyJson) The Google Cloud service account key JSON textserviceAccountKeyJsonFile(@NonNull Path serviceAccountKeyFile) Loads the Service Account Key JSON from the specified file.toString()Methods inherited from class ValidatedBuilder
build, validateModifier and TypeMethodDescriptionbuild()Builds and validates the object.Set<jakarta.validation.ConstraintViolation<GoogleCloudCredential>> validate()Performs validation based on the current builder properties and returns the ConstraintViolations without throwing.
-
Method Details
-
serviceAccountKeyJsonFile
public GoogleCloudCredential.Builder serviceAccountKeyJsonFile(@NonNull @NonNull Path serviceAccountKeyFile) throws IOException Loads the Service Account Key JSON from the specified file.- Parameters:
serviceAccountKeyFile- the Service Account Key file- Returns:
- the builder
- Throws:
IOException- if an exception is thrown whilst reading the file
-
name
- Specified by:
namein interfaceCredentialBuilder<GoogleCloudCredential>- Returns:
this.
-
description
- Returns:
this.
-
serviceAccountKeyJson
The Google Cloud service account key JSON text- Parameters:
serviceAccountKeyJson- the service account key JSON- Returns:
this.
-
buildUnchecked
Description copied from class:ValidatedBuilderBuilds the object without enforcing validation constraints. Use this when the object is validated later, for example as part of an enclosing object built withValidatedBuilder.build(), or when it does not need to be valid on its own.- Specified by:
buildUncheckedin interfaceCredentialBuilder<GoogleCloudCredential>- Overrides:
buildUncheckedin classValidatedBuilder<GoogleCloudCredential>- Returns:
- the object being built
-
toString
-