Package io.micronaut.gcp
Class GoogleCloudConfiguration
- java.lang.Object
-
- io.micronaut.gcp.GoogleCloudConfiguration
-
@ConfigurationProperties("gcp") public class GoogleCloudConfiguration extends java.lang.Object
General Google cloud configuration.- Since:
- 1.0
- Author:
- graemerocher, Ray Tsang
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NO_PROJECT_ID_MESSAGE
A message to report if no project id is configured.static java.lang.String
PREFIX
The prefix to use.
-
Constructor Summary
Constructors Constructor Description GoogleCloudConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getProjectId()
Returns the Google project ID for the project.boolean
hasProjectId()
Whether a project id is configured.void
setProjectId(java.lang.String projectId)
Sets the project id to use.
-
-
-
Field Detail
-
NO_PROJECT_ID_MESSAGE
public static final java.lang.String NO_PROJECT_ID_MESSAGE
A message to report if no project id is configured.- See Also:
- Constant Field Values
-
PREFIX
public static final java.lang.String PREFIX
The prefix to use.- See Also:
- Constant Field Values
-
-
Method Detail
-
getProjectId
@Nonnull public java.lang.String 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
public void setProjectId(@Nullable java.lang.String projectId)
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
-
-