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 co.yellowdog.platform.model.builders.ValidatedBuilder
build, validate
-
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:
name
in 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:ValidatedBuilder
Builds the object without enforcing validation constraints. This should only be used for testing purposes- Specified by:
buildUnchecked
in interfaceCredentialBuilder<GoogleCloudCredential>
- Overrides:
buildUnchecked
in classValidatedBuilder<GoogleCloudCredential>
- Returns:
- the object being built
-
toString
-