Class 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.
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
    • Constructor Detail

      • GoogleCloudConfiguration

        public GoogleCloudConfiguration()
    • 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