com.google.api.services.cloudfunctions.v1.model.CloudFunction 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.v1.model;
/**
* Describes a Cloud Function that contains user computation executed in response to an event. It
* encapsulate function and triggers configurations.
*
* 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 CloudFunction extends com.google.api.client.json.GenericJson {
/**
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private AutomaticUpdatePolicy automaticUpdatePolicy;
/**
* The amount of memory in MB available for a function. Defaults to 256MB.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Integer availableMemoryMb;
/**
* Build environment variables that shall be available during build time.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.Map buildEnvironmentVariables;
/**
* Output only. The Cloud Build ID of the latest successful deployment of the function.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String buildId;
/**
* Output only. The Cloud Build Name of the function deployment. `projects//locations//builds/`.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String buildName;
/**
* A service account the user provides for use with Cloud Build. 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 buildServiceAccount;
/**
* 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 buildWorkerPool;
/**
* User-provided description of a function.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String description;
/**
* Docker Registry to use for this deployment. 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;
/**
* User-managed repository created in Artifact Registry to which the function's Docker image will
* be pushed after it is built by Cloud Build. May optionally be encrypted with a customer-managed
* encryption key (CMEK). If unspecified and `docker_registry` is not explicitly set to
* `CONTAINER_REGISTRY`, GCF will create and use a default Artifact Registry repository named
* 'gcf-artifacts' in the 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'.
* 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 (ID of the function), if not specified.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String entryPoint;
/**
* Environment variables that shall be available during function execution.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.Map environmentVariables;
/**
* A source that fires events in response to a condition in another service.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private EventTrigger eventTrigger;
/**
* An HTTPS endpoint type of source that can be triggered via URL.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private HttpsTrigger httpsTrigger;
/**
* The ingress settings for the function, controlling what traffic can reach it.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String ingressSettings;
/**
* Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function
* resources. It must match the pattern
* `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. If
* specified, you must also provide an artifact registry repository using the `docker_repository`
* field that was created with the same KMS crypto key. The following service accounts need to be
* granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter
* (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the Key/KeyRing/Project/Organization (least
* access preferred). 1. Google Cloud Functions service account (service-{project_number}@gcf-
* admin-robot.iam.gserviceaccount.com) - Required to protect the function's image. 2. Google
* Storage service account (service-{project_number}@gs-project-accounts.iam.gserviceaccount.com)
* - Required to protect the function's source code. If this service account does not exist,
* deploying a function without a KMS key or retrieving the service agent name provisions it. For
* more information, see https://cloud.google.com/storage/docs/projects#service-agents and
* https://cloud.google.com/storage/docs/getting-service-agent#gsutil. Google Cloud Functions
* delegates access to service agents to protect function resources in internal projects that are
* not accessible by the end user.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String kmsKeyName;
/**
* Labels associated with this Cloud Function.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.Map labels;
/**
* The limit on the maximum number of function instances that may coexist at a given time. In some
* cases, such as rapid traffic surges, Cloud Functions may, for a short period of time, create
* more instances than the specified max instances limit. If your function cannot tolerate this
* temporary behavior, you may want to factor in a safety margin and set a lower max instances
* value than your function can tolerate. See the [Max
* Instances](https://cloud.google.com/functions/docs/max-instances) Guide for more details.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Integer maxInstances;
/**
* A lower bound for the number function instances that may coexist at a given time.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Integer minInstances;
/**
* A user-defined name of the function. Function names must be unique globally and match pattern
* `projects/locations/functions`
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/**
* Deprecated: use vpc_connector
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String network;
/**
* 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;
/**
* Secret environment variables configuration.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List secretEnvironmentVariables;
/**
* Secret volumes configuration.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List secretVolumes;
/**
* The email of the function's service account. If empty, defaults to
* `{project_id}@appspot.gserviceaccount.com`.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String serviceAccountEmail;
/**
* The Google Cloud Storage URL, starting with `gs://`, pointing to the zip archive which contains
* the function.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String sourceArchiveUrl;
/**
* **Beta Feature** The source repository where a function is hosted.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private SourceRepository sourceRepository;
/**
* Input only. 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;
/**
* The Google Cloud Storage signed URL used for source uploading, generated by calling
* [google.cloud.functions.v1.GenerateUploadUrl]. The signature is validated on write methods
* (Create, Update) The signature is stripped from the Function object on read methods (Get, List)
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String sourceUploadUrl;
/**
* Output only. Status of the function deployment.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String status;
/**
* The function execution timeout. Execution is considered failed and can be terminated if the
* function is not completed at the end of the timeout period. Defaults to 60 seconds.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private String timeout;
/**
* Output only. The last update timestamp of a Cloud Function.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private String updateTime;
/**
* Output only. The version identifier of the Cloud Function. Each deployment attempt results in a
* new version of a function being created.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key @com.google.api.client.json.JsonString
private java.lang.Long versionId;
/**
* The VPC Network Connector that this cloud function can connect to. It can be either the fully-
* qualified URI, or the short name of the network connector resource. The format of this field is
* `projects/locations/connectors` This field is mutually exclusive with `network` field and will
* eventually replace it. See [the VPC documentation](https://cloud.google.com/compute/docs/vpc)
* for more information on connecting Cloud projects.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String vpcConnector;
/**
* The egress settings for the connector, controlling what traffic is diverted through it.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String vpcConnectorEgressSettings;
/**
* @return value or {@code null} for none
*/
public AutomaticUpdatePolicy getAutomaticUpdatePolicy() {
return automaticUpdatePolicy;
}
/**
* @param automaticUpdatePolicy automaticUpdatePolicy or {@code null} for none
*/
public CloudFunction setAutomaticUpdatePolicy(AutomaticUpdatePolicy automaticUpdatePolicy) {
this.automaticUpdatePolicy = automaticUpdatePolicy;
return this;
}
/**
* The amount of memory in MB available for a function. Defaults to 256MB.
* @return value or {@code null} for none
*/
public java.lang.Integer getAvailableMemoryMb() {
return availableMemoryMb;
}
/**
* The amount of memory in MB available for a function. Defaults to 256MB.
* @param availableMemoryMb availableMemoryMb or {@code null} for none
*/
public CloudFunction setAvailableMemoryMb(java.lang.Integer availableMemoryMb) {
this.availableMemoryMb = availableMemoryMb;
return this;
}
/**
* Build environment variables that shall be available during build time.
* @return value or {@code null} for none
*/
public java.util.Map getBuildEnvironmentVariables() {
return buildEnvironmentVariables;
}
/**
* Build environment variables that shall be available during build time.
* @param buildEnvironmentVariables buildEnvironmentVariables or {@code null} for none
*/
public CloudFunction setBuildEnvironmentVariables(java.util.Map buildEnvironmentVariables) {
this.buildEnvironmentVariables = buildEnvironmentVariables;
return this;
}
/**
* Output only. The Cloud Build ID of the latest successful deployment of the function.
* @return value or {@code null} for none
*/
public java.lang.String getBuildId() {
return buildId;
}
/**
* Output only. The Cloud Build ID of the latest successful deployment of the function.
* @param buildId buildId or {@code null} for none
*/
public CloudFunction setBuildId(java.lang.String buildId) {
this.buildId = buildId;
return this;
}
/**
* Output only. The Cloud Build Name of the function deployment. `projects//locations//builds/`.
* @return value or {@code null} for none
*/
public java.lang.String getBuildName() {
return buildName;
}
/**
* Output only. The Cloud Build Name of the function deployment. `projects//locations//builds/`.
* @param buildName buildName or {@code null} for none
*/
public CloudFunction setBuildName(java.lang.String buildName) {
this.buildName = buildName;
return this;
}
/**
* A service account the user provides for use with Cloud Build. The format of this field is
* `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`.
* @return value or {@code null} for none
*/
public java.lang.String getBuildServiceAccount() {
return buildServiceAccount;
}
/**
* A service account the user provides for use with Cloud Build. The format of this field is
* `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`.
* @param buildServiceAccount buildServiceAccount or {@code null} for none
*/
public CloudFunction setBuildServiceAccount(java.lang.String buildServiceAccount) {
this.buildServiceAccount = buildServiceAccount;
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 getBuildWorkerPool() {
return buildWorkerPool;
}
/**
* 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 buildWorkerPool buildWorkerPool or {@code null} for none
*/
public CloudFunction setBuildWorkerPool(java.lang.String buildWorkerPool) {
this.buildWorkerPool = buildWorkerPool;
return this;
}
/**
* User-provided description of a function.
* @return value or {@code null} for none
*/
public java.lang.String getDescription() {
return description;
}
/**
* User-provided description of a function.
* @param description description or {@code null} for none
*/
public CloudFunction setDescription(java.lang.String description) {
this.description = description;
return this;
}
/**
* Docker Registry to use for this deployment. 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. 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 CloudFunction setDockerRegistry(java.lang.String dockerRegistry) {
this.dockerRegistry = dockerRegistry;
return this;
}
/**
* User-managed repository created in Artifact Registry to which the function's Docker image will
* be pushed after it is built by Cloud Build. May optionally be encrypted with a customer-managed
* encryption key (CMEK). If unspecified and `docker_registry` is not explicitly set to
* `CONTAINER_REGISTRY`, GCF will create and use a default Artifact Registry repository named
* 'gcf-artifacts' in the 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'.
* @return value or {@code null} for none
*/
public java.lang.String getDockerRepository() {
return dockerRepository;
}
/**
* User-managed repository created in Artifact Registry to which the function's Docker image will
* be pushed after it is built by Cloud Build. May optionally be encrypted with a customer-managed
* encryption key (CMEK). If unspecified and `docker_registry` is not explicitly set to
* `CONTAINER_REGISTRY`, GCF will create and use a default Artifact Registry repository named
* 'gcf-artifacts' in the 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'.
* @param dockerRepository dockerRepository or {@code null} for none
*/
public CloudFunction 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 (ID of the function), if not specified.
* @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 (ID of the function), if not specified.
* @param entryPoint entryPoint or {@code null} for none
*/
public CloudFunction setEntryPoint(java.lang.String entryPoint) {
this.entryPoint = entryPoint;
return this;
}
/**
* Environment variables that shall be available during function execution.
* @return value or {@code null} for none
*/
public java.util.Map getEnvironmentVariables() {
return environmentVariables;
}
/**
* Environment variables that shall be available during function execution.
* @param environmentVariables environmentVariables or {@code null} for none
*/
public CloudFunction setEnvironmentVariables(java.util.Map environmentVariables) {
this.environmentVariables = environmentVariables;
return this;
}
/**
* A source that fires events in response to a condition in another service.
* @return value or {@code null} for none
*/
public EventTrigger getEventTrigger() {
return eventTrigger;
}
/**
* A source that fires events in response to a condition in another service.
* @param eventTrigger eventTrigger or {@code null} for none
*/
public CloudFunction setEventTrigger(EventTrigger eventTrigger) {
this.eventTrigger = eventTrigger;
return this;
}
/**
* An HTTPS endpoint type of source that can be triggered via URL.
* @return value or {@code null} for none
*/
public HttpsTrigger getHttpsTrigger() {
return httpsTrigger;
}
/**
* An HTTPS endpoint type of source that can be triggered via URL.
* @param httpsTrigger httpsTrigger or {@code null} for none
*/
public CloudFunction setHttpsTrigger(HttpsTrigger httpsTrigger) {
this.httpsTrigger = httpsTrigger;
return this;
}
/**
* The ingress settings for the function, controlling what traffic can reach it.
* @return value or {@code null} for none
*/
public java.lang.String getIngressSettings() {
return ingressSettings;
}
/**
* The ingress settings for the function, controlling what traffic can reach it.
* @param ingressSettings ingressSettings or {@code null} for none
*/
public CloudFunction setIngressSettings(java.lang.String ingressSettings) {
this.ingressSettings = ingressSettings;
return this;
}
/**
* Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function
* resources. It must match the pattern
* `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. If
* specified, you must also provide an artifact registry repository using the `docker_repository`
* field that was created with the same KMS crypto key. The following service accounts need to be
* granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter
* (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the Key/KeyRing/Project/Organization (least
* access preferred). 1. Google Cloud Functions service account (service-{project_number}@gcf-
* admin-robot.iam.gserviceaccount.com) - Required to protect the function's image. 2. Google
* Storage service account (service-{project_number}@gs-project-accounts.iam.gserviceaccount.com)
* - Required to protect the function's source code. If this service account does not exist,
* deploying a function without a KMS key or retrieving the service agent name provisions it. For
* more information, see https://cloud.google.com/storage/docs/projects#service-agents and
* https://cloud.google.com/storage/docs/getting-service-agent#gsutil. Google Cloud Functions
* delegates access to service agents to protect function resources in internal projects that are
* not accessible by the end user.
* @return value or {@code null} for none
*/
public java.lang.String getKmsKeyName() {
return kmsKeyName;
}
/**
* Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function
* resources. It must match the pattern
* `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. If
* specified, you must also provide an artifact registry repository using the `docker_repository`
* field that was created with the same KMS crypto key. The following service accounts need to be
* granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter
* (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the Key/KeyRing/Project/Organization (least
* access preferred). 1. Google Cloud Functions service account (service-{project_number}@gcf-
* admin-robot.iam.gserviceaccount.com) - Required to protect the function's image. 2. Google
* Storage service account (service-{project_number}@gs-project-accounts.iam.gserviceaccount.com)
* - Required to protect the function's source code. If this service account does not exist,
* deploying a function without a KMS key or retrieving the service agent name provisions it. For
* more information, see https://cloud.google.com/storage/docs/projects#service-agents and
* https://cloud.google.com/storage/docs/getting-service-agent#gsutil. Google Cloud Functions
* delegates access to service agents to protect function resources in internal projects that are
* not accessible by the end user.
* @param kmsKeyName kmsKeyName or {@code null} for none
*/
public CloudFunction setKmsKeyName(java.lang.String kmsKeyName) {
this.kmsKeyName = kmsKeyName;
return this;
}
/**
* Labels associated with this Cloud Function.
* @return value or {@code null} for none
*/
public java.util.Map getLabels() {
return labels;
}
/**
* Labels associated with this Cloud Function.
* @param labels labels or {@code null} for none
*/
public CloudFunction setLabels(java.util.Map labels) {
this.labels = labels;
return this;
}
/**
* The limit on the maximum number of function instances that may coexist at a given time. In some
* cases, such as rapid traffic surges, Cloud Functions may, for a short period of time, create
* more instances than the specified max instances limit. If your function cannot tolerate this
* temporary behavior, you may want to factor in a safety margin and set a lower max instances
* value than your function can tolerate. See the [Max
* Instances](https://cloud.google.com/functions/docs/max-instances) Guide for more details.
* @return value or {@code null} for none
*/
public java.lang.Integer getMaxInstances() {
return maxInstances;
}
/**
* The limit on the maximum number of function instances that may coexist at a given time. In some
* cases, such as rapid traffic surges, Cloud Functions may, for a short period of time, create
* more instances than the specified max instances limit. If your function cannot tolerate this
* temporary behavior, you may want to factor in a safety margin and set a lower max instances
* value than your function can tolerate. See the [Max
* Instances](https://cloud.google.com/functions/docs/max-instances) Guide for more details.
* @param maxInstances maxInstances or {@code null} for none
*/
public CloudFunction setMaxInstances(java.lang.Integer maxInstances) {
this.maxInstances = maxInstances;
return this;
}
/**
* A lower bound for the number function instances that may coexist at a given time.
* @return value or {@code null} for none
*/
public java.lang.Integer getMinInstances() {
return minInstances;
}
/**
* A lower bound for the number function instances that may coexist at a given time.
* @param minInstances minInstances or {@code null} for none
*/
public CloudFunction setMinInstances(java.lang.Integer minInstances) {
this.minInstances = minInstances;
return this;
}
/**
* A user-defined name of the function. Function names must be unique globally and match pattern
* `projects/locations/functions`
* @return value or {@code null} for none
*/
public java.lang.String getName() {
return name;
}
/**
* A user-defined name of the function. Function names must be unique globally and match pattern
* `projects/locations/functions`
* @param name name or {@code null} for none
*/
public CloudFunction setName(java.lang.String name) {
this.name = name;
return this;
}
/**
* Deprecated: use vpc_connector
* @return value or {@code null} for none
*/
public java.lang.String getNetwork() {
return network;
}
/**
* Deprecated: use vpc_connector
* @param network network or {@code null} for none
*/
public CloudFunction setNetwork(java.lang.String network) {
this.network = network;
return this;
}
/**
* @return value or {@code null} for none
*/
public OnDeployUpdatePolicy getOnDeployUpdatePolicy() {
return onDeployUpdatePolicy;
}
/**
* @param onDeployUpdatePolicy onDeployUpdatePolicy or {@code null} for none
*/
public CloudFunction 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 CloudFunction setRuntime(java.lang.String runtime) {
this.runtime = runtime;
return this;
}
/**
* Secret environment variables configuration.
* @return value or {@code null} for none
*/
public java.util.List getSecretEnvironmentVariables() {
return secretEnvironmentVariables;
}
/**
* Secret environment variables configuration.
* @param secretEnvironmentVariables secretEnvironmentVariables or {@code null} for none
*/
public CloudFunction setSecretEnvironmentVariables(java.util.List secretEnvironmentVariables) {
this.secretEnvironmentVariables = secretEnvironmentVariables;
return this;
}
/**
* Secret volumes configuration.
* @return value or {@code null} for none
*/
public java.util.List getSecretVolumes() {
return secretVolumes;
}
/**
* Secret volumes configuration.
* @param secretVolumes secretVolumes or {@code null} for none
*/
public CloudFunction setSecretVolumes(java.util.List secretVolumes) {
this.secretVolumes = secretVolumes;
return this;
}
/**
* The email of the function's service account. If empty, defaults to
* `{project_id}@appspot.gserviceaccount.com`.
* @return value or {@code null} for none
*/
public java.lang.String getServiceAccountEmail() {
return serviceAccountEmail;
}
/**
* The email of the function's service account. If empty, defaults to
* `{project_id}@appspot.gserviceaccount.com`.
* @param serviceAccountEmail serviceAccountEmail or {@code null} for none
*/
public CloudFunction setServiceAccountEmail(java.lang.String serviceAccountEmail) {
this.serviceAccountEmail = serviceAccountEmail;
return this;
}
/**
* The Google Cloud Storage URL, starting with `gs://`, pointing to the zip archive which contains
* the function.
* @return value or {@code null} for none
*/
public java.lang.String getSourceArchiveUrl() {
return sourceArchiveUrl;
}
/**
* The Google Cloud Storage URL, starting with `gs://`, pointing to the zip archive which contains
* the function.
* @param sourceArchiveUrl sourceArchiveUrl or {@code null} for none
*/
public CloudFunction setSourceArchiveUrl(java.lang.String sourceArchiveUrl) {
this.sourceArchiveUrl = sourceArchiveUrl;
return this;
}
/**
* **Beta Feature** The source repository where a function is hosted.
* @return value or {@code null} for none
*/
public SourceRepository getSourceRepository() {
return sourceRepository;
}
/**
* **Beta Feature** The source repository where a function is hosted.
* @param sourceRepository sourceRepository or {@code null} for none
*/
public CloudFunction setSourceRepository(SourceRepository sourceRepository) {
this.sourceRepository = sourceRepository;
return this;
}
/**
* Input only. 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;
}
/**
* Input only. 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 CloudFunction setSourceToken(java.lang.String sourceToken) {
this.sourceToken = sourceToken;
return this;
}
/**
* The Google Cloud Storage signed URL used for source uploading, generated by calling
* [google.cloud.functions.v1.GenerateUploadUrl]. The signature is validated on write methods
* (Create, Update) The signature is stripped from the Function object on read methods (Get, List)
* @return value or {@code null} for none
*/
public java.lang.String getSourceUploadUrl() {
return sourceUploadUrl;
}
/**
* The Google Cloud Storage signed URL used for source uploading, generated by calling
* [google.cloud.functions.v1.GenerateUploadUrl]. The signature is validated on write methods
* (Create, Update) The signature is stripped from the Function object on read methods (Get, List)
* @param sourceUploadUrl sourceUploadUrl or {@code null} for none
*/
public CloudFunction setSourceUploadUrl(java.lang.String sourceUploadUrl) {
this.sourceUploadUrl = sourceUploadUrl;
return this;
}
/**
* Output only. Status of the function deployment.
* @return value or {@code null} for none
*/
public java.lang.String getStatus() {
return status;
}
/**
* Output only. Status of the function deployment.
* @param status status or {@code null} for none
*/
public CloudFunction setStatus(java.lang.String status) {
this.status = status;
return this;
}
/**
* The function execution timeout. Execution is considered failed and can be terminated if the
* function is not completed at the end of the timeout period. Defaults to 60 seconds.
* @return value or {@code null} for none
*/
public String getTimeout() {
return timeout;
}
/**
* The function execution timeout. Execution is considered failed and can be terminated if the
* function is not completed at the end of the timeout period. Defaults to 60 seconds.
* @param timeout timeout or {@code null} for none
*/
public CloudFunction setTimeout(String timeout) {
this.timeout = timeout;
return this;
}
/**
* Output only. The last update timestamp of a Cloud Function.
* @return value or {@code null} for none
*/
public String getUpdateTime() {
return updateTime;
}
/**
* Output only. The last update timestamp of a Cloud Function.
* @param updateTime updateTime or {@code null} for none
*/
public CloudFunction setUpdateTime(String updateTime) {
this.updateTime = updateTime;
return this;
}
/**
* Output only. The version identifier of the Cloud Function. Each deployment attempt results in a
* new version of a function being created.
* @return value or {@code null} for none
*/
public java.lang.Long getVersionId() {
return versionId;
}
/**
* Output only. The version identifier of the Cloud Function. Each deployment attempt results in a
* new version of a function being created.
* @param versionId versionId or {@code null} for none
*/
public CloudFunction setVersionId(java.lang.Long versionId) {
this.versionId = versionId;
return this;
}
/**
* The VPC Network Connector that this cloud function can connect to. It can be either the fully-
* qualified URI, or the short name of the network connector resource. The format of this field is
* `projects/locations/connectors` This field is mutually exclusive with `network` field and will
* eventually replace it. See [the VPC documentation](https://cloud.google.com/compute/docs/vpc)
* for more information on connecting Cloud projects.
* @return value or {@code null} for none
*/
public java.lang.String getVpcConnector() {
return vpcConnector;
}
/**
* The VPC Network Connector that this cloud function can connect to. It can be either the fully-
* qualified URI, or the short name of the network connector resource. The format of this field is
* `projects/locations/connectors` This field is mutually exclusive with `network` field and will
* eventually replace it. See [the VPC documentation](https://cloud.google.com/compute/docs/vpc)
* for more information on connecting Cloud projects.
* @param vpcConnector vpcConnector or {@code null} for none
*/
public CloudFunction setVpcConnector(java.lang.String vpcConnector) {
this.vpcConnector = vpcConnector;
return this;
}
/**
* The egress settings for the connector, controlling what traffic is diverted through it.
* @return value or {@code null} for none
*/
public java.lang.String getVpcConnectorEgressSettings() {
return vpcConnectorEgressSettings;
}
/**
* The egress settings for the connector, controlling what traffic is diverted through it.
* @param vpcConnectorEgressSettings vpcConnectorEgressSettings or {@code null} for none
*/
public CloudFunction setVpcConnectorEgressSettings(java.lang.String vpcConnectorEgressSettings) {
this.vpcConnectorEgressSettings = vpcConnectorEgressSettings;
return this;
}
@Override
public CloudFunction set(String fieldName, Object value) {
return (CloudFunction) super.set(fieldName, value);
}
@Override
public CloudFunction clone() {
return (CloudFunction) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy