Package io.micronaut.gcp
Class GoogleCloudConfiguration
java.lang.Object
io.micronaut.gcp.GoogleCloudConfiguration
General Google cloud configuration.
- Since:
- 1.0
- Author:
- graemerocher, Ray Tsang
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NonNull String
Returns the Google project ID for the project.boolean
Whether a project id is configured.void
setProjectId
(@Nullable String projectId) Sets the project id to use.
-
Field Details
-
NO_PROJECT_ID_MESSAGE
A message to report if no project id is configured.- See Also:
-
PREFIX
The prefix to use.- See Also:
-
-
Constructor Details
-
GoogleCloudConfiguration
public GoogleCloudConfiguration()
-
-
Method Details
-
getProjectId
Returns the Google project ID for the project.- Returns:
- The project id
- Throws:
io.micronaut.context.exceptions.ConfigurationException
- if no project ID is found
-
setProjectId
Sets the project id to use.- Parameters:
projectId
- The project id to use
-
hasProjectId
public boolean hasProjectId()Whether a project id is configured.- Returns:
- True if one is
-