Class BuildConfig

  • All Implemented Interfaces:
    BuildConfigOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class BuildConfig
    extends com.google.protobuf.GeneratedMessageV3
    implements BuildConfigOrBuilder
     Describes the Build step of the function that builds a container from the
     given source.
     
    Protobuf type google.cloud.functions.v2beta.BuildConfig
    See Also:
    Serialized Form
    • Field Detail

      • ENTRY_POINT_FIELD_NUMBER

        public static final int ENTRY_POINT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • SOURCE_PROVENANCE_FIELD_NUMBER

        public static final int SOURCE_PROVENANCE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • WORKER_POOL_FIELD_NUMBER

        public static final int WORKER_POOL_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ENVIRONMENT_VARIABLES_FIELD_NUMBER

        public static final int ENVIRONMENT_VARIABLES_FIELD_NUMBER
        See Also:
        Constant Field Values
      • DOCKER_REGISTRY_FIELD_NUMBER

        public static final int DOCKER_REGISTRY_FIELD_NUMBER
        See Also:
        Constant Field Values
      • DOCKER_REPOSITORY_FIELD_NUMBER

        public static final int DOCKER_REPOSITORY_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getBuild

        public String getBuild()
         Output only. The Cloud Build name of the latest successful deployment of
         the function.
         
        string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
        Specified by:
        getBuild in interface BuildConfigOrBuilder
        Returns:
        The build.
      • getBuildBytes

        public com.google.protobuf.ByteString getBuildBytes()
         Output only. The Cloud Build name of the latest successful deployment of
         the function.
         
        string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
        Specified by:
        getBuildBytes in interface BuildConfigOrBuilder
        Returns:
        The bytes for build.
      • getRuntime

        public String getRuntime()
         The runtime in which to run the function. Required when deploying a new
         function, optional when updating an existing function. For a complete
         list of possible choices, see the
         [`gcloud` command
         reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime).
         
        string runtime = 2;
        Specified by:
        getRuntime in interface BuildConfigOrBuilder
        Returns:
        The runtime.
      • getRuntimeBytes

        public com.google.protobuf.ByteString getRuntimeBytes()
         The runtime in which to run the function. Required when deploying a new
         function, optional when updating an existing function. For a complete
         list of possible choices, see the
         [`gcloud` command
         reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime).
         
        string runtime = 2;
        Specified by:
        getRuntimeBytes in interface BuildConfigOrBuilder
        Returns:
        The bytes for runtime.
      • getEntryPoint

        public String getEntryPoint()
         The name of the function (as defined in source code) that will be
         executed. Defaults to the resource name suffix, if not specified. For
         backward compatibility, if function with given name is not found, then the
         system will try to use function named "function".
         For Node.js this is name of a function exported by the module specified
         in `source_location`.
         
        string entry_point = 3;
        Specified by:
        getEntryPoint in interface BuildConfigOrBuilder
        Returns:
        The entryPoint.
      • getEntryPointBytes

        public com.google.protobuf.ByteString getEntryPointBytes()
         The name of the function (as defined in source code) that will be
         executed. Defaults to the resource name suffix, if not specified. For
         backward compatibility, if function with given name is not found, then the
         system will try to use function named "function".
         For Node.js this is name of a function exported by the module specified
         in `source_location`.
         
        string entry_point = 3;
        Specified by:
        getEntryPointBytes in interface BuildConfigOrBuilder
        Returns:
        The bytes for entryPoint.
      • hasSource

        public boolean hasSource()
         The location of the function source code.
         
        .google.cloud.functions.v2beta.Source source = 4;
        Specified by:
        hasSource in interface BuildConfigOrBuilder
        Returns:
        Whether the source field is set.
      • getSource

        public Source getSource()
         The location of the function source code.
         
        .google.cloud.functions.v2beta.Source source = 4;
        Specified by:
        getSource in interface BuildConfigOrBuilder
        Returns:
        The source.
      • hasSourceProvenance

        public boolean hasSourceProvenance()
         Output only. A permanent fixed identifier for source.
         
        .google.cloud.functions.v2beta.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasSourceProvenance in interface BuildConfigOrBuilder
        Returns:
        Whether the sourceProvenance field is set.
      • getSourceProvenance

        public SourceProvenance getSourceProvenance()
         Output only. A permanent fixed identifier for source.
         
        .google.cloud.functions.v2beta.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getSourceProvenance in interface BuildConfigOrBuilder
        Returns:
        The sourceProvenance.
      • getWorkerPool

        public String getWorkerPool()
         Name of the Cloud Build Custom Worker Pool that should be used to build the
         function. The format of this field is
         `projects/{project}/locations/{region}/workerPools/{workerPool}` where
         {project} and {region} are the project id and region respectively where the
         worker pool is defined and {workerPool} is the short name of the worker
         pool.
        
         If the project id is not the same as the function, then the Cloud
         Functions Service Agent
         (service-<project_number>@gcf-admin-robot.iam.gserviceaccount.com) must be
         granted the role Cloud Build Custom Workers Builder
         (roles/cloudbuild.customworkers.builder) in the project.
         
        string worker_pool = 5 [(.google.api.resource_reference) = { ... }
        Specified by:
        getWorkerPool in interface BuildConfigOrBuilder
        Returns:
        The workerPool.
      • getWorkerPoolBytes

        public com.google.protobuf.ByteString getWorkerPoolBytes()
         Name of the Cloud Build Custom Worker Pool that should be used to build the
         function. The format of this field is
         `projects/{project}/locations/{region}/workerPools/{workerPool}` where
         {project} and {region} are the project id and region respectively where the
         worker pool is defined and {workerPool} is the short name of the worker
         pool.
        
         If the project id is not the same as the function, then the Cloud
         Functions Service Agent
         (service-<project_number>@gcf-admin-robot.iam.gserviceaccount.com) must be
         granted the role Cloud Build Custom Workers Builder
         (roles/cloudbuild.customworkers.builder) in the project.
         
        string worker_pool = 5 [(.google.api.resource_reference) = { ... }
        Specified by:
        getWorkerPoolBytes in interface BuildConfigOrBuilder
        Returns:
        The bytes for workerPool.
      • containsEnvironmentVariables

        public boolean containsEnvironmentVariables​(String key)
         User-provided build-time environment variables for the function
         
        map<string, string> environment_variables = 6;
        Specified by:
        containsEnvironmentVariables in interface BuildConfigOrBuilder
      • getDockerRegistryValue

        public int getDockerRegistryValue()
         Docker Registry to use for this deployment. This configuration is only
         applicable to 1st Gen functions, 2nd Gen functions can only use Artifact
         Registry.
        
         If `docker_repository` field is specified, this field will be automatically
         set as `ARTIFACT_REGISTRY`.
         If unspecified, it currently defaults to `CONTAINER_REGISTRY`.
         This field may be overridden by the backend for eligible deployments.
         
        .google.cloud.functions.v2beta.BuildConfig.DockerRegistry docker_registry = 10;
        Specified by:
        getDockerRegistryValue in interface BuildConfigOrBuilder
        Returns:
        The enum numeric value on the wire for dockerRegistry.
      • getDockerRegistry

        public BuildConfig.DockerRegistry getDockerRegistry()
         Docker Registry to use for this deployment. This configuration is only
         applicable to 1st Gen functions, 2nd Gen functions can only use Artifact
         Registry.
        
         If `docker_repository` field is specified, this field will be automatically
         set as `ARTIFACT_REGISTRY`.
         If unspecified, it currently defaults to `CONTAINER_REGISTRY`.
         This field may be overridden by the backend for eligible deployments.
         
        .google.cloud.functions.v2beta.BuildConfig.DockerRegistry docker_registry = 10;
        Specified by:
        getDockerRegistry in interface BuildConfigOrBuilder
        Returns:
        The dockerRegistry.
      • getDockerRepository

        public String getDockerRepository()
         User managed repository created in Artifact Registry optionally
         with a customer managed encryption key. This is the repository to which the
         function docker image will be pushed after it is built by Cloud Build.
         If unspecified, GCF will create and use a repository named 'gcf-artifacts'
         for every deployed region.
        
         It must match the pattern
         `projects/{project}/locations/{location}/repositories/{repository}`.
        
         Cross-project repositories are not supported.
         Cross-location repositories are not supported.
         Repository format must be 'DOCKER'.
         
        string docker_repository = 7 [(.google.api.resource_reference) = { ... }
        Specified by:
        getDockerRepository in interface BuildConfigOrBuilder
        Returns:
        The dockerRepository.
      • getDockerRepositoryBytes

        public com.google.protobuf.ByteString getDockerRepositoryBytes()
         User managed repository created in Artifact Registry optionally
         with a customer managed encryption key. This is the repository to which the
         function docker image will be pushed after it is built by Cloud Build.
         If unspecified, GCF will create and use a repository named 'gcf-artifacts'
         for every deployed region.
        
         It must match the pattern
         `projects/{project}/locations/{location}/repositories/{repository}`.
        
         Cross-project repositories are not supported.
         Cross-location repositories are not supported.
         Repository format must be 'DOCKER'.
         
        string docker_repository = 7 [(.google.api.resource_reference) = { ... }
        Specified by:
        getDockerRepositoryBytes in interface BuildConfigOrBuilder
        Returns:
        The bytes for dockerRepository.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static BuildConfig parseFrom​(ByteBuffer data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static BuildConfig parseFrom​(ByteBuffer data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static BuildConfig parseFrom​(com.google.protobuf.ByteString data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static BuildConfig parseFrom​(com.google.protobuf.ByteString data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static BuildConfig parseFrom​(byte[] data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static BuildConfig parseFrom​(byte[] data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static BuildConfig parseFrom​(com.google.protobuf.CodedInputStream input,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws IOException
        Throws:
        IOException
      • newBuilderForType

        public BuildConfig.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public BuildConfig.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected BuildConfig.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static BuildConfig getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<BuildConfig> parser()
      • getParserForType

        public com.google.protobuf.Parser<BuildConfig> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public BuildConfig getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder