diff --git a/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/Queue.java b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/Queue.java index 8051ff3e..0b78e1aa 100644 --- a/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/Queue.java +++ b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/Queue.java @@ -148,6 +148,23 @@ private Queue( purgeTime_ = subBuilder.buildPartial(); } + break; + } + case 74: + { + com.google.cloud.tasks.v2.StackdriverLoggingConfig.Builder subBuilder = null; + if (stackdriverLoggingConfig_ != null) { + subBuilder = stackdriverLoggingConfig_.toBuilder(); + } + stackdriverLoggingConfig_ = + input.readMessage( + com.google.cloud.tasks.v2.StackdriverLoggingConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(stackdriverLoggingConfig_); + stackdriverLoggingConfig_ = subBuilder.buildPartial(); + } + break; } default: @@ -820,6 +837,58 @@ public com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder() { return getPurgeTime(); } + public static final int STACKDRIVER_LOGGING_CONFIG_FIELD_NUMBER = 9; + private com.google.cloud.tasks.v2.StackdriverLoggingConfig stackdriverLoggingConfig_; + /** + * + * + *
+ * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + * field is unset, then no logs are written. + *+ * + *
.google.cloud.tasks.v2.StackdriverLoggingConfig stackdriver_logging_config = 9;
+ *
+ * @return Whether the stackdriverLoggingConfig field is set.
+ */
+ public boolean hasStackdriverLoggingConfig() {
+ return stackdriverLoggingConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + * field is unset, then no logs are written. + *+ * + *
.google.cloud.tasks.v2.StackdriverLoggingConfig stackdriver_logging_config = 9;
+ *
+ * @return The stackdriverLoggingConfig.
+ */
+ public com.google.cloud.tasks.v2.StackdriverLoggingConfig getStackdriverLoggingConfig() {
+ return stackdriverLoggingConfig_ == null
+ ? com.google.cloud.tasks.v2.StackdriverLoggingConfig.getDefaultInstance()
+ : stackdriverLoggingConfig_;
+ }
+ /**
+ *
+ *
+ * + * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + * field is unset, then no logs are written. + *+ * + *
.google.cloud.tasks.v2.StackdriverLoggingConfig stackdriver_logging_config = 9;
+ */
+ public com.google.cloud.tasks.v2.StackdriverLoggingConfigOrBuilder
+ getStackdriverLoggingConfigOrBuilder() {
+ return getStackdriverLoggingConfig();
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -852,6 +921,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (purgeTime_ != null) {
output.writeMessage(6, getPurgeTime());
}
+ if (stackdriverLoggingConfig_ != null) {
+ output.writeMessage(9, getStackdriverLoggingConfig());
+ }
unknownFields.writeTo(output);
}
@@ -881,6 +953,11 @@ public int getSerializedSize() {
if (purgeTime_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getPurgeTime());
}
+ if (stackdriverLoggingConfig_ != null) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 9, getStackdriverLoggingConfig());
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -914,6 +991,10 @@ public boolean equals(final java.lang.Object obj) {
if (hasPurgeTime()) {
if (!getPurgeTime().equals(other.getPurgeTime())) return false;
}
+ if (hasStackdriverLoggingConfig() != other.hasStackdriverLoggingConfig()) return false;
+ if (hasStackdriverLoggingConfig()) {
+ if (!getStackdriverLoggingConfig().equals(other.getStackdriverLoggingConfig())) return false;
+ }
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@@ -945,6 +1026,10 @@ public int hashCode() {
hash = (37 * hash) + PURGE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getPurgeTime().hashCode();
}
+ if (hasStackdriverLoggingConfig()) {
+ hash = (37 * hash) + STACKDRIVER_LOGGING_CONFIG_FIELD_NUMBER;
+ hash = (53 * hash) + getStackdriverLoggingConfig().hashCode();
+ }
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -1118,6 +1203,12 @@ public Builder clear() {
purgeTime_ = null;
purgeTimeBuilder_ = null;
}
+ if (stackdriverLoggingConfigBuilder_ == null) {
+ stackdriverLoggingConfig_ = null;
+ } else {
+ stackdriverLoggingConfig_ = null;
+ stackdriverLoggingConfigBuilder_ = null;
+ }
return this;
}
@@ -1166,6 +1257,11 @@ public com.google.cloud.tasks.v2.Queue buildPartial() {
} else {
result.purgeTime_ = purgeTimeBuilder_.build();
}
+ if (stackdriverLoggingConfigBuilder_ == null) {
+ result.stackdriverLoggingConfig_ = stackdriverLoggingConfig_;
+ } else {
+ result.stackdriverLoggingConfig_ = stackdriverLoggingConfigBuilder_.build();
+ }
onBuilt();
return result;
}
@@ -1234,6 +1330,9 @@ public Builder mergeFrom(com.google.cloud.tasks.v2.Queue other) {
if (other.hasPurgeTime()) {
mergePurgeTime(other.getPurgeTime());
}
+ if (other.hasStackdriverLoggingConfig()) {
+ mergeStackdriverLoggingConfig(other.getStackdriverLoggingConfig());
+ }
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@@ -2671,6 +2770,215 @@ public com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder() {
return purgeTimeBuilder_;
}
+ private com.google.cloud.tasks.v2.StackdriverLoggingConfig stackdriverLoggingConfig_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.tasks.v2.StackdriverLoggingConfig,
+ com.google.cloud.tasks.v2.StackdriverLoggingConfig.Builder,
+ com.google.cloud.tasks.v2.StackdriverLoggingConfigOrBuilder>
+ stackdriverLoggingConfigBuilder_;
+ /**
+ *
+ *
+ * + * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + * field is unset, then no logs are written. + *+ * + *
.google.cloud.tasks.v2.StackdriverLoggingConfig stackdriver_logging_config = 9;
+ *
+ * @return Whether the stackdriverLoggingConfig field is set.
+ */
+ public boolean hasStackdriverLoggingConfig() {
+ return stackdriverLoggingConfigBuilder_ != null || stackdriverLoggingConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + * field is unset, then no logs are written. + *+ * + *
.google.cloud.tasks.v2.StackdriverLoggingConfig stackdriver_logging_config = 9;
+ *
+ * @return The stackdriverLoggingConfig.
+ */
+ public com.google.cloud.tasks.v2.StackdriverLoggingConfig getStackdriverLoggingConfig() {
+ if (stackdriverLoggingConfigBuilder_ == null) {
+ return stackdriverLoggingConfig_ == null
+ ? com.google.cloud.tasks.v2.StackdriverLoggingConfig.getDefaultInstance()
+ : stackdriverLoggingConfig_;
+ } else {
+ return stackdriverLoggingConfigBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + * field is unset, then no logs are written. + *+ * + *
.google.cloud.tasks.v2.StackdriverLoggingConfig stackdriver_logging_config = 9;
+ */
+ public Builder setStackdriverLoggingConfig(
+ com.google.cloud.tasks.v2.StackdriverLoggingConfig value) {
+ if (stackdriverLoggingConfigBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ stackdriverLoggingConfig_ = value;
+ onChanged();
+ } else {
+ stackdriverLoggingConfigBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + * field is unset, then no logs are written. + *+ * + *
.google.cloud.tasks.v2.StackdriverLoggingConfig stackdriver_logging_config = 9;
+ */
+ public Builder setStackdriverLoggingConfig(
+ com.google.cloud.tasks.v2.StackdriverLoggingConfig.Builder builderForValue) {
+ if (stackdriverLoggingConfigBuilder_ == null) {
+ stackdriverLoggingConfig_ = builderForValue.build();
+ onChanged();
+ } else {
+ stackdriverLoggingConfigBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + * field is unset, then no logs are written. + *+ * + *
.google.cloud.tasks.v2.StackdriverLoggingConfig stackdriver_logging_config = 9;
+ */
+ public Builder mergeStackdriverLoggingConfig(
+ com.google.cloud.tasks.v2.StackdriverLoggingConfig value) {
+ if (stackdriverLoggingConfigBuilder_ == null) {
+ if (stackdriverLoggingConfig_ != null) {
+ stackdriverLoggingConfig_ =
+ com.google.cloud.tasks.v2.StackdriverLoggingConfig.newBuilder(
+ stackdriverLoggingConfig_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ stackdriverLoggingConfig_ = value;
+ }
+ onChanged();
+ } else {
+ stackdriverLoggingConfigBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + * field is unset, then no logs are written. + *+ * + *
.google.cloud.tasks.v2.StackdriverLoggingConfig stackdriver_logging_config = 9;
+ */
+ public Builder clearStackdriverLoggingConfig() {
+ if (stackdriverLoggingConfigBuilder_ == null) {
+ stackdriverLoggingConfig_ = null;
+ onChanged();
+ } else {
+ stackdriverLoggingConfig_ = null;
+ stackdriverLoggingConfigBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + * field is unset, then no logs are written. + *+ * + *
.google.cloud.tasks.v2.StackdriverLoggingConfig stackdriver_logging_config = 9;
+ */
+ public com.google.cloud.tasks.v2.StackdriverLoggingConfig.Builder
+ getStackdriverLoggingConfigBuilder() {
+
+ onChanged();
+ return getStackdriverLoggingConfigFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + * field is unset, then no logs are written. + *+ * + *
.google.cloud.tasks.v2.StackdriverLoggingConfig stackdriver_logging_config = 9;
+ */
+ public com.google.cloud.tasks.v2.StackdriverLoggingConfigOrBuilder
+ getStackdriverLoggingConfigOrBuilder() {
+ if (stackdriverLoggingConfigBuilder_ != null) {
+ return stackdriverLoggingConfigBuilder_.getMessageOrBuilder();
+ } else {
+ return stackdriverLoggingConfig_ == null
+ ? com.google.cloud.tasks.v2.StackdriverLoggingConfig.getDefaultInstance()
+ : stackdriverLoggingConfig_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + * field is unset, then no logs are written. + *+ * + *
.google.cloud.tasks.v2.StackdriverLoggingConfig stackdriver_logging_config = 9;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.tasks.v2.StackdriverLoggingConfig,
+ com.google.cloud.tasks.v2.StackdriverLoggingConfig.Builder,
+ com.google.cloud.tasks.v2.StackdriverLoggingConfigOrBuilder>
+ getStackdriverLoggingConfigFieldBuilder() {
+ if (stackdriverLoggingConfigBuilder_ == null) {
+ stackdriverLoggingConfigBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.tasks.v2.StackdriverLoggingConfig,
+ com.google.cloud.tasks.v2.StackdriverLoggingConfig.Builder,
+ com.google.cloud.tasks.v2.StackdriverLoggingConfigOrBuilder>(
+ getStackdriverLoggingConfig(), getParentForChildren(), isClean());
+ stackdriverLoggingConfig_ = null;
+ }
+ return stackdriverLoggingConfigBuilder_;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/QueueOrBuilder.java b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/QueueOrBuilder.java
index dafc09c5..b88abb66 100644
--- a/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/QueueOrBuilder.java
+++ b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/QueueOrBuilder.java
@@ -378,4 +378,46 @@ public interface QueueOrBuilder
* .google.protobuf.Timestamp purge_time = 6;
*/
com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder();
+
+ /**
+ *
+ *
+ * + * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + * field is unset, then no logs are written. + *+ * + *
.google.cloud.tasks.v2.StackdriverLoggingConfig stackdriver_logging_config = 9;
+ *
+ * @return Whether the stackdriverLoggingConfig field is set.
+ */
+ boolean hasStackdriverLoggingConfig();
+ /**
+ *
+ *
+ * + * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + * field is unset, then no logs are written. + *+ * + *
.google.cloud.tasks.v2.StackdriverLoggingConfig stackdriver_logging_config = 9;
+ *
+ * @return The stackdriverLoggingConfig.
+ */
+ com.google.cloud.tasks.v2.StackdriverLoggingConfig getStackdriverLoggingConfig();
+ /**
+ *
+ *
+ * + * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + * field is unset, then no logs are written. + *+ * + *
.google.cloud.tasks.v2.StackdriverLoggingConfig stackdriver_logging_config = 9;
+ */
+ com.google.cloud.tasks.v2.StackdriverLoggingConfigOrBuilder
+ getStackdriverLoggingConfigOrBuilder();
}
diff --git a/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/QueueProto.java b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/QueueProto.java
index d6803e86..c90215f3 100644
--- a/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/QueueProto.java
+++ b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/QueueProto.java
@@ -39,6 +39,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
internal_static_google_cloud_tasks_v2_RetryConfig_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_cloud_tasks_v2_RetryConfig_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_tasks_v2_StackdriverLoggingConfig_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_tasks_v2_StackdriverLoggingConfig_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
return descriptor;
@@ -53,7 +57,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "proto\032\"google/cloud/tasks/v2/target.prot"
+ "o\032\036google/protobuf/duration.proto\032\037googl"
+ "e/protobuf/timestamp.proto\032\034google/api/a"
- + "nnotations.proto\"\335\003\n\005Queue\022\014\n\004name\030\001 \001(\t"
+ + "nnotations.proto\"\262\004\n\005Queue\022\014\n\004name\030\001 \001(\t"
+ "\022L\n\033app_engine_routing_override\030\002 \001(\0132\'."
+ "google.cloud.tasks.v2.AppEngineRouting\0226"
+ "\n\013rate_limits\030\003 \001(\0132!.google.cloud.tasks"
@@ -61,22 +65,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "oogle.cloud.tasks.v2.RetryConfig\0221\n\005stat"
+ "e\030\005 \001(\0162\".google.cloud.tasks.v2.Queue.St"
+ "ate\022.\n\npurge_time\030\006 \001(\0132\032.google.protobu"
- + "f.Timestamp\"E\n\005State\022\025\n\021STATE_UNSPECIFIE"
- + "D\020\000\022\013\n\007RUNNING\020\001\022\n\n\006PAUSED\020\002\022\014\n\010DISABLED"
- + "\020\003:\\\352AY\n\037cloudtasks.googleapis.com/Queue"
- + "\0226projects/{project}/locations/{location"
- + "}/queues/{queue}\"j\n\nRateLimits\022!\n\031max_di"
- + "spatches_per_second\030\001 \001(\001\022\026\n\016max_burst_s"
- + "ize\030\002 \001(\005\022!\n\031max_concurrent_dispatches\030\003"
- + " \001(\005\"\321\001\n\013RetryConfig\022\024\n\014max_attempts\030\001 \001"
- + "(\005\0225\n\022max_retry_duration\030\002 \001(\0132\031.google."
- + "protobuf.Duration\022.\n\013min_backoff\030\003 \001(\0132\031"
- + ".google.protobuf.Duration\022.\n\013max_backoff"
- + "\030\004 \001(\0132\031.google.protobuf.Duration\022\025\n\rmax"
- + "_doublings\030\005 \001(\005Be\n\031com.google.cloud.tas"
- + "ks.v2B\nQueueProtoP\001Z:google.golang.org/g"
- + "enproto/googleapis/cloud/tasks/v2;tasksb"
- + "\006proto3"
+ + "f.Timestamp\022S\n\032stackdriver_logging_confi"
+ + "g\030\t \001(\0132/.google.cloud.tasks.v2.Stackdri"
+ + "verLoggingConfig\"E\n\005State\022\025\n\021STATE_UNSPE"
+ + "CIFIED\020\000\022\013\n\007RUNNING\020\001\022\n\n\006PAUSED\020\002\022\014\n\010DIS"
+ + "ABLED\020\003:\\\352AY\n\037cloudtasks.googleapis.com/"
+ + "Queue\0226projects/{project}/locations/{loc"
+ + "ation}/queues/{queue}\"j\n\nRateLimits\022!\n\031m"
+ + "ax_dispatches_per_second\030\001 \001(\001\022\026\n\016max_bu"
+ + "rst_size\030\002 \001(\005\022!\n\031max_concurrent_dispatc"
+ + "hes\030\003 \001(\005\"\321\001\n\013RetryConfig\022\024\n\014max_attempt"
+ + "s\030\001 \001(\005\0225\n\022max_retry_duration\030\002 \001(\0132\031.go"
+ + "ogle.protobuf.Duration\022.\n\013min_backoff\030\003 "
+ + "\001(\0132\031.google.protobuf.Duration\022.\n\013max_ba"
+ + "ckoff\030\004 \001(\0132\031.google.protobuf.Duration\022\025"
+ + "\n\rmax_doublings\030\005 \001(\005\"2\n\030StackdriverLogg"
+ + "ingConfig\022\026\n\016sampling_ratio\030\001 \001(\001Be\n\031com"
+ + ".google.cloud.tasks.v2B\nQueueProtoP\001Z:go"
+ + "ogle.golang.org/genproto/googleapis/clou"
+ + "d/tasks/v2;tasksb\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -94,7 +101,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_tasks_v2_Queue_descriptor,
new java.lang.String[] {
- "Name", "AppEngineRoutingOverride", "RateLimits", "RetryConfig", "State", "PurgeTime",
+ "Name",
+ "AppEngineRoutingOverride",
+ "RateLimits",
+ "RetryConfig",
+ "State",
+ "PurgeTime",
+ "StackdriverLoggingConfig",
});
internal_static_google_cloud_tasks_v2_RateLimits_descriptor =
getDescriptor().getMessageTypes().get(1);
@@ -112,6 +125,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new java.lang.String[] {
"MaxAttempts", "MaxRetryDuration", "MinBackoff", "MaxBackoff", "MaxDoublings",
});
+ internal_static_google_cloud_tasks_v2_StackdriverLoggingConfig_descriptor =
+ getDescriptor().getMessageTypes().get(3);
+ internal_static_google_cloud_tasks_v2_StackdriverLoggingConfig_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_tasks_v2_StackdriverLoggingConfig_descriptor,
+ new java.lang.String[] {
+ "SamplingRatio",
+ });
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
registry.add(com.google.api.ResourceProto.resource);
diff --git a/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/StackdriverLoggingConfig.java b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/StackdriverLoggingConfig.java
new file mode 100644
index 00000000..ba3669d6
--- /dev/null
+++ b/proto-google-cloud-tasks-v2/src/main/java/com/google/cloud/tasks/v2/StackdriverLoggingConfig.java
@@ -0,0 +1,562 @@
+/*
+ * 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/tasks/v2/queue.proto
+
+package com.google.cloud.tasks.v2;
+
+/**
+ *
+ *
+ * + * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). + *+ * + * Protobuf type {@code google.cloud.tasks.v2.StackdriverLoggingConfig} + */ +public final class StackdriverLoggingConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2.StackdriverLoggingConfig) + StackdriverLoggingConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use StackdriverLoggingConfig.newBuilder() to construct. + private StackdriverLoggingConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private StackdriverLoggingConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StackdriverLoggingConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StackdriverLoggingConfig( + 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 9: + { + samplingRatio_ = input.readDouble(); + 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.tasks.v2.QueueProto + .internal_static_google_cloud_tasks_v2_StackdriverLoggingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2.QueueProto + .internal_static_google_cloud_tasks_v2_StackdriverLoggingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2.StackdriverLoggingConfig.class, + com.google.cloud.tasks.v2.StackdriverLoggingConfig.Builder.class); + } + + public static final int SAMPLING_RATIO_FIELD_NUMBER = 1; + private double samplingRatio_; + /** + * + * + *
+ * Specifies the fraction of operations to write to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). + * This field may contain any value between 0.0 and 1.0, inclusive. + * 0.0 is the default and means that no operations are logged. + *+ * + *
double sampling_ratio = 1;
+ *
+ * @return The samplingRatio.
+ */
+ public double getSamplingRatio() {
+ return samplingRatio_;
+ }
+
+ 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 (samplingRatio_ != 0D) {
+ output.writeDouble(1, samplingRatio_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (samplingRatio_ != 0D) {
+ size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, samplingRatio_);
+ }
+ 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.tasks.v2.StackdriverLoggingConfig)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.tasks.v2.StackdriverLoggingConfig other =
+ (com.google.cloud.tasks.v2.StackdriverLoggingConfig) obj;
+
+ if (java.lang.Double.doubleToLongBits(getSamplingRatio())
+ != java.lang.Double.doubleToLongBits(other.getSamplingRatio())) 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) + SAMPLING_RATIO_FIELD_NUMBER;
+ hash =
+ (53 * hash)
+ + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getSamplingRatio()));
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.tasks.v2.StackdriverLoggingConfig parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.tasks.v2.StackdriverLoggingConfig 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.tasks.v2.StackdriverLoggingConfig parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.tasks.v2.StackdriverLoggingConfig 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.tasks.v2.StackdriverLoggingConfig parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.tasks.v2.StackdriverLoggingConfig parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.tasks.v2.StackdriverLoggingConfig parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.tasks.v2.StackdriverLoggingConfig 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.tasks.v2.StackdriverLoggingConfig parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.tasks.v2.StackdriverLoggingConfig 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.tasks.v2.StackdriverLoggingConfig parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.tasks.v2.StackdriverLoggingConfig 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.tasks.v2.StackdriverLoggingConfig 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 options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). + *+ * + * Protobuf type {@code google.cloud.tasks.v2.StackdriverLoggingConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Specifies the fraction of operations to write to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). + * This field may contain any value between 0.0 and 1.0, inclusive. + * 0.0 is the default and means that no operations are logged. + *+ * + *
double sampling_ratio = 1;
+ *
+ * @return The samplingRatio.
+ */
+ public double getSamplingRatio() {
+ return samplingRatio_;
+ }
+ /**
+ *
+ *
+ * + * Specifies the fraction of operations to write to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). + * This field may contain any value between 0.0 and 1.0, inclusive. + * 0.0 is the default and means that no operations are logged. + *+ * + *
double sampling_ratio = 1;
+ *
+ * @param value The samplingRatio to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSamplingRatio(double value) {
+
+ samplingRatio_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Specifies the fraction of operations to write to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). + * This field may contain any value between 0.0 and 1.0, inclusive. + * 0.0 is the default and means that no operations are logged. + *+ * + *
double sampling_ratio = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearSamplingRatio() {
+
+ samplingRatio_ = 0D;
+ 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.tasks.v2.StackdriverLoggingConfig)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2.StackdriverLoggingConfig)
+ private static final com.google.cloud.tasks.v2.StackdriverLoggingConfig DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.tasks.v2.StackdriverLoggingConfig();
+ }
+
+ public static com.google.cloud.tasks.v2.StackdriverLoggingConfig getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Specifies the fraction of operations to write to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). + * This field may contain any value between 0.0 and 1.0, inclusive. + * 0.0 is the default and means that no operations are logged. + *+ * + *
double sampling_ratio = 1;
+ *
+ * @return The samplingRatio.
+ */
+ double getSamplingRatio();
+}
diff --git a/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/queue.proto b/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/queue.proto
index b50f5aec..483a1f61 100644
--- a/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/queue.proto
+++ b/proto-google-cloud-tasks-v2/src/main/proto/google/cloud/tasks/v2/queue.proto
@@ -166,6 +166,11 @@ message Queue {
// Purge time will be truncated to the nearest microsecond. Purge
// time will be unset if the queue has never been purged.
google.protobuf.Timestamp purge_time = 6;
+
+ // Configuration options for writing logs to
+ // [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
+ // field is unset, then no logs are written.
+ StackdriverLoggingConfig stackdriver_logging_config = 9;
}
// Rate limits.
@@ -344,3 +349,13 @@ message RetryConfig {
// queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
int32 max_doublings = 5;
}
+
+// Configuration options for writing logs to
+// [Stackdriver Logging](https://cloud.google.com/logging/docs/).
+message StackdriverLoggingConfig {
+ // Specifies the fraction of operations to write to
+ // [Stackdriver Logging](https://cloud.google.com/logging/docs/).
+ // This field may contain any value between 0.0 and 1.0, inclusive.
+ // 0.0 is the default and means that no operations are logged.
+ double sampling_ratio = 1;
+}
diff --git a/synth.metadata b/synth.metadata
index 9e8b06b5..abd9a6fe 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -1,34 +1,34 @@
{
- "updateTime": "2020-02-14T23:06:57.154480Z",
+ "updateTime": "2020-02-20T23:08:22.389660Z",
"sources": [
{
- "git": {
- "name": ".",
- "remote": "https://github.com/googleapis/java-tasks.git",
- "sha": "f4b4284994be3e243820d8900aad5f3cd6b0fb2f"
+ "generator": {
+ "name": "artman",
+ "version": "0.45.0",
+ "dockerImage": "googleapis/artman@sha256:6aec9c34db0e4be221cdaf6faba27bdc07cfea846808b3d3b964dfce3a9a0f9b"
}
},
{
"git": {
- "name": "synthtool",
- "remote": "rpc://devrel/cloud/libraries/tools/autosynth",
- "sha": "dd7cd93888cbeb1d4c56a1ca814491c7813160e8"
+ "name": ".",
+ "remote": "https://github.com/googleapis/java-tasks.git",
+ "sha": "a578f229f93560329f96aea6e2446d5278a6cd5f"
}
},
{
- "generator": {
- "name": "artman",
- "version": "0.45.0",
- "dockerImage": "googleapis/artman@sha256:6aec9c34db0e4be221cdaf6faba27bdc07cfea846808b3d3b964dfce3a9a0f9b"
+ "git": {
+ "name": "googleapis",
+ "remote": "https://github.com/googleapis/googleapis.git",
+ "sha": "3eaaaf8626ce5b0c0bc7eee05e143beffa373b01",
+ "internalRef": "296274723",
+ "log": "3eaaaf8626ce5b0c0bc7eee05e143beffa373b01\nAdd BUILD.bazel for v1 secretmanager.googleapis.com\n\nPiperOrigin-RevId: 296274723\n\ne76149c3d992337f85eeb45643106aacae7ede82\nMove securitycenter v1 to use generate from annotations.\n\nPiperOrigin-RevId: 296266862\n\n203740c78ac69ee07c3bf6be7408048751f618f8\nAdd StackdriverLoggingConfig field to Cloud Tasks v2 API.\n\nPiperOrigin-RevId: 296256388\n\ne4117d5e9ed8bbca28da4a60a94947ca51cb2083\nCreate a Bazel BUILD file for the google.actions.type export.\n\nPiperOrigin-RevId: 296212567\n\na9639a0a9854fd6e1be08bba1ac3897f4f16cb2f\nAdd secretmanager.googleapis.com v1 protos\n\nPiperOrigin-RevId: 295983266\n\nce4f4c21d9dd2bfab18873a80449b9d9851efde8\nasset: v1p1beta1 remove SearchResources and SearchIamPolicies\n\nPiperOrigin-RevId: 295861722\n\ncb61d6c2d070b589980c779b68ffca617f789116\nasset: v1p1beta1 remove SearchResources and SearchIamPolicies\n\nPiperOrigin-RevId: 295855449\n\nab2685d8d3a0e191dc8aef83df36773c07cb3d06\nfix: Dataproc v1 - AutoscalingPolicy annotation\n\nThis adds the second resource name pattern to the\nAutoscalingPolicy resource.\n\nCommitter: @lukesneeringer\nPiperOrigin-RevId: 295738415\n\n8a1020bf6828f6e3c84c3014f2c51cb62b739140\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 295286165\n\n5cfa105206e77670369e4b2225597386aba32985\nAdd service control related proto build rule.\n\nPiperOrigin-RevId: 295262088\n\nee4dddf805072004ab19ac94df2ce669046eec26\nmonitoring v3: Add prefix \"https://cloud.google.com/\" into the link for global access\ncl 295167522, get ride of synth.py hacks\n\nPiperOrigin-RevId: 295238095\n\n"
}
},
{
"git": {
- "name": "googleapis",
- "remote": "https://github.com/googleapis/googleapis.git",
- "sha": "d9835e922ea79eed8497db270d2f9f85099a519c",
- "internalRef": "295185610",
- "log": "d9835e922ea79eed8497db270d2f9f85099a519c\nUpdate some minor docs changes about user event proto\n\nPiperOrigin-RevId: 295185610\n\n5f311e416e69c170243de722023b22f3df89ec1c\nfix: use correct PHP package name in gapic configuration\n\nPiperOrigin-RevId: 295161330\n\n6cdd74dcdb071694da6a6b5a206e3a320b62dd11\npubsub: v1 add client config annotations and retry config\n\nPiperOrigin-RevId: 295158776\n\n5169f46d9f792e2934d9fa25c36d0515b4fd0024\nAdded cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 295026522\n\n56b55aa8818cd0a532a7d779f6ef337ba809ccbd\nFix: Resource annotations for CreateTimeSeriesRequest and ListTimeSeriesRequest should refer to valid resources. TimeSeries is not a named resource.\n\nPiperOrigin-RevId: 294931650\n\n"
+ "name": "synthtool",
+ "remote": "rpc://devrel/cloud/libraries/tools/autosynth",
+ "sha": "706a38c26db42299845396cdae55db635c38794a"
}
},
{