• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 // Generated by the protocol buffer compiler.  DO NOT EDIT!
17 // source: google/cloud/tasks/v2beta2/queue.proto
18 
19 package com.google.cloud.tasks.v2beta2;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Statistics for a queue.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.tasks.v2beta2.QueueStats}
29  */
30 public final class QueueStats extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.QueueStats)
33     QueueStatsOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use QueueStats.newBuilder() to construct.
QueueStats(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private QueueStats(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
QueueStats()40   private QueueStats() {}
41 
42   @java.lang.Override
43   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)44   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
45     return new QueueStats();
46   }
47 
48   @java.lang.Override
getUnknownFields()49   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
50     return this.unknownFields;
51   }
52 
getDescriptor()53   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
54     return com.google.cloud.tasks.v2beta2.QueueProto
55         .internal_static_google_cloud_tasks_v2beta2_QueueStats_descriptor;
56   }
57 
58   @java.lang.Override
59   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()60       internalGetFieldAccessorTable() {
61     return com.google.cloud.tasks.v2beta2.QueueProto
62         .internal_static_google_cloud_tasks_v2beta2_QueueStats_fieldAccessorTable
63         .ensureFieldAccessorsInitialized(
64             com.google.cloud.tasks.v2beta2.QueueStats.class,
65             com.google.cloud.tasks.v2beta2.QueueStats.Builder.class);
66   }
67 
68   public static final int TASKS_COUNT_FIELD_NUMBER = 1;
69   private long tasksCount_ = 0L;
70   /**
71    *
72    *
73    * <pre>
74    * Output only. An estimation of the number of tasks in the queue, that is,
75    * the tasks in the queue that haven't been executed, the tasks in the queue
76    * which the queue has dispatched but has not yet received a reply for, and
77    * the failed tasks that the queue is retrying.
78    * </pre>
79    *
80    * <code>int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
81    *
82    * @return The tasksCount.
83    */
84   @java.lang.Override
getTasksCount()85   public long getTasksCount() {
86     return tasksCount_;
87   }
88 
89   public static final int OLDEST_ESTIMATED_ARRIVAL_TIME_FIELD_NUMBER = 2;
90   private com.google.protobuf.Timestamp oldestEstimatedArrivalTime_;
91   /**
92    *
93    *
94    * <pre>
95    * Output only. An estimation of the nearest time in the future where a task
96    * in the queue is scheduled to be executed.
97    * </pre>
98    *
99    * <code>
100    * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
101    * </code>
102    *
103    * @return Whether the oldestEstimatedArrivalTime field is set.
104    */
105   @java.lang.Override
hasOldestEstimatedArrivalTime()106   public boolean hasOldestEstimatedArrivalTime() {
107     return oldestEstimatedArrivalTime_ != null;
108   }
109   /**
110    *
111    *
112    * <pre>
113    * Output only. An estimation of the nearest time in the future where a task
114    * in the queue is scheduled to be executed.
115    * </pre>
116    *
117    * <code>
118    * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
119    * </code>
120    *
121    * @return The oldestEstimatedArrivalTime.
122    */
123   @java.lang.Override
getOldestEstimatedArrivalTime()124   public com.google.protobuf.Timestamp getOldestEstimatedArrivalTime() {
125     return oldestEstimatedArrivalTime_ == null
126         ? com.google.protobuf.Timestamp.getDefaultInstance()
127         : oldestEstimatedArrivalTime_;
128   }
129   /**
130    *
131    *
132    * <pre>
133    * Output only. An estimation of the nearest time in the future where a task
134    * in the queue is scheduled to be executed.
135    * </pre>
136    *
137    * <code>
138    * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
139    * </code>
140    */
141   @java.lang.Override
getOldestEstimatedArrivalTimeOrBuilder()142   public com.google.protobuf.TimestampOrBuilder getOldestEstimatedArrivalTimeOrBuilder() {
143     return oldestEstimatedArrivalTime_ == null
144         ? com.google.protobuf.Timestamp.getDefaultInstance()
145         : oldestEstimatedArrivalTime_;
146   }
147 
148   public static final int EXECUTED_LAST_MINUTE_COUNT_FIELD_NUMBER = 3;
149   private long executedLastMinuteCount_ = 0L;
150   /**
151    *
152    *
153    * <pre>
154    * Output only. The number of tasks that the queue has dispatched and received
155    * a reply for during the last minute. This variable counts both successful
156    * and non-successful executions.
157    * </pre>
158    *
159    * <code>int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
160    *
161    * @return The executedLastMinuteCount.
162    */
163   @java.lang.Override
getExecutedLastMinuteCount()164   public long getExecutedLastMinuteCount() {
165     return executedLastMinuteCount_;
166   }
167 
168   public static final int CONCURRENT_DISPATCHES_COUNT_FIELD_NUMBER = 4;
169   private long concurrentDispatchesCount_ = 0L;
170   /**
171    *
172    *
173    * <pre>
174    * Output only. The number of requests that the queue has dispatched but has
175    * not received a reply for yet.
176    * </pre>
177    *
178    * <code>int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
179    * </code>
180    *
181    * @return The concurrentDispatchesCount.
182    */
183   @java.lang.Override
getConcurrentDispatchesCount()184   public long getConcurrentDispatchesCount() {
185     return concurrentDispatchesCount_;
186   }
187 
188   public static final int EFFECTIVE_EXECUTION_RATE_FIELD_NUMBER = 5;
189   private double effectiveExecutionRate_ = 0D;
190   /**
191    *
192    *
193    * <pre>
194    * Output only. The current maximum number of tasks per second executed by the
195    * queue. The maximum value of this variable is controlled by the RateLimits
196    * of the Queue. However, this value could be less to avoid overloading the
197    * endpoints tasks in the queue are targeting.
198    * </pre>
199    *
200    * <code>double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
201    *
202    * @return The effectiveExecutionRate.
203    */
204   @java.lang.Override
getEffectiveExecutionRate()205   public double getEffectiveExecutionRate() {
206     return effectiveExecutionRate_;
207   }
208 
209   private byte memoizedIsInitialized = -1;
210 
211   @java.lang.Override
isInitialized()212   public final boolean isInitialized() {
213     byte isInitialized = memoizedIsInitialized;
214     if (isInitialized == 1) return true;
215     if (isInitialized == 0) return false;
216 
217     memoizedIsInitialized = 1;
218     return true;
219   }
220 
221   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)222   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
223     if (tasksCount_ != 0L) {
224       output.writeInt64(1, tasksCount_);
225     }
226     if (oldestEstimatedArrivalTime_ != null) {
227       output.writeMessage(2, getOldestEstimatedArrivalTime());
228     }
229     if (executedLastMinuteCount_ != 0L) {
230       output.writeInt64(3, executedLastMinuteCount_);
231     }
232     if (concurrentDispatchesCount_ != 0L) {
233       output.writeInt64(4, concurrentDispatchesCount_);
234     }
235     if (java.lang.Double.doubleToRawLongBits(effectiveExecutionRate_) != 0) {
236       output.writeDouble(5, effectiveExecutionRate_);
237     }
238     getUnknownFields().writeTo(output);
239   }
240 
241   @java.lang.Override
getSerializedSize()242   public int getSerializedSize() {
243     int size = memoizedSize;
244     if (size != -1) return size;
245 
246     size = 0;
247     if (tasksCount_ != 0L) {
248       size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, tasksCount_);
249     }
250     if (oldestEstimatedArrivalTime_ != null) {
251       size +=
252           com.google.protobuf.CodedOutputStream.computeMessageSize(
253               2, getOldestEstimatedArrivalTime());
254     }
255     if (executedLastMinuteCount_ != 0L) {
256       size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, executedLastMinuteCount_);
257     }
258     if (concurrentDispatchesCount_ != 0L) {
259       size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, concurrentDispatchesCount_);
260     }
261     if (java.lang.Double.doubleToRawLongBits(effectiveExecutionRate_) != 0) {
262       size += com.google.protobuf.CodedOutputStream.computeDoubleSize(5, effectiveExecutionRate_);
263     }
264     size += getUnknownFields().getSerializedSize();
265     memoizedSize = size;
266     return size;
267   }
268 
269   @java.lang.Override
equals(final java.lang.Object obj)270   public boolean equals(final java.lang.Object obj) {
271     if (obj == this) {
272       return true;
273     }
274     if (!(obj instanceof com.google.cloud.tasks.v2beta2.QueueStats)) {
275       return super.equals(obj);
276     }
277     com.google.cloud.tasks.v2beta2.QueueStats other =
278         (com.google.cloud.tasks.v2beta2.QueueStats) obj;
279 
280     if (getTasksCount() != other.getTasksCount()) return false;
281     if (hasOldestEstimatedArrivalTime() != other.hasOldestEstimatedArrivalTime()) return false;
282     if (hasOldestEstimatedArrivalTime()) {
283       if (!getOldestEstimatedArrivalTime().equals(other.getOldestEstimatedArrivalTime()))
284         return false;
285     }
286     if (getExecutedLastMinuteCount() != other.getExecutedLastMinuteCount()) return false;
287     if (getConcurrentDispatchesCount() != other.getConcurrentDispatchesCount()) return false;
288     if (java.lang.Double.doubleToLongBits(getEffectiveExecutionRate())
289         != java.lang.Double.doubleToLongBits(other.getEffectiveExecutionRate())) return false;
290     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
291     return true;
292   }
293 
294   @java.lang.Override
hashCode()295   public int hashCode() {
296     if (memoizedHashCode != 0) {
297       return memoizedHashCode;
298     }
299     int hash = 41;
300     hash = (19 * hash) + getDescriptor().hashCode();
301     hash = (37 * hash) + TASKS_COUNT_FIELD_NUMBER;
302     hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTasksCount());
303     if (hasOldestEstimatedArrivalTime()) {
304       hash = (37 * hash) + OLDEST_ESTIMATED_ARRIVAL_TIME_FIELD_NUMBER;
305       hash = (53 * hash) + getOldestEstimatedArrivalTime().hashCode();
306     }
307     hash = (37 * hash) + EXECUTED_LAST_MINUTE_COUNT_FIELD_NUMBER;
308     hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getExecutedLastMinuteCount());
309     hash = (37 * hash) + CONCURRENT_DISPATCHES_COUNT_FIELD_NUMBER;
310     hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getConcurrentDispatchesCount());
311     hash = (37 * hash) + EFFECTIVE_EXECUTION_RATE_FIELD_NUMBER;
312     hash =
313         (53 * hash)
314             + com.google.protobuf.Internal.hashLong(
315                 java.lang.Double.doubleToLongBits(getEffectiveExecutionRate()));
316     hash = (29 * hash) + getUnknownFields().hashCode();
317     memoizedHashCode = hash;
318     return hash;
319   }
320 
parseFrom(java.nio.ByteBuffer data)321   public static com.google.cloud.tasks.v2beta2.QueueStats parseFrom(java.nio.ByteBuffer data)
322       throws com.google.protobuf.InvalidProtocolBufferException {
323     return PARSER.parseFrom(data);
324   }
325 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)326   public static com.google.cloud.tasks.v2beta2.QueueStats parseFrom(
327       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
328       throws com.google.protobuf.InvalidProtocolBufferException {
329     return PARSER.parseFrom(data, extensionRegistry);
330   }
331 
parseFrom( com.google.protobuf.ByteString data)332   public static com.google.cloud.tasks.v2beta2.QueueStats parseFrom(
333       com.google.protobuf.ByteString data)
334       throws com.google.protobuf.InvalidProtocolBufferException {
335     return PARSER.parseFrom(data);
336   }
337 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)338   public static com.google.cloud.tasks.v2beta2.QueueStats parseFrom(
339       com.google.protobuf.ByteString data,
340       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
341       throws com.google.protobuf.InvalidProtocolBufferException {
342     return PARSER.parseFrom(data, extensionRegistry);
343   }
344 
parseFrom(byte[] data)345   public static com.google.cloud.tasks.v2beta2.QueueStats parseFrom(byte[] data)
346       throws com.google.protobuf.InvalidProtocolBufferException {
347     return PARSER.parseFrom(data);
348   }
349 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)350   public static com.google.cloud.tasks.v2beta2.QueueStats parseFrom(
351       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
352       throws com.google.protobuf.InvalidProtocolBufferException {
353     return PARSER.parseFrom(data, extensionRegistry);
354   }
355 
parseFrom(java.io.InputStream input)356   public static com.google.cloud.tasks.v2beta2.QueueStats parseFrom(java.io.InputStream input)
357       throws java.io.IOException {
358     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
359   }
360 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)361   public static com.google.cloud.tasks.v2beta2.QueueStats parseFrom(
362       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
363       throws java.io.IOException {
364     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
365         PARSER, input, extensionRegistry);
366   }
367 
parseDelimitedFrom( java.io.InputStream input)368   public static com.google.cloud.tasks.v2beta2.QueueStats parseDelimitedFrom(
369       java.io.InputStream input) throws java.io.IOException {
370     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
371   }
372 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)373   public static com.google.cloud.tasks.v2beta2.QueueStats parseDelimitedFrom(
374       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
375       throws java.io.IOException {
376     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
377         PARSER, input, extensionRegistry);
378   }
379 
parseFrom( com.google.protobuf.CodedInputStream input)380   public static com.google.cloud.tasks.v2beta2.QueueStats parseFrom(
381       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
382     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
383   }
384 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)385   public static com.google.cloud.tasks.v2beta2.QueueStats parseFrom(
386       com.google.protobuf.CodedInputStream input,
387       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
388       throws java.io.IOException {
389     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
390         PARSER, input, extensionRegistry);
391   }
392 
393   @java.lang.Override
newBuilderForType()394   public Builder newBuilderForType() {
395     return newBuilder();
396   }
397 
newBuilder()398   public static Builder newBuilder() {
399     return DEFAULT_INSTANCE.toBuilder();
400   }
401 
newBuilder(com.google.cloud.tasks.v2beta2.QueueStats prototype)402   public static Builder newBuilder(com.google.cloud.tasks.v2beta2.QueueStats prototype) {
403     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
404   }
405 
406   @java.lang.Override
toBuilder()407   public Builder toBuilder() {
408     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
409   }
410 
411   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)412   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
413     Builder builder = new Builder(parent);
414     return builder;
415   }
416   /**
417    *
418    *
419    * <pre>
420    * Statistics for a queue.
421    * </pre>
422    *
423    * Protobuf type {@code google.cloud.tasks.v2beta2.QueueStats}
424    */
425   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
426       implements
427       // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.QueueStats)
428       com.google.cloud.tasks.v2beta2.QueueStatsOrBuilder {
getDescriptor()429     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
430       return com.google.cloud.tasks.v2beta2.QueueProto
431           .internal_static_google_cloud_tasks_v2beta2_QueueStats_descriptor;
432     }
433 
434     @java.lang.Override
435     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()436         internalGetFieldAccessorTable() {
437       return com.google.cloud.tasks.v2beta2.QueueProto
438           .internal_static_google_cloud_tasks_v2beta2_QueueStats_fieldAccessorTable
439           .ensureFieldAccessorsInitialized(
440               com.google.cloud.tasks.v2beta2.QueueStats.class,
441               com.google.cloud.tasks.v2beta2.QueueStats.Builder.class);
442     }
443 
444     // Construct using com.google.cloud.tasks.v2beta2.QueueStats.newBuilder()
Builder()445     private Builder() {}
446 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)447     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
448       super(parent);
449     }
450 
451     @java.lang.Override
clear()452     public Builder clear() {
453       super.clear();
454       bitField0_ = 0;
455       tasksCount_ = 0L;
456       oldestEstimatedArrivalTime_ = null;
457       if (oldestEstimatedArrivalTimeBuilder_ != null) {
458         oldestEstimatedArrivalTimeBuilder_.dispose();
459         oldestEstimatedArrivalTimeBuilder_ = null;
460       }
461       executedLastMinuteCount_ = 0L;
462       concurrentDispatchesCount_ = 0L;
463       effectiveExecutionRate_ = 0D;
464       return this;
465     }
466 
467     @java.lang.Override
getDescriptorForType()468     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
469       return com.google.cloud.tasks.v2beta2.QueueProto
470           .internal_static_google_cloud_tasks_v2beta2_QueueStats_descriptor;
471     }
472 
473     @java.lang.Override
getDefaultInstanceForType()474     public com.google.cloud.tasks.v2beta2.QueueStats getDefaultInstanceForType() {
475       return com.google.cloud.tasks.v2beta2.QueueStats.getDefaultInstance();
476     }
477 
478     @java.lang.Override
build()479     public com.google.cloud.tasks.v2beta2.QueueStats build() {
480       com.google.cloud.tasks.v2beta2.QueueStats result = buildPartial();
481       if (!result.isInitialized()) {
482         throw newUninitializedMessageException(result);
483       }
484       return result;
485     }
486 
487     @java.lang.Override
buildPartial()488     public com.google.cloud.tasks.v2beta2.QueueStats buildPartial() {
489       com.google.cloud.tasks.v2beta2.QueueStats result =
490           new com.google.cloud.tasks.v2beta2.QueueStats(this);
491       if (bitField0_ != 0) {
492         buildPartial0(result);
493       }
494       onBuilt();
495       return result;
496     }
497 
buildPartial0(com.google.cloud.tasks.v2beta2.QueueStats result)498     private void buildPartial0(com.google.cloud.tasks.v2beta2.QueueStats result) {
499       int from_bitField0_ = bitField0_;
500       if (((from_bitField0_ & 0x00000001) != 0)) {
501         result.tasksCount_ = tasksCount_;
502       }
503       if (((from_bitField0_ & 0x00000002) != 0)) {
504         result.oldestEstimatedArrivalTime_ =
505             oldestEstimatedArrivalTimeBuilder_ == null
506                 ? oldestEstimatedArrivalTime_
507                 : oldestEstimatedArrivalTimeBuilder_.build();
508       }
509       if (((from_bitField0_ & 0x00000004) != 0)) {
510         result.executedLastMinuteCount_ = executedLastMinuteCount_;
511       }
512       if (((from_bitField0_ & 0x00000008) != 0)) {
513         result.concurrentDispatchesCount_ = concurrentDispatchesCount_;
514       }
515       if (((from_bitField0_ & 0x00000010) != 0)) {
516         result.effectiveExecutionRate_ = effectiveExecutionRate_;
517       }
518     }
519 
520     @java.lang.Override
clone()521     public Builder clone() {
522       return super.clone();
523     }
524 
525     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)526     public Builder setField(
527         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
528       return super.setField(field, value);
529     }
530 
531     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)532     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
533       return super.clearField(field);
534     }
535 
536     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)537     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
538       return super.clearOneof(oneof);
539     }
540 
541     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)542     public Builder setRepeatedField(
543         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
544       return super.setRepeatedField(field, index, value);
545     }
546 
547     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)548     public Builder addRepeatedField(
549         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
550       return super.addRepeatedField(field, value);
551     }
552 
553     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)554     public Builder mergeFrom(com.google.protobuf.Message other) {
555       if (other instanceof com.google.cloud.tasks.v2beta2.QueueStats) {
556         return mergeFrom((com.google.cloud.tasks.v2beta2.QueueStats) other);
557       } else {
558         super.mergeFrom(other);
559         return this;
560       }
561     }
562 
mergeFrom(com.google.cloud.tasks.v2beta2.QueueStats other)563     public Builder mergeFrom(com.google.cloud.tasks.v2beta2.QueueStats other) {
564       if (other == com.google.cloud.tasks.v2beta2.QueueStats.getDefaultInstance()) return this;
565       if (other.getTasksCount() != 0L) {
566         setTasksCount(other.getTasksCount());
567       }
568       if (other.hasOldestEstimatedArrivalTime()) {
569         mergeOldestEstimatedArrivalTime(other.getOldestEstimatedArrivalTime());
570       }
571       if (other.getExecutedLastMinuteCount() != 0L) {
572         setExecutedLastMinuteCount(other.getExecutedLastMinuteCount());
573       }
574       if (other.getConcurrentDispatchesCount() != 0L) {
575         setConcurrentDispatchesCount(other.getConcurrentDispatchesCount());
576       }
577       if (other.getEffectiveExecutionRate() != 0D) {
578         setEffectiveExecutionRate(other.getEffectiveExecutionRate());
579       }
580       this.mergeUnknownFields(other.getUnknownFields());
581       onChanged();
582       return this;
583     }
584 
585     @java.lang.Override
isInitialized()586     public final boolean isInitialized() {
587       return true;
588     }
589 
590     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)591     public Builder mergeFrom(
592         com.google.protobuf.CodedInputStream input,
593         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
594         throws java.io.IOException {
595       if (extensionRegistry == null) {
596         throw new java.lang.NullPointerException();
597       }
598       try {
599         boolean done = false;
600         while (!done) {
601           int tag = input.readTag();
602           switch (tag) {
603             case 0:
604               done = true;
605               break;
606             case 8:
607               {
608                 tasksCount_ = input.readInt64();
609                 bitField0_ |= 0x00000001;
610                 break;
611               } // case 8
612             case 18:
613               {
614                 input.readMessage(
615                     getOldestEstimatedArrivalTimeFieldBuilder().getBuilder(), extensionRegistry);
616                 bitField0_ |= 0x00000002;
617                 break;
618               } // case 18
619             case 24:
620               {
621                 executedLastMinuteCount_ = input.readInt64();
622                 bitField0_ |= 0x00000004;
623                 break;
624               } // case 24
625             case 32:
626               {
627                 concurrentDispatchesCount_ = input.readInt64();
628                 bitField0_ |= 0x00000008;
629                 break;
630               } // case 32
631             case 41:
632               {
633                 effectiveExecutionRate_ = input.readDouble();
634                 bitField0_ |= 0x00000010;
635                 break;
636               } // case 41
637             default:
638               {
639                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
640                   done = true; // was an endgroup tag
641                 }
642                 break;
643               } // default:
644           } // switch (tag)
645         } // while (!done)
646       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
647         throw e.unwrapIOException();
648       } finally {
649         onChanged();
650       } // finally
651       return this;
652     }
653 
654     private int bitField0_;
655 
656     private long tasksCount_;
657     /**
658      *
659      *
660      * <pre>
661      * Output only. An estimation of the number of tasks in the queue, that is,
662      * the tasks in the queue that haven't been executed, the tasks in the queue
663      * which the queue has dispatched but has not yet received a reply for, and
664      * the failed tasks that the queue is retrying.
665      * </pre>
666      *
667      * <code>int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
668      *
669      * @return The tasksCount.
670      */
671     @java.lang.Override
getTasksCount()672     public long getTasksCount() {
673       return tasksCount_;
674     }
675     /**
676      *
677      *
678      * <pre>
679      * Output only. An estimation of the number of tasks in the queue, that is,
680      * the tasks in the queue that haven't been executed, the tasks in the queue
681      * which the queue has dispatched but has not yet received a reply for, and
682      * the failed tasks that the queue is retrying.
683      * </pre>
684      *
685      * <code>int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
686      *
687      * @param value The tasksCount to set.
688      * @return This builder for chaining.
689      */
setTasksCount(long value)690     public Builder setTasksCount(long value) {
691 
692       tasksCount_ = value;
693       bitField0_ |= 0x00000001;
694       onChanged();
695       return this;
696     }
697     /**
698      *
699      *
700      * <pre>
701      * Output only. An estimation of the number of tasks in the queue, that is,
702      * the tasks in the queue that haven't been executed, the tasks in the queue
703      * which the queue has dispatched but has not yet received a reply for, and
704      * the failed tasks that the queue is retrying.
705      * </pre>
706      *
707      * <code>int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
708      *
709      * @return This builder for chaining.
710      */
clearTasksCount()711     public Builder clearTasksCount() {
712       bitField0_ = (bitField0_ & ~0x00000001);
713       tasksCount_ = 0L;
714       onChanged();
715       return this;
716     }
717 
718     private com.google.protobuf.Timestamp oldestEstimatedArrivalTime_;
719     private com.google.protobuf.SingleFieldBuilderV3<
720             com.google.protobuf.Timestamp,
721             com.google.protobuf.Timestamp.Builder,
722             com.google.protobuf.TimestampOrBuilder>
723         oldestEstimatedArrivalTimeBuilder_;
724     /**
725      *
726      *
727      * <pre>
728      * Output only. An estimation of the nearest time in the future where a task
729      * in the queue is scheduled to be executed.
730      * </pre>
731      *
732      * <code>
733      * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
734      * </code>
735      *
736      * @return Whether the oldestEstimatedArrivalTime field is set.
737      */
hasOldestEstimatedArrivalTime()738     public boolean hasOldestEstimatedArrivalTime() {
739       return ((bitField0_ & 0x00000002) != 0);
740     }
741     /**
742      *
743      *
744      * <pre>
745      * Output only. An estimation of the nearest time in the future where a task
746      * in the queue is scheduled to be executed.
747      * </pre>
748      *
749      * <code>
750      * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
751      * </code>
752      *
753      * @return The oldestEstimatedArrivalTime.
754      */
getOldestEstimatedArrivalTime()755     public com.google.protobuf.Timestamp getOldestEstimatedArrivalTime() {
756       if (oldestEstimatedArrivalTimeBuilder_ == null) {
757         return oldestEstimatedArrivalTime_ == null
758             ? com.google.protobuf.Timestamp.getDefaultInstance()
759             : oldestEstimatedArrivalTime_;
760       } else {
761         return oldestEstimatedArrivalTimeBuilder_.getMessage();
762       }
763     }
764     /**
765      *
766      *
767      * <pre>
768      * Output only. An estimation of the nearest time in the future where a task
769      * in the queue is scheduled to be executed.
770      * </pre>
771      *
772      * <code>
773      * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
774      * </code>
775      */
setOldestEstimatedArrivalTime(com.google.protobuf.Timestamp value)776     public Builder setOldestEstimatedArrivalTime(com.google.protobuf.Timestamp value) {
777       if (oldestEstimatedArrivalTimeBuilder_ == null) {
778         if (value == null) {
779           throw new NullPointerException();
780         }
781         oldestEstimatedArrivalTime_ = value;
782       } else {
783         oldestEstimatedArrivalTimeBuilder_.setMessage(value);
784       }
785       bitField0_ |= 0x00000002;
786       onChanged();
787       return this;
788     }
789     /**
790      *
791      *
792      * <pre>
793      * Output only. An estimation of the nearest time in the future where a task
794      * in the queue is scheduled to be executed.
795      * </pre>
796      *
797      * <code>
798      * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
799      * </code>
800      */
setOldestEstimatedArrivalTime( com.google.protobuf.Timestamp.Builder builderForValue)801     public Builder setOldestEstimatedArrivalTime(
802         com.google.protobuf.Timestamp.Builder builderForValue) {
803       if (oldestEstimatedArrivalTimeBuilder_ == null) {
804         oldestEstimatedArrivalTime_ = builderForValue.build();
805       } else {
806         oldestEstimatedArrivalTimeBuilder_.setMessage(builderForValue.build());
807       }
808       bitField0_ |= 0x00000002;
809       onChanged();
810       return this;
811     }
812     /**
813      *
814      *
815      * <pre>
816      * Output only. An estimation of the nearest time in the future where a task
817      * in the queue is scheduled to be executed.
818      * </pre>
819      *
820      * <code>
821      * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
822      * </code>
823      */
mergeOldestEstimatedArrivalTime(com.google.protobuf.Timestamp value)824     public Builder mergeOldestEstimatedArrivalTime(com.google.protobuf.Timestamp value) {
825       if (oldestEstimatedArrivalTimeBuilder_ == null) {
826         if (((bitField0_ & 0x00000002) != 0)
827             && oldestEstimatedArrivalTime_ != null
828             && oldestEstimatedArrivalTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
829           getOldestEstimatedArrivalTimeBuilder().mergeFrom(value);
830         } else {
831           oldestEstimatedArrivalTime_ = value;
832         }
833       } else {
834         oldestEstimatedArrivalTimeBuilder_.mergeFrom(value);
835       }
836       bitField0_ |= 0x00000002;
837       onChanged();
838       return this;
839     }
840     /**
841      *
842      *
843      * <pre>
844      * Output only. An estimation of the nearest time in the future where a task
845      * in the queue is scheduled to be executed.
846      * </pre>
847      *
848      * <code>
849      * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
850      * </code>
851      */
clearOldestEstimatedArrivalTime()852     public Builder clearOldestEstimatedArrivalTime() {
853       bitField0_ = (bitField0_ & ~0x00000002);
854       oldestEstimatedArrivalTime_ = null;
855       if (oldestEstimatedArrivalTimeBuilder_ != null) {
856         oldestEstimatedArrivalTimeBuilder_.dispose();
857         oldestEstimatedArrivalTimeBuilder_ = null;
858       }
859       onChanged();
860       return this;
861     }
862     /**
863      *
864      *
865      * <pre>
866      * Output only. An estimation of the nearest time in the future where a task
867      * in the queue is scheduled to be executed.
868      * </pre>
869      *
870      * <code>
871      * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
872      * </code>
873      */
getOldestEstimatedArrivalTimeBuilder()874     public com.google.protobuf.Timestamp.Builder getOldestEstimatedArrivalTimeBuilder() {
875       bitField0_ |= 0x00000002;
876       onChanged();
877       return getOldestEstimatedArrivalTimeFieldBuilder().getBuilder();
878     }
879     /**
880      *
881      *
882      * <pre>
883      * Output only. An estimation of the nearest time in the future where a task
884      * in the queue is scheduled to be executed.
885      * </pre>
886      *
887      * <code>
888      * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
889      * </code>
890      */
getOldestEstimatedArrivalTimeOrBuilder()891     public com.google.protobuf.TimestampOrBuilder getOldestEstimatedArrivalTimeOrBuilder() {
892       if (oldestEstimatedArrivalTimeBuilder_ != null) {
893         return oldestEstimatedArrivalTimeBuilder_.getMessageOrBuilder();
894       } else {
895         return oldestEstimatedArrivalTime_ == null
896             ? com.google.protobuf.Timestamp.getDefaultInstance()
897             : oldestEstimatedArrivalTime_;
898       }
899     }
900     /**
901      *
902      *
903      * <pre>
904      * Output only. An estimation of the nearest time in the future where a task
905      * in the queue is scheduled to be executed.
906      * </pre>
907      *
908      * <code>
909      * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
910      * </code>
911      */
912     private com.google.protobuf.SingleFieldBuilderV3<
913             com.google.protobuf.Timestamp,
914             com.google.protobuf.Timestamp.Builder,
915             com.google.protobuf.TimestampOrBuilder>
getOldestEstimatedArrivalTimeFieldBuilder()916         getOldestEstimatedArrivalTimeFieldBuilder() {
917       if (oldestEstimatedArrivalTimeBuilder_ == null) {
918         oldestEstimatedArrivalTimeBuilder_ =
919             new com.google.protobuf.SingleFieldBuilderV3<
920                 com.google.protobuf.Timestamp,
921                 com.google.protobuf.Timestamp.Builder,
922                 com.google.protobuf.TimestampOrBuilder>(
923                 getOldestEstimatedArrivalTime(), getParentForChildren(), isClean());
924         oldestEstimatedArrivalTime_ = null;
925       }
926       return oldestEstimatedArrivalTimeBuilder_;
927     }
928 
929     private long executedLastMinuteCount_;
930     /**
931      *
932      *
933      * <pre>
934      * Output only. The number of tasks that the queue has dispatched and received
935      * a reply for during the last minute. This variable counts both successful
936      * and non-successful executions.
937      * </pre>
938      *
939      * <code>int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
940      * </code>
941      *
942      * @return The executedLastMinuteCount.
943      */
944     @java.lang.Override
getExecutedLastMinuteCount()945     public long getExecutedLastMinuteCount() {
946       return executedLastMinuteCount_;
947     }
948     /**
949      *
950      *
951      * <pre>
952      * Output only. The number of tasks that the queue has dispatched and received
953      * a reply for during the last minute. This variable counts both successful
954      * and non-successful executions.
955      * </pre>
956      *
957      * <code>int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
958      * </code>
959      *
960      * @param value The executedLastMinuteCount to set.
961      * @return This builder for chaining.
962      */
setExecutedLastMinuteCount(long value)963     public Builder setExecutedLastMinuteCount(long value) {
964 
965       executedLastMinuteCount_ = value;
966       bitField0_ |= 0x00000004;
967       onChanged();
968       return this;
969     }
970     /**
971      *
972      *
973      * <pre>
974      * Output only. The number of tasks that the queue has dispatched and received
975      * a reply for during the last minute. This variable counts both successful
976      * and non-successful executions.
977      * </pre>
978      *
979      * <code>int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
980      * </code>
981      *
982      * @return This builder for chaining.
983      */
clearExecutedLastMinuteCount()984     public Builder clearExecutedLastMinuteCount() {
985       bitField0_ = (bitField0_ & ~0x00000004);
986       executedLastMinuteCount_ = 0L;
987       onChanged();
988       return this;
989     }
990 
991     private long concurrentDispatchesCount_;
992     /**
993      *
994      *
995      * <pre>
996      * Output only. The number of requests that the queue has dispatched but has
997      * not received a reply for yet.
998      * </pre>
999      *
1000      * <code>int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1001      * </code>
1002      *
1003      * @return The concurrentDispatchesCount.
1004      */
1005     @java.lang.Override
getConcurrentDispatchesCount()1006     public long getConcurrentDispatchesCount() {
1007       return concurrentDispatchesCount_;
1008     }
1009     /**
1010      *
1011      *
1012      * <pre>
1013      * Output only. The number of requests that the queue has dispatched but has
1014      * not received a reply for yet.
1015      * </pre>
1016      *
1017      * <code>int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1018      * </code>
1019      *
1020      * @param value The concurrentDispatchesCount to set.
1021      * @return This builder for chaining.
1022      */
setConcurrentDispatchesCount(long value)1023     public Builder setConcurrentDispatchesCount(long value) {
1024 
1025       concurrentDispatchesCount_ = value;
1026       bitField0_ |= 0x00000008;
1027       onChanged();
1028       return this;
1029     }
1030     /**
1031      *
1032      *
1033      * <pre>
1034      * Output only. The number of requests that the queue has dispatched but has
1035      * not received a reply for yet.
1036      * </pre>
1037      *
1038      * <code>int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
1039      * </code>
1040      *
1041      * @return This builder for chaining.
1042      */
clearConcurrentDispatchesCount()1043     public Builder clearConcurrentDispatchesCount() {
1044       bitField0_ = (bitField0_ & ~0x00000008);
1045       concurrentDispatchesCount_ = 0L;
1046       onChanged();
1047       return this;
1048     }
1049 
1050     private double effectiveExecutionRate_;
1051     /**
1052      *
1053      *
1054      * <pre>
1055      * Output only. The current maximum number of tasks per second executed by the
1056      * queue. The maximum value of this variable is controlled by the RateLimits
1057      * of the Queue. However, this value could be less to avoid overloading the
1058      * endpoints tasks in the queue are targeting.
1059      * </pre>
1060      *
1061      * <code>double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
1062      * </code>
1063      *
1064      * @return The effectiveExecutionRate.
1065      */
1066     @java.lang.Override
getEffectiveExecutionRate()1067     public double getEffectiveExecutionRate() {
1068       return effectiveExecutionRate_;
1069     }
1070     /**
1071      *
1072      *
1073      * <pre>
1074      * Output only. The current maximum number of tasks per second executed by the
1075      * queue. The maximum value of this variable is controlled by the RateLimits
1076      * of the Queue. However, this value could be less to avoid overloading the
1077      * endpoints tasks in the queue are targeting.
1078      * </pre>
1079      *
1080      * <code>double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
1081      * </code>
1082      *
1083      * @param value The effectiveExecutionRate to set.
1084      * @return This builder for chaining.
1085      */
setEffectiveExecutionRate(double value)1086     public Builder setEffectiveExecutionRate(double value) {
1087 
1088       effectiveExecutionRate_ = value;
1089       bitField0_ |= 0x00000010;
1090       onChanged();
1091       return this;
1092     }
1093     /**
1094      *
1095      *
1096      * <pre>
1097      * Output only. The current maximum number of tasks per second executed by the
1098      * queue. The maximum value of this variable is controlled by the RateLimits
1099      * of the Queue. However, this value could be less to avoid overloading the
1100      * endpoints tasks in the queue are targeting.
1101      * </pre>
1102      *
1103      * <code>double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
1104      * </code>
1105      *
1106      * @return This builder for chaining.
1107      */
clearEffectiveExecutionRate()1108     public Builder clearEffectiveExecutionRate() {
1109       bitField0_ = (bitField0_ & ~0x00000010);
1110       effectiveExecutionRate_ = 0D;
1111       onChanged();
1112       return this;
1113     }
1114 
1115     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1116     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1117       return super.setUnknownFields(unknownFields);
1118     }
1119 
1120     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1121     public final Builder mergeUnknownFields(
1122         final com.google.protobuf.UnknownFieldSet unknownFields) {
1123       return super.mergeUnknownFields(unknownFields);
1124     }
1125 
1126     // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.QueueStats)
1127   }
1128 
1129   // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.QueueStats)
1130   private static final com.google.cloud.tasks.v2beta2.QueueStats DEFAULT_INSTANCE;
1131 
1132   static {
1133     DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.QueueStats();
1134   }
1135 
getDefaultInstance()1136   public static com.google.cloud.tasks.v2beta2.QueueStats getDefaultInstance() {
1137     return DEFAULT_INSTANCE;
1138   }
1139 
1140   private static final com.google.protobuf.Parser<QueueStats> PARSER =
1141       new com.google.protobuf.AbstractParser<QueueStats>() {
1142         @java.lang.Override
1143         public QueueStats parsePartialFrom(
1144             com.google.protobuf.CodedInputStream input,
1145             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1146             throws com.google.protobuf.InvalidProtocolBufferException {
1147           Builder builder = newBuilder();
1148           try {
1149             builder.mergeFrom(input, extensionRegistry);
1150           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1151             throw e.setUnfinishedMessage(builder.buildPartial());
1152           } catch (com.google.protobuf.UninitializedMessageException e) {
1153             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1154           } catch (java.io.IOException e) {
1155             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1156                 .setUnfinishedMessage(builder.buildPartial());
1157           }
1158           return builder.buildPartial();
1159         }
1160       };
1161 
parser()1162   public static com.google.protobuf.Parser<QueueStats> parser() {
1163     return PARSER;
1164   }
1165 
1166   @java.lang.Override
getParserForType()1167   public com.google.protobuf.Parser<QueueStats> getParserForType() {
1168     return PARSER;
1169   }
1170 
1171   @java.lang.Override
getDefaultInstanceForType()1172   public com.google.cloud.tasks.v2beta2.QueueStats getDefaultInstanceForType() {
1173     return DEFAULT_INSTANCE;
1174   }
1175 }
1176