com.google.api.services.cloudfunctions.v2alpha.model.BuildConfig Maven / Gradle / Ivy
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/
package com.google.api.services.cloudfunctions.v2alpha.model;
/**
* Describes the Build step of the function that builds a container from the given source.
*
* This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Cloud Functions API. For a detailed explanation see:
* https://developers.google.com/api-client-library/java/google-http-java-client/json
*
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class BuildConfig extends com.google.api.client.json.GenericJson {
/**
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private AutomaticUpdatePolicy automaticUpdatePolicy;
/**
* Output only. The Cloud Build name of the latest successful deployment of the function.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String build;
/**
* Docker Registry to use for this deployment. This configuration is only applicable to 1st Gen
* functions, 2nd Gen functions can only use Artifact Registry. Deprecated: Container Registry
* option will no longer be available after March 2025: https://cloud.google.com/artifact-
* registry/docs/transition/transition-from-gcr Please use Artifact Registry instead, which is the
* default choice. If unspecified, it defaults to `ARTIFACT_REGISTRY`. If `docker_repository`
* field is specified, this field should either be left unspecified or set to `ARTIFACT_REGISTRY`.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String dockerRegistry;
/**
* Repository in Artifact Registry to which the function docker image will be pushed after it is
* built by Cloud Build. If specified by user, it is created and managed by user with a customer
* managed encryption key. Otherwise, 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}`. Repository format must be
* 'DOCKER'.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String dockerRepository;
/**
* 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`.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String entryPoint;
/**
* User-provided build-time environment variables for the function
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.Map environmentVariables;
/**
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private OnDeployUpdatePolicy onDeployUpdatePolicy;
/**
* 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).
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String runtime;
/**
* Service account to be used for building the container. The format of this field is
* `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String serviceAccount;
/**
* The location of the function source code.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private Source source;
/**
* Output only. A permanent fixed identifier for source.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private SourceProvenance sourceProvenance;
/**
* An identifier for Firebase function sources. Disclaimer: This field is only supported for
* Firebase function deployments.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String sourceToken;
/**
* 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-@gcf-admin-
* robot.iam.gserviceaccount.com) must be granted the role Cloud Build Custom Workers Builder
* (roles/cloudbuild.customworkers.builder) in the project.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String workerPool;
/**
* @return value or {@code null} for none
*/
public AutomaticUpdatePolicy getAutomaticUpdatePolicy() {
return automaticUpdatePolicy;
}
/**
* @param automaticUpdatePolicy automaticUpdatePolicy or {@code null} for none
*/
public BuildConfig setAutomaticUpdatePolicy(AutomaticUpdatePolicy automaticUpdatePolicy) {
this.automaticUpdatePolicy = automaticUpdatePolicy;
return this;
}
/**
* Output only. The Cloud Build name of the latest successful deployment of the function.
* @return value or {@code null} for none
*/
public java.lang.String getBuild() {
return build;
}
/**
* Output only. The Cloud Build name of the latest successful deployment of the function.
* @param build build or {@code null} for none
*/
public BuildConfig setBuild(java.lang.String build) {
this.build = build;
return this;
}
/**
* Docker Registry to use for this deployment. This configuration is only applicable to 1st Gen
* functions, 2nd Gen functions can only use Artifact Registry. Deprecated: Container Registry
* option will no longer be available after March 2025: https://cloud.google.com/artifact-
* registry/docs/transition/transition-from-gcr Please use Artifact Registry instead, which is the
* default choice. If unspecified, it defaults to `ARTIFACT_REGISTRY`. If `docker_repository`
* field is specified, this field should either be left unspecified or set to `ARTIFACT_REGISTRY`.
* @return value or {@code null} for none
*/
public java.lang.String getDockerRegistry() {
return dockerRegistry;
}
/**
* Docker Registry to use for this deployment. This configuration is only applicable to 1st Gen
* functions, 2nd Gen functions can only use Artifact Registry. Deprecated: Container Registry
* option will no longer be available after March 2025: https://cloud.google.com/artifact-
* registry/docs/transition/transition-from-gcr Please use Artifact Registry instead, which is the
* default choice. If unspecified, it defaults to `ARTIFACT_REGISTRY`. If `docker_repository`
* field is specified, this field should either be left unspecified or set to `ARTIFACT_REGISTRY`.
* @param dockerRegistry dockerRegistry or {@code null} for none
*/
public BuildConfig setDockerRegistry(java.lang.String dockerRegistry) {
this.dockerRegistry = dockerRegistry;
return this;
}
/**
* Repository in Artifact Registry to which the function docker image will be pushed after it is
* built by Cloud Build. If specified by user, it is created and managed by user with a customer
* managed encryption key. Otherwise, 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}`. Repository format must be
* 'DOCKER'.
* @return value or {@code null} for none
*/
public java.lang.String getDockerRepository() {
return dockerRepository;
}
/**
* Repository in Artifact Registry to which the function docker image will be pushed after it is
* built by Cloud Build. If specified by user, it is created and managed by user with a customer
* managed encryption key. Otherwise, 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}`. Repository format must be
* 'DOCKER'.
* @param dockerRepository dockerRepository or {@code null} for none
*/
public BuildConfig setDockerRepository(java.lang.String dockerRepository) {
this.dockerRepository = dockerRepository;
return this;
}
/**
* 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`.
* @return value or {@code null} for none
*/
public java.lang.String getEntryPoint() {
return entryPoint;
}
/**
* 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`.
* @param entryPoint entryPoint or {@code null} for none
*/
public BuildConfig setEntryPoint(java.lang.String entryPoint) {
this.entryPoint = entryPoint;
return this;
}
/**
* User-provided build-time environment variables for the function
* @return value or {@code null} for none
*/
public java.util.Map getEnvironmentVariables() {
return environmentVariables;
}
/**
* User-provided build-time environment variables for the function
* @param environmentVariables environmentVariables or {@code null} for none
*/
public BuildConfig setEnvironmentVariables(java.util.Map environmentVariables) {
this.environmentVariables = environmentVariables;
return this;
}
/**
* @return value or {@code null} for none
*/
public OnDeployUpdatePolicy getOnDeployUpdatePolicy() {
return onDeployUpdatePolicy;
}
/**
* @param onDeployUpdatePolicy onDeployUpdatePolicy or {@code null} for none
*/
public BuildConfig setOnDeployUpdatePolicy(OnDeployUpdatePolicy onDeployUpdatePolicy) {
this.onDeployUpdatePolicy = onDeployUpdatePolicy;
return this;
}
/**
* 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).
* @return value or {@code null} for none
*/
public java.lang.String getRuntime() {
return runtime;
}
/**
* 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).
* @param runtime runtime or {@code null} for none
*/
public BuildConfig setRuntime(java.lang.String runtime) {
this.runtime = runtime;
return this;
}
/**
* Service account to be used for building the container. The format of this field is
* `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`.
* @return value or {@code null} for none
*/
public java.lang.String getServiceAccount() {
return serviceAccount;
}
/**
* Service account to be used for building the container. The format of this field is
* `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`.
* @param serviceAccount serviceAccount or {@code null} for none
*/
public BuildConfig setServiceAccount(java.lang.String serviceAccount) {
this.serviceAccount = serviceAccount;
return this;
}
/**
* The location of the function source code.
* @return value or {@code null} for none
*/
public Source getSource() {
return source;
}
/**
* The location of the function source code.
* @param source source or {@code null} for none
*/
public BuildConfig setSource(Source source) {
this.source = source;
return this;
}
/**
* Output only. A permanent fixed identifier for source.
* @return value or {@code null} for none
*/
public SourceProvenance getSourceProvenance() {
return sourceProvenance;
}
/**
* Output only. A permanent fixed identifier for source.
* @param sourceProvenance sourceProvenance or {@code null} for none
*/
public BuildConfig setSourceProvenance(SourceProvenance sourceProvenance) {
this.sourceProvenance = sourceProvenance;
return this;
}
/**
* An identifier for Firebase function sources. Disclaimer: This field is only supported for
* Firebase function deployments.
* @return value or {@code null} for none
*/
public java.lang.String getSourceToken() {
return sourceToken;
}
/**
* An identifier for Firebase function sources. Disclaimer: This field is only supported for
* Firebase function deployments.
* @param sourceToken sourceToken or {@code null} for none
*/
public BuildConfig setSourceToken(java.lang.String sourceToken) {
this.sourceToken = sourceToken;
return this;
}
/**
* 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-@gcf-admin-
* robot.iam.gserviceaccount.com) must be granted the role Cloud Build Custom Workers Builder
* (roles/cloudbuild.customworkers.builder) in the project.
* @return value or {@code null} for none
*/
public java.lang.String getWorkerPool() {
return workerPool;
}
/**
* 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-@gcf-admin-
* robot.iam.gserviceaccount.com) must be granted the role Cloud Build Custom Workers Builder
* (roles/cloudbuild.customworkers.builder) in the project.
* @param workerPool workerPool or {@code null} for none
*/
public BuildConfig setWorkerPool(java.lang.String workerPool) {
this.workerPool = workerPool;
return this;
}
@Override
public BuildConfig set(String fieldName, Object value) {
return (BuildConfig) super.set(fieldName, value);
}
@Override
public BuildConfig clone() {
return (BuildConfig) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy