() {
+ public SecurityLevel findValueByNumber(int number) {
+ return SecurityLevel.forNumber(number);
+ }
+ };
+
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalStateException(
+ "Can't get the descriptor of an unrecognized enum value.");
+ }
+ return getDescriptor().getValues().get(ordinal());
+ }
+
+ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
+ return getDescriptor();
+ }
+
+ public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
+ return com.google.cloud.functions.v1.HttpsTrigger.getDescriptor().getEnumTypes().get(0);
+ }
+
+ private static final SecurityLevel[] VALUES = values();
+
+ public static SecurityLevel valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
+ }
+ if (desc.getIndex() == -1) {
+ return UNRECOGNIZED;
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ private final int value;
+
+ private SecurityLevel(int value) {
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:google.cloud.functions.v1.HttpsTrigger.SecurityLevel)
+ }
+
public static final int URL_FIELD_NUMBER = 1;
private volatile java.lang.Object url_;
/**
@@ -160,6 +335,44 @@ public com.google.protobuf.ByteString getUrlBytes() {
}
}
+ public static final int SECURITY_LEVEL_FIELD_NUMBER = 2;
+ private int securityLevel_;
+ /**
+ *
+ *
+ *
+ * The security level for the function.
+ *
+ *
+ * .google.cloud.functions.v1.HttpsTrigger.SecurityLevel security_level = 2;
+ *
+ * @return The enum numeric value on the wire for securityLevel.
+ */
+ @java.lang.Override
+ public int getSecurityLevelValue() {
+ return securityLevel_;
+ }
+ /**
+ *
+ *
+ *
+ * The security level for the function.
+ *
+ *
+ * .google.cloud.functions.v1.HttpsTrigger.SecurityLevel security_level = 2;
+ *
+ * @return The securityLevel.
+ */
+ @java.lang.Override
+ public com.google.cloud.functions.v1.HttpsTrigger.SecurityLevel getSecurityLevel() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.functions.v1.HttpsTrigger.SecurityLevel result =
+ com.google.cloud.functions.v1.HttpsTrigger.SecurityLevel.valueOf(securityLevel_);
+ return result == null
+ ? com.google.cloud.functions.v1.HttpsTrigger.SecurityLevel.UNRECOGNIZED
+ : result;
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -177,6 +390,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!getUrlBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_);
}
+ if (securityLevel_
+ != com.google.cloud.functions.v1.HttpsTrigger.SecurityLevel.SECURITY_LEVEL_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(2, securityLevel_);
+ }
unknownFields.writeTo(output);
}
@@ -189,6 +407,11 @@ public int getSerializedSize() {
if (!getUrlBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_);
}
+ if (securityLevel_
+ != com.google.cloud.functions.v1.HttpsTrigger.SecurityLevel.SECURITY_LEVEL_UNSPECIFIED
+ .getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, securityLevel_);
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -206,6 +429,7 @@ public boolean equals(final java.lang.Object obj) {
(com.google.cloud.functions.v1.HttpsTrigger) obj;
if (!getUrl().equals(other.getUrl())) return false;
+ if (securityLevel_ != other.securityLevel_) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@@ -219,6 +443,8 @@ public int hashCode() {
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + URL_FIELD_NUMBER;
hash = (53 * hash) + getUrl().hashCode();
+ hash = (37 * hash) + SECURITY_LEVEL_FIELD_NUMBER;
+ hash = (53 * hash) + securityLevel_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -366,6 +592,8 @@ public Builder clear() {
super.clear();
url_ = "";
+ securityLevel_ = 0;
+
return this;
}
@@ -394,6 +622,7 @@ public com.google.cloud.functions.v1.HttpsTrigger buildPartial() {
com.google.cloud.functions.v1.HttpsTrigger result =
new com.google.cloud.functions.v1.HttpsTrigger(this);
result.url_ = url_;
+ result.securityLevel_ = securityLevel_;
onBuilt();
return result;
}
@@ -447,6 +676,9 @@ public Builder mergeFrom(com.google.cloud.functions.v1.HttpsTrigger other) {
url_ = other.url_;
onChanged();
}
+ if (other.securityLevel_ != 0) {
+ setSecurityLevelValue(other.getSecurityLevelValue());
+ }
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@@ -582,6 +814,100 @@ public Builder setUrlBytes(com.google.protobuf.ByteString value) {
return this;
}
+ private int securityLevel_ = 0;
+ /**
+ *
+ *
+ *
+ * The security level for the function.
+ *
+ *
+ * .google.cloud.functions.v1.HttpsTrigger.SecurityLevel security_level = 2;
+ *
+ * @return The enum numeric value on the wire for securityLevel.
+ */
+ @java.lang.Override
+ public int getSecurityLevelValue() {
+ return securityLevel_;
+ }
+ /**
+ *
+ *
+ *
+ * The security level for the function.
+ *
+ *
+ * .google.cloud.functions.v1.HttpsTrigger.SecurityLevel security_level = 2;
+ *
+ * @param value The enum numeric value on the wire for securityLevel to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSecurityLevelValue(int value) {
+
+ securityLevel_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The security level for the function.
+ *
+ *
+ * .google.cloud.functions.v1.HttpsTrigger.SecurityLevel security_level = 2;
+ *
+ * @return The securityLevel.
+ */
+ @java.lang.Override
+ public com.google.cloud.functions.v1.HttpsTrigger.SecurityLevel getSecurityLevel() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.functions.v1.HttpsTrigger.SecurityLevel result =
+ com.google.cloud.functions.v1.HttpsTrigger.SecurityLevel.valueOf(securityLevel_);
+ return result == null
+ ? com.google.cloud.functions.v1.HttpsTrigger.SecurityLevel.UNRECOGNIZED
+ : result;
+ }
+ /**
+ *
+ *
+ *
+ * The security level for the function.
+ *
+ *
+ * .google.cloud.functions.v1.HttpsTrigger.SecurityLevel security_level = 2;
+ *
+ * @param value The securityLevel to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSecurityLevel(
+ com.google.cloud.functions.v1.HttpsTrigger.SecurityLevel value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ securityLevel_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The security level for the function.
+ *
+ *
+ * .google.cloud.functions.v1.HttpsTrigger.SecurityLevel security_level = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearSecurityLevel() {
+
+ securityLevel_ = 0;
+ 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/HttpsTriggerOrBuilder.java b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/HttpsTriggerOrBuilder.java
index 4c15fb07..6b44c857 100644
--- a/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/HttpsTriggerOrBuilder.java
+++ b/proto-google-cloud-functions-v1/src/main/java/com/google/cloud/functions/v1/HttpsTriggerOrBuilder.java
@@ -47,4 +47,29 @@ public interface HttpsTriggerOrBuilder
* @return The bytes for url.
*/
com.google.protobuf.ByteString getUrlBytes();
+
+ /**
+ *
+ *
+ *
+ * The security level for the function.
+ *
+ *
+ * .google.cloud.functions.v1.HttpsTrigger.SecurityLevel security_level = 2;
+ *
+ * @return The enum numeric value on the wire for securityLevel.
+ */
+ int getSecurityLevelValue();
+ /**
+ *
+ *
+ *
+ * The security level for the function.
+ *
+ *
+ * .google.cloud.functions.v1.HttpsTrigger.SecurityLevel security_level = 2;
+ *
+ * @return The securityLevel.
+ */
+ com.google.cloud.functions.v1.HttpsTrigger.SecurityLevel getSecurityLevel();
}
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 98a6d536..049378ab 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
@@ -375,8 +375,31 @@ message SourceRepository {
// Describes HttpsTrigger, could be used to connect web hooks to function.
message HttpsTrigger {
+ // Available security level settings.
+ //
+ // This controls the methods to enforce security (HTTPS) on a URL.
+ //
+ // If unspecified, SECURE_OPTIONAL will be used.
+ enum SecurityLevel {
+ // Unspecified.
+ SECURITY_LEVEL_UNSPECIFIED = 0;
+
+ // Requests for a URL that match this handler that do not use HTTPS are
+ // automatically redirected to the HTTPS URL with the same path. Query
+ // parameters are reserved for the redirect.
+ SECURE_ALWAYS = 1;
+
+ // Both HTTP and HTTPS requests with URLs that match the handler succeed
+ // without redirects. The application can examine the request to determine
+ // which protocol was used and respond accordingly.
+ SECURE_OPTIONAL = 2;
+ }
+
// Output only. The deployed url for the function.
string url = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // The security level for the function.
+ SecurityLevel security_level = 2;
}
// Describes EventTrigger, used to request events be sent from another
diff --git a/renovate.json b/renovate.json
index e142fd62..5a4be432 100644
--- a/renovate.json
+++ b/renovate.json
@@ -70,8 +70,5 @@
}
],
"semanticCommits": true,
- "dependencyDashboard": true,
- "dependencyDashboardLabels": [
- "type: process"
- ]
+ "dependencyDashboard": true
}
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index dd278fc9..e27e9f7d 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.0.3
+ 2.1.1
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index 9c5fc7b7..46d53f1d 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -28,7 +28,7 @@
com.google.cloud
google-cloud-functions
- 2.0.3
+ 2.1.1
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml
index edcdd4a0..11a04155 100644
--- a/samples/snippets/pom.xml
+++ b/samples/snippets/pom.xml
@@ -28,7 +28,7 @@
com.google.cloud
google-cloud-functions
- 2.0.3
+ 2.1.1
diff --git a/versions.txt b/versions.txt
index 27ca12db..d55aa549 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,6 +1,6 @@
# Format:
# module:released-version:current-version
-google-cloud-functions:2.1.1:2.1.1
-grpc-google-cloud-functions-v1:2.1.1:2.1.1
-proto-google-cloud-functions-v1:2.1.1:2.1.1
+google-cloud-functions:2.2.0:2.2.0
+grpc-google-cloud-functions-v1:2.2.0:2.2.0
+proto-google-cloud-functions-v1:2.2.0:2.2.0