From a042af580930a8045342f66f64763de88f994d38 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 19 Oct 2021 15:44:22 +0000 Subject: [PATCH 01/18] chore: release 2.2.2-SNAPSHOT (#322) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-functions-bom/pom.xml | 8 ++++---- google-cloud-functions/pom.xml | 4 ++-- grpc-google-cloud-functions-v1/pom.xml | 4 ++-- pom.xml | 8 ++++---- proto-google-cloud-functions-v1/pom.xml | 4 ++-- versions.txt | 6 +++--- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/google-cloud-functions-bom/pom.xml b/google-cloud-functions-bom/pom.xml index bd0e132b..3156d653 100644 --- a/google-cloud-functions-bom/pom.xml +++ b/google-cloud-functions-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-functions-bom - 2.2.1 + 2.2.2-SNAPSHOT pom com.google.cloud @@ -56,17 +56,17 @@ com.google.cloud google-cloud-functions - 2.2.1 + 2.2.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-functions-v1 - 2.2.1 + 2.2.2-SNAPSHOT com.google.api.grpc proto-google-cloud-functions-v1 - 2.2.1 + 2.2.2-SNAPSHOT diff --git a/google-cloud-functions/pom.xml b/google-cloud-functions/pom.xml index eb58b44d..056d0227 100644 --- a/google-cloud-functions/pom.xml +++ b/google-cloud-functions/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-functions - 2.2.1 + 2.2.2-SNAPSHOT jar Google Cloud Functions https://github.com/googleapis/java-functions @@ -11,7 +11,7 @@ com.google.cloud google-cloud-functions-parent - 2.2.1 + 2.2.2-SNAPSHOT google-cloud-functions diff --git a/grpc-google-cloud-functions-v1/pom.xml b/grpc-google-cloud-functions-v1/pom.xml index 729bd846..8784f880 100644 --- a/grpc-google-cloud-functions-v1/pom.xml +++ b/grpc-google-cloud-functions-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-functions-v1 - 2.2.1 + 2.2.2-SNAPSHOT grpc-google-cloud-functions-v1 GRPC library for grpc-google-cloud-functions-v1 com.google.cloud google-cloud-functions-parent - 2.2.1 + 2.2.2-SNAPSHOT diff --git a/pom.xml b/pom.xml index 11392e08..bb62f5b5 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-functions-parent pom - 2.2.1 + 2.2.2-SNAPSHOT Google Cloud Functions Parent https://github.com/googleapis/java-functions @@ -61,17 +61,17 @@ com.google.cloud google-cloud-functions - 2.2.1 + 2.2.2-SNAPSHOT com.google.api.grpc proto-google-cloud-functions-v1 - 2.2.1 + 2.2.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-functions-v1 - 2.2.1 + 2.2.2-SNAPSHOT diff --git a/proto-google-cloud-functions-v1/pom.xml b/proto-google-cloud-functions-v1/pom.xml index d8d413dc..59149119 100644 --- a/proto-google-cloud-functions-v1/pom.xml +++ b/proto-google-cloud-functions-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-functions-v1 - 2.2.1 + 2.2.2-SNAPSHOT proto-google-cloud-functions-v1 PROTO library for proto-google-cloud-functions-v1 com.google.cloud google-cloud-functions-parent - 2.2.1 + 2.2.2-SNAPSHOT diff --git a/versions.txt b/versions.txt index 92d0dd20..a90d39b6 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-functions:2.2.1:2.2.1 -grpc-google-cloud-functions-v1:2.2.1:2.2.1 -proto-google-cloud-functions-v1:2.2.1:2.2.1 +google-cloud-functions:2.2.1:2.2.2-SNAPSHOT +grpc-google-cloud-functions-v1:2.2.1:2.2.2-SNAPSHOT +proto-google-cloud-functions-v1:2.2.1:2.2.2-SNAPSHOT From de5ea90a3ebc61074df0598ab46d43d61f30dd76 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 19 Oct 2021 18:52:54 +0000 Subject: [PATCH 02/18] chore(ruby): Re-enable bigquery-storage-v1 generation, which also required updating protobuf from 3.15.3 to 3.18.1 for codegen (#318) - [x] Regenerate this pull request now. PiperOrigin-RevId: 403132955 Source-Link: https://github.com/googleapis/googleapis/commit/d2977af9e9f1fc0c9dc8368352daa032471f3c63 Source-Link: https://github.com/googleapis/googleapis-gen/commit/99bb13c813c0e9c2682d03a8b3c3bcb382a909c9 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTliYjEzYzgxM2MwZTljMjY4MmQwM2E4YjNjM2JjYjM4MmE5MDljOSJ9 --- README.md | 4 +-- .../functions/v1/CallFunctionRequest.java | 8 ++--- .../functions/v1/CallFunctionResponse.java | 12 +++---- .../cloud/functions/v1/CloudFunction.java | 32 +++++++++---------- .../functions/v1/CreateFunctionRequest.java | 4 +-- .../functions/v1/DeleteFunctionRequest.java | 4 +-- .../cloud/functions/v1/EventTrigger.java | 12 +++---- .../v1/GenerateDownloadUrlRequest.java | 4 +-- .../v1/GenerateDownloadUrlResponse.java | 4 +-- .../v1/GenerateUploadUrlRequest.java | 4 +-- .../v1/GenerateUploadUrlResponse.java | 4 +-- .../functions/v1/GetFunctionRequest.java | 4 +-- .../cloud/functions/v1/HttpsTrigger.java | 4 +-- .../functions/v1/ListFunctionsRequest.java | 8 ++--- .../functions/v1/ListFunctionsResponse.java | 4 +-- .../functions/v1/OperationMetadataV1.java | 8 ++--- .../cloud/functions/v1/SourceRepository.java | 8 ++--- 17 files changed, 64 insertions(+), 64 deletions(-) diff --git a/README.md b/README.md index 517b10f9..c6c748e6 100644 --- a/README.md +++ b/README.md @@ -27,13 +27,13 @@ If you are using Maven, add this to your pom.xml file: If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-functions:2.2.0' +implementation 'com.google.cloud:google-cloud-functions:2.2.1' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-functions" % "2.2.0" +libraryDependencies += "com.google.cloud" % "google-cloud-functions" % "2.2.1" ``` ## Authentication diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CallFunctionRequest.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CallFunctionRequest.java index 94c255b8..8efc22d6 100644 --- a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CallFunctionRequest.java +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CallFunctionRequest.java @@ -235,10 +235,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - if (!getDataBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, data_); } unknownFields.writeTo(output); @@ -250,10 +250,10 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - if (!getDataBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, data_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CallFunctionResponse.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CallFunctionResponse.java index 999acde9..b6416c46 100644 --- a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CallFunctionResponse.java +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CallFunctionResponse.java @@ -292,13 +292,13 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getExecutionIdBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(executionId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, executionId_); } - if (!getResultBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(result_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, result_); } - if (!getErrorBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(error_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, error_); } unknownFields.writeTo(output); @@ -310,13 +310,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getExecutionIdBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(executionId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, executionId_); } - if (!getResultBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(result_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, result_); } - if (!getErrorBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(error_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, error_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CloudFunction.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CloudFunction.java index 03700e1c..d2cc974d 100644 --- a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CloudFunction.java +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CloudFunction.java @@ -2051,10 +2051,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - if (!getDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); } if (sourceCodeCase_ == 3) { @@ -2074,7 +2074,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(7, status_); } - if (!getEntryPointBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, entryPoint_); } if (timeout_ != null) { @@ -2083,7 +2083,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (availableMemoryMb_ != 0) { output.writeInt32(10, availableMemoryMb_); } - if (!getServiceAccountEmailBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 11, serviceAccountEmail_); } if (updateTime_ != null) { @@ -2102,16 +2102,16 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io internalGetEnvironmentVariables(), EnvironmentVariablesDefaultEntryHolder.defaultEntry, 17); - if (!getNetworkBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 18, network_); } - if (!getRuntimeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runtime_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 19, runtime_); } if (maxInstances_ != 0) { output.writeInt32(20, maxInstances_); } - if (!getVpcConnectorBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vpcConnector_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 22, vpcConnector_); } if (vpcConnectorEgressSettings_ @@ -2125,7 +2125,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(24, ingressSettings_); } - if (!getBuildIdBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 27, buildId_); } unknownFields.writeTo(output); @@ -2137,10 +2137,10 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - if (!getDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); } if (sourceCodeCase_ == 3) { @@ -2166,7 +2166,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, status_); } - if (!getEntryPointBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entryPoint_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, entryPoint_); } if (timeout_ != null) { @@ -2175,7 +2175,7 @@ public int getSerializedSize() { if (availableMemoryMb_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(10, availableMemoryMb_); } - if (!getServiceAccountEmailBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, serviceAccountEmail_); } if (updateTime_ != null) { @@ -2207,16 +2207,16 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, environmentVariables__); } - if (!getNetworkBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, network_); } - if (!getRuntimeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(runtime_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, runtime_); } if (maxInstances_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(20, maxInstances_); } - if (!getVpcConnectorBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vpcConnector_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(22, vpcConnector_); } if (vpcConnectorEgressSettings_ @@ -2231,7 +2231,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(24, ingressSettings_); } - if (!getBuildIdBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(27, buildId_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CreateFunctionRequest.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CreateFunctionRequest.java index 32fddd68..8115a8d5 100644 --- a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CreateFunctionRequest.java +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CreateFunctionRequest.java @@ -250,7 +250,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getLocationBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, location_); } if (function_ != null) { @@ -265,7 +265,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getLocationBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, location_); } if (function_ != null) { diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/DeleteFunctionRequest.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/DeleteFunctionRequest.java index 30de42bd..4fd015fc 100644 --- a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/DeleteFunctionRequest.java +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/DeleteFunctionRequest.java @@ -178,7 +178,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } unknownFields.writeTo(output); @@ -190,7 +190,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/EventTrigger.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/EventTrigger.java index ac06c038..feb8b4a8 100644 --- a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/EventTrigger.java +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/EventTrigger.java @@ -409,13 +409,13 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getEventTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(eventType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, eventType_); } - if (!getResourceBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resource_); } - if (!getServiceBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, service_); } if (failurePolicy_ != null) { @@ -430,13 +430,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getEventTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(eventType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, eventType_); } - if (!getResourceBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resource_); } - if (!getServiceBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, service_); } if (failurePolicy_ != null) { diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateDownloadUrlRequest.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateDownloadUrlRequest.java index 1280034b..a961e0b7 100644 --- a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateDownloadUrlRequest.java +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateDownloadUrlRequest.java @@ -200,7 +200,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (versionId_ != 0L) { @@ -215,7 +215,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (versionId_ != 0L) { diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateDownloadUrlResponse.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateDownloadUrlResponse.java index a55bdc7d..7a59fd4e 100644 --- a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateDownloadUrlResponse.java +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateDownloadUrlResponse.java @@ -176,7 +176,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getDownloadUrlBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(downloadUrl_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, downloadUrl_); } unknownFields.writeTo(output); @@ -188,7 +188,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getDownloadUrlBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(downloadUrl_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, downloadUrl_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateUploadUrlRequest.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateUploadUrlRequest.java index 4910b85b..fa1af76c 100644 --- a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateUploadUrlRequest.java +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateUploadUrlRequest.java @@ -176,7 +176,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } unknownFields.writeTo(output); @@ -188,7 +188,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateUploadUrlResponse.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateUploadUrlResponse.java index 55844172..ab3eccca 100644 --- a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateUploadUrlResponse.java +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GenerateUploadUrlResponse.java @@ -178,7 +178,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getUploadUrlBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uploadUrl_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uploadUrl_); } unknownFields.writeTo(output); @@ -190,7 +190,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getUploadUrlBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uploadUrl_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uploadUrl_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GetFunctionRequest.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GetFunctionRequest.java index 1257655b..14c5795d 100644 --- a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GetFunctionRequest.java +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/GetFunctionRequest.java @@ -178,7 +178,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } unknownFields.writeTo(output); @@ -190,7 +190,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/HttpsTrigger.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/HttpsTrigger.java index 492fcc76..4c27eab2 100644 --- a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/HttpsTrigger.java +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/HttpsTrigger.java @@ -387,7 +387,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getUrlBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); } if (securityLevel_ @@ -404,7 +404,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getUrlBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); } if (securityLevel_ diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/ListFunctionsRequest.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/ListFunctionsRequest.java index 841fa0c7..01a10765 100644 --- a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/ListFunctionsRequest.java +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/ListFunctionsRequest.java @@ -270,13 +270,13 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } if (pageSize_ != 0) { output.writeInt32(2, pageSize_); } - if (!getPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } unknownFields.writeTo(output); @@ -288,13 +288,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); } - if (!getPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/ListFunctionsResponse.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/ListFunctionsResponse.java index cc730cf8..a522f84d 100644 --- a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/ListFunctionsResponse.java +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/ListFunctionsResponse.java @@ -347,7 +347,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < functions_.size(); i++) { output.writeMessage(1, functions_.get(i)); } - if (!getNextPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } for (int i = 0; i < unreachable_.size(); i++) { @@ -365,7 +365,7 @@ public int getSerializedSize() { for (int i = 0; i < functions_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, functions_.get(i)); } - if (!getNextPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } { diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/OperationMetadataV1.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/OperationMetadataV1.java index 252be479..f52814e7 100644 --- a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/OperationMetadataV1.java +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/OperationMetadataV1.java @@ -424,7 +424,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getTargetBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, target_); } if (type_ != com.google.cloud.functions.v1.OperationType.OPERATION_UNSPECIFIED.getNumber()) { @@ -439,7 +439,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateTime_ != null) { output.writeMessage(5, getUpdateTime()); } - if (!getBuildIdBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, buildId_); } unknownFields.writeTo(output); @@ -451,7 +451,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getTargetBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, target_); } if (type_ != com.google.cloud.functions.v1.OperationType.OPERATION_UNSPECIFIED.getNumber()) { @@ -466,7 +466,7 @@ public int getSerializedSize() { if (updateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); } - if (!getBuildIdBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, buildId_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SourceRepository.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SourceRepository.java index 4970e50d..8b5e9635 100644 --- a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SourceRepository.java +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SourceRepository.java @@ -256,10 +256,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getUrlBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); } - if (!getDeployedUrlBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deployedUrl_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deployedUrl_); } unknownFields.writeTo(output); @@ -271,10 +271,10 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getUrlBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); } - if (!getDeployedUrlBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deployedUrl_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deployedUrl_); } size += unknownFields.getSerializedSize(); From e2d5c7c808a48437565b6c5532bc9ba8eb78c34c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 25 Oct 2021 16:10:47 +0000 Subject: [PATCH 03/18] fix(java): java 17 dependency arguments (#1266) (#325) --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/dependencies.sh | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index dc53bbb5..0df65ebe 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:d4b2141d65566523dfd523f63c6e6899ab1281463bce182a9f600e74b0511875 + digest: sha256:a3ac08d167454718ff057b97a1950d3cb5e16fc39fb3f355d90276285a6cac75 diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index 9a5105d7..d7476cfe 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -38,15 +38,13 @@ function determineMavenOpts() { | sed -E 's/^(1\.[0-9]\.0).*$/\1/g' ) - case $javaVersion in - "17") + if [[ $javaVersion == 17* ]] + then # MaxPermSize is no longer supported as of jdk 17 echo -n "-Xmx1024m" - ;; - *) + else echo -n "-Xmx1024m -XX:MaxPermSize=128m" - ;; - esac + fi } export MAVEN_OPTS=$(determineMavenOpts) From a34f78c9338d53140b6acd8ffb47639a8030a79a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Oct 2021 23:08:30 +0200 Subject: [PATCH 04/18] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.2.0 (#324) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.1.0` -> `1.2.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.0/compatibility-slim/1.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.0/confidence-slim/1.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.2.0`](https://togithub.com/googleapis/java-shared-config/blob/master/CHANGELOG.md#​120-httpswwwgithubcomgoogleapisjava-shared-configcomparev110v120-2021-10-21) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.1.0...v1.2.0) ##### Features - Introduce Native Image testing build script changes ([#​1240](https://www.togithub.com/googleapis/java-shared-config/issues/1240)) ([#​334](https://www.togithub.com/googleapis/java-shared-config/issues/334)) ([4643cf1](https://www.github.com/googleapis/java-shared-config/commit/4643cf15be0b37fa8fa905d544d438cda7ef2ecd)) ##### Bug Fixes - **java:** downgrade native maven plugin version ([#​335](https://www.togithub.com/googleapis/java-shared-config/issues/335)) ([5834284](https://www.github.com/googleapis/java-shared-config/commit/5834284176fb34713d10082ce04f3b6abba85ad8))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-functions). --- google-cloud-functions-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-functions-bom/pom.xml b/google-cloud-functions-bom/pom.xml index 3156d653..b3f2a4a9 100644 --- a/google-cloud-functions-bom/pom.xml +++ b/google-cloud-functions-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.1.0 + 1.2.0 Google Cloud Functions BOM diff --git a/pom.xml b/pom.xml index bb62f5b5..06624aee 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.1.0 + 1.2.0 From 535d5fbde2724587efce8ee540305e7bbde53542 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 26 Oct 2021 19:50:21 +0200 Subject: [PATCH 05/18] chore(deps): update dependency com.google.cloud:google-cloud-functions to v2.2.1 (#323) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-functions](https://togithub.com/googleapis/java-functions) | `2.2.0` -> `2.2.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-functions/2.2.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-functions/2.2.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-functions/2.2.1/compatibility-slim/2.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-functions/2.2.1/confidence-slim/2.2.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-functions ### [`v2.2.1`](https://togithub.com/googleapis/java-functions/blob/master/CHANGELOG.md#​221-httpswwwgithubcomgoogleapisjava-functionscomparev220v221-2021-10-19) [Compare Source](https://togithub.com/googleapis/java-functions/compare/v2.2.0...v2.2.1)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-functions). --- README.md | 2 +- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c6c748e6..2eebb6fa 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-functions - 2.2.0 + 2.2.1 ``` diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index ba08079f..7618685d 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-functions - 2.2.0 + 2.2.1 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 6fffd9e9..2512f34c 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-functions - 2.2.0 + 2.2.1 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 24ec966a..2d914b9a 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-functions - 2.2.0 + 2.2.1 From 88f58a7d394ca0a6b0d313a2dee5eacd219c1c1c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 4 Nov 2021 20:56:32 +0000 Subject: [PATCH 06/18] chore(java): remove pin on Apache Maven 3.8.1 from github actions (#1268) (#327) --- .github/.OwlBot.lock.yaml | 2 +- .github/workflows/ci.yaml | 17 +---------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 0df65ebe..5a79fcd5 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:a3ac08d167454718ff057b97a1950d3cb5e16fc39fb3f355d90276285a6cac75 + digest: sha256:ed012741acaae5d03e011244585a1f0625a596d31568967d77772aa5a0a51d5e diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2425d723..d95a11a2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,9 +12,6 @@ jobs: java: [8, 11, 17] steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -27,9 +24,6 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -45,9 +39,6 @@ jobs: java: [8, 11, 17] steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -58,9 +49,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -73,9 +61,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -83,4 +68,4 @@ jobs: - run: java -version - run: .kokoro/build.sh env: - JOB_TYPE: clirr + JOB_TYPE: clirr \ No newline at end of file From ea30e8c7625145df60773dbae78923159e9997b9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 4 Nov 2021 22:18:27 +0000 Subject: [PATCH 07/18] feat: Secret Manager integration fields 'secret_environment_variables' and 'secret_volumes' added feat: CMEK integration fields 'kms_key_name' and 'docker_repository' added (#328) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 407654258 Source-Link: https://github.com/googleapis/googleapis/commit/09b25760127661d664c7eeef6e4aafedbdd5e051 Source-Link: https://github.com/googleapis/googleapis-gen/commit/28d38540e7a574ce249f65ff0228533129cd120c Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjhkMzg1NDBlN2E1NzRjZTI0OWY2NWZmMDIyODUzMzEyOWNkMTIwYyJ9 --- .../v1/CloudFunctionsServiceClientTest.java | 45 + .../cloud/functions/v1/CloudFunction.java | 2805 ++++++++++++++++- .../functions/v1/CloudFunctionOrBuilder.java | 400 +++ .../v1/FunctionsOperationsProto.java | 26 +- .../cloud/functions/v1/FunctionsProto.java | 313 +- .../functions/v1/OperationMetadataV1.java | 379 +++ .../v1/OperationMetadataV1OrBuilder.java | 56 + .../cloud/functions/v1/SecretEnvVar.java | 1212 +++++++ .../functions/v1/SecretEnvVarOrBuilder.java | 135 + .../cloud/functions/v1/SecretVolume.java | 2516 +++++++++++++++ .../functions/v1/SecretVolumeOrBuilder.java | 178 ++ .../google/cloud/functions/v1/functions.proto | 196 +- .../cloud/functions/v1/operations.proto | 11 +- 13 files changed, 8071 insertions(+), 201 deletions(-) create mode 100644 proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretEnvVar.java create mode 100644 proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretEnvVarOrBuilder.java create mode 100644 proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretVolume.java create mode 100644 proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretVolumeOrBuilder.java diff --git a/google-cloud-functions/src/test/java/com/google/cloud/functions/v1/CloudFunctionsServiceClientTest.java b/google-cloud-functions/src/test/java/com/google/cloud/functions/v1/CloudFunctionsServiceClientTest.java index 6690cd11..7845eddb 100644 --- a/google-cloud-functions/src/test/java/com/google/cloud/functions/v1/CloudFunctionsServiceClientTest.java +++ b/google-cloud-functions/src/test/java/com/google/cloud/functions/v1/CloudFunctionsServiceClientTest.java @@ -168,10 +168,19 @@ public void getFunctionTest() throws Exception { .setVersionId(-670497310) .putAllLabels(new HashMap()) .putAllEnvironmentVariables(new HashMap()) + .putAllBuildEnvironmentVariables(new HashMap()) .setNetwork("network1843485230") .setMaxInstances(-330682013) + .setMinInstances(1491624145) .setVpcConnector("vpcConnector2101559652") + .setKmsKeyName("kmsKeyName412586233") + .setBuildWorkerPool("buildWorkerPool1011442120") .setBuildId("buildId230943785") + .setBuildName("buildName-1401172455") + .addAllSecretEnvironmentVariables(new ArrayList()) + .addAllSecretVolumes(new ArrayList()) + .setSourceToken("sourceToken-94946658") + .setDockerRepository("dockerRepository1588395402") .build(); mockCloudFunctionsService.addResponse(expectedResponse); @@ -221,10 +230,19 @@ public void getFunctionTest2() throws Exception { .setVersionId(-670497310) .putAllLabels(new HashMap()) .putAllEnvironmentVariables(new HashMap()) + .putAllBuildEnvironmentVariables(new HashMap()) .setNetwork("network1843485230") .setMaxInstances(-330682013) + .setMinInstances(1491624145) .setVpcConnector("vpcConnector2101559652") + .setKmsKeyName("kmsKeyName412586233") + .setBuildWorkerPool("buildWorkerPool1011442120") .setBuildId("buildId230943785") + .setBuildName("buildName-1401172455") + .addAllSecretEnvironmentVariables(new ArrayList()) + .addAllSecretVolumes(new ArrayList()) + .setSourceToken("sourceToken-94946658") + .setDockerRepository("dockerRepository1588395402") .build(); mockCloudFunctionsService.addResponse(expectedResponse); @@ -274,10 +292,19 @@ public void createFunctionTest() throws Exception { .setVersionId(-670497310) .putAllLabels(new HashMap()) .putAllEnvironmentVariables(new HashMap()) + .putAllBuildEnvironmentVariables(new HashMap()) .setNetwork("network1843485230") .setMaxInstances(-330682013) + .setMinInstances(1491624145) .setVpcConnector("vpcConnector2101559652") + .setKmsKeyName("kmsKeyName412586233") + .setBuildWorkerPool("buildWorkerPool1011442120") .setBuildId("buildId230943785") + .setBuildName("buildName-1401172455") + .addAllSecretEnvironmentVariables(new ArrayList()) + .addAllSecretVolumes(new ArrayList()) + .setSourceToken("sourceToken-94946658") + .setDockerRepository("dockerRepository1588395402") .build(); Operation resultOperation = Operation.newBuilder() @@ -338,10 +365,19 @@ public void createFunctionTest2() throws Exception { .setVersionId(-670497310) .putAllLabels(new HashMap()) .putAllEnvironmentVariables(new HashMap()) + .putAllBuildEnvironmentVariables(new HashMap()) .setNetwork("network1843485230") .setMaxInstances(-330682013) + .setMinInstances(1491624145) .setVpcConnector("vpcConnector2101559652") + .setKmsKeyName("kmsKeyName412586233") + .setBuildWorkerPool("buildWorkerPool1011442120") .setBuildId("buildId230943785") + .setBuildName("buildName-1401172455") + .addAllSecretEnvironmentVariables(new ArrayList()) + .addAllSecretVolumes(new ArrayList()) + .setSourceToken("sourceToken-94946658") + .setDockerRepository("dockerRepository1588395402") .build(); Operation resultOperation = Operation.newBuilder() @@ -402,10 +438,19 @@ public void updateFunctionTest() throws Exception { .setVersionId(-670497310) .putAllLabels(new HashMap()) .putAllEnvironmentVariables(new HashMap()) + .putAllBuildEnvironmentVariables(new HashMap()) .setNetwork("network1843485230") .setMaxInstances(-330682013) + .setMinInstances(1491624145) .setVpcConnector("vpcConnector2101559652") + .setKmsKeyName("kmsKeyName412586233") + .setBuildWorkerPool("buildWorkerPool1011442120") .setBuildId("buildId230943785") + .setBuildName("buildName-1401172455") + .addAllSecretEnvironmentVariables(new ArrayList()) + .addAllSecretVolumes(new ArrayList()) + .setSourceToken("sourceToken-94946658") + .setDockerRepository("dockerRepository1588395402") .build(); Operation resultOperation = Operation.newBuilder() diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CloudFunction.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CloudFunction.java index d2cc974d..00e4a0b9 100644 --- a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CloudFunction.java +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CloudFunction.java @@ -24,6 +24,7 @@ *
  * Describes a Cloud Function that contains user computation executed in
  * response to an event. It encapsulate function and triggers configurations.
+ * Next tag: 36
  * 
* * Protobuf type {@code google.cloud.functions.v1.CloudFunction} @@ -49,7 +50,14 @@ private CloudFunction() { vpcConnector_ = ""; vpcConnectorEgressSettings_ = 0; ingressSettings_ = 0; + kmsKeyName_ = ""; + buildWorkerPool_ = ""; buildId_ = ""; + buildName_ = ""; + secretEnvironmentVariables_ = java.util.Collections.emptyList(); + secretVolumes_ = java.util.Collections.emptyList(); + sourceToken_ = ""; + dockerRepository_ = ""; } @java.lang.Override @@ -291,6 +299,20 @@ private CloudFunction( ingressSettings_ = rawValue; break; } + case 202: + { + java.lang.String s = input.readStringRequireUtf8(); + + kmsKeyName_ = s; + break; + } + case 210: + { + java.lang.String s = input.readStringRequireUtf8(); + + buildWorkerPool_ = s; + break; + } case 218: { java.lang.String s = input.readStringRequireUtf8(); @@ -298,6 +320,76 @@ private CloudFunction( buildId_ = s; break; } + case 226: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + buildEnvironmentVariables_ = + com.google.protobuf.MapField.newMapField( + BuildEnvironmentVariablesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry + buildEnvironmentVariables__ = + input.readMessage( + BuildEnvironmentVariablesDefaultEntryHolder.defaultEntry + .getParserForType(), + extensionRegistry); + buildEnvironmentVariables_ + .getMutableMap() + .put( + buildEnvironmentVariables__.getKey(), buildEnvironmentVariables__.getValue()); + break; + } + case 234: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + secretEnvironmentVariables_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + secretEnvironmentVariables_.add( + input.readMessage( + com.google.cloud.functions.v1.SecretEnvVar.parser(), extensionRegistry)); + break; + } + case 242: + { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + secretVolumes_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + secretVolumes_.add( + input.readMessage( + com.google.cloud.functions.v1.SecretVolume.parser(), extensionRegistry)); + break; + } + case 250: + { + java.lang.String s = input.readStringRequireUtf8(); + + sourceToken_ = s; + break; + } + case 256: + { + minInstances_ = input.readInt32(); + break; + } + case 266: + { + java.lang.String s = input.readStringRequireUtf8(); + + buildName_ = s; + break; + } + case 274: + { + java.lang.String s = input.readStringRequireUtf8(); + + dockerRepository_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -312,6 +404,13 @@ private CloudFunction( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { + if (((mutable_bitField0_ & 0x00000008) != 0)) { + secretEnvironmentVariables_ = + java.util.Collections.unmodifiableList(secretEnvironmentVariables_); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + secretVolumes_ = java.util.Collections.unmodifiableList(secretVolumes_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -330,6 +429,8 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { return internalGetLabels(); case 17: return internalGetEnvironmentVariables(); + case 28: + return internalGetBuildEnvironmentVariables(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -1747,6 +1848,110 @@ public java.lang.String getEnvironmentVariablesOrThrow(java.lang.String key) { return map.get(key); } + public static final int BUILD_ENVIRONMENT_VARIABLES_FIELD_NUMBER = 28; + + private static final class BuildEnvironmentVariablesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.functions.v1.FunctionsProto + .internal_static_google_cloud_functions_v1_CloudFunction_BuildEnvironmentVariablesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField + buildEnvironmentVariables_; + + private com.google.protobuf.MapField + internalGetBuildEnvironmentVariables() { + if (buildEnvironmentVariables_ == null) { + return com.google.protobuf.MapField.emptyMapField( + BuildEnvironmentVariablesDefaultEntryHolder.defaultEntry); + } + return buildEnvironmentVariables_; + } + + public int getBuildEnvironmentVariablesCount() { + return internalGetBuildEnvironmentVariables().getMap().size(); + } + /** + * + * + *
+   * Build environment variables that shall be available during build time.
+   * 
+ * + * map<string, string> build_environment_variables = 28; + */ + @java.lang.Override + public boolean containsBuildEnvironmentVariables(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetBuildEnvironmentVariables().getMap().containsKey(key); + } + /** Use {@link #getBuildEnvironmentVariablesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getBuildEnvironmentVariables() { + return getBuildEnvironmentVariablesMap(); + } + /** + * + * + *
+   * Build environment variables that shall be available during build time.
+   * 
+ * + * map<string, string> build_environment_variables = 28; + */ + @java.lang.Override + public java.util.Map getBuildEnvironmentVariablesMap() { + return internalGetBuildEnvironmentVariables().getMap(); + } + /** + * + * + *
+   * Build environment variables that shall be available during build time.
+   * 
+ * + * map<string, string> build_environment_variables = 28; + */ + @java.lang.Override + public java.lang.String getBuildEnvironmentVariablesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetBuildEnvironmentVariables().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Build environment variables that shall be available during build time.
+   * 
+ * + * map<string, string> build_environment_variables = 28; + */ + @java.lang.Override + public java.lang.String getBuildEnvironmentVariablesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetBuildEnvironmentVariables().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public static final int NETWORK_FIELD_NUMBER = 18; private volatile java.lang.Object network_; /** @@ -1826,6 +2031,14 @@ public com.google.protobuf.ByteString getNetworkBytes() { *
    * 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.
    * 
* * int32 max_instances = 20; @@ -1837,6 +2050,25 @@ public int getMaxInstances() { return maxInstances_; } + public static final int MIN_INSTANCES_FIELD_NUMBER = 32; + private int minInstances_; + /** + * + * + *
+   * A lower bound for the number function instances that may coexist at a
+   * given time.
+   * 
+ * + * int32 min_instances = 32; + * + * @return The minInstances. + */ + @java.lang.Override + public int getMinInstances() { + return minInstances_; + } + public static final int VPC_CONNECTOR_FIELD_NUMBER = 22; private volatile java.lang.Object vpcConnector_; /** @@ -1986,6 +2218,168 @@ public com.google.cloud.functions.v1.CloudFunction.IngressSettings getIngressSet : result; } + public static final int KMS_KEY_NAME_FIELD_NUMBER = 25; + private volatile java.lang.Object 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 Cloud KMS crypto key
+   * encrypter/decrypter roles on the key.
+   * 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.
+   * 
+ * + * string kms_key_name = 25 [(.google.api.resource_reference) = { ... } + * + * @return The kmsKeyName. + */ + @java.lang.Override + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyName_ = s; + return s; + } + } + /** + * + * + *
+   * 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 Cloud KMS crypto key
+   * encrypter/decrypter roles on the key.
+   * 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.
+   * 
+ * + * string kms_key_name = 25 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for kmsKeyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUILD_WORKER_POOL_FIELD_NUMBER = 26; + private volatile java.lang.Object 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-<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 build_worker_pool = 26; + * + * @return The buildWorkerPool. + */ + @java.lang.Override + public java.lang.String getBuildWorkerPool() { + java.lang.Object ref = buildWorkerPool_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildWorkerPool_ = s; + return s; + } + } + /** + * + * + *
+   * 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 build_worker_pool = 26; + * + * @return The bytes for buildWorkerPool. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBuildWorkerPoolBytes() { + java.lang.Object ref = buildWorkerPool_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + buildWorkerPool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int BUILD_ID_FIELD_NUMBER = 27; private volatile java.lang.Object buildId_; /** @@ -2037,31 +2431,347 @@ public com.google.protobuf.ByteString getBuildIdBytes() { } } - private byte memoizedIsInitialized = -1; - + public static final int BUILD_NAME_FIELD_NUMBER = 33; + private volatile java.lang.Object buildName_; + /** + * + * + *
+   * Output only. The Cloud Build Name of the function deployment.
+   * `projects/<project-number>/locations/<region>/builds/<build-id>`.
+   * 
+ * + * string build_name = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The buildName. + */ @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; + public java.lang.String getBuildName() { + java.lang.Object ref = buildName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildName_ = s; + return s; + } } - + /** + * + * + *
+   * Output only. The Cloud Build Name of the function deployment.
+   * `projects/<project-number>/locations/<region>/builds/<build-id>`.
+   * 
+ * + * string build_name = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for buildName. + */ @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); - } - if (sourceCodeCase_ == 3) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceCode_); + public com.google.protobuf.ByteString getBuildNameBytes() { + java.lang.Object ref = buildName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + buildName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - if (sourceCodeCase_ == 4) { - output.writeMessage(4, (com.google.cloud.functions.v1.SourceRepository) sourceCode_); + } + + public static final int SECRET_ENVIRONMENT_VARIABLES_FIELD_NUMBER = 29; + private java.util.List secretEnvironmentVariables_; + /** + * + * + *
+   * Secret environment variables configuration.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + @java.lang.Override + public java.util.List + getSecretEnvironmentVariablesList() { + return secretEnvironmentVariables_; + } + /** + * + * + *
+   * Secret environment variables configuration.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + @java.lang.Override + public java.util.List + getSecretEnvironmentVariablesOrBuilderList() { + return secretEnvironmentVariables_; + } + /** + * + * + *
+   * Secret environment variables configuration.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + @java.lang.Override + public int getSecretEnvironmentVariablesCount() { + return secretEnvironmentVariables_.size(); + } + /** + * + * + *
+   * Secret environment variables configuration.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + @java.lang.Override + public com.google.cloud.functions.v1.SecretEnvVar getSecretEnvironmentVariables(int index) { + return secretEnvironmentVariables_.get(index); + } + /** + * + * + *
+   * Secret environment variables configuration.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + @java.lang.Override + public com.google.cloud.functions.v1.SecretEnvVarOrBuilder getSecretEnvironmentVariablesOrBuilder( + int index) { + return secretEnvironmentVariables_.get(index); + } + + public static final int SECRET_VOLUMES_FIELD_NUMBER = 30; + private java.util.List secretVolumes_; + /** + * + * + *
+   * Secret volumes configuration.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + @java.lang.Override + public java.util.List getSecretVolumesList() { + return secretVolumes_; + } + /** + * + * + *
+   * Secret volumes configuration.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + @java.lang.Override + public java.util.List + getSecretVolumesOrBuilderList() { + return secretVolumes_; + } + /** + * + * + *
+   * Secret volumes configuration.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + @java.lang.Override + public int getSecretVolumesCount() { + return secretVolumes_.size(); + } + /** + * + * + *
+   * Secret volumes configuration.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + @java.lang.Override + public com.google.cloud.functions.v1.SecretVolume getSecretVolumes(int index) { + return secretVolumes_.get(index); + } + /** + * + * + *
+   * Secret volumes configuration.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + @java.lang.Override + public com.google.cloud.functions.v1.SecretVolumeOrBuilder getSecretVolumesOrBuilder(int index) { + return secretVolumes_.get(index); + } + + public static final int SOURCE_TOKEN_FIELD_NUMBER = 31; + private volatile java.lang.Object sourceToken_; + /** + * + * + *
+   * Input only. An identifier for Firebase function sources. Disclaimer: This field is only
+   * supported for Firebase function deployments.
+   * 
+ * + * string source_token = 31 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The sourceToken. + */ + @java.lang.Override + public java.lang.String getSourceToken() { + java.lang.Object ref = sourceToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceToken_ = s; + return s; + } + } + /** + * + * + *
+   * Input only. An identifier for Firebase function sources. Disclaimer: This field is only
+   * supported for Firebase function deployments.
+   * 
+ * + * string source_token = 31 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for sourceToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceTokenBytes() { + java.lang.Object ref = sourceToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOCKER_REPOSITORY_FIELD_NUMBER = 34; + private volatile java.lang.Object dockerRepository_; + /** + * + * + *
+   * User managed repository created in Artifact Registry optionally with a
+   * customer managed encryption key. If specified, deployments will use
+   * Artifact Registry. If unspecified and the deployment is eligible to use
+   * Artifact Registry, GCF will create and use a repository named
+   * 'gcf-artifacts' for every deployed region. This is the repository to which
+   * the function docker image will be pushed after it is built by Cloud Build.
+   * 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 = 34 [(.google.api.resource_reference) = { ... } + * + * @return The dockerRepository. + */ + @java.lang.Override + public java.lang.String getDockerRepository() { + java.lang.Object ref = dockerRepository_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dockerRepository_ = s; + return s; + } + } + /** + * + * + *
+   * User managed repository created in Artifact Registry optionally with a
+   * customer managed encryption key. If specified, deployments will use
+   * Artifact Registry. If unspecified and the deployment is eligible to use
+   * Artifact Registry, GCF will create and use a repository named
+   * 'gcf-artifacts' for every deployed region. This is the repository to which
+   * the function docker image will be pushed after it is built by Cloud Build.
+   * 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 = 34 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for dockerRepository. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDockerRepositoryBytes() { + java.lang.Object ref = dockerRepository_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dockerRepository_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (sourceCodeCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceCode_); + } + if (sourceCodeCase_ == 4) { + output.writeMessage(4, (com.google.cloud.functions.v1.SourceRepository) sourceCode_); } if (triggerCase_ == 5) { output.writeMessage(5, (com.google.cloud.functions.v1.HttpsTrigger) trigger_); @@ -2125,9 +2835,38 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(24, ingressSettings_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 25, kmsKeyName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildWorkerPool_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 26, buildWorkerPool_); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 27, buildId_); } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, + internalGetBuildEnvironmentVariables(), + BuildEnvironmentVariablesDefaultEntryHolder.defaultEntry, + 28); + for (int i = 0; i < secretEnvironmentVariables_.size(); i++) { + output.writeMessage(29, secretEnvironmentVariables_.get(i)); + } + for (int i = 0; i < secretVolumes_.size(); i++) { + output.writeMessage(30, secretVolumes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 31, sourceToken_); + } + if (minInstances_ != 0) { + output.writeInt32(32, minInstances_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 33, buildName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dockerRepository_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 34, dockerRepository_); + } unknownFields.writeTo(output); } @@ -2231,9 +2970,46 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(24, ingressSettings_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(25, kmsKeyName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildWorkerPool_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(26, buildWorkerPool_); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(27, buildId_); } + for (java.util.Map.Entry entry : + internalGetBuildEnvironmentVariables().getMap().entrySet()) { + com.google.protobuf.MapEntry buildEnvironmentVariables__ = + BuildEnvironmentVariablesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(28, buildEnvironmentVariables__); + } + for (int i = 0; i < secretEnvironmentVariables_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 29, secretEnvironmentVariables_.get(i)); + } + for (int i = 0; i < secretVolumes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(30, secretVolumes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(31, sourceToken_); + } + if (minInstances_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(32, minInstances_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(33, buildName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dockerRepository_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(34, dockerRepository_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -2269,12 +3045,23 @@ public boolean equals(final java.lang.Object obj) { if (!internalGetLabels().equals(other.internalGetLabels())) return false; if (!internalGetEnvironmentVariables().equals(other.internalGetEnvironmentVariables())) return false; + if (!internalGetBuildEnvironmentVariables() + .equals(other.internalGetBuildEnvironmentVariables())) return false; if (!getNetwork().equals(other.getNetwork())) return false; if (getMaxInstances() != other.getMaxInstances()) return false; + if (getMinInstances() != other.getMinInstances()) return false; if (!getVpcConnector().equals(other.getVpcConnector())) return false; if (vpcConnectorEgressSettings_ != other.vpcConnectorEgressSettings_) return false; if (ingressSettings_ != other.ingressSettings_) return false; + if (!getKmsKeyName().equals(other.getKmsKeyName())) return false; + if (!getBuildWorkerPool().equals(other.getBuildWorkerPool())) return false; if (!getBuildId().equals(other.getBuildId())) return false; + if (!getBuildName().equals(other.getBuildName())) return false; + if (!getSecretEnvironmentVariablesList().equals(other.getSecretEnvironmentVariablesList())) + return false; + if (!getSecretVolumesList().equals(other.getSecretVolumesList())) return false; + if (!getSourceToken().equals(other.getSourceToken())) return false; + if (!getDockerRepository().equals(other.getDockerRepository())) return false; if (!getSourceCodeCase().equals(other.getSourceCodeCase())) return false; switch (sourceCodeCase_) { case 3: @@ -2343,18 +3130,42 @@ public int hashCode() { hash = (37 * hash) + ENVIRONMENT_VARIABLES_FIELD_NUMBER; hash = (53 * hash) + internalGetEnvironmentVariables().hashCode(); } + if (!internalGetBuildEnvironmentVariables().getMap().isEmpty()) { + hash = (37 * hash) + BUILD_ENVIRONMENT_VARIABLES_FIELD_NUMBER; + hash = (53 * hash) + internalGetBuildEnvironmentVariables().hashCode(); + } hash = (37 * hash) + NETWORK_FIELD_NUMBER; hash = (53 * hash) + getNetwork().hashCode(); hash = (37 * hash) + MAX_INSTANCES_FIELD_NUMBER; hash = (53 * hash) + getMaxInstances(); + hash = (37 * hash) + MIN_INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getMinInstances(); hash = (37 * hash) + VPC_CONNECTOR_FIELD_NUMBER; hash = (53 * hash) + getVpcConnector().hashCode(); hash = (37 * hash) + VPC_CONNECTOR_EGRESS_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + vpcConnectorEgressSettings_; hash = (37 * hash) + INGRESS_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + ingressSettings_; + hash = (37 * hash) + KMS_KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyName().hashCode(); + hash = (37 * hash) + BUILD_WORKER_POOL_FIELD_NUMBER; + hash = (53 * hash) + getBuildWorkerPool().hashCode(); hash = (37 * hash) + BUILD_ID_FIELD_NUMBER; hash = (53 * hash) + getBuildId().hashCode(); + hash = (37 * hash) + BUILD_NAME_FIELD_NUMBER; + hash = (53 * hash) + getBuildName().hashCode(); + if (getSecretEnvironmentVariablesCount() > 0) { + hash = (37 * hash) + SECRET_ENVIRONMENT_VARIABLES_FIELD_NUMBER; + hash = (53 * hash) + getSecretEnvironmentVariablesList().hashCode(); + } + if (getSecretVolumesCount() > 0) { + hash = (37 * hash) + SECRET_VOLUMES_FIELD_NUMBER; + hash = (53 * hash) + getSecretVolumesList().hashCode(); + } + hash = (37 * hash) + SOURCE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getSourceToken().hashCode(); + hash = (37 * hash) + DOCKER_REPOSITORY_FIELD_NUMBER; + hash = (53 * hash) + getDockerRepository().hashCode(); switch (sourceCodeCase_) { case 3: hash = (37 * hash) + SOURCE_ARCHIVE_URL_FIELD_NUMBER; @@ -2489,6 +3300,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
    * Describes a Cloud Function that contains user computation executed in
    * response to an event. It encapsulate function and triggers configurations.
+   * Next tag: 36
    * 
* * Protobuf type {@code google.cloud.functions.v1.CloudFunction} @@ -2509,6 +3321,8 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { return internalGetLabels(); case 17: return internalGetEnvironmentVariables(); + case 28: + return internalGetBuildEnvironmentVariables(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -2521,6 +3335,8 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { return internalGetMutableLabels(); case 17: return internalGetMutableEnvironmentVariables(); + case 28: + return internalGetMutableBuildEnvironmentVariables(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -2547,7 +3363,10 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSecretEnvironmentVariablesFieldBuilder(); + getSecretVolumesFieldBuilder(); + } } @java.lang.Override @@ -2583,18 +3402,43 @@ public Builder clear() { internalGetMutableLabels().clear(); internalGetMutableEnvironmentVariables().clear(); + internalGetMutableBuildEnvironmentVariables().clear(); network_ = ""; maxInstances_ = 0; + minInstances_ = 0; + vpcConnector_ = ""; vpcConnectorEgressSettings_ = 0; ingressSettings_ = 0; + kmsKeyName_ = ""; + + buildWorkerPool_ = ""; + buildId_ = ""; + buildName_ = ""; + + if (secretEnvironmentVariablesBuilder_ == null) { + secretEnvironmentVariables_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + secretEnvironmentVariablesBuilder_.clear(); + } + if (secretVolumesBuilder_ == null) { + secretVolumes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + secretVolumesBuilder_.clear(); + } + sourceToken_ = ""; + + dockerRepository_ = ""; + sourceCodeCase_ = 0; sourceCode_ = null; triggerCase_ = 0; @@ -2676,12 +3520,39 @@ public com.google.cloud.functions.v1.CloudFunction buildPartial() { result.labels_.makeImmutable(); result.environmentVariables_ = internalGetEnvironmentVariables(); result.environmentVariables_.makeImmutable(); + result.buildEnvironmentVariables_ = internalGetBuildEnvironmentVariables(); + result.buildEnvironmentVariables_.makeImmutable(); result.network_ = network_; result.maxInstances_ = maxInstances_; + result.minInstances_ = minInstances_; result.vpcConnector_ = vpcConnector_; result.vpcConnectorEgressSettings_ = vpcConnectorEgressSettings_; result.ingressSettings_ = ingressSettings_; + result.kmsKeyName_ = kmsKeyName_; + result.buildWorkerPool_ = buildWorkerPool_; result.buildId_ = buildId_; + result.buildName_ = buildName_; + if (secretEnvironmentVariablesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + secretEnvironmentVariables_ = + java.util.Collections.unmodifiableList(secretEnvironmentVariables_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.secretEnvironmentVariables_ = secretEnvironmentVariables_; + } else { + result.secretEnvironmentVariables_ = secretEnvironmentVariablesBuilder_.build(); + } + if (secretVolumesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + secretVolumes_ = java.util.Collections.unmodifiableList(secretVolumes_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.secretVolumes_ = secretVolumes_; + } else { + result.secretVolumes_ = secretVolumesBuilder_.build(); + } + result.sourceToken_ = sourceToken_; + result.dockerRepository_ = dockerRepository_; result.sourceCodeCase_ = sourceCodeCase_; result.triggerCase_ = triggerCase_; onBuilt(); @@ -2770,6 +3641,8 @@ public Builder mergeFrom(com.google.cloud.functions.v1.CloudFunction other) { } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); internalGetMutableEnvironmentVariables().mergeFrom(other.internalGetEnvironmentVariables()); + internalGetMutableBuildEnvironmentVariables() + .mergeFrom(other.internalGetBuildEnvironmentVariables()); if (!other.getNetwork().isEmpty()) { network_ = other.network_; onChanged(); @@ -2777,6 +3650,9 @@ public Builder mergeFrom(com.google.cloud.functions.v1.CloudFunction other) { if (other.getMaxInstances() != 0) { setMaxInstances(other.getMaxInstances()); } + if (other.getMinInstances() != 0) { + setMinInstances(other.getMinInstances()); + } if (!other.getVpcConnector().isEmpty()) { vpcConnector_ = other.vpcConnector_; onChanged(); @@ -2787,20 +3663,94 @@ public Builder mergeFrom(com.google.cloud.functions.v1.CloudFunction other) { if (other.ingressSettings_ != 0) { setIngressSettingsValue(other.getIngressSettingsValue()); } + if (!other.getKmsKeyName().isEmpty()) { + kmsKeyName_ = other.kmsKeyName_; + onChanged(); + } + if (!other.getBuildWorkerPool().isEmpty()) { + buildWorkerPool_ = other.buildWorkerPool_; + onChanged(); + } if (!other.getBuildId().isEmpty()) { buildId_ = other.buildId_; onChanged(); } - switch (other.getSourceCodeCase()) { - case SOURCE_ARCHIVE_URL: - { - sourceCodeCase_ = 3; - sourceCode_ = other.sourceCode_; - onChanged(); - break; + if (!other.getBuildName().isEmpty()) { + buildName_ = other.buildName_; + onChanged(); + } + if (secretEnvironmentVariablesBuilder_ == null) { + if (!other.secretEnvironmentVariables_.isEmpty()) { + if (secretEnvironmentVariables_.isEmpty()) { + secretEnvironmentVariables_ = other.secretEnvironmentVariables_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureSecretEnvironmentVariablesIsMutable(); + secretEnvironmentVariables_.addAll(other.secretEnvironmentVariables_); } - case SOURCE_REPOSITORY: - { + onChanged(); + } + } else { + if (!other.secretEnvironmentVariables_.isEmpty()) { + if (secretEnvironmentVariablesBuilder_.isEmpty()) { + secretEnvironmentVariablesBuilder_.dispose(); + secretEnvironmentVariablesBuilder_ = null; + secretEnvironmentVariables_ = other.secretEnvironmentVariables_; + bitField0_ = (bitField0_ & ~0x00000008); + secretEnvironmentVariablesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSecretEnvironmentVariablesFieldBuilder() + : null; + } else { + secretEnvironmentVariablesBuilder_.addAllMessages(other.secretEnvironmentVariables_); + } + } + } + if (secretVolumesBuilder_ == null) { + if (!other.secretVolumes_.isEmpty()) { + if (secretVolumes_.isEmpty()) { + secretVolumes_ = other.secretVolumes_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureSecretVolumesIsMutable(); + secretVolumes_.addAll(other.secretVolumes_); + } + onChanged(); + } + } else { + if (!other.secretVolumes_.isEmpty()) { + if (secretVolumesBuilder_.isEmpty()) { + secretVolumesBuilder_.dispose(); + secretVolumesBuilder_ = null; + secretVolumes_ = other.secretVolumes_; + bitField0_ = (bitField0_ & ~0x00000010); + secretVolumesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSecretVolumesFieldBuilder() + : null; + } else { + secretVolumesBuilder_.addAllMessages(other.secretVolumes_); + } + } + } + if (!other.getSourceToken().isEmpty()) { + sourceToken_ = other.sourceToken_; + onChanged(); + } + if (!other.getDockerRepository().isEmpty()) { + dockerRepository_ = other.dockerRepository_; + onChanged(); + } + switch (other.getSourceCodeCase()) { + case SOURCE_ARCHIVE_URL: + { + sourceCodeCase_ = 3; + sourceCode_ = other.sourceCode_; + onChanged(); + break; + } + case SOURCE_REPOSITORY: + { mergeSourceRepository(other.getSourceRepository()); break; } @@ -5342,6 +6292,171 @@ public Builder putAllEnvironmentVariables( return this; } + private com.google.protobuf.MapField + buildEnvironmentVariables_; + + private com.google.protobuf.MapField + internalGetBuildEnvironmentVariables() { + if (buildEnvironmentVariables_ == null) { + return com.google.protobuf.MapField.emptyMapField( + BuildEnvironmentVariablesDefaultEntryHolder.defaultEntry); + } + return buildEnvironmentVariables_; + } + + private com.google.protobuf.MapField + internalGetMutableBuildEnvironmentVariables() { + onChanged(); + ; + if (buildEnvironmentVariables_ == null) { + buildEnvironmentVariables_ = + com.google.protobuf.MapField.newMapField( + BuildEnvironmentVariablesDefaultEntryHolder.defaultEntry); + } + if (!buildEnvironmentVariables_.isMutable()) { + buildEnvironmentVariables_ = buildEnvironmentVariables_.copy(); + } + return buildEnvironmentVariables_; + } + + public int getBuildEnvironmentVariablesCount() { + return internalGetBuildEnvironmentVariables().getMap().size(); + } + /** + * + * + *
+     * Build environment variables that shall be available during build time.
+     * 
+ * + * map<string, string> build_environment_variables = 28; + */ + @java.lang.Override + public boolean containsBuildEnvironmentVariables(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetBuildEnvironmentVariables().getMap().containsKey(key); + } + /** Use {@link #getBuildEnvironmentVariablesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getBuildEnvironmentVariables() { + return getBuildEnvironmentVariablesMap(); + } + /** + * + * + *
+     * Build environment variables that shall be available during build time.
+     * 
+ * + * map<string, string> build_environment_variables = 28; + */ + @java.lang.Override + public java.util.Map getBuildEnvironmentVariablesMap() { + return internalGetBuildEnvironmentVariables().getMap(); + } + /** + * + * + *
+     * Build environment variables that shall be available during build time.
+     * 
+ * + * map<string, string> build_environment_variables = 28; + */ + @java.lang.Override + public java.lang.String getBuildEnvironmentVariablesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetBuildEnvironmentVariables().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Build environment variables that shall be available during build time.
+     * 
+ * + * map<string, string> build_environment_variables = 28; + */ + @java.lang.Override + public java.lang.String getBuildEnvironmentVariablesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetBuildEnvironmentVariables().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearBuildEnvironmentVariables() { + internalGetMutableBuildEnvironmentVariables().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Build environment variables that shall be available during build time.
+     * 
+ * + * map<string, string> build_environment_variables = 28; + */ + public Builder removeBuildEnvironmentVariables(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableBuildEnvironmentVariables().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableBuildEnvironmentVariables() { + return internalGetMutableBuildEnvironmentVariables().getMutableMap(); + } + /** + * + * + *
+     * Build environment variables that shall be available during build time.
+     * 
+ * + * map<string, string> build_environment_variables = 28; + */ + public Builder putBuildEnvironmentVariables(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableBuildEnvironmentVariables().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Build environment variables that shall be available during build time.
+     * 
+ * + * map<string, string> build_environment_variables = 28; + */ + public Builder putAllBuildEnvironmentVariables( + java.util.Map values) { + internalGetMutableBuildEnvironmentVariables().getMutableMap().putAll(values); + return this; + } + private java.lang.Object network_ = ""; /** * @@ -5510,6 +6625,14 @@ public Builder setNetworkBytes(com.google.protobuf.ByteString value) { *
      * 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.
      * 
* * int32 max_instances = 20; @@ -5526,6 +6649,14 @@ public int getMaxInstances() { *
      * 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.
      * 
* * int32 max_instances = 20; @@ -5545,6 +6676,14 @@ public Builder setMaxInstances(int value) { *
      * 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.
      * 
* * int32 max_instances = 20; @@ -5558,6 +6697,61 @@ public Builder clearMaxInstances() { return this; } + private int minInstances_; + /** + * + * + *
+     * A lower bound for the number function instances that may coexist at a
+     * given time.
+     * 
+ * + * int32 min_instances = 32; + * + * @return The minInstances. + */ + @java.lang.Override + public int getMinInstances() { + return minInstances_; + } + /** + * + * + *
+     * A lower bound for the number function instances that may coexist at a
+     * given time.
+     * 
+ * + * int32 min_instances = 32; + * + * @param value The minInstances to set. + * @return This builder for chaining. + */ + public Builder setMinInstances(int value) { + + minInstances_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A lower bound for the number function instances that may coexist at a
+     * given time.
+     * 
+ * + * int32 min_instances = 32; + * + * @return This builder for chaining. + */ + public Builder clearMinInstances() { + + minInstances_ = 0; + onChanged(); + return this; + } + private java.lang.Object vpcConnector_ = ""; /** * @@ -5909,25 +7103,46 @@ public Builder clearIngressSettings() { return this; } - private java.lang.Object buildId_ = ""; + private java.lang.Object kmsKeyName_ = ""; /** * * *
-     * Output only. The Cloud Build ID of the latest successful deployment of the
-     * function.
+     * 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 Cloud KMS crypto key
+     * encrypter/decrypter roles on the key.
+     * 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.
      * 
* - * string build_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string kms_key_name = 25 [(.google.api.resource_reference) = { ... } * - * @return The buildId. + * @return The kmsKeyName. */ - public java.lang.String getBuildId() { - java.lang.Object ref = buildId_; + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - buildId_ = s; + kmsKeyName_ = s; return s; } else { return (java.lang.String) ref; @@ -5937,20 +7152,41 @@ public java.lang.String getBuildId() { * * *
-     * Output only. The Cloud Build ID of the latest successful deployment of the
-     * function.
+     * 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 Cloud KMS crypto key
+     * encrypter/decrypter roles on the key.
+     * 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.
      * 
* - * string build_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string kms_key_name = 25 [(.google.api.resource_reference) = { ... } * - * @return The bytes for buildId. + * @return The bytes for kmsKeyName. */ - public com.google.protobuf.ByteString getBuildIdBytes() { - java.lang.Object ref = buildId_; + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - buildId_ = b; + kmsKeyName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -5960,21 +7196,42 @@ public com.google.protobuf.ByteString getBuildIdBytes() { * * *
-     * Output only. The Cloud Build ID of the latest successful deployment of the
-     * function.
+     * 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 Cloud KMS crypto key
+     * encrypter/decrypter roles on the key.
+     * 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.
      * 
* - * string build_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string kms_key_name = 25 [(.google.api.resource_reference) = { ... } * - * @param value The buildId to set. + * @param value The kmsKeyName to set. * @return This builder for chaining. */ - public Builder setBuildId(java.lang.String value) { + public Builder setKmsKeyName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - buildId_ = value; + kmsKeyName_ = value; onChanged(); return this; } @@ -5982,17 +7239,38 @@ public Builder setBuildId(java.lang.String value) { * * *
-     * Output only. The Cloud Build ID of the latest successful deployment of the
-     * function.
+     * 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 Cloud KMS crypto key
+     * encrypter/decrypter roles on the key.
+     * 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.
      * 
* - * string build_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string kms_key_name = 25 [(.google.api.resource_reference) = { ... } * * @return This builder for chaining. */ - public Builder clearBuildId() { + public Builder clearKmsKeyName() { - buildId_ = getDefaultInstance().getBuildId(); + kmsKeyName_ = getDefaultInstance().getKmsKeyName(); onChanged(); return this; } @@ -6000,22 +7278,1423 @@ public Builder clearBuildId() { * * *
-     * Output only. The Cloud Build ID of the latest successful deployment of the
-     * function.
+     * 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 Cloud KMS crypto key
+     * encrypter/decrypter roles on the key.
+     * 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.
      * 
* - * string build_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * string kms_key_name = 25 [(.google.api.resource_reference) = { ... } * - * @param value The bytes for buildId to set. + * @param value The bytes for kmsKeyName to set. * @return This builder for chaining. */ - public Builder setBuildIdBytes(com.google.protobuf.ByteString value) { + public Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - buildId_ = value; + kmsKeyName_ = value; + onChanged(); + return this; + } + + private java.lang.Object 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-<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 build_worker_pool = 26; + * + * @return The buildWorkerPool. + */ + public java.lang.String getBuildWorkerPool() { + java.lang.Object ref = buildWorkerPool_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildWorkerPool_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * 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 build_worker_pool = 26; + * + * @return The bytes for buildWorkerPool. + */ + public com.google.protobuf.ByteString getBuildWorkerPoolBytes() { + java.lang.Object ref = buildWorkerPool_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + buildWorkerPool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * 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 build_worker_pool = 26; + * + * @param value The buildWorkerPool to set. + * @return This builder for chaining. + */ + public Builder setBuildWorkerPool(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + buildWorkerPool_ = value; + onChanged(); + 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-<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 build_worker_pool = 26; + * + * @return This builder for chaining. + */ + public Builder clearBuildWorkerPool() { + + buildWorkerPool_ = getDefaultInstance().getBuildWorkerPool(); + onChanged(); + 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-<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 build_worker_pool = 26; + * + * @param value The bytes for buildWorkerPool to set. + * @return This builder for chaining. + */ + public Builder setBuildWorkerPoolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + buildWorkerPool_ = value; + onChanged(); + return this; + } + + private java.lang.Object buildId_ = ""; + /** + * + * + *
+     * Output only. The Cloud Build ID of the latest successful deployment of the
+     * function.
+     * 
+ * + * string build_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The buildId. + */ + public java.lang.String getBuildId() { + java.lang.Object ref = buildId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The Cloud Build ID of the latest successful deployment of the
+     * function.
+     * 
+ * + * string build_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for buildId. + */ + public com.google.protobuf.ByteString getBuildIdBytes() { + java.lang.Object ref = buildId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + buildId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The Cloud Build ID of the latest successful deployment of the
+     * function.
+     * 
+ * + * string build_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The buildId to set. + * @return This builder for chaining. + */ + public Builder setBuildId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + buildId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Cloud Build ID of the latest successful deployment of the
+     * function.
+     * 
+ * + * string build_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearBuildId() { + + buildId_ = getDefaultInstance().getBuildId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Cloud Build ID of the latest successful deployment of the
+     * function.
+     * 
+ * + * string build_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for buildId to set. + * @return This builder for chaining. + */ + public Builder setBuildIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + buildId_ = value; + onChanged(); + return this; + } + + private java.lang.Object buildName_ = ""; + /** + * + * + *
+     * Output only. The Cloud Build Name of the function deployment.
+     * `projects/<project-number>/locations/<region>/builds/<build-id>`.
+     * 
+ * + * string build_name = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The buildName. + */ + public java.lang.String getBuildName() { + java.lang.Object ref = buildName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The Cloud Build Name of the function deployment.
+     * `projects/<project-number>/locations/<region>/builds/<build-id>`.
+     * 
+ * + * string build_name = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for buildName. + */ + public com.google.protobuf.ByteString getBuildNameBytes() { + java.lang.Object ref = buildName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + buildName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The Cloud Build Name of the function deployment.
+     * `projects/<project-number>/locations/<region>/builds/<build-id>`.
+     * 
+ * + * string build_name = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The buildName to set. + * @return This builder for chaining. + */ + public Builder setBuildName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + buildName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Cloud Build Name of the function deployment.
+     * `projects/<project-number>/locations/<region>/builds/<build-id>`.
+     * 
+ * + * string build_name = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearBuildName() { + + buildName_ = getDefaultInstance().getBuildName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Cloud Build Name of the function deployment.
+     * `projects/<project-number>/locations/<region>/builds/<build-id>`.
+     * 
+ * + * string build_name = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for buildName to set. + * @return This builder for chaining. + */ + public Builder setBuildNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + buildName_ = value; + onChanged(); + return this; + } + + private java.util.List secretEnvironmentVariables_ = + java.util.Collections.emptyList(); + + private void ensureSecretEnvironmentVariablesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + secretEnvironmentVariables_ = + new java.util.ArrayList( + secretEnvironmentVariables_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.functions.v1.SecretEnvVar, + com.google.cloud.functions.v1.SecretEnvVar.Builder, + com.google.cloud.functions.v1.SecretEnvVarOrBuilder> + secretEnvironmentVariablesBuilder_; + + /** + * + * + *
+     * Secret environment variables configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + public java.util.List + getSecretEnvironmentVariablesList() { + if (secretEnvironmentVariablesBuilder_ == null) { + return java.util.Collections.unmodifiableList(secretEnvironmentVariables_); + } else { + return secretEnvironmentVariablesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Secret environment variables configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + public int getSecretEnvironmentVariablesCount() { + if (secretEnvironmentVariablesBuilder_ == null) { + return secretEnvironmentVariables_.size(); + } else { + return secretEnvironmentVariablesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Secret environment variables configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + public com.google.cloud.functions.v1.SecretEnvVar getSecretEnvironmentVariables(int index) { + if (secretEnvironmentVariablesBuilder_ == null) { + return secretEnvironmentVariables_.get(index); + } else { + return secretEnvironmentVariablesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Secret environment variables configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + public Builder setSecretEnvironmentVariables( + int index, com.google.cloud.functions.v1.SecretEnvVar value) { + if (secretEnvironmentVariablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecretEnvironmentVariablesIsMutable(); + secretEnvironmentVariables_.set(index, value); + onChanged(); + } else { + secretEnvironmentVariablesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Secret environment variables configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + public Builder setSecretEnvironmentVariables( + int index, com.google.cloud.functions.v1.SecretEnvVar.Builder builderForValue) { + if (secretEnvironmentVariablesBuilder_ == null) { + ensureSecretEnvironmentVariablesIsMutable(); + secretEnvironmentVariables_.set(index, builderForValue.build()); + onChanged(); + } else { + secretEnvironmentVariablesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Secret environment variables configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + public Builder addSecretEnvironmentVariables(com.google.cloud.functions.v1.SecretEnvVar value) { + if (secretEnvironmentVariablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecretEnvironmentVariablesIsMutable(); + secretEnvironmentVariables_.add(value); + onChanged(); + } else { + secretEnvironmentVariablesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Secret environment variables configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + public Builder addSecretEnvironmentVariables( + int index, com.google.cloud.functions.v1.SecretEnvVar value) { + if (secretEnvironmentVariablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecretEnvironmentVariablesIsMutable(); + secretEnvironmentVariables_.add(index, value); + onChanged(); + } else { + secretEnvironmentVariablesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Secret environment variables configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + public Builder addSecretEnvironmentVariables( + com.google.cloud.functions.v1.SecretEnvVar.Builder builderForValue) { + if (secretEnvironmentVariablesBuilder_ == null) { + ensureSecretEnvironmentVariablesIsMutable(); + secretEnvironmentVariables_.add(builderForValue.build()); + onChanged(); + } else { + secretEnvironmentVariablesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Secret environment variables configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + public Builder addSecretEnvironmentVariables( + int index, com.google.cloud.functions.v1.SecretEnvVar.Builder builderForValue) { + if (secretEnvironmentVariablesBuilder_ == null) { + ensureSecretEnvironmentVariablesIsMutable(); + secretEnvironmentVariables_.add(index, builderForValue.build()); + onChanged(); + } else { + secretEnvironmentVariablesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Secret environment variables configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + public Builder addAllSecretEnvironmentVariables( + java.lang.Iterable values) { + if (secretEnvironmentVariablesBuilder_ == null) { + ensureSecretEnvironmentVariablesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, secretEnvironmentVariables_); + onChanged(); + } else { + secretEnvironmentVariablesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Secret environment variables configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + public Builder clearSecretEnvironmentVariables() { + if (secretEnvironmentVariablesBuilder_ == null) { + secretEnvironmentVariables_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + secretEnvironmentVariablesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Secret environment variables configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + public Builder removeSecretEnvironmentVariables(int index) { + if (secretEnvironmentVariablesBuilder_ == null) { + ensureSecretEnvironmentVariablesIsMutable(); + secretEnvironmentVariables_.remove(index); + onChanged(); + } else { + secretEnvironmentVariablesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Secret environment variables configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + public com.google.cloud.functions.v1.SecretEnvVar.Builder getSecretEnvironmentVariablesBuilder( + int index) { + return getSecretEnvironmentVariablesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Secret environment variables configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + public com.google.cloud.functions.v1.SecretEnvVarOrBuilder + getSecretEnvironmentVariablesOrBuilder(int index) { + if (secretEnvironmentVariablesBuilder_ == null) { + return secretEnvironmentVariables_.get(index); + } else { + return secretEnvironmentVariablesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Secret environment variables configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + public java.util.List + getSecretEnvironmentVariablesOrBuilderList() { + if (secretEnvironmentVariablesBuilder_ != null) { + return secretEnvironmentVariablesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(secretEnvironmentVariables_); + } + } + /** + * + * + *
+     * Secret environment variables configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + public com.google.cloud.functions.v1.SecretEnvVar.Builder + addSecretEnvironmentVariablesBuilder() { + return getSecretEnvironmentVariablesFieldBuilder() + .addBuilder(com.google.cloud.functions.v1.SecretEnvVar.getDefaultInstance()); + } + /** + * + * + *
+     * Secret environment variables configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + public com.google.cloud.functions.v1.SecretEnvVar.Builder addSecretEnvironmentVariablesBuilder( + int index) { + return getSecretEnvironmentVariablesFieldBuilder() + .addBuilder(index, com.google.cloud.functions.v1.SecretEnvVar.getDefaultInstance()); + } + /** + * + * + *
+     * Secret environment variables configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + public java.util.List + getSecretEnvironmentVariablesBuilderList() { + return getSecretEnvironmentVariablesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.functions.v1.SecretEnvVar, + com.google.cloud.functions.v1.SecretEnvVar.Builder, + com.google.cloud.functions.v1.SecretEnvVarOrBuilder> + getSecretEnvironmentVariablesFieldBuilder() { + if (secretEnvironmentVariablesBuilder_ == null) { + secretEnvironmentVariablesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.functions.v1.SecretEnvVar, + com.google.cloud.functions.v1.SecretEnvVar.Builder, + com.google.cloud.functions.v1.SecretEnvVarOrBuilder>( + secretEnvironmentVariables_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + secretEnvironmentVariables_ = null; + } + return secretEnvironmentVariablesBuilder_; + } + + private java.util.List secretVolumes_ = + java.util.Collections.emptyList(); + + private void ensureSecretVolumesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + secretVolumes_ = + new java.util.ArrayList(secretVolumes_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.functions.v1.SecretVolume, + com.google.cloud.functions.v1.SecretVolume.Builder, + com.google.cloud.functions.v1.SecretVolumeOrBuilder> + secretVolumesBuilder_; + + /** + * + * + *
+     * Secret volumes configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + public java.util.List getSecretVolumesList() { + if (secretVolumesBuilder_ == null) { + return java.util.Collections.unmodifiableList(secretVolumes_); + } else { + return secretVolumesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Secret volumes configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + public int getSecretVolumesCount() { + if (secretVolumesBuilder_ == null) { + return secretVolumes_.size(); + } else { + return secretVolumesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Secret volumes configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + public com.google.cloud.functions.v1.SecretVolume getSecretVolumes(int index) { + if (secretVolumesBuilder_ == null) { + return secretVolumes_.get(index); + } else { + return secretVolumesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Secret volumes configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + public Builder setSecretVolumes(int index, com.google.cloud.functions.v1.SecretVolume value) { + if (secretVolumesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecretVolumesIsMutable(); + secretVolumes_.set(index, value); + onChanged(); + } else { + secretVolumesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Secret volumes configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + public Builder setSecretVolumes( + int index, com.google.cloud.functions.v1.SecretVolume.Builder builderForValue) { + if (secretVolumesBuilder_ == null) { + ensureSecretVolumesIsMutable(); + secretVolumes_.set(index, builderForValue.build()); + onChanged(); + } else { + secretVolumesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Secret volumes configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + public Builder addSecretVolumes(com.google.cloud.functions.v1.SecretVolume value) { + if (secretVolumesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecretVolumesIsMutable(); + secretVolumes_.add(value); + onChanged(); + } else { + secretVolumesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Secret volumes configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + public Builder addSecretVolumes(int index, com.google.cloud.functions.v1.SecretVolume value) { + if (secretVolumesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSecretVolumesIsMutable(); + secretVolumes_.add(index, value); + onChanged(); + } else { + secretVolumesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Secret volumes configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + public Builder addSecretVolumes( + com.google.cloud.functions.v1.SecretVolume.Builder builderForValue) { + if (secretVolumesBuilder_ == null) { + ensureSecretVolumesIsMutable(); + secretVolumes_.add(builderForValue.build()); + onChanged(); + } else { + secretVolumesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Secret volumes configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + public Builder addSecretVolumes( + int index, com.google.cloud.functions.v1.SecretVolume.Builder builderForValue) { + if (secretVolumesBuilder_ == null) { + ensureSecretVolumesIsMutable(); + secretVolumes_.add(index, builderForValue.build()); + onChanged(); + } else { + secretVolumesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Secret volumes configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + public Builder addAllSecretVolumes( + java.lang.Iterable values) { + if (secretVolumesBuilder_ == null) { + ensureSecretVolumesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, secretVolumes_); + onChanged(); + } else { + secretVolumesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Secret volumes configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + public Builder clearSecretVolumes() { + if (secretVolumesBuilder_ == null) { + secretVolumes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + secretVolumesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Secret volumes configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + public Builder removeSecretVolumes(int index) { + if (secretVolumesBuilder_ == null) { + ensureSecretVolumesIsMutable(); + secretVolumes_.remove(index); + onChanged(); + } else { + secretVolumesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Secret volumes configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + public com.google.cloud.functions.v1.SecretVolume.Builder getSecretVolumesBuilder(int index) { + return getSecretVolumesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Secret volumes configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + public com.google.cloud.functions.v1.SecretVolumeOrBuilder getSecretVolumesOrBuilder( + int index) { + if (secretVolumesBuilder_ == null) { + return secretVolumes_.get(index); + } else { + return secretVolumesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Secret volumes configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + public java.util.List + getSecretVolumesOrBuilderList() { + if (secretVolumesBuilder_ != null) { + return secretVolumesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(secretVolumes_); + } + } + /** + * + * + *
+     * Secret volumes configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + public com.google.cloud.functions.v1.SecretVolume.Builder addSecretVolumesBuilder() { + return getSecretVolumesFieldBuilder() + .addBuilder(com.google.cloud.functions.v1.SecretVolume.getDefaultInstance()); + } + /** + * + * + *
+     * Secret volumes configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + public com.google.cloud.functions.v1.SecretVolume.Builder addSecretVolumesBuilder(int index) { + return getSecretVolumesFieldBuilder() + .addBuilder(index, com.google.cloud.functions.v1.SecretVolume.getDefaultInstance()); + } + /** + * + * + *
+     * Secret volumes configuration.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + public java.util.List + getSecretVolumesBuilderList() { + return getSecretVolumesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.functions.v1.SecretVolume, + com.google.cloud.functions.v1.SecretVolume.Builder, + com.google.cloud.functions.v1.SecretVolumeOrBuilder> + getSecretVolumesFieldBuilder() { + if (secretVolumesBuilder_ == null) { + secretVolumesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.functions.v1.SecretVolume, + com.google.cloud.functions.v1.SecretVolume.Builder, + com.google.cloud.functions.v1.SecretVolumeOrBuilder>( + secretVolumes_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + secretVolumes_ = null; + } + return secretVolumesBuilder_; + } + + private java.lang.Object sourceToken_ = ""; + /** + * + * + *
+     * Input only. An identifier for Firebase function sources. Disclaimer: This field is only
+     * supported for Firebase function deployments.
+     * 
+ * + * string source_token = 31 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The sourceToken. + */ + public java.lang.String getSourceToken() { + java.lang.Object ref = sourceToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Input only. An identifier for Firebase function sources. Disclaimer: This field is only
+     * supported for Firebase function deployments.
+     * 
+ * + * string source_token = 31 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for sourceToken. + */ + public com.google.protobuf.ByteString getSourceTokenBytes() { + java.lang.Object ref = sourceToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Input only. An identifier for Firebase function sources. Disclaimer: This field is only
+     * supported for Firebase function deployments.
+     * 
+ * + * string source_token = 31 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The sourceToken to set. + * @return This builder for chaining. + */ + public Builder setSourceToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. An identifier for Firebase function sources. Disclaimer: This field is only
+     * supported for Firebase function deployments.
+     * 
+ * + * string source_token = 31 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSourceToken() { + + sourceToken_ = getDefaultInstance().getSourceToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. An identifier for Firebase function sources. Disclaimer: This field is only
+     * supported for Firebase function deployments.
+     * 
+ * + * string source_token = 31 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The bytes for sourceToken to set. + * @return This builder for chaining. + */ + public Builder setSourceTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object dockerRepository_ = ""; + /** + * + * + *
+     * User managed repository created in Artifact Registry optionally with a
+     * customer managed encryption key. If specified, deployments will use
+     * Artifact Registry. If unspecified and the deployment is eligible to use
+     * Artifact Registry, GCF will create and use a repository named
+     * 'gcf-artifacts' for every deployed region. This is the repository to which
+     * the function docker image will be pushed after it is built by Cloud Build.
+     * 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 = 34 [(.google.api.resource_reference) = { ... } + * + * @return The dockerRepository. + */ + public java.lang.String getDockerRepository() { + java.lang.Object ref = dockerRepository_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dockerRepository_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * User managed repository created in Artifact Registry optionally with a
+     * customer managed encryption key. If specified, deployments will use
+     * Artifact Registry. If unspecified and the deployment is eligible to use
+     * Artifact Registry, GCF will create and use a repository named
+     * 'gcf-artifacts' for every deployed region. This is the repository to which
+     * the function docker image will be pushed after it is built by Cloud Build.
+     * 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 = 34 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for dockerRepository. + */ + public com.google.protobuf.ByteString getDockerRepositoryBytes() { + java.lang.Object ref = dockerRepository_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dockerRepository_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * User managed repository created in Artifact Registry optionally with a
+     * customer managed encryption key. If specified, deployments will use
+     * Artifact Registry. If unspecified and the deployment is eligible to use
+     * Artifact Registry, GCF will create and use a repository named
+     * 'gcf-artifacts' for every deployed region. This is the repository to which
+     * the function docker image will be pushed after it is built by Cloud Build.
+     * 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 = 34 [(.google.api.resource_reference) = { ... } + * + * @param value The dockerRepository to set. + * @return This builder for chaining. + */ + public Builder setDockerRepository(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dockerRepository_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * User managed repository created in Artifact Registry optionally with a
+     * customer managed encryption key. If specified, deployments will use
+     * Artifact Registry. If unspecified and the deployment is eligible to use
+     * Artifact Registry, GCF will create and use a repository named
+     * 'gcf-artifacts' for every deployed region. This is the repository to which
+     * the function docker image will be pushed after it is built by Cloud Build.
+     * 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 = 34 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearDockerRepository() { + + dockerRepository_ = getDefaultInstance().getDockerRepository(); + onChanged(); + return this; + } + /** + * + * + *
+     * User managed repository created in Artifact Registry optionally with a
+     * customer managed encryption key. If specified, deployments will use
+     * Artifact Registry. If unspecified and the deployment is eligible to use
+     * Artifact Registry, GCF will create and use a repository named
+     * 'gcf-artifacts' for every deployed region. This is the repository to which
+     * the function docker image will be pushed after it is built by Cloud Build.
+     * 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 = 34 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for dockerRepository to set. + * @return This builder for chaining. + */ + public Builder setDockerRepositoryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dockerRepository_ = value; onChanged(); return this; } diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CloudFunctionOrBuilder.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CloudFunctionOrBuilder.java index 5129f736..0142bf0b 100644 --- a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CloudFunctionOrBuilder.java +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CloudFunctionOrBuilder.java @@ -612,6 +612,61 @@ java.lang.String getEnvironmentVariablesOrDefault( */ java.lang.String getEnvironmentVariablesOrThrow(java.lang.String key); + /** + * + * + *
+   * Build environment variables that shall be available during build time.
+   * 
+ * + * map<string, string> build_environment_variables = 28; + */ + int getBuildEnvironmentVariablesCount(); + /** + * + * + *
+   * Build environment variables that shall be available during build time.
+   * 
+ * + * map<string, string> build_environment_variables = 28; + */ + boolean containsBuildEnvironmentVariables(java.lang.String key); + /** Use {@link #getBuildEnvironmentVariablesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getBuildEnvironmentVariables(); + /** + * + * + *
+   * Build environment variables that shall be available during build time.
+   * 
+ * + * map<string, string> build_environment_variables = 28; + */ + java.util.Map getBuildEnvironmentVariablesMap(); + /** + * + * + *
+   * Build environment variables that shall be available during build time.
+   * 
+ * + * map<string, string> build_environment_variables = 28; + */ + java.lang.String getBuildEnvironmentVariablesOrDefault( + java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Build environment variables that shall be available during build time.
+   * 
+ * + * map<string, string> build_environment_variables = 28; + */ + java.lang.String getBuildEnvironmentVariablesOrThrow(java.lang.String key); + /** * * @@ -665,6 +720,14 @@ java.lang.String getEnvironmentVariablesOrDefault( *
    * 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.
    * 
* * int32 max_instances = 20; @@ -673,6 +736,20 @@ java.lang.String getEnvironmentVariablesOrDefault( */ int getMaxInstances(); + /** + * + * + *
+   * A lower bound for the number function instances that may coexist at a
+   * given time.
+   * 
+ * + * int32 min_instances = 32; + * + * @return The minInstances. + */ + int getMinInstances(); + /** * * @@ -771,6 +848,120 @@ java.lang.String getEnvironmentVariablesOrDefault( */ com.google.cloud.functions.v1.CloudFunction.IngressSettings getIngressSettings(); + /** + * + * + *
+   * 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 Cloud KMS crypto key
+   * encrypter/decrypter roles on the key.
+   * 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.
+   * 
+ * + * string kms_key_name = 25 [(.google.api.resource_reference) = { ... } + * + * @return The kmsKeyName. + */ + java.lang.String getKmsKeyName(); + /** + * + * + *
+   * 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 Cloud KMS crypto key
+   * encrypter/decrypter roles on the key.
+   * 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.
+   * 
+ * + * string kms_key_name = 25 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for kmsKeyName. + */ + com.google.protobuf.ByteString getKmsKeyNameBytes(); + + /** + * + * + *
+   * 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 build_worker_pool = 26; + * + * @return The buildWorkerPool. + */ + java.lang.String getBuildWorkerPool(); + /** + * + * + *
+   * 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 build_worker_pool = 26; + * + * @return The bytes for buildWorkerPool. + */ + com.google.protobuf.ByteString getBuildWorkerPoolBytes(); + /** * * @@ -798,6 +989,215 @@ java.lang.String getEnvironmentVariablesOrDefault( */ com.google.protobuf.ByteString getBuildIdBytes(); + /** + * + * + *
+   * Output only. The Cloud Build Name of the function deployment.
+   * `projects/<project-number>/locations/<region>/builds/<build-id>`.
+   * 
+ * + * string build_name = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The buildName. + */ + java.lang.String getBuildName(); + /** + * + * + *
+   * Output only. The Cloud Build Name of the function deployment.
+   * `projects/<project-number>/locations/<region>/builds/<build-id>`.
+   * 
+ * + * string build_name = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for buildName. + */ + com.google.protobuf.ByteString getBuildNameBytes(); + + /** + * + * + *
+   * Secret environment variables configuration.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + java.util.List getSecretEnvironmentVariablesList(); + /** + * + * + *
+   * Secret environment variables configuration.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + com.google.cloud.functions.v1.SecretEnvVar getSecretEnvironmentVariables(int index); + /** + * + * + *
+   * Secret environment variables configuration.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + int getSecretEnvironmentVariablesCount(); + /** + * + * + *
+   * Secret environment variables configuration.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + java.util.List + getSecretEnvironmentVariablesOrBuilderList(); + /** + * + * + *
+   * Secret environment variables configuration.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29; + * + */ + com.google.cloud.functions.v1.SecretEnvVarOrBuilder getSecretEnvironmentVariablesOrBuilder( + int index); + + /** + * + * + *
+   * Secret volumes configuration.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + java.util.List getSecretVolumesList(); + /** + * + * + *
+   * Secret volumes configuration.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + com.google.cloud.functions.v1.SecretVolume getSecretVolumes(int index); + /** + * + * + *
+   * Secret volumes configuration.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + int getSecretVolumesCount(); + /** + * + * + *
+   * Secret volumes configuration.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + java.util.List + getSecretVolumesOrBuilderList(); + /** + * + * + *
+   * Secret volumes configuration.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30; + */ + com.google.cloud.functions.v1.SecretVolumeOrBuilder getSecretVolumesOrBuilder(int index); + + /** + * + * + *
+   * Input only. An identifier for Firebase function sources. Disclaimer: This field is only
+   * supported for Firebase function deployments.
+   * 
+ * + * string source_token = 31 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The sourceToken. + */ + java.lang.String getSourceToken(); + /** + * + * + *
+   * Input only. An identifier for Firebase function sources. Disclaimer: This field is only
+   * supported for Firebase function deployments.
+   * 
+ * + * string source_token = 31 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for sourceToken. + */ + com.google.protobuf.ByteString getSourceTokenBytes(); + + /** + * + * + *
+   * User managed repository created in Artifact Registry optionally with a
+   * customer managed encryption key. If specified, deployments will use
+   * Artifact Registry. If unspecified and the deployment is eligible to use
+   * Artifact Registry, GCF will create and use a repository named
+   * 'gcf-artifacts' for every deployed region. This is the repository to which
+   * the function docker image will be pushed after it is built by Cloud Build.
+   * 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 = 34 [(.google.api.resource_reference) = { ... } + * + * @return The dockerRepository. + */ + java.lang.String getDockerRepository(); + /** + * + * + *
+   * User managed repository created in Artifact Registry optionally with a
+   * customer managed encryption key. If specified, deployments will use
+   * Artifact Registry. If unspecified and the deployment is eligible to use
+   * Artifact Registry, GCF will create and use a repository named
+   * 'gcf-artifacts' for every deployed region. This is the repository to which
+   * the function docker image will be pushed after it is built by Cloud Build.
+   * 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 = 34 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for dockerRepository. + */ + com.google.protobuf.ByteString getDockerRepositoryBytes(); + public com.google.cloud.functions.v1.CloudFunction.SourceCodeCase getSourceCodeCase(); public com.google.cloud.functions.v1.CloudFunction.TriggerCase getTriggerCase(); diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/FunctionsOperationsProto.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/FunctionsOperationsProto.java index 37d94e72..7df7b3dd 100644 --- a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/FunctionsOperationsProto.java +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/FunctionsOperationsProto.java @@ -44,18 +44,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "roto\022\031google.cloud.functions.v1\032\031google/" + "protobuf/any.proto\032\037google/protobuf/time" + "stamp.proto\032\034google/api/annotations.prot" - + "o\"\333\001\n\023OperationMetadataV1\022\016\n\006target\030\001 \001(" + + "o\"\205\002\n\023OperationMetadataV1\022\016\n\006target\030\001 \001(" + "\t\0226\n\004type\030\002 \001(\0162(.google.cloud.functions" + ".v1.OperationType\022%\n\007request\030\003 \001(\0132\024.goo" + "gle.protobuf.Any\022\022\n\nversion_id\030\004 \001(\003\022/\n\013" + "update_time\030\005 \001(\0132\032.google.protobuf.Time" - + "stamp\022\020\n\010build_id\030\006 \001(\t*i\n\rOperationType" - + "\022\031\n\025OPERATION_UNSPECIFIED\020\000\022\023\n\017CREATE_FU" - + "NCTION\020\001\022\023\n\017UPDATE_FUNCTION\020\002\022\023\n\017DELETE_" - + "FUNCTION\020\003B\177\n\035com.google.cloud.functions" - + ".v1B\030FunctionsOperationsProtoP\001ZBgoogle." - + "golang.org/genproto/googleapis/cloud/fun" - + "ctions/v1;functionsb\006proto3" + + "stamp\022\020\n\010build_id\030\006 \001(\t\022\024\n\014source_token\030" + + "\007 \001(\t\022\022\n\nbuild_name\030\010 \001(\t*i\n\rOperationTy" + + "pe\022\031\n\025OPERATION_UNSPECIFIED\020\000\022\023\n\017CREATE_" + + "FUNCTION\020\001\022\023\n\017UPDATE_FUNCTION\020\002\022\023\n\017DELET" + + "E_FUNCTION\020\003B\177\n\035com.google.cloud.functio" + + "ns.v1B\030FunctionsOperationsProtoP\001ZBgoogl" + + "e.golang.org/genproto/googleapis/cloud/f" + + "unctions/v1;functionsb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -71,7 +72,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_functions_v1_OperationMetadataV1_descriptor, new java.lang.String[] { - "Target", "Type", "Request", "VersionId", "UpdateTime", "BuildId", + "Target", + "Type", + "Request", + "VersionId", + "UpdateTime", + "BuildId", + "SourceToken", + "BuildName", }); com.google.protobuf.AnyProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/FunctionsProto.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/FunctionsProto.java index 8f80c50d..9ec1709b 100644 --- a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/FunctionsProto.java +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/FunctionsProto.java @@ -39,6 +39,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_functions_v1_CloudFunction_EnvironmentVariablesEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_functions_v1_CloudFunction_EnvironmentVariablesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_functions_v1_CloudFunction_BuildEnvironmentVariablesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_functions_v1_CloudFunction_BuildEnvironmentVariablesEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_functions_v1_SourceRepository_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -59,6 +63,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_functions_v1_FailurePolicy_Retry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_functions_v1_FailurePolicy_Retry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_functions_v1_SecretEnvVar_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_functions_v1_SecretEnvVar_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_functions_v1_SecretVolume_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_functions_v1_SecretVolume_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_functions_v1_SecretVolume_SecretVersion_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_functions_v1_SecretVolume_SecretVersion_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_functions_v1_CreateFunctionRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -125,7 +141,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "proto\032#google/longrunning/operations.pro" + "to\032\036google/protobuf/duration.proto\032 goog" + "le/protobuf/field_mask.proto\032\037google/pro" - + "tobuf/timestamp.proto\"\203\014\n\rCloudFunction\022" + + "tobuf/timestamp.proto\"\263\020\n\rCloudFunction\022" + "\014\n\004name\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022\034\n\022so" + "urce_archive_url\030\003 \001(\tH\000\022H\n\021source_repos" + "itory\030\004 \001(\0132+.google.cloud.functions.v1." @@ -144,16 +160,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\017 \003(\01324.google.cloud.functions.v1.CloudF" + "unction.LabelsEntry\022a\n\025environment_varia" + "bles\030\021 \003(\0132B.google.cloud.functions.v1.C" - + "loudFunction.EnvironmentVariablesEntry\022\017" - + "\n\007network\030\022 \001(\t\022\025\n\rmax_instances\030\024 \001(\005\022\025" - + "\n\rvpc_connector\030\026 \001(\t\022j\n\035vpc_connector_e" - + "gress_settings\030\027 \001(\0162C.google.cloud.func" - + "tions.v1.CloudFunction.VpcConnectorEgres" - + "sSettings\022R\n\020ingress_settings\030\030 \001(\01628.go" - + "ogle.cloud.functions.v1.CloudFunction.In" - + "gressSettings\022\025\n\010build_id\030\033 \001(\tB\003\340A\003\032-\n\013" - + "LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" - + "\0028\001\032;\n\031EnvironmentVariablesEntry\022\013\n\003key\030" + + "loudFunction.EnvironmentVariablesEntry\022l" + + "\n\033build_environment_variables\030\034 \003(\0132G.go" + + "ogle.cloud.functions.v1.CloudFunction.Bu" + + "ildEnvironmentVariablesEntry\022\017\n\007network\030" + + "\022 \001(\t\022\025\n\rmax_instances\030\024 \001(\005\022\025\n\rmin_inst" + + "ances\030 \001(\005\022\025\n\rvpc_connector\030\026 \001(\t\022j\n\035vp" + + "c_connector_egress_settings\030\027 \001(\0162C.goog" + + "le.cloud.functions.v1.CloudFunction.VpcC" + + "onnectorEgressSettings\022R\n\020ingress_settin" + + "gs\030\030 \001(\01628.google.cloud.functions.v1.Clo" + + "udFunction.IngressSettings\022<\n\014kms_key_na" + + "me\030\031 \001(\tB&\372A#\n!cloudkms.googleapis.com/C" + + "ryptoKey\022\031\n\021build_worker_pool\030\032 \001(\t\022\025\n\010b" + + "uild_id\030\033 \001(\tB\003\340A\003\022\027\n\nbuild_name\030! \001(\tB\003" + + "\340A\003\022M\n\034secret_environment_variables\030\035 \003(" + + "\0132\'.google.cloud.functions.v1.SecretEnvV" + + "ar\022?\n\016secret_volumes\030\036 \003(\0132\'.google.clou" + + "d.functions.v1.SecretVolume\022\031\n\014source_to" + + "ken\030\037 \001(\tB\003\340A\004\022J\n\021docker_repository\030\" \001(" + + "\tB/\372A,\n*artifactregistry.googleapis.com/" + + "Repository\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r" + + "\n\005value\030\002 \001(\t:\0028\001\032;\n\031EnvironmentVariable" + + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032@" + + "\n\036BuildEnvironmentVariablesEntry\022\013\n\003key\030" + "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"u\n\032VpcConnector" + "EgressSettings\022-\n)VPC_CONNECTOR_EGRESS_S" + "ETTINGS_UNSPECIFIED\020\000\022\027\n\023PRIVATE_RANGES_" @@ -176,97 +206,110 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "(\0132(.google.cloud.functions.v1.FailurePo" + "licy\"c\n\rFailurePolicy\022?\n\005retry\030\001 \001(\0132..g" + "oogle.cloud.functions.v1.FailurePolicy.R" - + "etryH\000\032\007\n\005RetryB\010\n\006action\"\225\001\n\025CreateFunc" - + "tionRequest\022;\n\010location\030\001 \001(\tB)\340A\002\372A#\n!l" - + "ocations.googleapis.com/Location\022?\n\010func" - + "tion\030\002 \001(\0132(.google.cloud.functions.v1.C" - + "loudFunctionB\003\340A\002\"\211\001\n\025UpdateFunctionRequ" - + "est\022?\n\010function\030\001 \001(\0132(.google.cloud.fun" - + "ctions.v1.CloudFunctionB\003\340A\002\022/\n\013update_m" - + "ask\030\002 \001(\0132\032.google.protobuf.FieldMask\"W\n" - + "\022GetFunctionRequest\022A\n\004name\030\001 \001(\tB3\340A\002\372A" - + "-\n+cloudfunctions.googleapis.com/CloudFu" - + "nction\"u\n\024ListFunctionsRequest\0226\n\006parent" - + "\030\001 \001(\tB&\372A#\n!locations.googleapis.com/Lo" - + "cation\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030" - + "\003 \001(\t\"\202\001\n\025ListFunctionsResponse\022;\n\tfunct" - + "ions\030\001 \003(\0132(.google.cloud.functions.v1.C" - + "loudFunction\022\027\n\017next_page_token\030\002 \001(\t\022\023\n" - + "\013unreachable\030\003 \003(\t\"Z\n\025DeleteFunctionRequ" - + "est\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+cloudfunction" - + "s.googleapis.com/CloudFunction\"k\n\023CallFu" - + "nctionRequest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+clo" - + "udfunctions.googleapis.com/CloudFunction" - + "\022\021\n\004data\030\002 \001(\tB\003\340A\002\"K\n\024CallFunctionRespo" - + "nse\022\024\n\014execution_id\030\001 \001(\t\022\016\n\006result\030\002 \001(" - + "\t\022\r\n\005error\030\003 \001(\t\"*\n\030GenerateUploadUrlReq" - + "uest\022\016\n\006parent\030\001 \001(\t\"/\n\031GenerateUploadUr" - + "lResponse\022\022\n\nupload_url\030\001 \001(\t\">\n\032Generat" - + "eDownloadUrlRequest\022\014\n\004name\030\001 \001(\t\022\022\n\nver" - + "sion_id\030\002 \001(\004\"3\n\033GenerateDownloadUrlResp" - + "onse\022\024\n\014download_url\030\001 \001(\t*\222\001\n\023CloudFunc" - + "tionStatus\022%\n!CLOUD_FUNCTION_STATUS_UNSP" - + "ECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\013\n\007OFFLINE\020\002\022\026\n\022DE" - + "PLOY_IN_PROGRESS\020\003\022\026\n\022DELETE_IN_PROGRESS" - + "\020\004\022\013\n\007UNKNOWN\020\0052\227\021\n\025CloudFunctionsServic" - + "e\022\251\001\n\rListFunctions\022/.google.cloud.funct" - + "ions.v1.ListFunctionsRequest\0320.google.cl" - + "oud.functions.v1.ListFunctionsResponse\"5" - + "\202\323\344\223\002/\022-/v1/{parent=projects/*/locations" - + "/*}/functions\022\244\001\n\013GetFunction\022-.google.c" - + "loud.functions.v1.GetFunctionRequest\032(.g" - + "oogle.cloud.functions.v1.CloudFunction\"<" - + "\202\323\344\223\002/\022-/v1/{name=projects/*/locations/*" - + "/functions/*}\332A\004name\022\337\001\n\016CreateFunction\022" - + "0.google.cloud.functions.v1.CreateFuncti" - + "onRequest\032\035.google.longrunning.Operation" - + "\"|\202\323\344\223\002;\"//v1/{location=projects/*/locat" - + "ions/*}/functions:\010function\332A\021location,f" - + "unction\312A$\n\rCloudFunction\022\023OperationMeta" - + "dataV1\022\335\001\n\016UpdateFunction\0220.google.cloud" - + ".functions.v1.UpdateFunctionRequest\032\035.go" - + "ogle.longrunning.Operation\"z\202\323\344\223\002B26/v1/" - + "{function.name=projects/*/locations/*/fu" - + "nctions/*}:\010function\332A\010function\312A$\n\rClou" - + "dFunction\022\023OperationMetadataV1\022\316\001\n\016Delet" - + "eFunction\0220.google.cloud.functions.v1.De" - + "leteFunctionRequest\032\035.google.longrunning" - + ".Operation\"k\202\323\344\223\002/*-/v1/{name=projects/*" - + "/locations/*/functions/*}\332A\004name\312A,\n\025goo" - + "gle.protobuf.Empty\022\023OperationMetadataV1\022" - + "\272\001\n\014CallFunction\022..google.cloud.function" - + "s.v1.CallFunctionRequest\032/.google.cloud." - + "functions.v1.CallFunctionResponse\"I\202\323\344\223\002" - + "7\"2/v1/{name=projects/*/locations/*/func" - + "tions/*}:call:\001*\332A\tname,data\022\312\001\n\021Generat" - + "eUploadUrl\0223.google.cloud.functions.v1.G" - + "enerateUploadUrlRequest\0324.google.cloud.f" - + "unctions.v1.GenerateUploadUrlResponse\"J\202" - + "\323\344\223\002D\"?/v1/{parent=projects/*/locations/" - + "*}/functions:generateUploadUrl:\001*\022\322\001\n\023Ge" - + "nerateDownloadUrl\0225.google.cloud.functio" - + "ns.v1.GenerateDownloadUrlRequest\0326.googl" - + "e.cloud.functions.v1.GenerateDownloadUrl" - + "Response\"L\202\323\344\223\002F\"A/v1/{name=projects/*/l" - + "ocations/*/functions/*}:generateDownload" - + "Url:\001*\022\224\001\n\014SetIamPolicy\022\".google.iam.v1." - + "SetIamPolicyRequest\032\025.google.iam.v1.Poli" - + "cy\"I\202\323\344\223\002C\">/v1/{resource=projects/*/loc" - + "ations/*/functions/*}:setIamPolicy:\001*\022\221\001" - + "\n\014GetIamPolicy\022\".google.iam.v1.GetIamPol" - + "icyRequest\032\025.google.iam.v1.Policy\"F\202\323\344\223\002" - + "@\022>/v1/{resource=projects/*/locations/*/" - + "functions/*}:getIamPolicy\022\272\001\n\022TestIamPer" - + "missions\022(.google.iam.v1.TestIamPermissi" - + "onsRequest\032).google.iam.v1.TestIamPermis" - + "sionsResponse\"O\202\323\344\223\002I\"D/v1/{resource=pro" - + "jects/*/locations/*/functions/*}:testIam" - + "Permissions:\001*\032Q\312A\035cloudfunctions.google" - + "apis.com\322A.https://www.googleapis.com/au" - + "th/cloud-platformB{\n\035com.google.cloud.fu" - + "nctions.v1B\016FunctionsProtoP\001ZBgoogle.gol" - + "ang.org/genproto/googleapis/cloud/functi" - + "ons/v1;functions\242\002\003GCFb\006proto3" + + "etryH\000\032\007\n\005RetryB\010\n\006action\"P\n\014SecretEnvVa" + + "r\022\013\n\003key\030\001 \001(\t\022\022\n\nproject_id\030\002 \001(\t\022\016\n\006se" + + "cret\030\003 \001(\t\022\017\n\007version\030\004 \001(\t\"\277\001\n\014SecretVo" + + "lume\022\022\n\nmount_path\030\001 \001(\t\022\022\n\nproject_id\030\002" + + " \001(\t\022\016\n\006secret\030\003 \001(\t\022G\n\010versions\030\004 \003(\01325" + + ".google.cloud.functions.v1.SecretVolume." + + "SecretVersion\032.\n\rSecretVersion\022\017\n\007versio" + + "n\030\001 \001(\t\022\014\n\004path\030\002 \001(\t\"\225\001\n\025CreateFunction" + + "Request\022;\n\010location\030\001 \001(\tB)\340A\002\372A#\n!locat" + + "ions.googleapis.com/Location\022?\n\010function" + + "\030\002 \001(\0132(.google.cloud.functions.v1.Cloud" + + "FunctionB\003\340A\002\"\211\001\n\025UpdateFunctionRequest\022" + + "?\n\010function\030\001 \001(\0132(.google.cloud.functio" + + "ns.v1.CloudFunctionB\003\340A\002\022/\n\013update_mask\030" + + "\002 \001(\0132\032.google.protobuf.FieldMask\"W\n\022Get" + + "FunctionRequest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+c" + + "loudfunctions.googleapis.com/CloudFuncti" + + "on\"u\n\024ListFunctionsRequest\0226\n\006parent\030\001 \001" + + "(\tB&\372A#\n!locations.googleapis.com/Locati" + + "on\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(" + + "\t\"\202\001\n\025ListFunctionsResponse\022;\n\tfunctions" + + "\030\001 \003(\0132(.google.cloud.functions.v1.Cloud" + + "Function\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unr" + + "eachable\030\003 \003(\t\"Z\n\025DeleteFunctionRequest\022" + + "A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+cloudfunctions.go" + + "ogleapis.com/CloudFunction\"k\n\023CallFuncti" + + "onRequest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+cloudfu" + + "nctions.googleapis.com/CloudFunction\022\021\n\004" + + "data\030\002 \001(\tB\003\340A\002\"K\n\024CallFunctionResponse\022" + + "\024\n\014execution_id\030\001 \001(\t\022\016\n\006result\030\002 \001(\t\022\r\n" + + "\005error\030\003 \001(\t\"*\n\030GenerateUploadUrlRequest" + + "\022\016\n\006parent\030\001 \001(\t\"/\n\031GenerateUploadUrlRes" + + "ponse\022\022\n\nupload_url\030\001 \001(\t\">\n\032GenerateDow" + + "nloadUrlRequest\022\014\n\004name\030\001 \001(\t\022\022\n\nversion" + + "_id\030\002 \001(\004\"3\n\033GenerateDownloadUrlResponse" + + "\022\024\n\014download_url\030\001 \001(\t*\222\001\n\023CloudFunction" + + "Status\022%\n!CLOUD_FUNCTION_STATUS_UNSPECIF" + + "IED\020\000\022\n\n\006ACTIVE\020\001\022\013\n\007OFFLINE\020\002\022\026\n\022DEPLOY" + + "_IN_PROGRESS\020\003\022\026\n\022DELETE_IN_PROGRESS\020\004\022\013" + + "\n\007UNKNOWN\020\0052\227\021\n\025CloudFunctionsService\022\251\001" + + "\n\rListFunctions\022/.google.cloud.functions" + + ".v1.ListFunctionsRequest\0320.google.cloud." + + "functions.v1.ListFunctionsResponse\"5\202\323\344\223" + + "\002/\022-/v1/{parent=projects/*/locations/*}/" + + "functions\022\244\001\n\013GetFunction\022-.google.cloud" + + ".functions.v1.GetFunctionRequest\032(.googl" + + "e.cloud.functions.v1.CloudFunction\"<\202\323\344\223" + + "\002/\022-/v1/{name=projects/*/locations/*/fun" + + "ctions/*}\332A\004name\022\337\001\n\016CreateFunction\0220.go" + + "ogle.cloud.functions.v1.CreateFunctionRe" + + "quest\032\035.google.longrunning.Operation\"|\202\323" + + "\344\223\002;\"//v1/{location=projects/*/locations" + + "/*}/functions:\010function\332A\021location,funct" + + "ion\312A$\n\rCloudFunction\022\023OperationMetadata" + + "V1\022\335\001\n\016UpdateFunction\0220.google.cloud.fun" + + "ctions.v1.UpdateFunctionRequest\032\035.google" + + ".longrunning.Operation\"z\202\323\344\223\002B26/v1/{fun" + + "ction.name=projects/*/locations/*/functi" + + "ons/*}:\010function\332A\010function\312A$\n\rCloudFun" + + "ction\022\023OperationMetadataV1\022\316\001\n\016DeleteFun" + + "ction\0220.google.cloud.functions.v1.Delete" + + "FunctionRequest\032\035.google.longrunning.Ope" + + "ration\"k\202\323\344\223\002/*-/v1/{name=projects/*/loc" + + "ations/*/functions/*}\332A\004name\312A,\n\025google." + + "protobuf.Empty\022\023OperationMetadataV1\022\272\001\n\014" + + "CallFunction\022..google.cloud.functions.v1" + + ".CallFunctionRequest\032/.google.cloud.func" + + "tions.v1.CallFunctionResponse\"I\202\323\344\223\0027\"2/" + + "v1/{name=projects/*/locations/*/function" + + "s/*}:call:\001*\332A\tname,data\022\312\001\n\021GenerateUpl" + + "oadUrl\0223.google.cloud.functions.v1.Gener" + + "ateUploadUrlRequest\0324.google.cloud.funct" + + "ions.v1.GenerateUploadUrlResponse\"J\202\323\344\223\002" + + "D\"?/v1/{parent=projects/*/locations/*}/f" + + "unctions:generateUploadUrl:\001*\022\322\001\n\023Genera" + + "teDownloadUrl\0225.google.cloud.functions.v" + + "1.GenerateDownloadUrlRequest\0326.google.cl" + + "oud.functions.v1.GenerateDownloadUrlResp" + + "onse\"L\202\323\344\223\002F\"A/v1/{name=projects/*/locat" + + "ions/*/functions/*}:generateDownloadUrl:" + + "\001*\022\224\001\n\014SetIamPolicy\022\".google.iam.v1.SetI" + + "amPolicyRequest\032\025.google.iam.v1.Policy\"I" + + "\202\323\344\223\002C\">/v1/{resource=projects/*/locatio" + + "ns/*/functions/*}:setIamPolicy:\001*\022\221\001\n\014Ge" + + "tIamPolicy\022\".google.iam.v1.GetIamPolicyR" + + "equest\032\025.google.iam.v1.Policy\"F\202\323\344\223\002@\022>/" + + "v1/{resource=projects/*/locations/*/func" + + "tions/*}:getIamPolicy\022\272\001\n\022TestIamPermiss" + + "ions\022(.google.iam.v1.TestIamPermissionsR" + + "equest\032).google.iam.v1.TestIamPermission" + + "sResponse\"O\202\323\344\223\002I\"D/v1/{resource=project" + + "s/*/locations/*/functions/*}:testIamPerm" + + "issions:\001*\032Q\312A\035cloudfunctions.googleapis" + + ".com\322A.https://www.googleapis.com/auth/c" + + "loud-platformB\350\002\n\035com.google.cloud.funct" + + "ions.v1B\016FunctionsProtoP\001ZBgoogle.golang" + + ".org/genproto/googleapis/cloud/functions" + + "/v1;functions\242\002\003GCF\352Ao\n*artifactregistry" + + ".googleapis.com/Repository\022Aprojects/{pr" + + "oject}/locations/{location}/repositories" + + "/{repository}\352Ax\n!cloudkms.googleapis.co" + + "m/CryptoKey\022Sprojects/{project}/location" + + "s/{location}/keyRings/{key_ring}/cryptoK" + + "eys/{crypto_key}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -306,12 +349,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "VersionId", "Labels", "EnvironmentVariables", + "BuildEnvironmentVariables", "Network", "MaxInstances", + "MinInstances", "VpcConnector", "VpcConnectorEgressSettings", "IngressSettings", + "KmsKeyName", + "BuildWorkerPool", "BuildId", + "BuildName", + "SecretEnvironmentVariables", + "SecretVolumes", + "SourceToken", + "DockerRepository", "SourceCode", "Trigger", }); @@ -331,6 +383,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_functions_v1_CloudFunction_BuildEnvironmentVariablesEntry_descriptor = + internal_static_google_cloud_functions_v1_CloudFunction_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_functions_v1_CloudFunction_BuildEnvironmentVariablesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_functions_v1_CloudFunction_BuildEnvironmentVariablesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); internal_static_google_cloud_functions_v1_SourceRepository_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_google_cloud_functions_v1_SourceRepository_fieldAccessorTable = @@ -369,8 +429,32 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_functions_v1_FailurePolicy_Retry_descriptor, new java.lang.String[] {}); - internal_static_google_cloud_functions_v1_CreateFunctionRequest_descriptor = + internal_static_google_cloud_functions_v1_SecretEnvVar_descriptor = getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_functions_v1_SecretEnvVar_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_functions_v1_SecretEnvVar_descriptor, + new java.lang.String[] { + "Key", "ProjectId", "Secret", "Version", + }); + internal_static_google_cloud_functions_v1_SecretVolume_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_functions_v1_SecretVolume_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_functions_v1_SecretVolume_descriptor, + new java.lang.String[] { + "MountPath", "ProjectId", "Secret", "Versions", + }); + internal_static_google_cloud_functions_v1_SecretVolume_SecretVersion_descriptor = + internal_static_google_cloud_functions_v1_SecretVolume_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_functions_v1_SecretVolume_SecretVersion_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_functions_v1_SecretVolume_SecretVersion_descriptor, + new java.lang.String[] { + "Version", "Path", + }); + internal_static_google_cloud_functions_v1_CreateFunctionRequest_descriptor = + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_functions_v1_CreateFunctionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_functions_v1_CreateFunctionRequest_descriptor, @@ -378,7 +462,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Location", "Function", }); internal_static_google_cloud_functions_v1_UpdateFunctionRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_functions_v1_UpdateFunctionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_functions_v1_UpdateFunctionRequest_descriptor, @@ -386,7 +470,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Function", "UpdateMask", }); internal_static_google_cloud_functions_v1_GetFunctionRequest_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_functions_v1_GetFunctionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_functions_v1_GetFunctionRequest_descriptor, @@ -394,7 +478,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_functions_v1_ListFunctionsRequest_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_functions_v1_ListFunctionsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_functions_v1_ListFunctionsRequest_descriptor, @@ -402,7 +486,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_cloud_functions_v1_ListFunctionsResponse_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(11); internal_static_google_cloud_functions_v1_ListFunctionsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_functions_v1_ListFunctionsResponse_descriptor, @@ -410,7 +494,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Functions", "NextPageToken", "Unreachable", }); internal_static_google_cloud_functions_v1_DeleteFunctionRequest_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_functions_v1_DeleteFunctionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_functions_v1_DeleteFunctionRequest_descriptor, @@ -418,7 +502,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_functions_v1_CallFunctionRequest_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(13); internal_static_google_cloud_functions_v1_CallFunctionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_functions_v1_CallFunctionRequest_descriptor, @@ -426,7 +510,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Data", }); internal_static_google_cloud_functions_v1_CallFunctionResponse_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_functions_v1_CallFunctionResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_functions_v1_CallFunctionResponse_descriptor, @@ -434,7 +518,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ExecutionId", "Result", "Error", }); internal_static_google_cloud_functions_v1_GenerateUploadUrlRequest_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_functions_v1_GenerateUploadUrlRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_functions_v1_GenerateUploadUrlRequest_descriptor, @@ -442,7 +526,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", }); internal_static_google_cloud_functions_v1_GenerateUploadUrlResponse_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_functions_v1_GenerateUploadUrlResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_functions_v1_GenerateUploadUrlResponse_descriptor, @@ -450,7 +534,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UploadUrl", }); internal_static_google_cloud_functions_v1_GenerateDownloadUrlRequest_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_functions_v1_GenerateDownloadUrlRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_functions_v1_GenerateDownloadUrlRequest_descriptor, @@ -458,7 +542,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "VersionId", }); internal_static_google_cloud_functions_v1_GenerateDownloadUrlResponse_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_functions_v1_GenerateDownloadUrlResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_functions_v1_GenerateDownloadUrlResponse_descriptor, @@ -473,6 +557,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ClientProto.methodSignature); registry.add(com.google.api.ClientProto.oauthScopes); registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceDefinition); registry.add(com.google.api.ResourceProto.resourceReference); registry.add(com.google.longrunning.OperationsProto.operationInfo); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/OperationMetadataV1.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/OperationMetadataV1.java index f52814e7..33c8541f 100644 --- a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/OperationMetadataV1.java +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/OperationMetadataV1.java @@ -41,6 +41,8 @@ private OperationMetadataV1() { target_ = ""; type_ = 0; buildId_ = ""; + sourceToken_ = ""; + buildName_ = ""; } @java.lang.Override @@ -127,6 +129,20 @@ private OperationMetadataV1( buildId_ = s; break; } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + sourceToken_ = s; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + buildName_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -410,6 +426,110 @@ public com.google.protobuf.ByteString getBuildIdBytes() { } } + public static final int SOURCE_TOKEN_FIELD_NUMBER = 7; + private volatile java.lang.Object sourceToken_; + /** + * + * + *
+   * An identifier for Firebase function sources. Disclaimer: This field is only
+   * supported for Firebase function deployments.
+   * 
+ * + * string source_token = 7; + * + * @return The sourceToken. + */ + @java.lang.Override + public java.lang.String getSourceToken() { + java.lang.Object ref = sourceToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceToken_ = s; + return s; + } + } + /** + * + * + *
+   * An identifier for Firebase function sources. Disclaimer: This field is only
+   * supported for Firebase function deployments.
+   * 
+ * + * string source_token = 7; + * + * @return The bytes for sourceToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceTokenBytes() { + java.lang.Object ref = sourceToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUILD_NAME_FIELD_NUMBER = 8; + private volatile java.lang.Object buildName_; + /** + * + * + *
+   * The Cloud Build Name of the function deployment.
+   * This field is only populated for Create and Update operations.
+   * `projects/<project-number>/locations/<region>/builds/<build-id>`.
+   * 
+ * + * string build_name = 8; + * + * @return The buildName. + */ + @java.lang.Override + public java.lang.String getBuildName() { + java.lang.Object ref = buildName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildName_ = s; + return s; + } + } + /** + * + * + *
+   * The Cloud Build Name of the function deployment.
+   * This field is only populated for Create and Update operations.
+   * `projects/<project-number>/locations/<region>/builds/<build-id>`.
+   * 
+ * + * string build_name = 8; + * + * @return The bytes for buildName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBuildNameBytes() { + java.lang.Object ref = buildName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + buildName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -442,6 +562,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, buildId_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, sourceToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, buildName_); + } unknownFields.writeTo(output); } @@ -469,6 +595,12 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, buildId_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, sourceToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(buildName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, buildName_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -497,6 +629,8 @@ public boolean equals(final java.lang.Object obj) { if (!getUpdateTime().equals(other.getUpdateTime())) return false; } if (!getBuildId().equals(other.getBuildId())) return false; + if (!getSourceToken().equals(other.getSourceToken())) return false; + if (!getBuildName().equals(other.getBuildName())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -524,6 +658,10 @@ public int hashCode() { } hash = (37 * hash) + BUILD_ID_FIELD_NUMBER; hash = (53 * hash) + getBuildId().hashCode(); + hash = (37 * hash) + SOURCE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getSourceToken().hashCode(); + hash = (37 * hash) + BUILD_NAME_FIELD_NUMBER; + hash = (53 * hash) + getBuildName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -689,6 +827,10 @@ public Builder clear() { } buildId_ = ""; + sourceToken_ = ""; + + buildName_ = ""; + return this; } @@ -730,6 +872,8 @@ public com.google.cloud.functions.v1.OperationMetadataV1 buildPartial() { result.updateTime_ = updateTimeBuilder_.build(); } result.buildId_ = buildId_; + result.sourceToken_ = sourceToken_; + result.buildName_ = buildName_; onBuilt(); return result; } @@ -800,6 +944,14 @@ public Builder mergeFrom(com.google.cloud.functions.v1.OperationMetadataV1 other buildId_ = other.buildId_; onChanged(); } + if (!other.getSourceToken().isEmpty()) { + sourceToken_ = other.sourceToken_; + onChanged(); + } + if (!other.getBuildName().isEmpty()) { + buildName_ = other.buildName_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1558,6 +1710,233 @@ public Builder setBuildIdBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object sourceToken_ = ""; + /** + * + * + *
+     * An identifier for Firebase function sources. Disclaimer: This field is only
+     * supported for Firebase function deployments.
+     * 
+ * + * string source_token = 7; + * + * @return The sourceToken. + */ + public java.lang.String getSourceToken() { + java.lang.Object ref = sourceToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An identifier for Firebase function sources. Disclaimer: This field is only
+     * supported for Firebase function deployments.
+     * 
+ * + * string source_token = 7; + * + * @return The bytes for sourceToken. + */ + public com.google.protobuf.ByteString getSourceTokenBytes() { + java.lang.Object ref = sourceToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An identifier for Firebase function sources. Disclaimer: This field is only
+     * supported for Firebase function deployments.
+     * 
+ * + * string source_token = 7; + * + * @param value The sourceToken to set. + * @return This builder for chaining. + */ + public Builder setSourceToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * An identifier for Firebase function sources. Disclaimer: This field is only
+     * supported for Firebase function deployments.
+     * 
+ * + * string source_token = 7; + * + * @return This builder for chaining. + */ + public Builder clearSourceToken() { + + sourceToken_ = getDefaultInstance().getSourceToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * An identifier for Firebase function sources. Disclaimer: This field is only
+     * supported for Firebase function deployments.
+     * 
+ * + * string source_token = 7; + * + * @param value The bytes for sourceToken to set. + * @return This builder for chaining. + */ + public Builder setSourceTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object buildName_ = ""; + /** + * + * + *
+     * The Cloud Build Name of the function deployment.
+     * This field is only populated for Create and Update operations.
+     * `projects/<project-number>/locations/<region>/builds/<build-id>`.
+     * 
+ * + * string build_name = 8; + * + * @return The buildName. + */ + public java.lang.String getBuildName() { + java.lang.Object ref = buildName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The Cloud Build Name of the function deployment.
+     * This field is only populated for Create and Update operations.
+     * `projects/<project-number>/locations/<region>/builds/<build-id>`.
+     * 
+ * + * string build_name = 8; + * + * @return The bytes for buildName. + */ + public com.google.protobuf.ByteString getBuildNameBytes() { + java.lang.Object ref = buildName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + buildName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Cloud Build Name of the function deployment.
+     * This field is only populated for Create and Update operations.
+     * `projects/<project-number>/locations/<region>/builds/<build-id>`.
+     * 
+ * + * string build_name = 8; + * + * @param value The buildName to set. + * @return This builder for chaining. + */ + public Builder setBuildName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + buildName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Cloud Build Name of the function deployment.
+     * This field is only populated for Create and Update operations.
+     * `projects/<project-number>/locations/<region>/builds/<build-id>`.
+     * 
+ * + * string build_name = 8; + * + * @return This builder for chaining. + */ + public Builder clearBuildName() { + + buildName_ = getDefaultInstance().getBuildName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Cloud Build Name of the function deployment.
+     * This field is only populated for Create and Update operations.
+     * `projects/<project-number>/locations/<region>/builds/<build-id>`.
+     * 
+ * + * string build_name = 8; + * + * @param value The bytes for buildName to set. + * @return This builder for chaining. + */ + public Builder setBuildNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + buildName_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/OperationMetadataV1OrBuilder.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/OperationMetadataV1OrBuilder.java index 982f3ce4..ded4fd8f 100644 --- a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/OperationMetadataV1OrBuilder.java +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/OperationMetadataV1OrBuilder.java @@ -185,4 +185,60 @@ public interface OperationMetadataV1OrBuilder * @return The bytes for buildId. */ com.google.protobuf.ByteString getBuildIdBytes(); + + /** + * + * + *
+   * An identifier for Firebase function sources. Disclaimer: This field is only
+   * supported for Firebase function deployments.
+   * 
+ * + * string source_token = 7; + * + * @return The sourceToken. + */ + java.lang.String getSourceToken(); + /** + * + * + *
+   * An identifier for Firebase function sources. Disclaimer: This field is only
+   * supported for Firebase function deployments.
+   * 
+ * + * string source_token = 7; + * + * @return The bytes for sourceToken. + */ + com.google.protobuf.ByteString getSourceTokenBytes(); + + /** + * + * + *
+   * The Cloud Build Name of the function deployment.
+   * This field is only populated for Create and Update operations.
+   * `projects/<project-number>/locations/<region>/builds/<build-id>`.
+   * 
+ * + * string build_name = 8; + * + * @return The buildName. + */ + java.lang.String getBuildName(); + /** + * + * + *
+   * The Cloud Build Name of the function deployment.
+   * This field is only populated for Create and Update operations.
+   * `projects/<project-number>/locations/<region>/builds/<build-id>`.
+   * 
+ * + * string build_name = 8; + * + * @return The bytes for buildName. + */ + com.google.protobuf.ByteString getBuildNameBytes(); } diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretEnvVar.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretEnvVar.java new file mode 100644 index 00000000..90fdb2a1 --- /dev/null +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretEnvVar.java @@ -0,0 +1,1212 @@ +/* + * Copyright 2020 Google LLC + * + * 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/functions/v1/functions.proto + +package com.google.cloud.functions.v1; + +/** + * + * + *
+ * Configuration for a secret environment variable. It has the information
+ * necessary to fetch the secret value from secret manager and expose it as an
+ * environment variable. Secret value is not a part of the configuration. Secret
+ * values are only fetched when a new clone starts.
+ * 
+ * + * Protobuf type {@code google.cloud.functions.v1.SecretEnvVar} + */ +public final class SecretEnvVar extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.functions.v1.SecretEnvVar) + SecretEnvVarOrBuilder { + private static final long serialVersionUID = 0L; + // Use SecretEnvVar.newBuilder() to construct. + private SecretEnvVar(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SecretEnvVar() { + key_ = ""; + projectId_ = ""; + secret_ = ""; + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SecretEnvVar(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SecretEnvVar( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + key_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + projectId_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + secret_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.functions.v1.FunctionsProto + .internal_static_google_cloud_functions_v1_SecretEnvVar_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.functions.v1.FunctionsProto + .internal_static_google_cloud_functions_v1_SecretEnvVar_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.functions.v1.SecretEnvVar.class, + com.google.cloud.functions.v1.SecretEnvVar.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + private volatile java.lang.Object key_; + /** + * + * + *
+   * Name of the environment variable.
+   * 
+ * + * string key = 1; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the environment variable.
+   * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object projectId_; + /** + * + * + *
+   * Project identifier (preferrably project number but can also be the project
+   * ID) of the project that contains the secret. If not set, it will be
+   * populated with the function's project assuming that the secret exists in
+   * the same project as of the function.
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Project identifier (preferrably project number but can also be the project
+   * ID) of the project that contains the secret. If not set, it will be
+   * populated with the function's project assuming that the secret exists in
+   * the same project as of the function.
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SECRET_FIELD_NUMBER = 3; + private volatile java.lang.Object secret_; + /** + * + * + *
+   * Name of the secret in secret manager (not the full resource name).
+   * 
+ * + * string secret = 3; + * + * @return The secret. + */ + @java.lang.Override + public java.lang.String getSecret() { + java.lang.Object ref = secret_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secret_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the secret in secret manager (not the full resource name).
+   * 
+ * + * string secret = 3; + * + * @return The bytes for secret. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSecretBytes() { + java.lang.Object ref = secret_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secret_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 4; + private volatile java.lang.Object version_; + /** + * + * + *
+   * Version of the secret (version number or the string 'latest'). It is
+   * recommended to use a numeric version for secret environment variables as
+   * any updates to the secret value is not reflected until new clones start.
+   * 
+ * + * string version = 4; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+   * Version of the secret (version number or the string 'latest'). It is
+   * recommended to use a numeric version for secret environment variables as
+   * any updates to the secret value is not reflected until new clones start.
+   * 
+ * + * string version = 4; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secret_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, secret_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, version_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secret_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, secret_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, version_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.functions.v1.SecretEnvVar)) { + return super.equals(obj); + } + com.google.cloud.functions.v1.SecretEnvVar other = + (com.google.cloud.functions.v1.SecretEnvVar) obj; + + if (!getKey().equals(other.getKey())) return false; + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getSecret().equals(other.getSecret())) return false; + if (!getVersion().equals(other.getVersion())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + SECRET_FIELD_NUMBER; + hash = (53 * hash) + getSecret().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.functions.v1.SecretEnvVar parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.functions.v1.SecretEnvVar parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.functions.v1.SecretEnvVar parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.functions.v1.SecretEnvVar parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.functions.v1.SecretEnvVar parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.functions.v1.SecretEnvVar parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.functions.v1.SecretEnvVar parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.functions.v1.SecretEnvVar parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.functions.v1.SecretEnvVar parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.functions.v1.SecretEnvVar parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.functions.v1.SecretEnvVar parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.functions.v1.SecretEnvVar parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.functions.v1.SecretEnvVar prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Configuration for a secret environment variable. It has the information
+   * necessary to fetch the secret value from secret manager and expose it as an
+   * environment variable. Secret value is not a part of the configuration. Secret
+   * values are only fetched when a new clone starts.
+   * 
+ * + * Protobuf type {@code google.cloud.functions.v1.SecretEnvVar} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.functions.v1.SecretEnvVar) + com.google.cloud.functions.v1.SecretEnvVarOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.functions.v1.FunctionsProto + .internal_static_google_cloud_functions_v1_SecretEnvVar_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.functions.v1.FunctionsProto + .internal_static_google_cloud_functions_v1_SecretEnvVar_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.functions.v1.SecretEnvVar.class, + com.google.cloud.functions.v1.SecretEnvVar.Builder.class); + } + + // Construct using com.google.cloud.functions.v1.SecretEnvVar.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + key_ = ""; + + projectId_ = ""; + + secret_ = ""; + + version_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.functions.v1.FunctionsProto + .internal_static_google_cloud_functions_v1_SecretEnvVar_descriptor; + } + + @java.lang.Override + public com.google.cloud.functions.v1.SecretEnvVar getDefaultInstanceForType() { + return com.google.cloud.functions.v1.SecretEnvVar.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.functions.v1.SecretEnvVar build() { + com.google.cloud.functions.v1.SecretEnvVar result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.functions.v1.SecretEnvVar buildPartial() { + com.google.cloud.functions.v1.SecretEnvVar result = + new com.google.cloud.functions.v1.SecretEnvVar(this); + result.key_ = key_; + result.projectId_ = projectId_; + result.secret_ = secret_; + result.version_ = version_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.functions.v1.SecretEnvVar) { + return mergeFrom((com.google.cloud.functions.v1.SecretEnvVar) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.functions.v1.SecretEnvVar other) { + if (other == com.google.cloud.functions.v1.SecretEnvVar.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + onChanged(); + } + if (!other.getSecret().isEmpty()) { + secret_ = other.secret_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.functions.v1.SecretEnvVar parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.functions.v1.SecretEnvVar) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object key_ = ""; + /** + * + * + *
+     * Name of the environment variable.
+     * 
+ * + * string key = 1; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the environment variable.
+     * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the environment variable.
+     * 
+ * + * string key = 1; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + key_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the environment variable.
+     * 
+ * + * string key = 1; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the environment variable.
+     * 
+ * + * string key = 1; + * + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + key_ = value; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Project identifier (preferrably project number but can also be the project
+     * ID) of the project that contains the secret. If not set, it will be
+     * populated with the function's project assuming that the secret exists in
+     * the same project as of the function.
+     * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Project identifier (preferrably project number but can also be the project
+     * ID) of the project that contains the secret. If not set, it will be
+     * populated with the function's project assuming that the secret exists in
+     * the same project as of the function.
+     * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Project identifier (preferrably project number but can also be the project
+     * ID) of the project that contains the secret. If not set, it will be
+     * populated with the function's project assuming that the secret exists in
+     * the same project as of the function.
+     * 
+ * + * string project_id = 2; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + projectId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Project identifier (preferrably project number but can also be the project
+     * ID) of the project that contains the secret. If not set, it will be
+     * populated with the function's project assuming that the secret exists in
+     * the same project as of the function.
+     * 
+ * + * string project_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + + projectId_ = getDefaultInstance().getProjectId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Project identifier (preferrably project number but can also be the project
+     * ID) of the project that contains the secret. If not set, it will be
+     * populated with the function's project assuming that the secret exists in
+     * the same project as of the function.
+     * 
+ * + * string project_id = 2; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + projectId_ = value; + onChanged(); + return this; + } + + private java.lang.Object secret_ = ""; + /** + * + * + *
+     * Name of the secret in secret manager (not the full resource name).
+     * 
+ * + * string secret = 3; + * + * @return The secret. + */ + public java.lang.String getSecret() { + java.lang.Object ref = secret_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secret_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the secret in secret manager (not the full resource name).
+     * 
+ * + * string secret = 3; + * + * @return The bytes for secret. + */ + public com.google.protobuf.ByteString getSecretBytes() { + java.lang.Object ref = secret_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secret_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the secret in secret manager (not the full resource name).
+     * 
+ * + * string secret = 3; + * + * @param value The secret to set. + * @return This builder for chaining. + */ + public Builder setSecret(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + secret_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the secret in secret manager (not the full resource name).
+     * 
+ * + * string secret = 3; + * + * @return This builder for chaining. + */ + public Builder clearSecret() { + + secret_ = getDefaultInstance().getSecret(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the secret in secret manager (not the full resource name).
+     * 
+ * + * string secret = 3; + * + * @param value The bytes for secret to set. + * @return This builder for chaining. + */ + public Builder setSecretBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + secret_ = value; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+     * Version of the secret (version number or the string 'latest'). It is
+     * recommended to use a numeric version for secret environment variables as
+     * any updates to the secret value is not reflected until new clones start.
+     * 
+ * + * string version = 4; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Version of the secret (version number or the string 'latest'). It is
+     * recommended to use a numeric version for secret environment variables as
+     * any updates to the secret value is not reflected until new clones start.
+     * 
+ * + * string version = 4; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Version of the secret (version number or the string 'latest'). It is
+     * recommended to use a numeric version for secret environment variables as
+     * any updates to the secret value is not reflected until new clones start.
+     * 
+ * + * string version = 4; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Version of the secret (version number or the string 'latest'). It is
+     * recommended to use a numeric version for secret environment variables as
+     * any updates to the secret value is not reflected until new clones start.
+     * 
+ * + * string version = 4; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Version of the secret (version number or the string 'latest'). It is
+     * recommended to use a numeric version for secret environment variables as
+     * any updates to the secret value is not reflected until new clones start.
+     * 
+ * + * string version = 4; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.functions.v1.SecretEnvVar) + } + + // @@protoc_insertion_point(class_scope:google.cloud.functions.v1.SecretEnvVar) + private static final com.google.cloud.functions.v1.SecretEnvVar DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.functions.v1.SecretEnvVar(); + } + + public static com.google.cloud.functions.v1.SecretEnvVar getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SecretEnvVar parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SecretEnvVar(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.functions.v1.SecretEnvVar getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretEnvVarOrBuilder.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretEnvVarOrBuilder.java new file mode 100644 index 00000000..4d4838b8 --- /dev/null +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretEnvVarOrBuilder.java @@ -0,0 +1,135 @@ +/* + * Copyright 2020 Google LLC + * + * 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/functions/v1/functions.proto + +package com.google.cloud.functions.v1; + +public interface SecretEnvVarOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.functions.v1.SecretEnvVar) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the environment variable.
+   * 
+ * + * string key = 1; + * + * @return The key. + */ + java.lang.String getKey(); + /** + * + * + *
+   * Name of the environment variable.
+   * 
+ * + * string key = 1; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + + /** + * + * + *
+   * Project identifier (preferrably project number but can also be the project
+   * ID) of the project that contains the secret. If not set, it will be
+   * populated with the function's project assuming that the secret exists in
+   * the same project as of the function.
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Project identifier (preferrably project number but can also be the project
+   * ID) of the project that contains the secret. If not set, it will be
+   * populated with the function's project assuming that the secret exists in
+   * the same project as of the function.
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Name of the secret in secret manager (not the full resource name).
+   * 
+ * + * string secret = 3; + * + * @return The secret. + */ + java.lang.String getSecret(); + /** + * + * + *
+   * Name of the secret in secret manager (not the full resource name).
+   * 
+ * + * string secret = 3; + * + * @return The bytes for secret. + */ + com.google.protobuf.ByteString getSecretBytes(); + + /** + * + * + *
+   * Version of the secret (version number or the string 'latest'). It is
+   * recommended to use a numeric version for secret environment variables as
+   * any updates to the secret value is not reflected until new clones start.
+   * 
+ * + * string version = 4; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+   * Version of the secret (version number or the string 'latest'). It is
+   * recommended to use a numeric version for secret environment variables as
+   * any updates to the secret value is not reflected until new clones start.
+   * 
+ * + * string version = 4; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); +} diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretVolume.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretVolume.java new file mode 100644 index 00000000..cd01f175 --- /dev/null +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretVolume.java @@ -0,0 +1,2516 @@ +/* + * Copyright 2020 Google LLC + * + * 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/functions/v1/functions.proto + +package com.google.cloud.functions.v1; + +/** + * + * + *
+ * Configuration for a secret volume. It has the information necessary to fetch
+ * the secret value from secret manager and make it available as files mounted
+ * at the requested paths within the application container. Secret value is not
+ * a part of the configuration. Every filesystem read operation performs a
+ * lookup in secret manager to retrieve the secret value.
+ * 
+ * + * Protobuf type {@code google.cloud.functions.v1.SecretVolume} + */ +public final class SecretVolume extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.functions.v1.SecretVolume) + SecretVolumeOrBuilder { + private static final long serialVersionUID = 0L; + // Use SecretVolume.newBuilder() to construct. + private SecretVolume(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SecretVolume() { + mountPath_ = ""; + projectId_ = ""; + secret_ = ""; + versions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SecretVolume(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SecretVolume( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + mountPath_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + projectId_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + secret_ = s; + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + versions_ = + new java.util.ArrayList< + com.google.cloud.functions.v1.SecretVolume.SecretVersion>(); + mutable_bitField0_ |= 0x00000001; + } + versions_.add( + input.readMessage( + com.google.cloud.functions.v1.SecretVolume.SecretVersion.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + versions_ = java.util.Collections.unmodifiableList(versions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.functions.v1.FunctionsProto + .internal_static_google_cloud_functions_v1_SecretVolume_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.functions.v1.FunctionsProto + .internal_static_google_cloud_functions_v1_SecretVolume_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.functions.v1.SecretVolume.class, + com.google.cloud.functions.v1.SecretVolume.Builder.class); + } + + public interface SecretVersionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.functions.v1.SecretVolume.SecretVersion) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Version of the secret (version number or the string 'latest'). It is
+     * preferrable to use `latest` version with secret volumes as secret value
+     * changes are reflected immediately.
+     * 
+ * + * string version = 1; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+     * Version of the secret (version number or the string 'latest'). It is
+     * preferrable to use `latest` version with secret volumes as secret value
+     * changes are reflected immediately.
+     * 
+ * + * string version = 1; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+     * Relative path of the file under the mount path where the secret value for
+     * this version will be fetched and made available. For example, setting the
+     * mount_path as '/etc/secrets' and path as `/secret_foo` would mount the
+     * secret value file at `/etc/secrets/secret_foo`.
+     * 
+ * + * string path = 2; + * + * @return The path. + */ + java.lang.String getPath(); + /** + * + * + *
+     * Relative path of the file under the mount path where the secret value for
+     * this version will be fetched and made available. For example, setting the
+     * mount_path as '/etc/secrets' and path as `/secret_foo` would mount the
+     * secret value file at `/etc/secrets/secret_foo`.
+     * 
+ * + * string path = 2; + * + * @return The bytes for path. + */ + com.google.protobuf.ByteString getPathBytes(); + } + /** + * + * + *
+   * Configuration for a single version.
+   * 
+ * + * Protobuf type {@code google.cloud.functions.v1.SecretVolume.SecretVersion} + */ + public static final class SecretVersion extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.functions.v1.SecretVolume.SecretVersion) + SecretVersionOrBuilder { + private static final long serialVersionUID = 0L; + // Use SecretVersion.newBuilder() to construct. + private SecretVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SecretVersion() { + version_ = ""; + path_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SecretVersion(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SecretVersion( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + path_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.functions.v1.FunctionsProto + .internal_static_google_cloud_functions_v1_SecretVolume_SecretVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.functions.v1.FunctionsProto + .internal_static_google_cloud_functions_v1_SecretVolume_SecretVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.functions.v1.SecretVolume.SecretVersion.class, + com.google.cloud.functions.v1.SecretVolume.SecretVersion.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object version_; + /** + * + * + *
+     * Version of the secret (version number or the string 'latest'). It is
+     * preferrable to use `latest` version with secret volumes as secret value
+     * changes are reflected immediately.
+     * 
+ * + * string version = 1; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+     * Version of the secret (version number or the string 'latest'). It is
+     * preferrable to use `latest` version with secret volumes as secret value
+     * changes are reflected immediately.
+     * 
+ * + * string version = 1; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PATH_FIELD_NUMBER = 2; + private volatile java.lang.Object path_; + /** + * + * + *
+     * Relative path of the file under the mount path where the secret value for
+     * this version will be fetched and made available. For example, setting the
+     * mount_path as '/etc/secrets' and path as `/secret_foo` would mount the
+     * secret value file at `/etc/secrets/secret_foo`.
+     * 
+ * + * string path = 2; + * + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } + } + /** + * + * + *
+     * Relative path of the file under the mount path where the secret value for
+     * this version will be fetched and made available. For example, setting the
+     * mount_path as '/etc/secrets' and path as `/secret_foo` would mount the
+     * secret value file at `/etc/secrets/secret_foo`.
+     * 
+ * + * string path = 2; + * + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, path_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, path_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.functions.v1.SecretVolume.SecretVersion)) { + return super.equals(obj); + } + com.google.cloud.functions.v1.SecretVolume.SecretVersion other = + (com.google.cloud.functions.v1.SecretVolume.SecretVersion) obj; + + if (!getVersion().equals(other.getVersion())) return false; + if (!getPath().equals(other.getPath())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.functions.v1.SecretVolume.SecretVersion parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.functions.v1.SecretVolume.SecretVersion parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.functions.v1.SecretVolume.SecretVersion parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.functions.v1.SecretVolume.SecretVersion parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.functions.v1.SecretVolume.SecretVersion parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.functions.v1.SecretVolume.SecretVersion parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.functions.v1.SecretVolume.SecretVersion parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.functions.v1.SecretVolume.SecretVersion parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.functions.v1.SecretVolume.SecretVersion parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.functions.v1.SecretVolume.SecretVersion parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.functions.v1.SecretVolume.SecretVersion parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.functions.v1.SecretVolume.SecretVersion parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.functions.v1.SecretVolume.SecretVersion prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Configuration for a single version.
+     * 
+ * + * Protobuf type {@code google.cloud.functions.v1.SecretVolume.SecretVersion} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.functions.v1.SecretVolume.SecretVersion) + com.google.cloud.functions.v1.SecretVolume.SecretVersionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.functions.v1.FunctionsProto + .internal_static_google_cloud_functions_v1_SecretVolume_SecretVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.functions.v1.FunctionsProto + .internal_static_google_cloud_functions_v1_SecretVolume_SecretVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.functions.v1.SecretVolume.SecretVersion.class, + com.google.cloud.functions.v1.SecretVolume.SecretVersion.Builder.class); + } + + // Construct using com.google.cloud.functions.v1.SecretVolume.SecretVersion.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + version_ = ""; + + path_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.functions.v1.FunctionsProto + .internal_static_google_cloud_functions_v1_SecretVolume_SecretVersion_descriptor; + } + + @java.lang.Override + public com.google.cloud.functions.v1.SecretVolume.SecretVersion getDefaultInstanceForType() { + return com.google.cloud.functions.v1.SecretVolume.SecretVersion.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.functions.v1.SecretVolume.SecretVersion build() { + com.google.cloud.functions.v1.SecretVolume.SecretVersion result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.functions.v1.SecretVolume.SecretVersion buildPartial() { + com.google.cloud.functions.v1.SecretVolume.SecretVersion result = + new com.google.cloud.functions.v1.SecretVolume.SecretVersion(this); + result.version_ = version_; + result.path_ = path_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.functions.v1.SecretVolume.SecretVersion) { + return mergeFrom((com.google.cloud.functions.v1.SecretVolume.SecretVersion) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.functions.v1.SecretVolume.SecretVersion other) { + if (other == com.google.cloud.functions.v1.SecretVolume.SecretVersion.getDefaultInstance()) + return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (!other.getPath().isEmpty()) { + path_ = other.path_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.functions.v1.SecretVolume.SecretVersion parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.functions.v1.SecretVolume.SecretVersion) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+       * Version of the secret (version number or the string 'latest'). It is
+       * preferrable to use `latest` version with secret volumes as secret value
+       * changes are reflected immediately.
+       * 
+ * + * string version = 1; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Version of the secret (version number or the string 'latest'). It is
+       * preferrable to use `latest` version with secret volumes as secret value
+       * changes are reflected immediately.
+       * 
+ * + * string version = 1; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Version of the secret (version number or the string 'latest'). It is
+       * preferrable to use `latest` version with secret volumes as secret value
+       * changes are reflected immediately.
+       * 
+ * + * string version = 1; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Version of the secret (version number or the string 'latest'). It is
+       * preferrable to use `latest` version with secret volumes as secret value
+       * changes are reflected immediately.
+       * 
+ * + * string version = 1; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * + * + *
+       * Version of the secret (version number or the string 'latest'). It is
+       * preferrable to use `latest` version with secret volumes as secret value
+       * changes are reflected immediately.
+       * 
+ * + * string version = 1; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private java.lang.Object path_ = ""; + /** + * + * + *
+       * Relative path of the file under the mount path where the secret value for
+       * this version will be fetched and made available. For example, setting the
+       * mount_path as '/etc/secrets' and path as `/secret_foo` would mount the
+       * secret value file at `/etc/secrets/secret_foo`.
+       * 
+ * + * string path = 2; + * + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Relative path of the file under the mount path where the secret value for
+       * this version will be fetched and made available. For example, setting the
+       * mount_path as '/etc/secrets' and path as `/secret_foo` would mount the
+       * secret value file at `/etc/secrets/secret_foo`.
+       * 
+ * + * string path = 2; + * + * @return The bytes for path. + */ + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Relative path of the file under the mount path where the secret value for
+       * this version will be fetched and made available. For example, setting the
+       * mount_path as '/etc/secrets' and path as `/secret_foo` would mount the
+       * secret value file at `/etc/secrets/secret_foo`.
+       * 
+ * + * string path = 2; + * + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + path_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Relative path of the file under the mount path where the secret value for
+       * this version will be fetched and made available. For example, setting the
+       * mount_path as '/etc/secrets' and path as `/secret_foo` would mount the
+       * secret value file at `/etc/secrets/secret_foo`.
+       * 
+ * + * string path = 2; + * + * @return This builder for chaining. + */ + public Builder clearPath() { + + path_ = getDefaultInstance().getPath(); + onChanged(); + return this; + } + /** + * + * + *
+       * Relative path of the file under the mount path where the secret value for
+       * this version will be fetched and made available. For example, setting the
+       * mount_path as '/etc/secrets' and path as `/secret_foo` would mount the
+       * secret value file at `/etc/secrets/secret_foo`.
+       * 
+ * + * string path = 2; + * + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + path_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.functions.v1.SecretVolume.SecretVersion) + } + + // @@protoc_insertion_point(class_scope:google.cloud.functions.v1.SecretVolume.SecretVersion) + private static final com.google.cloud.functions.v1.SecretVolume.SecretVersion DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.functions.v1.SecretVolume.SecretVersion(); + } + + public static com.google.cloud.functions.v1.SecretVolume.SecretVersion getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SecretVersion parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SecretVersion(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.functions.v1.SecretVolume.SecretVersion getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int MOUNT_PATH_FIELD_NUMBER = 1; + private volatile java.lang.Object mountPath_; + /** + * + * + *
+   * The path within the container to mount the secret volume. For example,
+   * setting the mount_path as `/etc/secrets` would mount the secret value files
+   * under the `/etc/secrets` directory. This directory will also be completely
+   * shadowed and unavailable to mount any other secrets.
+   * Recommended mount paths: /etc/secrets
+   * Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log
+   * 
+ * + * string mount_path = 1; + * + * @return The mountPath. + */ + @java.lang.Override + public java.lang.String getMountPath() { + java.lang.Object ref = mountPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mountPath_ = s; + return s; + } + } + /** + * + * + *
+   * The path within the container to mount the secret volume. For example,
+   * setting the mount_path as `/etc/secrets` would mount the secret value files
+   * under the `/etc/secrets` directory. This directory will also be completely
+   * shadowed and unavailable to mount any other secrets.
+   * Recommended mount paths: /etc/secrets
+   * Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log
+   * 
+ * + * string mount_path = 1; + * + * @return The bytes for mountPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMountPathBytes() { + java.lang.Object ref = mountPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mountPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object projectId_; + /** + * + * + *
+   * Project identifier (preferrably project number but can also be the project
+   * ID) of the project that contains the secret. If not set, it will be
+   * populated with the function's project assuming that the secret exists in
+   * the same project as of the function.
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+   * Project identifier (preferrably project number but can also be the project
+   * ID) of the project that contains the secret. If not set, it will be
+   * populated with the function's project assuming that the secret exists in
+   * the same project as of the function.
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SECRET_FIELD_NUMBER = 3; + private volatile java.lang.Object secret_; + /** + * + * + *
+   * Name of the secret in secret manager (not the full resource name).
+   * 
+ * + * string secret = 3; + * + * @return The secret. + */ + @java.lang.Override + public java.lang.String getSecret() { + java.lang.Object ref = secret_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secret_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the secret in secret manager (not the full resource name).
+   * 
+ * + * string secret = 3; + * + * @return The bytes for secret. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSecretBytes() { + java.lang.Object ref = secret_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secret_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSIONS_FIELD_NUMBER = 4; + private java.util.List versions_; + /** + * + * + *
+   * List of secret versions to mount for this secret. If empty, the `latest`
+   * version of the secret will be made available in a file named after the
+   * secret under the mount point.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + @java.lang.Override + public java.util.List + getVersionsList() { + return versions_; + } + /** + * + * + *
+   * List of secret versions to mount for this secret. If empty, the `latest`
+   * version of the secret will be made available in a file named after the
+   * secret under the mount point.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + @java.lang.Override + public java.util.List + getVersionsOrBuilderList() { + return versions_; + } + /** + * + * + *
+   * List of secret versions to mount for this secret. If empty, the `latest`
+   * version of the secret will be made available in a file named after the
+   * secret under the mount point.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + @java.lang.Override + public int getVersionsCount() { + return versions_.size(); + } + /** + * + * + *
+   * List of secret versions to mount for this secret. If empty, the `latest`
+   * version of the secret will be made available in a file named after the
+   * secret under the mount point.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + @java.lang.Override + public com.google.cloud.functions.v1.SecretVolume.SecretVersion getVersions(int index) { + return versions_.get(index); + } + /** + * + * + *
+   * List of secret versions to mount for this secret. If empty, the `latest`
+   * version of the secret will be made available in a file named after the
+   * secret under the mount point.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + @java.lang.Override + public com.google.cloud.functions.v1.SecretVolume.SecretVersionOrBuilder getVersionsOrBuilder( + int index) { + return versions_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mountPath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mountPath_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secret_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, secret_); + } + for (int i = 0; i < versions_.size(); i++) { + output.writeMessage(4, versions_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mountPath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mountPath_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secret_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, secret_); + } + for (int i = 0; i < versions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, versions_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.functions.v1.SecretVolume)) { + return super.equals(obj); + } + com.google.cloud.functions.v1.SecretVolume other = + (com.google.cloud.functions.v1.SecretVolume) obj; + + if (!getMountPath().equals(other.getMountPath())) return false; + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getSecret().equals(other.getSecret())) return false; + if (!getVersionsList().equals(other.getVersionsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MOUNT_PATH_FIELD_NUMBER; + hash = (53 * hash) + getMountPath().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + SECRET_FIELD_NUMBER; + hash = (53 * hash) + getSecret().hashCode(); + if (getVersionsCount() > 0) { + hash = (37 * hash) + VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getVersionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.functions.v1.SecretVolume parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.functions.v1.SecretVolume parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.functions.v1.SecretVolume parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.functions.v1.SecretVolume parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.functions.v1.SecretVolume parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.functions.v1.SecretVolume parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.functions.v1.SecretVolume parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.functions.v1.SecretVolume parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.functions.v1.SecretVolume parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.functions.v1.SecretVolume parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.functions.v1.SecretVolume parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.functions.v1.SecretVolume parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.functions.v1.SecretVolume prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Configuration for a secret volume. It has the information necessary to fetch
+   * the secret value from secret manager and make it available as files mounted
+   * at the requested paths within the application container. Secret value is not
+   * a part of the configuration. Every filesystem read operation performs a
+   * lookup in secret manager to retrieve the secret value.
+   * 
+ * + * Protobuf type {@code google.cloud.functions.v1.SecretVolume} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.functions.v1.SecretVolume) + com.google.cloud.functions.v1.SecretVolumeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.functions.v1.FunctionsProto + .internal_static_google_cloud_functions_v1_SecretVolume_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.functions.v1.FunctionsProto + .internal_static_google_cloud_functions_v1_SecretVolume_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.functions.v1.SecretVolume.class, + com.google.cloud.functions.v1.SecretVolume.Builder.class); + } + + // Construct using com.google.cloud.functions.v1.SecretVolume.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getVersionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + mountPath_ = ""; + + projectId_ = ""; + + secret_ = ""; + + if (versionsBuilder_ == null) { + versions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + versionsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.functions.v1.FunctionsProto + .internal_static_google_cloud_functions_v1_SecretVolume_descriptor; + } + + @java.lang.Override + public com.google.cloud.functions.v1.SecretVolume getDefaultInstanceForType() { + return com.google.cloud.functions.v1.SecretVolume.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.functions.v1.SecretVolume build() { + com.google.cloud.functions.v1.SecretVolume result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.functions.v1.SecretVolume buildPartial() { + com.google.cloud.functions.v1.SecretVolume result = + new com.google.cloud.functions.v1.SecretVolume(this); + int from_bitField0_ = bitField0_; + result.mountPath_ = mountPath_; + result.projectId_ = projectId_; + result.secret_ = secret_; + if (versionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + versions_ = java.util.Collections.unmodifiableList(versions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.versions_ = versions_; + } else { + result.versions_ = versionsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.functions.v1.SecretVolume) { + return mergeFrom((com.google.cloud.functions.v1.SecretVolume) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.functions.v1.SecretVolume other) { + if (other == com.google.cloud.functions.v1.SecretVolume.getDefaultInstance()) return this; + if (!other.getMountPath().isEmpty()) { + mountPath_ = other.mountPath_; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + onChanged(); + } + if (!other.getSecret().isEmpty()) { + secret_ = other.secret_; + onChanged(); + } + if (versionsBuilder_ == null) { + if (!other.versions_.isEmpty()) { + if (versions_.isEmpty()) { + versions_ = other.versions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureVersionsIsMutable(); + versions_.addAll(other.versions_); + } + onChanged(); + } + } else { + if (!other.versions_.isEmpty()) { + if (versionsBuilder_.isEmpty()) { + versionsBuilder_.dispose(); + versionsBuilder_ = null; + versions_ = other.versions_; + bitField0_ = (bitField0_ & ~0x00000001); + versionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVersionsFieldBuilder() + : null; + } else { + versionsBuilder_.addAllMessages(other.versions_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.functions.v1.SecretVolume parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.functions.v1.SecretVolume) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object mountPath_ = ""; + /** + * + * + *
+     * The path within the container to mount the secret volume. For example,
+     * setting the mount_path as `/etc/secrets` would mount the secret value files
+     * under the `/etc/secrets` directory. This directory will also be completely
+     * shadowed and unavailable to mount any other secrets.
+     * Recommended mount paths: /etc/secrets
+     * Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log
+     * 
+ * + * string mount_path = 1; + * + * @return The mountPath. + */ + public java.lang.String getMountPath() { + java.lang.Object ref = mountPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mountPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The path within the container to mount the secret volume. For example,
+     * setting the mount_path as `/etc/secrets` would mount the secret value files
+     * under the `/etc/secrets` directory. This directory will also be completely
+     * shadowed and unavailable to mount any other secrets.
+     * Recommended mount paths: /etc/secrets
+     * Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log
+     * 
+ * + * string mount_path = 1; + * + * @return The bytes for mountPath. + */ + public com.google.protobuf.ByteString getMountPathBytes() { + java.lang.Object ref = mountPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mountPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The path within the container to mount the secret volume. For example,
+     * setting the mount_path as `/etc/secrets` would mount the secret value files
+     * under the `/etc/secrets` directory. This directory will also be completely
+     * shadowed and unavailable to mount any other secrets.
+     * Recommended mount paths: /etc/secrets
+     * Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log
+     * 
+ * + * string mount_path = 1; + * + * @param value The mountPath to set. + * @return This builder for chaining. + */ + public Builder setMountPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mountPath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The path within the container to mount the secret volume. For example,
+     * setting the mount_path as `/etc/secrets` would mount the secret value files
+     * under the `/etc/secrets` directory. This directory will also be completely
+     * shadowed and unavailable to mount any other secrets.
+     * Recommended mount paths: /etc/secrets
+     * Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log
+     * 
+ * + * string mount_path = 1; + * + * @return This builder for chaining. + */ + public Builder clearMountPath() { + + mountPath_ = getDefaultInstance().getMountPath(); + onChanged(); + return this; + } + /** + * + * + *
+     * The path within the container to mount the secret volume. For example,
+     * setting the mount_path as `/etc/secrets` would mount the secret value files
+     * under the `/etc/secrets` directory. This directory will also be completely
+     * shadowed and unavailable to mount any other secrets.
+     * Recommended mount paths: /etc/secrets
+     * Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log
+     * 
+ * + * string mount_path = 1; + * + * @param value The bytes for mountPath to set. + * @return This builder for chaining. + */ + public Builder setMountPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mountPath_ = value; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+     * Project identifier (preferrably project number but can also be the project
+     * ID) of the project that contains the secret. If not set, it will be
+     * populated with the function's project assuming that the secret exists in
+     * the same project as of the function.
+     * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Project identifier (preferrably project number but can also be the project
+     * ID) of the project that contains the secret. If not set, it will be
+     * populated with the function's project assuming that the secret exists in
+     * the same project as of the function.
+     * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Project identifier (preferrably project number but can also be the project
+     * ID) of the project that contains the secret. If not set, it will be
+     * populated with the function's project assuming that the secret exists in
+     * the same project as of the function.
+     * 
+ * + * string project_id = 2; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + projectId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Project identifier (preferrably project number but can also be the project
+     * ID) of the project that contains the secret. If not set, it will be
+     * populated with the function's project assuming that the secret exists in
+     * the same project as of the function.
+     * 
+ * + * string project_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + + projectId_ = getDefaultInstance().getProjectId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Project identifier (preferrably project number but can also be the project
+     * ID) of the project that contains the secret. If not set, it will be
+     * populated with the function's project assuming that the secret exists in
+     * the same project as of the function.
+     * 
+ * + * string project_id = 2; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + projectId_ = value; + onChanged(); + return this; + } + + private java.lang.Object secret_ = ""; + /** + * + * + *
+     * Name of the secret in secret manager (not the full resource name).
+     * 
+ * + * string secret = 3; + * + * @return The secret. + */ + public java.lang.String getSecret() { + java.lang.Object ref = secret_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secret_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the secret in secret manager (not the full resource name).
+     * 
+ * + * string secret = 3; + * + * @return The bytes for secret. + */ + public com.google.protobuf.ByteString getSecretBytes() { + java.lang.Object ref = secret_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secret_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the secret in secret manager (not the full resource name).
+     * 
+ * + * string secret = 3; + * + * @param value The secret to set. + * @return This builder for chaining. + */ + public Builder setSecret(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + secret_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the secret in secret manager (not the full resource name).
+     * 
+ * + * string secret = 3; + * + * @return This builder for chaining. + */ + public Builder clearSecret() { + + secret_ = getDefaultInstance().getSecret(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the secret in secret manager (not the full resource name).
+     * 
+ * + * string secret = 3; + * + * @param value The bytes for secret to set. + * @return This builder for chaining. + */ + public Builder setSecretBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + secret_ = value; + onChanged(); + return this; + } + + private java.util.List versions_ = + java.util.Collections.emptyList(); + + private void ensureVersionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + versions_ = + new java.util.ArrayList( + versions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.functions.v1.SecretVolume.SecretVersion, + com.google.cloud.functions.v1.SecretVolume.SecretVersion.Builder, + com.google.cloud.functions.v1.SecretVolume.SecretVersionOrBuilder> + versionsBuilder_; + + /** + * + * + *
+     * List of secret versions to mount for this secret. If empty, the `latest`
+     * version of the secret will be made available in a file named after the
+     * secret under the mount point.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + public java.util.List + getVersionsList() { + if (versionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(versions_); + } else { + return versionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of secret versions to mount for this secret. If empty, the `latest`
+     * version of the secret will be made available in a file named after the
+     * secret under the mount point.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + public int getVersionsCount() { + if (versionsBuilder_ == null) { + return versions_.size(); + } else { + return versionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of secret versions to mount for this secret. If empty, the `latest`
+     * version of the secret will be made available in a file named after the
+     * secret under the mount point.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + public com.google.cloud.functions.v1.SecretVolume.SecretVersion getVersions(int index) { + if (versionsBuilder_ == null) { + return versions_.get(index); + } else { + return versionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of secret versions to mount for this secret. If empty, the `latest`
+     * version of the secret will be made available in a file named after the
+     * secret under the mount point.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + public Builder setVersions( + int index, com.google.cloud.functions.v1.SecretVolume.SecretVersion value) { + if (versionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionsIsMutable(); + versions_.set(index, value); + onChanged(); + } else { + versionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of secret versions to mount for this secret. If empty, the `latest`
+     * version of the secret will be made available in a file named after the
+     * secret under the mount point.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + public Builder setVersions( + int index, + com.google.cloud.functions.v1.SecretVolume.SecretVersion.Builder builderForValue) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.set(index, builderForValue.build()); + onChanged(); + } else { + versionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of secret versions to mount for this secret. If empty, the `latest`
+     * version of the secret will be made available in a file named after the
+     * secret under the mount point.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + public Builder addVersions(com.google.cloud.functions.v1.SecretVolume.SecretVersion value) { + if (versionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionsIsMutable(); + versions_.add(value); + onChanged(); + } else { + versionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of secret versions to mount for this secret. If empty, the `latest`
+     * version of the secret will be made available in a file named after the
+     * secret under the mount point.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + public Builder addVersions( + int index, com.google.cloud.functions.v1.SecretVolume.SecretVersion value) { + if (versionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionsIsMutable(); + versions_.add(index, value); + onChanged(); + } else { + versionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of secret versions to mount for this secret. If empty, the `latest`
+     * version of the secret will be made available in a file named after the
+     * secret under the mount point.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + public Builder addVersions( + com.google.cloud.functions.v1.SecretVolume.SecretVersion.Builder builderForValue) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.add(builderForValue.build()); + onChanged(); + } else { + versionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of secret versions to mount for this secret. If empty, the `latest`
+     * version of the secret will be made available in a file named after the
+     * secret under the mount point.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + public Builder addVersions( + int index, + com.google.cloud.functions.v1.SecretVolume.SecretVersion.Builder builderForValue) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.add(index, builderForValue.build()); + onChanged(); + } else { + versionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of secret versions to mount for this secret. If empty, the `latest`
+     * version of the secret will be made available in a file named after the
+     * secret under the mount point.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + public Builder addAllVersions( + java.lang.Iterable + values) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, versions_); + onChanged(); + } else { + versionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of secret versions to mount for this secret. If empty, the `latest`
+     * version of the secret will be made available in a file named after the
+     * secret under the mount point.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + public Builder clearVersions() { + if (versionsBuilder_ == null) { + versions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + versionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of secret versions to mount for this secret. If empty, the `latest`
+     * version of the secret will be made available in a file named after the
+     * secret under the mount point.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + public Builder removeVersions(int index) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.remove(index); + onChanged(); + } else { + versionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of secret versions to mount for this secret. If empty, the `latest`
+     * version of the secret will be made available in a file named after the
+     * secret under the mount point.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + public com.google.cloud.functions.v1.SecretVolume.SecretVersion.Builder getVersionsBuilder( + int index) { + return getVersionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of secret versions to mount for this secret. If empty, the `latest`
+     * version of the secret will be made available in a file named after the
+     * secret under the mount point.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + public com.google.cloud.functions.v1.SecretVolume.SecretVersionOrBuilder getVersionsOrBuilder( + int index) { + if (versionsBuilder_ == null) { + return versions_.get(index); + } else { + return versionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of secret versions to mount for this secret. If empty, the `latest`
+     * version of the secret will be made available in a file named after the
+     * secret under the mount point.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + public java.util.List< + ? extends com.google.cloud.functions.v1.SecretVolume.SecretVersionOrBuilder> + getVersionsOrBuilderList() { + if (versionsBuilder_ != null) { + return versionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(versions_); + } + } + /** + * + * + *
+     * List of secret versions to mount for this secret. If empty, the `latest`
+     * version of the secret will be made available in a file named after the
+     * secret under the mount point.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + public com.google.cloud.functions.v1.SecretVolume.SecretVersion.Builder addVersionsBuilder() { + return getVersionsFieldBuilder() + .addBuilder( + com.google.cloud.functions.v1.SecretVolume.SecretVersion.getDefaultInstance()); + } + /** + * + * + *
+     * List of secret versions to mount for this secret. If empty, the `latest`
+     * version of the secret will be made available in a file named after the
+     * secret under the mount point.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + public com.google.cloud.functions.v1.SecretVolume.SecretVersion.Builder addVersionsBuilder( + int index) { + return getVersionsFieldBuilder() + .addBuilder( + index, com.google.cloud.functions.v1.SecretVolume.SecretVersion.getDefaultInstance()); + } + /** + * + * + *
+     * List of secret versions to mount for this secret. If empty, the `latest`
+     * version of the secret will be made available in a file named after the
+     * secret under the mount point.
+     * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + public java.util.List + getVersionsBuilderList() { + return getVersionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.functions.v1.SecretVolume.SecretVersion, + com.google.cloud.functions.v1.SecretVolume.SecretVersion.Builder, + com.google.cloud.functions.v1.SecretVolume.SecretVersionOrBuilder> + getVersionsFieldBuilder() { + if (versionsBuilder_ == null) { + versionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.functions.v1.SecretVolume.SecretVersion, + com.google.cloud.functions.v1.SecretVolume.SecretVersion.Builder, + com.google.cloud.functions.v1.SecretVolume.SecretVersionOrBuilder>( + versions_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + versions_ = null; + } + return versionsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.functions.v1.SecretVolume) + } + + // @@protoc_insertion_point(class_scope:google.cloud.functions.v1.SecretVolume) + private static final com.google.cloud.functions.v1.SecretVolume DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.functions.v1.SecretVolume(); + } + + public static com.google.cloud.functions.v1.SecretVolume getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SecretVolume parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SecretVolume(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.functions.v1.SecretVolume getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretVolumeOrBuilder.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretVolumeOrBuilder.java new file mode 100644 index 00000000..1b656146 --- /dev/null +++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/SecretVolumeOrBuilder.java @@ -0,0 +1,178 @@ +/* + * Copyright 2020 Google LLC + * + * 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/functions/v1/functions.proto + +package com.google.cloud.functions.v1; + +public interface SecretVolumeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.functions.v1.SecretVolume) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The path within the container to mount the secret volume. For example,
+   * setting the mount_path as `/etc/secrets` would mount the secret value files
+   * under the `/etc/secrets` directory. This directory will also be completely
+   * shadowed and unavailable to mount any other secrets.
+   * Recommended mount paths: /etc/secrets
+   * Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log
+   * 
+ * + * string mount_path = 1; + * + * @return The mountPath. + */ + java.lang.String getMountPath(); + /** + * + * + *
+   * The path within the container to mount the secret volume. For example,
+   * setting the mount_path as `/etc/secrets` would mount the secret value files
+   * under the `/etc/secrets` directory. This directory will also be completely
+   * shadowed and unavailable to mount any other secrets.
+   * Recommended mount paths: /etc/secrets
+   * Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log
+   * 
+ * + * string mount_path = 1; + * + * @return The bytes for mountPath. + */ + com.google.protobuf.ByteString getMountPathBytes(); + + /** + * + * + *
+   * Project identifier (preferrably project number but can also be the project
+   * ID) of the project that contains the secret. If not set, it will be
+   * populated with the function's project assuming that the secret exists in
+   * the same project as of the function.
+   * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+   * Project identifier (preferrably project number but can also be the project
+   * ID) of the project that contains the secret. If not set, it will be
+   * populated with the function's project assuming that the secret exists in
+   * the same project as of the function.
+   * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Name of the secret in secret manager (not the full resource name).
+   * 
+ * + * string secret = 3; + * + * @return The secret. + */ + java.lang.String getSecret(); + /** + * + * + *
+   * Name of the secret in secret manager (not the full resource name).
+   * 
+ * + * string secret = 3; + * + * @return The bytes for secret. + */ + com.google.protobuf.ByteString getSecretBytes(); + + /** + * + * + *
+   * List of secret versions to mount for this secret. If empty, the `latest`
+   * version of the secret will be made available in a file named after the
+   * secret under the mount point.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + java.util.List getVersionsList(); + /** + * + * + *
+   * List of secret versions to mount for this secret. If empty, the `latest`
+   * version of the secret will be made available in a file named after the
+   * secret under the mount point.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + com.google.cloud.functions.v1.SecretVolume.SecretVersion getVersions(int index); + /** + * + * + *
+   * List of secret versions to mount for this secret. If empty, the `latest`
+   * version of the secret will be made available in a file named after the
+   * secret under the mount point.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + int getVersionsCount(); + /** + * + * + *
+   * List of secret versions to mount for this secret. If empty, the `latest`
+   * version of the secret will be made available in a file named after the
+   * secret under the mount point.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + java.util.List + getVersionsOrBuilderList(); + /** + * + * + *
+   * List of secret versions to mount for this secret. If empty, the `latest`
+   * version of the secret will be made available in a file named after the
+   * secret under the mount point.
+   * 
+ * + * repeated .google.cloud.functions.v1.SecretVolume.SecretVersion versions = 4; + */ + com.google.cloud.functions.v1.SecretVolume.SecretVersionOrBuilder getVersionsOrBuilder(int index); +} diff --git a/proto-google-cloud-functions-v1/src/main/proto/google/cloud/functions/v1/functions.proto b/proto-google-cloud-functions-v1/src/main/proto/google/cloud/functions/v1/functions.proto index 049378ab..29693dda 100644 --- a/proto-google-cloud-functions-v1/src/main/proto/google/cloud/functions/v1/functions.proto +++ b/proto-google-cloud-functions-v1/src/main/proto/google/cloud/functions/v1/functions.proto @@ -32,6 +32,14 @@ option java_multiple_files = true; option java_outer_classname = "FunctionsProto"; option java_package = "com.google.cloud.functions.v1"; option objc_class_prefix = "GCF"; +option (google.api.resource_definition) = { + type: "artifactregistry.googleapis.com/Repository" + pattern: "projects/{project}/locations/{location}/repositories/{repository}" +}; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKey" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}" +}; // A service that application uses to manipulate triggers and functions. service CloudFunctionsService { @@ -183,6 +191,7 @@ service CloudFunctionsService { // Describes a Cloud Function that contains user computation executed in // response to an event. It encapsulate function and triggers configurations. +// Next tag: 36 message CloudFunction { option (google.api.resource) = { type: "cloudfunctions.googleapis.com/CloudFunction" @@ -304,6 +313,9 @@ message CloudFunction { // Environment variables that shall be available during function execution. map environment_variables = 17; + // Build environment variables that shall be available during build time. + map build_environment_variables = 28; + // The VPC Network that this cloud function can connect to. It can be // either the fully-qualified URI, or the short name of the network resource. // If the short network name is used, the network must belong to the same @@ -322,8 +334,22 @@ message CloudFunction { // 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. int32 max_instances = 20; + // A lower bound for the number function instances that may coexist at a + // given time. + int32 min_instances = 32; + // 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 @@ -344,9 +370,86 @@ message CloudFunction { // it. IngressSettings ingress_settings = 24; + // 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 Cloud KMS crypto key + // encrypter/decrypter roles on the key. + // + // 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. + string kms_key_name = 25 [(google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + }]; + + // 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. + string build_worker_pool = 26; + // Output only. The Cloud Build ID of the latest successful deployment of the // function. string build_id = 27 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Cloud Build Name of the function deployment. + // `projects//locations//builds/`. + string build_name = 33 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Secret environment variables configuration. + repeated SecretEnvVar secret_environment_variables = 29; + + // Secret volumes configuration. + repeated SecretVolume secret_volumes = 30; + + // Input only. An identifier for Firebase function sources. Disclaimer: This field is only + // supported for Firebase function deployments. + string source_token = 31 [(google.api.field_behavior) = INPUT_ONLY]; + + // User managed repository created in Artifact Registry optionally with a + // customer managed encryption key. If specified, deployments will use + // Artifact Registry. If unspecified and the deployment is eligible to use + // Artifact Registry, GCF will create and use a repository named + // 'gcf-artifacts' for every deployed region. This is the repository to which + // the function docker image will be pushed after it is built by Cloud Build. + // + // 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 = 34 [(google.api.resource_reference) = { + type: "artifactregistry.googleapis.com/Repository" + }]; } // Describes SourceRepository, used to represent parameters related to @@ -472,6 +575,73 @@ message FailurePolicy { } } +// Configuration for a secret environment variable. It has the information +// necessary to fetch the secret value from secret manager and expose it as an +// environment variable. Secret value is not a part of the configuration. Secret +// values are only fetched when a new clone starts. +message SecretEnvVar { + // Name of the environment variable. + string key = 1; + + // Project identifier (preferrably project number but can also be the project + // ID) of the project that contains the secret. If not set, it will be + // populated with the function's project assuming that the secret exists in + // the same project as of the function. + string project_id = 2; + + // Name of the secret in secret manager (not the full resource name). + string secret = 3; + + // Version of the secret (version number or the string 'latest'). It is + // recommended to use a numeric version for secret environment variables as + // any updates to the secret value is not reflected until new clones start. + string version = 4; +} + +// Configuration for a secret volume. It has the information necessary to fetch +// the secret value from secret manager and make it available as files mounted +// at the requested paths within the application container. Secret value is not +// a part of the configuration. Every filesystem read operation performs a +// lookup in secret manager to retrieve the secret value. +message SecretVolume { + // Configuration for a single version. + message SecretVersion { + // Version of the secret (version number or the string 'latest'). It is + // preferrable to use `latest` version with secret volumes as secret value + // changes are reflected immediately. + string version = 1; + + // Relative path of the file under the mount path where the secret value for + // this version will be fetched and made available. For example, setting the + // mount_path as '/etc/secrets' and path as `/secret_foo` would mount the + // secret value file at `/etc/secrets/secret_foo`. + string path = 2; + } + + // The path within the container to mount the secret volume. For example, + // setting the mount_path as `/etc/secrets` would mount the secret value files + // under the `/etc/secrets` directory. This directory will also be completely + // shadowed and unavailable to mount any other secrets. + // + // Recommended mount paths: /etc/secrets + // Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log + string mount_path = 1; + + // Project identifier (preferrably project number but can also be the project + // ID) of the project that contains the secret. If not set, it will be + // populated with the function's project assuming that the secret exists in + // the same project as of the function. + string project_id = 2; + + // Name of the secret in secret manager (not the full resource name). + string secret = 3; + + // List of secret versions to mount for this secret. If empty, the `latest` + // version of the secret will be made available in a file named after the + // secret under the mount point. + repeated SecretVersion versions = 4; +} + // Request for the `CreateFunction` method. message CreateFunctionRequest { // Required. The project and location in which the function should be created, specified @@ -490,25 +660,12 @@ message CreateFunctionRequest { // Request for the `UpdateFunction` method. message UpdateFunctionRequest { // Required. New version of the function. - CloudFunction function = 1 [ - (google.api.field_behavior) = REQUIRED - ]; + CloudFunction function = 1 [(google.api.field_behavior) = REQUIRED]; // Required list of fields to be updated in this request. google.protobuf.FieldMask update_mask = 2; } -// Request for the `GetFunction` method. -message GetFunctionRequest { - // Required. The name of the function which details should be obtained. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudfunctions.googleapis.com/CloudFunction" - } - ]; -} - // Describes the current stage of a deployment. enum CloudFunctionStatus { // Not specified. Invalid state. @@ -531,6 +688,17 @@ enum CloudFunctionStatus { UNKNOWN = 5; } +// Request for the `GetFunction` method. +message GetFunctionRequest { + // Required. The name of the function which details should be obtained. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudfunctions.googleapis.com/CloudFunction" + } + ]; +} + // Request for the `ListFunctions` method. message ListFunctionsRequest { // The project and location from which the function should be listed, diff --git a/proto-google-cloud-functions-v1/src/main/proto/google/cloud/functions/v1/operations.proto b/proto-google-cloud-functions-v1/src/main/proto/google/cloud/functions/v1/operations.proto index 961cd0b5..183957cc 100644 --- a/proto-google-cloud-functions-v1/src/main/proto/google/cloud/functions/v1/operations.proto +++ b/proto-google-cloud-functions-v1/src/main/proto/google/cloud/functions/v1/operations.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -62,4 +62,13 @@ message OperationMetadataV1 { // The Cloud Build ID of the function created or updated by an API call. // This field is only populated for Create and Update operations. string build_id = 6; + + // An identifier for Firebase function sources. Disclaimer: This field is only + // supported for Firebase function deployments. + string source_token = 7; + + // The Cloud Build Name of the function deployment. + // This field is only populated for Create and Update operations. + // `projects//locations//builds/`. + string build_name = 8; } From d46e249b114640718ab313e865010abd6d543eaa Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 6 Nov 2021 00:38:12 +0000 Subject: [PATCH 08/18] Update ci.yaml (#1275) (#329) --- .github/.OwlBot.lock.yaml | 2 +- .github/workflows/ci.yaml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 5a79fcd5..994dd04b 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:ed012741acaae5d03e011244585a1f0625a596d31568967d77772aa5a0a51d5e + digest: sha256:fecf6bd85f19eb046d913982ea36f6d434f9a49ab0545d25e31186aa64367c0c diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d95a11a2..93b337c6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,6 +8,7 @@ jobs: units: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: java: [8, 11, 17] steps: @@ -68,4 +69,4 @@ jobs: - run: java -version - run: .kokoro/build.sh env: - JOB_TYPE: clirr \ No newline at end of file + JOB_TYPE: clirr From b6c02e78de48f8d29d10ef187b0a5b70178d6696 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 8 Nov 2021 23:16:11 +0000 Subject: [PATCH 09/18] chore: cleanup cloud RAD generation (#1269) (#330) --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/release/publish_javadoc11.sh | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 994dd04b..325daaa4 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:fecf6bd85f19eb046d913982ea36f6d434f9a49ab0545d25e31186aa64367c0c + digest: sha256:204b7af96e6d481f19b0ff377aa379d46bc56dd06e1cc7c523f361dd9cbfeeaa diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh index fad26960..6b6f8b0d 100755 --- a/.kokoro/release/publish_javadoc11.sh +++ b/.kokoro/release/publish_javadoc11.sh @@ -36,13 +36,9 @@ mvn clean install -B -q -DskipTests=true export NAME=google-cloud-functions export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) -# V3 generates docfx yml from javadoc -# generate yml -mvn clean site -B -q -P docFX - -# copy README to docfx-yml dir and rename index.md -cp README.md target/docfx-yml/index.md -# copy CHANGELOG to docfx-yml dir and rename history.md +# cloud RAD generation +mvn clean javadoc:aggregate -B -q -P docFX +# include CHANGELOG cp CHANGELOG.md target/docfx-yml/history.md pushd target/docfx-yml From f9268c765903dc359372d3b5c3fd7624566c776e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 9 Nov 2021 14:48:31 +0000 Subject: [PATCH 10/18] chore: update jre to 11 for linter (#1278) (#332) --- .github/.OwlBot.lock.yaml | 2 +- .github/workflows/ci.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 325daaa4..886d0949 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:204b7af96e6d481f19b0ff377aa379d46bc56dd06e1cc7c523f361dd9cbfeeaa + digest: sha256:14ecf64ec36f67c7bf04e3dc0f68eafcc01df3955121c38862b695e2ae7515d8 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 93b337c6..05de1f60 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -53,7 +53,7 @@ jobs: - uses: actions/setup-java@v2 with: distribution: zulu - java-version: 8 + java-version: 11 - run: java -version - run: .kokoro/build.sh env: From ecd41f1156062e41495675cb3b940c11b32d050a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 10 Nov 2021 21:06:12 +0100 Subject: [PATCH 11/18] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.2.1 (#331) --- google-cloud-functions-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-functions-bom/pom.xml b/google-cloud-functions-bom/pom.xml index b3f2a4a9..3f712604 100644 --- a/google-cloud-functions-bom/pom.xml +++ b/google-cloud-functions-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.2.0 + 1.2.1 Google Cloud Functions BOM diff --git a/pom.xml b/pom.xml index 06624aee..017111b6 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.2.0 + 1.2.1 From f55765bcbebde3c595d111176bc51e4c6d5a7f6c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 10 Nov 2021 21:14:27 +0000 Subject: [PATCH 12/18] chore: update Java and Python dependencies (#333) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 408420890 Source-Link: https://github.com/googleapis/googleapis/commit/2921f9fb3bfbd16f6b2da0104373e2b47a80a65e Source-Link: https://github.com/googleapis/googleapis-gen/commit/6598ca8cbbf5226733a099c4506518a5af6ff74c Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjU5OGNhOGNiYmY1MjI2NzMzYTA5OWM0NTA2NTE4YTVhZjZmZjc0YyJ9 --- .../com/google/cloud/functions/v1/CloudFunctionsServiceGrpc.java | 1 + 1 file changed, 1 insertion(+) diff --git a/grpc-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CloudFunctionsServiceGrpc.java b/grpc-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CloudFunctionsServiceGrpc.java index 5cbf85c4..17c064db 100644 --- a/grpc-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CloudFunctionsServiceGrpc.java +++ b/grpc-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/CloudFunctionsServiceGrpc.java @@ -27,6 +27,7 @@ @javax.annotation.Generated( value = "by gRPC proto compiler", comments = "Source: google/cloud/functions/v1/functions.proto") +@io.grpc.stub.annotations.GrpcGenerated public final class CloudFunctionsServiceGrpc { private CloudFunctionsServiceGrpc() {} From 4b60291e0f7b0873d736eb24d2da0bbcc0361c92 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 11 Nov 2021 21:24:15 +0000 Subject: [PATCH 13/18] chore: update minimum java version to java 8 (#1281) (#334) --- .github/.OwlBot.lock.yaml | 2 +- README.md | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 886d0949..5d788be0 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:14ecf64ec36f67c7bf04e3dc0f68eafcc01df3955121c38862b695e2ae7515d8 + digest: sha256:a744afda1956beb7bd6dc8d0b740a7839bbe402e34e2f4ef24589074db53ceb0 diff --git a/README.md b/README.md index 2eebb6fa..d58f1327 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ Cloud Functions uses gRPC for the transport layer. ## Supported Java Versions -Java 7 or above is required for using this client. +Java 8 or above is required for using this client. Google's Java client libraries, [Google Cloud Client Libraries][cloudlibs] @@ -151,7 +151,6 @@ Apache 2.0 - See [LICENSE][license] for more information. Java Version | Status ------------ | ------ -Java 7 | [![Kokoro CI][kokoro-badge-image-1]][kokoro-badge-link-1] Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] From 415a191fdc043f0fccd5d2035b7e9895c24e9e50 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 15 Nov 2021 17:16:31 +0100 Subject: [PATCH 14/18] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.0 (#335) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.4.0` -> `2.5.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.0/compatibility-slim/2.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.0/confidence-slim/2.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v2.5.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/master/CHANGELOG.md#​250-httpswwwgithubcomgoogleapisjava-shared-dependenciescompare240v250-2021-11-12) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.4.0...v2.5.0) ##### Features - next release from main branch is 2.5.0 ([#​510](https://www.togithub.com/googleapis/java-shared-dependencies/issues/510)) ([ca9eb8a](https://www.github.com/googleapis/java-shared-dependencies/commit/ca9eb8a40ae81d69de0d82d9499ef21b0136ae49)) ##### Bug Fixes - dependencies.sh to work with Java 17 ([#​516](https://www.togithub.com/googleapis/java-shared-dependencies/issues/516)) ([8422c1d](https://www.github.com/googleapis/java-shared-dependencies/commit/8422c1d7e9ef479f348e63c530789050b5235426)) ##### Dependencies - update dependency com.google.api:api-common to v2.1.0 ([#​508](https://www.togithub.com/googleapis/java-shared-dependencies/issues/508)) ([ae32d16](https://www.github.com/googleapis/java-shared-dependencies/commit/ae32d1689c78fc1469206c8c0df0ebaca59edd2c)) - update dependency com.google.auth:google-auth-library-bom to v1.2.2 ([#​506](https://www.togithub.com/googleapis/java-shared-dependencies/issues/506)) ([b9a8209](https://www.github.com/googleapis/java-shared-dependencies/commit/b9a82098655f29e858bd0c7a9b1049a379e5062a)) - update dependency com.google.auth:google-auth-library-bom to v1.3.0 ([#​524](https://www.togithub.com/googleapis/java-shared-dependencies/issues/524)) ([fc07879](https://www.github.com/googleapis/java-shared-dependencies/commit/fc07879fa6531e39b21977fe77abc19354a1fd33)) - update dependency com.google.code.gson:gson to v2.8.9 ([#​509](https://www.togithub.com/googleapis/java-shared-dependencies/issues/509)) ([bece99b](https://www.github.com/googleapis/java-shared-dependencies/commit/bece99bb3e0365e60e7376ba18d046ab6436a235)) - update dependency com.google.errorprone:error_prone_annotations to v2.10.0 ([#​512](https://www.togithub.com/googleapis/java-shared-dependencies/issues/512)) ([c281f13](https://www.github.com/googleapis/java-shared-dependencies/commit/c281f137525e2111e97349657be578ed1fc832f2)) - update dependency com.google.protobuf:protobuf-bom to v3.19.1 ([#​505](https://www.togithub.com/googleapis/java-shared-dependencies/issues/505)) ([94cde96](https://www.github.com/googleapis/java-shared-dependencies/commit/94cde96069900f9f8c2ff9a522671d03b26828bd)) - update dependency io.grpc:grpc-bom to v1.42.1 ([#​513](https://www.togithub.com/googleapis/java-shared-dependencies/issues/513)) ([0d2b774](https://www.github.com/googleapis/java-shared-dependencies/commit/0d2b774287a132821cc6fe2789140086bc48d525)) - update dependency org.checkerframework:checker-qual to v3.19.0 ([#​501](https://www.togithub.com/googleapis/java-shared-dependencies/issues/501)) ([2b3e0b5](https://www.github.com/googleapis/java-shared-dependencies/commit/2b3e0b5ddc3a645b20a837f3123394f1ca114f08)) - update dependency org.threeten:threetenbp to v1.5.2 ([#​514](https://www.togithub.com/googleapis/java-shared-dependencies/issues/514)) ([4885f40](https://www.github.com/googleapis/java-shared-dependencies/commit/4885f402e2c70435cd10d4f1b893df9873808c56)) - update gax.version to v2.7.0 ([#​515](https://www.togithub.com/googleapis/java-shared-dependencies/issues/515)) ([567e728](https://www.github.com/googleapis/java-shared-dependencies/commit/567e728b0e59233a04e2d04183e6a0c36cca2437)) - update google.core.version to v2.3.0 ([#​530](https://www.togithub.com/googleapis/java-shared-dependencies/issues/530)) ([78e87e9](https://www.github.com/googleapis/java-shared-dependencies/commit/78e87e96befab34dc4a494e752aeb473cd14a156)) - update iam.version to v1.1.7 ([#​504](https://www.togithub.com/googleapis/java-shared-dependencies/issues/504)) ([63dd583](https://www.github.com/googleapis/java-shared-dependencies/commit/63dd583c80f35b01a66fd1908d41467468c66436))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-functions). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 017111b6..932a4539 100644 --- a/pom.xml +++ b/pom.xml @@ -77,7 +77,7 @@ com.google.cloud google-cloud-shared-dependencies - 2.4.0 + 2.5.0 pom import From 16a7c9531a2267084e2c1079fceb95e85cba0d51 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 17 Nov 2021 18:42:40 +0100 Subject: [PATCH 15/18] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.2.2 (#336) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.2.1` -> `1.2.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.2/compatibility-slim/1.2.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.2/confidence-slim/1.2.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.2.2`](https://togithub.com/googleapis/java-shared-config/blob/master/CHANGELOG.md#​122-httpswwwgithubcomgoogleapisjava-shared-configcomparev121v122-2021-11-16) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.2.1...v1.2.2)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-functions). --- google-cloud-functions-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-functions-bom/pom.xml b/google-cloud-functions-bom/pom.xml index 3f712604..655870ea 100644 --- a/google-cloud-functions-bom/pom.xml +++ b/google-cloud-functions-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.2.1 + 1.2.2 Google Cloud Functions BOM diff --git a/pom.xml b/pom.xml index 932a4539..40885f43 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.2.1 + 1.2.2 From 58dcd50ceddb2b795abdb4ff547718aa95210446 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 22 Nov 2021 18:26:31 +0000 Subject: [PATCH 16/18] chore: remove enable-samples profile (#1284) (#337) --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/build.sh | 1 - CONTRIBUTING.md | 61 +++++---------------------------------- 3 files changed, 8 insertions(+), 56 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 5d788be0..88d9b926 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:a744afda1956beb7bd6dc8d0b740a7839bbe402e34e2f4ef24589074db53ceb0 + digest: sha256:5b8c790f57cca57e6b37ba25f79291265c218cea3e6ba9714b001910ab3f1419 diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 0f6e111b..daf7382e 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -91,7 +91,6 @@ samples) pushd ${SAMPLES_DIR} mvn -B \ - -Penable-samples \ -ntp \ -DtrimStackTrace=false \ -Dclirr.skip=true \ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f2dbdee0..b65dd279 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,12 +53,12 @@ mvn -Penable-integration-tests clean verify ## Code Samples -Code Samples must be bundled in separate Maven modules, and guarded by a -Maven profile with the name `enable-samples`. +All code samples must be in compliance with the [java sample formatting guide][3]. +Code Samples must be bundled in separate Maven modules. The samples must be separate from the primary project for a few reasons: -1. Primary projects have a minimum Java version of Java 7 whereas samples have - a minimum Java version of Java 8. Due to this we need the ability to +1. Primary projects have a minimum Java version of Java 8 whereas samples can have + Java version of Java 11. Due to this we need the ability to selectively exclude samples from a build run. 2. Many code samples depend on external GCP services and need credentials to access the service. @@ -68,39 +68,16 @@ The samples must be separate from the primary project for a few reasons: ### Building ```bash -mvn -Penable-samples clean verify +mvn clean verify ``` Some samples require access to GCP services and require a service account: ```bash export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json -mvn -Penable-samples clean verify +mvn clean verify ``` -### Profile Config - -1. To add samples in a profile to your Maven project, add the following to your -`pom.xml` - - ```xml - - [...] - - - enable-samples - - sample - - - - [...] - - ``` - -2. [Activate](#profile-activation) the profile. -3. Define your samples in a normal Maven project in the `samples/` directory. - ### Code Formatting Code in this repo is formatted with @@ -110,30 +87,6 @@ To run formatting on your project, you can run: mvn com.coveo:fmt-maven-plugin:format ``` -### Profile Activation - -To include code samples when building and testing the project, enable the -`enable-samples` Maven profile. - -#### Command line - -To activate the Maven profile on the command line add `-Penable-samples` to your -Maven command. - -#### Maven `settings.xml` - -To activate the Maven profile in your `~/.m2/settings.xml` add an entry of -`enable-samples` following the instructions in [Active Profiles][2]. - -This method has the benefit of applying to all projects you build (and is -respected by IntelliJ IDEA) and is recommended if you are going to be -contributing samples to several projects. - -#### IntelliJ IDEA - -To activate the Maven Profile inside IntelliJ IDEA, follow the instructions in -[Activate Maven profiles][3] to activate `enable-samples`. - [1]: https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account [2]: https://maven.apache.org/settings.html#Active_Profiles -[3]: https://www.jetbrains.com/help/idea/work-with-maven-profiles.html#activate_maven_profiles +[3]: https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md \ No newline at end of file From f60645f6d68fe401fbc7d90d74baf714458a2445 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 3 Dec 2021 17:08:20 +0100 Subject: [PATCH 17/18] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.1 (#340) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.5.0` -> `2.5.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.1/compatibility-slim/2.5.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.1/confidence-slim/2.5.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v2.5.1`](https://togithub.com/googleapis/java-shared-dependencies/blob/master/CHANGELOG.md#​251-httpswwwgithubcomgoogleapisjava-shared-dependenciescompare250v251-2021-12-03) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.5.0...v2.5.1)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-functions). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 40885f43..b29e0191 100644 --- a/pom.xml +++ b/pom.xml @@ -77,7 +77,7 @@ com.google.cloud google-cloud-shared-dependencies - 2.5.0 + 2.5.1 pom import From 90829df8a4a137e6657c3b1206f757e43c32f4b2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 3 Dec 2021 22:26:12 +0000 Subject: [PATCH 18/18] chore: release 2.3.0 (#326) :robot: I have created a release \*beep\* \*boop\* --- ## [2.3.0](https://www.github.com/googleapis/java-functions/compare/v2.2.1...v2.3.0) (2021-12-03) ### Features * Secret Manager integration fields 'secret_environment_variables' and 'secret_volumes' added feat: CMEK integration fields 'kms_key_name' and 'docker_repository' added ([#328](https://www.github.com/googleapis/java-functions/issues/328)) ([ea30e8c](https://www.github.com/googleapis/java-functions/commit/ea30e8c7625145df60773dbae78923159e9997b9)) ### Bug Fixes * **java:** java 17 dependency arguments ([#1266](https://www.github.com/googleapis/java-functions/issues/1266)) ([#325](https://www.github.com/googleapis/java-functions/issues/325)) ([e2d5c7c](https://www.github.com/googleapis/java-functions/commit/e2d5c7c808a48437565b6c5532bc9ba8eb78c34c)) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.0 ([#335](https://www.github.com/googleapis/java-functions/issues/335)) ([415a191](https://www.github.com/googleapis/java-functions/commit/415a191fdc043f0fccd5d2035b7e9895c24e9e50)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.1 ([#340](https://www.github.com/googleapis/java-functions/issues/340)) ([f60645f](https://www.github.com/googleapis/java-functions/commit/f60645f6d68fe401fbc7d90d74baf714458a2445)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 18 ++++++++++++++++++ google-cloud-functions-bom/pom.xml | 8 ++++---- google-cloud-functions/pom.xml | 4 ++-- grpc-google-cloud-functions-v1/pom.xml | 4 ++-- pom.xml | 8 ++++---- proto-google-cloud-functions-v1/pom.xml | 4 ++-- versions.txt | 6 +++--- 7 files changed, 35 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83c7c5d5..45d6c550 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## [2.3.0](https://www.github.com/googleapis/java-functions/compare/v2.2.1...v2.3.0) (2021-12-03) + + +### Features + +* Secret Manager integration fields 'secret_environment_variables' and 'secret_volumes' added feat: CMEK integration fields 'kms_key_name' and 'docker_repository' added ([#328](https://www.github.com/googleapis/java-functions/issues/328)) ([ea30e8c](https://www.github.com/googleapis/java-functions/commit/ea30e8c7625145df60773dbae78923159e9997b9)) + + +### Bug Fixes + +* **java:** java 17 dependency arguments ([#1266](https://www.github.com/googleapis/java-functions/issues/1266)) ([#325](https://www.github.com/googleapis/java-functions/issues/325)) ([e2d5c7c](https://www.github.com/googleapis/java-functions/commit/e2d5c7c808a48437565b6c5532bc9ba8eb78c34c)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.0 ([#335](https://www.github.com/googleapis/java-functions/issues/335)) ([415a191](https://www.github.com/googleapis/java-functions/commit/415a191fdc043f0fccd5d2035b7e9895c24e9e50)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.1 ([#340](https://www.github.com/googleapis/java-functions/issues/340)) ([f60645f](https://www.github.com/googleapis/java-functions/commit/f60645f6d68fe401fbc7d90d74baf714458a2445)) + ### [2.2.1](https://www.github.com/googleapis/java-functions/compare/v2.2.0...v2.2.1) (2021-10-19) diff --git a/google-cloud-functions-bom/pom.xml b/google-cloud-functions-bom/pom.xml index 655870ea..3ccdcd3a 100644 --- a/google-cloud-functions-bom/pom.xml +++ b/google-cloud-functions-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-functions-bom - 2.2.2-SNAPSHOT + 2.3.0 pom com.google.cloud @@ -56,17 +56,17 @@ com.google.cloud google-cloud-functions - 2.2.2-SNAPSHOT + 2.3.0 com.google.api.grpc grpc-google-cloud-functions-v1 - 2.2.2-SNAPSHOT + 2.3.0 com.google.api.grpc proto-google-cloud-functions-v1 - 2.2.2-SNAPSHOT + 2.3.0
diff --git a/google-cloud-functions/pom.xml b/google-cloud-functions/pom.xml index 056d0227..5b7ab529 100644 --- a/google-cloud-functions/pom.xml +++ b/google-cloud-functions/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-functions - 2.2.2-SNAPSHOT + 2.3.0 jar Google Cloud Functions https://github.com/googleapis/java-functions @@ -11,7 +11,7 @@ com.google.cloud google-cloud-functions-parent - 2.2.2-SNAPSHOT + 2.3.0 google-cloud-functions diff --git a/grpc-google-cloud-functions-v1/pom.xml b/grpc-google-cloud-functions-v1/pom.xml index 8784f880..c90b6554 100644 --- a/grpc-google-cloud-functions-v1/pom.xml +++ b/grpc-google-cloud-functions-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-functions-v1 - 2.2.2-SNAPSHOT + 2.3.0 grpc-google-cloud-functions-v1 GRPC library for grpc-google-cloud-functions-v1 com.google.cloud google-cloud-functions-parent - 2.2.2-SNAPSHOT + 2.3.0 diff --git a/pom.xml b/pom.xml index b29e0191..43fc5182 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-functions-parent pom - 2.2.2-SNAPSHOT + 2.3.0 Google Cloud Functions Parent https://github.com/googleapis/java-functions @@ -61,17 +61,17 @@ com.google.cloud google-cloud-functions - 2.2.2-SNAPSHOT + 2.3.0 com.google.api.grpc proto-google-cloud-functions-v1 - 2.2.2-SNAPSHOT + 2.3.0 com.google.api.grpc grpc-google-cloud-functions-v1 - 2.2.2-SNAPSHOT + 2.3.0 diff --git a/proto-google-cloud-functions-v1/pom.xml b/proto-google-cloud-functions-v1/pom.xml index 59149119..918738ba 100644 --- a/proto-google-cloud-functions-v1/pom.xml +++ b/proto-google-cloud-functions-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-functions-v1 - 2.2.2-SNAPSHOT + 2.3.0 proto-google-cloud-functions-v1 PROTO library for proto-google-cloud-functions-v1 com.google.cloud google-cloud-functions-parent - 2.2.2-SNAPSHOT + 2.3.0 diff --git a/versions.txt b/versions.txt index a90d39b6..0948c9f2 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-functions:2.2.1:2.2.2-SNAPSHOT -grpc-google-cloud-functions-v1:2.2.1:2.2.2-SNAPSHOT -proto-google-cloud-functions-v1:2.2.1:2.2.2-SNAPSHOT +google-cloud-functions:2.3.0:2.3.0 +grpc-google-cloud-functions-v1:2.3.0:2.3.0 +proto-google-cloud-functions-v1:2.3.0:2.3.0