• 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/compute/v1/compute.proto
18 
19 package com.google.cloud.compute.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Settings controlling the volume of requests, connections and retries to this backend service.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.compute.v1.CircuitBreakers}
29  */
30 public final class CircuitBreakers extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.CircuitBreakers)
33     CircuitBreakersOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use CircuitBreakers.newBuilder() to construct.
CircuitBreakers(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private CircuitBreakers(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
CircuitBreakers()40   private CircuitBreakers() {}
41 
42   @java.lang.Override
43   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)44   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
45     return new CircuitBreakers();
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.compute.v1.Compute
55         .internal_static_google_cloud_compute_v1_CircuitBreakers_descriptor;
56   }
57 
58   @java.lang.Override
59   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()60       internalGetFieldAccessorTable() {
61     return com.google.cloud.compute.v1.Compute
62         .internal_static_google_cloud_compute_v1_CircuitBreakers_fieldAccessorTable
63         .ensureFieldAccessorsInitialized(
64             com.google.cloud.compute.v1.CircuitBreakers.class,
65             com.google.cloud.compute.v1.CircuitBreakers.Builder.class);
66   }
67 
68   private int bitField0_;
69   public static final int MAX_CONNECTIONS_FIELD_NUMBER = 110652154;
70   private int maxConnections_ = 0;
71   /**
72    *
73    *
74    * <pre>
75    * The maximum number of connections to the backend service. If not specified, there is no limit. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
76    * </pre>
77    *
78    * <code>optional int32 max_connections = 110652154;</code>
79    *
80    * @return Whether the maxConnections field is set.
81    */
82   @java.lang.Override
hasMaxConnections()83   public boolean hasMaxConnections() {
84     return ((bitField0_ & 0x00000001) != 0);
85   }
86   /**
87    *
88    *
89    * <pre>
90    * The maximum number of connections to the backend service. If not specified, there is no limit. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
91    * </pre>
92    *
93    * <code>optional int32 max_connections = 110652154;</code>
94    *
95    * @return The maxConnections.
96    */
97   @java.lang.Override
getMaxConnections()98   public int getMaxConnections() {
99     return maxConnections_;
100   }
101 
102   public static final int MAX_PENDING_REQUESTS_FIELD_NUMBER = 375558887;
103   private int maxPendingRequests_ = 0;
104   /**
105    *
106    *
107    * <pre>
108    * The maximum number of pending requests allowed to the backend service. If not specified, there is no limit. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
109    * </pre>
110    *
111    * <code>optional int32 max_pending_requests = 375558887;</code>
112    *
113    * @return Whether the maxPendingRequests field is set.
114    */
115   @java.lang.Override
hasMaxPendingRequests()116   public boolean hasMaxPendingRequests() {
117     return ((bitField0_ & 0x00000002) != 0);
118   }
119   /**
120    *
121    *
122    * <pre>
123    * The maximum number of pending requests allowed to the backend service. If not specified, there is no limit. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
124    * </pre>
125    *
126    * <code>optional int32 max_pending_requests = 375558887;</code>
127    *
128    * @return The maxPendingRequests.
129    */
130   @java.lang.Override
getMaxPendingRequests()131   public int getMaxPendingRequests() {
132     return maxPendingRequests_;
133   }
134 
135   public static final int MAX_REQUESTS_FIELD_NUMBER = 28097599;
136   private int maxRequests_ = 0;
137   /**
138    *
139    *
140    * <pre>
141    * The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
142    * </pre>
143    *
144    * <code>optional int32 max_requests = 28097599;</code>
145    *
146    * @return Whether the maxRequests field is set.
147    */
148   @java.lang.Override
hasMaxRequests()149   public boolean hasMaxRequests() {
150     return ((bitField0_ & 0x00000004) != 0);
151   }
152   /**
153    *
154    *
155    * <pre>
156    * The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
157    * </pre>
158    *
159    * <code>optional int32 max_requests = 28097599;</code>
160    *
161    * @return The maxRequests.
162    */
163   @java.lang.Override
getMaxRequests()164   public int getMaxRequests() {
165     return maxRequests_;
166   }
167 
168   public static final int MAX_REQUESTS_PER_CONNECTION_FIELD_NUMBER = 361630528;
169   private int maxRequestsPerConnection_ = 0;
170   /**
171    *
172    *
173    * <pre>
174    * Maximum requests for a single connection to the backend service. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
175    * </pre>
176    *
177    * <code>optional int32 max_requests_per_connection = 361630528;</code>
178    *
179    * @return Whether the maxRequestsPerConnection field is set.
180    */
181   @java.lang.Override
hasMaxRequestsPerConnection()182   public boolean hasMaxRequestsPerConnection() {
183     return ((bitField0_ & 0x00000008) != 0);
184   }
185   /**
186    *
187    *
188    * <pre>
189    * Maximum requests for a single connection to the backend service. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
190    * </pre>
191    *
192    * <code>optional int32 max_requests_per_connection = 361630528;</code>
193    *
194    * @return The maxRequestsPerConnection.
195    */
196   @java.lang.Override
getMaxRequestsPerConnection()197   public int getMaxRequestsPerConnection() {
198     return maxRequestsPerConnection_;
199   }
200 
201   public static final int MAX_RETRIES_FIELD_NUMBER = 55546219;
202   private int maxRetries_ = 0;
203   /**
204    *
205    *
206    * <pre>
207    * The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
208    * </pre>
209    *
210    * <code>optional int32 max_retries = 55546219;</code>
211    *
212    * @return Whether the maxRetries field is set.
213    */
214   @java.lang.Override
hasMaxRetries()215   public boolean hasMaxRetries() {
216     return ((bitField0_ & 0x00000010) != 0);
217   }
218   /**
219    *
220    *
221    * <pre>
222    * The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
223    * </pre>
224    *
225    * <code>optional int32 max_retries = 55546219;</code>
226    *
227    * @return The maxRetries.
228    */
229   @java.lang.Override
getMaxRetries()230   public int getMaxRetries() {
231     return maxRetries_;
232   }
233 
234   private byte memoizedIsInitialized = -1;
235 
236   @java.lang.Override
isInitialized()237   public final boolean isInitialized() {
238     byte isInitialized = memoizedIsInitialized;
239     if (isInitialized == 1) return true;
240     if (isInitialized == 0) return false;
241 
242     memoizedIsInitialized = 1;
243     return true;
244   }
245 
246   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)247   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
248     if (((bitField0_ & 0x00000004) != 0)) {
249       output.writeInt32(28097599, maxRequests_);
250     }
251     if (((bitField0_ & 0x00000010) != 0)) {
252       output.writeInt32(55546219, maxRetries_);
253     }
254     if (((bitField0_ & 0x00000001) != 0)) {
255       output.writeInt32(110652154, maxConnections_);
256     }
257     if (((bitField0_ & 0x00000008) != 0)) {
258       output.writeInt32(361630528, maxRequestsPerConnection_);
259     }
260     if (((bitField0_ & 0x00000002) != 0)) {
261       output.writeInt32(375558887, maxPendingRequests_);
262     }
263     getUnknownFields().writeTo(output);
264   }
265 
266   @java.lang.Override
getSerializedSize()267   public int getSerializedSize() {
268     int size = memoizedSize;
269     if (size != -1) return size;
270 
271     size = 0;
272     if (((bitField0_ & 0x00000004) != 0)) {
273       size += com.google.protobuf.CodedOutputStream.computeInt32Size(28097599, maxRequests_);
274     }
275     if (((bitField0_ & 0x00000010) != 0)) {
276       size += com.google.protobuf.CodedOutputStream.computeInt32Size(55546219, maxRetries_);
277     }
278     if (((bitField0_ & 0x00000001) != 0)) {
279       size += com.google.protobuf.CodedOutputStream.computeInt32Size(110652154, maxConnections_);
280     }
281     if (((bitField0_ & 0x00000008) != 0)) {
282       size +=
283           com.google.protobuf.CodedOutputStream.computeInt32Size(
284               361630528, maxRequestsPerConnection_);
285     }
286     if (((bitField0_ & 0x00000002) != 0)) {
287       size +=
288           com.google.protobuf.CodedOutputStream.computeInt32Size(375558887, maxPendingRequests_);
289     }
290     size += getUnknownFields().getSerializedSize();
291     memoizedSize = size;
292     return size;
293   }
294 
295   @java.lang.Override
equals(final java.lang.Object obj)296   public boolean equals(final java.lang.Object obj) {
297     if (obj == this) {
298       return true;
299     }
300     if (!(obj instanceof com.google.cloud.compute.v1.CircuitBreakers)) {
301       return super.equals(obj);
302     }
303     com.google.cloud.compute.v1.CircuitBreakers other =
304         (com.google.cloud.compute.v1.CircuitBreakers) obj;
305 
306     if (hasMaxConnections() != other.hasMaxConnections()) return false;
307     if (hasMaxConnections()) {
308       if (getMaxConnections() != other.getMaxConnections()) return false;
309     }
310     if (hasMaxPendingRequests() != other.hasMaxPendingRequests()) return false;
311     if (hasMaxPendingRequests()) {
312       if (getMaxPendingRequests() != other.getMaxPendingRequests()) return false;
313     }
314     if (hasMaxRequests() != other.hasMaxRequests()) return false;
315     if (hasMaxRequests()) {
316       if (getMaxRequests() != other.getMaxRequests()) return false;
317     }
318     if (hasMaxRequestsPerConnection() != other.hasMaxRequestsPerConnection()) return false;
319     if (hasMaxRequestsPerConnection()) {
320       if (getMaxRequestsPerConnection() != other.getMaxRequestsPerConnection()) return false;
321     }
322     if (hasMaxRetries() != other.hasMaxRetries()) return false;
323     if (hasMaxRetries()) {
324       if (getMaxRetries() != other.getMaxRetries()) return false;
325     }
326     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
327     return true;
328   }
329 
330   @java.lang.Override
hashCode()331   public int hashCode() {
332     if (memoizedHashCode != 0) {
333       return memoizedHashCode;
334     }
335     int hash = 41;
336     hash = (19 * hash) + getDescriptor().hashCode();
337     if (hasMaxConnections()) {
338       hash = (37 * hash) + MAX_CONNECTIONS_FIELD_NUMBER;
339       hash = (53 * hash) + getMaxConnections();
340     }
341     if (hasMaxPendingRequests()) {
342       hash = (37 * hash) + MAX_PENDING_REQUESTS_FIELD_NUMBER;
343       hash = (53 * hash) + getMaxPendingRequests();
344     }
345     if (hasMaxRequests()) {
346       hash = (37 * hash) + MAX_REQUESTS_FIELD_NUMBER;
347       hash = (53 * hash) + getMaxRequests();
348     }
349     if (hasMaxRequestsPerConnection()) {
350       hash = (37 * hash) + MAX_REQUESTS_PER_CONNECTION_FIELD_NUMBER;
351       hash = (53 * hash) + getMaxRequestsPerConnection();
352     }
353     if (hasMaxRetries()) {
354       hash = (37 * hash) + MAX_RETRIES_FIELD_NUMBER;
355       hash = (53 * hash) + getMaxRetries();
356     }
357     hash = (29 * hash) + getUnknownFields().hashCode();
358     memoizedHashCode = hash;
359     return hash;
360   }
361 
parseFrom(java.nio.ByteBuffer data)362   public static com.google.cloud.compute.v1.CircuitBreakers parseFrom(java.nio.ByteBuffer data)
363       throws com.google.protobuf.InvalidProtocolBufferException {
364     return PARSER.parseFrom(data);
365   }
366 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)367   public static com.google.cloud.compute.v1.CircuitBreakers parseFrom(
368       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
369       throws com.google.protobuf.InvalidProtocolBufferException {
370     return PARSER.parseFrom(data, extensionRegistry);
371   }
372 
parseFrom( com.google.protobuf.ByteString data)373   public static com.google.cloud.compute.v1.CircuitBreakers parseFrom(
374       com.google.protobuf.ByteString data)
375       throws com.google.protobuf.InvalidProtocolBufferException {
376     return PARSER.parseFrom(data);
377   }
378 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)379   public static com.google.cloud.compute.v1.CircuitBreakers parseFrom(
380       com.google.protobuf.ByteString data,
381       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
382       throws com.google.protobuf.InvalidProtocolBufferException {
383     return PARSER.parseFrom(data, extensionRegistry);
384   }
385 
parseFrom(byte[] data)386   public static com.google.cloud.compute.v1.CircuitBreakers parseFrom(byte[] data)
387       throws com.google.protobuf.InvalidProtocolBufferException {
388     return PARSER.parseFrom(data);
389   }
390 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)391   public static com.google.cloud.compute.v1.CircuitBreakers parseFrom(
392       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
393       throws com.google.protobuf.InvalidProtocolBufferException {
394     return PARSER.parseFrom(data, extensionRegistry);
395   }
396 
parseFrom(java.io.InputStream input)397   public static com.google.cloud.compute.v1.CircuitBreakers parseFrom(java.io.InputStream input)
398       throws java.io.IOException {
399     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
400   }
401 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)402   public static com.google.cloud.compute.v1.CircuitBreakers parseFrom(
403       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
404       throws java.io.IOException {
405     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
406         PARSER, input, extensionRegistry);
407   }
408 
parseDelimitedFrom( java.io.InputStream input)409   public static com.google.cloud.compute.v1.CircuitBreakers parseDelimitedFrom(
410       java.io.InputStream input) throws java.io.IOException {
411     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
412   }
413 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)414   public static com.google.cloud.compute.v1.CircuitBreakers parseDelimitedFrom(
415       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
416       throws java.io.IOException {
417     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
418         PARSER, input, extensionRegistry);
419   }
420 
parseFrom( com.google.protobuf.CodedInputStream input)421   public static com.google.cloud.compute.v1.CircuitBreakers parseFrom(
422       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
423     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
424   }
425 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)426   public static com.google.cloud.compute.v1.CircuitBreakers parseFrom(
427       com.google.protobuf.CodedInputStream input,
428       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
429       throws java.io.IOException {
430     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
431         PARSER, input, extensionRegistry);
432   }
433 
434   @java.lang.Override
newBuilderForType()435   public Builder newBuilderForType() {
436     return newBuilder();
437   }
438 
newBuilder()439   public static Builder newBuilder() {
440     return DEFAULT_INSTANCE.toBuilder();
441   }
442 
newBuilder(com.google.cloud.compute.v1.CircuitBreakers prototype)443   public static Builder newBuilder(com.google.cloud.compute.v1.CircuitBreakers prototype) {
444     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
445   }
446 
447   @java.lang.Override
toBuilder()448   public Builder toBuilder() {
449     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
450   }
451 
452   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)453   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
454     Builder builder = new Builder(parent);
455     return builder;
456   }
457   /**
458    *
459    *
460    * <pre>
461    * Settings controlling the volume of requests, connections and retries to this backend service.
462    * </pre>
463    *
464    * Protobuf type {@code google.cloud.compute.v1.CircuitBreakers}
465    */
466   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
467       implements
468       // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.CircuitBreakers)
469       com.google.cloud.compute.v1.CircuitBreakersOrBuilder {
getDescriptor()470     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
471       return com.google.cloud.compute.v1.Compute
472           .internal_static_google_cloud_compute_v1_CircuitBreakers_descriptor;
473     }
474 
475     @java.lang.Override
476     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()477         internalGetFieldAccessorTable() {
478       return com.google.cloud.compute.v1.Compute
479           .internal_static_google_cloud_compute_v1_CircuitBreakers_fieldAccessorTable
480           .ensureFieldAccessorsInitialized(
481               com.google.cloud.compute.v1.CircuitBreakers.class,
482               com.google.cloud.compute.v1.CircuitBreakers.Builder.class);
483     }
484 
485     // Construct using com.google.cloud.compute.v1.CircuitBreakers.newBuilder()
Builder()486     private Builder() {}
487 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)488     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
489       super(parent);
490     }
491 
492     @java.lang.Override
clear()493     public Builder clear() {
494       super.clear();
495       bitField0_ = 0;
496       maxConnections_ = 0;
497       maxPendingRequests_ = 0;
498       maxRequests_ = 0;
499       maxRequestsPerConnection_ = 0;
500       maxRetries_ = 0;
501       return this;
502     }
503 
504     @java.lang.Override
getDescriptorForType()505     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
506       return com.google.cloud.compute.v1.Compute
507           .internal_static_google_cloud_compute_v1_CircuitBreakers_descriptor;
508     }
509 
510     @java.lang.Override
getDefaultInstanceForType()511     public com.google.cloud.compute.v1.CircuitBreakers getDefaultInstanceForType() {
512       return com.google.cloud.compute.v1.CircuitBreakers.getDefaultInstance();
513     }
514 
515     @java.lang.Override
build()516     public com.google.cloud.compute.v1.CircuitBreakers build() {
517       com.google.cloud.compute.v1.CircuitBreakers result = buildPartial();
518       if (!result.isInitialized()) {
519         throw newUninitializedMessageException(result);
520       }
521       return result;
522     }
523 
524     @java.lang.Override
buildPartial()525     public com.google.cloud.compute.v1.CircuitBreakers buildPartial() {
526       com.google.cloud.compute.v1.CircuitBreakers result =
527           new com.google.cloud.compute.v1.CircuitBreakers(this);
528       if (bitField0_ != 0) {
529         buildPartial0(result);
530       }
531       onBuilt();
532       return result;
533     }
534 
buildPartial0(com.google.cloud.compute.v1.CircuitBreakers result)535     private void buildPartial0(com.google.cloud.compute.v1.CircuitBreakers result) {
536       int from_bitField0_ = bitField0_;
537       int to_bitField0_ = 0;
538       if (((from_bitField0_ & 0x00000001) != 0)) {
539         result.maxConnections_ = maxConnections_;
540         to_bitField0_ |= 0x00000001;
541       }
542       if (((from_bitField0_ & 0x00000002) != 0)) {
543         result.maxPendingRequests_ = maxPendingRequests_;
544         to_bitField0_ |= 0x00000002;
545       }
546       if (((from_bitField0_ & 0x00000004) != 0)) {
547         result.maxRequests_ = maxRequests_;
548         to_bitField0_ |= 0x00000004;
549       }
550       if (((from_bitField0_ & 0x00000008) != 0)) {
551         result.maxRequestsPerConnection_ = maxRequestsPerConnection_;
552         to_bitField0_ |= 0x00000008;
553       }
554       if (((from_bitField0_ & 0x00000010) != 0)) {
555         result.maxRetries_ = maxRetries_;
556         to_bitField0_ |= 0x00000010;
557       }
558       result.bitField0_ |= to_bitField0_;
559     }
560 
561     @java.lang.Override
clone()562     public Builder clone() {
563       return super.clone();
564     }
565 
566     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)567     public Builder setField(
568         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
569       return super.setField(field, value);
570     }
571 
572     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)573     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
574       return super.clearField(field);
575     }
576 
577     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)578     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
579       return super.clearOneof(oneof);
580     }
581 
582     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)583     public Builder setRepeatedField(
584         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
585       return super.setRepeatedField(field, index, value);
586     }
587 
588     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)589     public Builder addRepeatedField(
590         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
591       return super.addRepeatedField(field, value);
592     }
593 
594     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)595     public Builder mergeFrom(com.google.protobuf.Message other) {
596       if (other instanceof com.google.cloud.compute.v1.CircuitBreakers) {
597         return mergeFrom((com.google.cloud.compute.v1.CircuitBreakers) other);
598       } else {
599         super.mergeFrom(other);
600         return this;
601       }
602     }
603 
mergeFrom(com.google.cloud.compute.v1.CircuitBreakers other)604     public Builder mergeFrom(com.google.cloud.compute.v1.CircuitBreakers other) {
605       if (other == com.google.cloud.compute.v1.CircuitBreakers.getDefaultInstance()) return this;
606       if (other.hasMaxConnections()) {
607         setMaxConnections(other.getMaxConnections());
608       }
609       if (other.hasMaxPendingRequests()) {
610         setMaxPendingRequests(other.getMaxPendingRequests());
611       }
612       if (other.hasMaxRequests()) {
613         setMaxRequests(other.getMaxRequests());
614       }
615       if (other.hasMaxRequestsPerConnection()) {
616         setMaxRequestsPerConnection(other.getMaxRequestsPerConnection());
617       }
618       if (other.hasMaxRetries()) {
619         setMaxRetries(other.getMaxRetries());
620       }
621       this.mergeUnknownFields(other.getUnknownFields());
622       onChanged();
623       return this;
624     }
625 
626     @java.lang.Override
isInitialized()627     public final boolean isInitialized() {
628       return true;
629     }
630 
631     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)632     public Builder mergeFrom(
633         com.google.protobuf.CodedInputStream input,
634         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
635         throws java.io.IOException {
636       if (extensionRegistry == null) {
637         throw new java.lang.NullPointerException();
638       }
639       try {
640         boolean done = false;
641         while (!done) {
642           int tag = input.readTag();
643           switch (tag) {
644             case 0:
645               done = true;
646               break;
647             case 224780792:
648               {
649                 maxRequests_ = input.readInt32();
650                 bitField0_ |= 0x00000004;
651                 break;
652               } // case 224780792
653             case 444369752:
654               {
655                 maxRetries_ = input.readInt32();
656                 bitField0_ |= 0x00000010;
657                 break;
658               } // case 444369752
659             case 885217232:
660               {
661                 maxConnections_ = input.readInt32();
662                 bitField0_ |= 0x00000001;
663                 break;
664               } // case 885217232
665             case -1401923072:
666               {
667                 maxRequestsPerConnection_ = input.readInt32();
668                 bitField0_ |= 0x00000008;
669                 break;
670               } // case -1401923072
671             case -1290496200:
672               {
673                 maxPendingRequests_ = input.readInt32();
674                 bitField0_ |= 0x00000002;
675                 break;
676               } // case -1290496200
677             default:
678               {
679                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
680                   done = true; // was an endgroup tag
681                 }
682                 break;
683               } // default:
684           } // switch (tag)
685         } // while (!done)
686       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
687         throw e.unwrapIOException();
688       } finally {
689         onChanged();
690       } // finally
691       return this;
692     }
693 
694     private int bitField0_;
695 
696     private int maxConnections_;
697     /**
698      *
699      *
700      * <pre>
701      * The maximum number of connections to the backend service. If not specified, there is no limit. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
702      * </pre>
703      *
704      * <code>optional int32 max_connections = 110652154;</code>
705      *
706      * @return Whether the maxConnections field is set.
707      */
708     @java.lang.Override
hasMaxConnections()709     public boolean hasMaxConnections() {
710       return ((bitField0_ & 0x00000001) != 0);
711     }
712     /**
713      *
714      *
715      * <pre>
716      * The maximum number of connections to the backend service. If not specified, there is no limit. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
717      * </pre>
718      *
719      * <code>optional int32 max_connections = 110652154;</code>
720      *
721      * @return The maxConnections.
722      */
723     @java.lang.Override
getMaxConnections()724     public int getMaxConnections() {
725       return maxConnections_;
726     }
727     /**
728      *
729      *
730      * <pre>
731      * The maximum number of connections to the backend service. If not specified, there is no limit. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
732      * </pre>
733      *
734      * <code>optional int32 max_connections = 110652154;</code>
735      *
736      * @param value The maxConnections to set.
737      * @return This builder for chaining.
738      */
setMaxConnections(int value)739     public Builder setMaxConnections(int value) {
740 
741       maxConnections_ = value;
742       bitField0_ |= 0x00000001;
743       onChanged();
744       return this;
745     }
746     /**
747      *
748      *
749      * <pre>
750      * The maximum number of connections to the backend service. If not specified, there is no limit. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
751      * </pre>
752      *
753      * <code>optional int32 max_connections = 110652154;</code>
754      *
755      * @return This builder for chaining.
756      */
clearMaxConnections()757     public Builder clearMaxConnections() {
758       bitField0_ = (bitField0_ & ~0x00000001);
759       maxConnections_ = 0;
760       onChanged();
761       return this;
762     }
763 
764     private int maxPendingRequests_;
765     /**
766      *
767      *
768      * <pre>
769      * The maximum number of pending requests allowed to the backend service. If not specified, there is no limit. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
770      * </pre>
771      *
772      * <code>optional int32 max_pending_requests = 375558887;</code>
773      *
774      * @return Whether the maxPendingRequests field is set.
775      */
776     @java.lang.Override
hasMaxPendingRequests()777     public boolean hasMaxPendingRequests() {
778       return ((bitField0_ & 0x00000002) != 0);
779     }
780     /**
781      *
782      *
783      * <pre>
784      * The maximum number of pending requests allowed to the backend service. If not specified, there is no limit. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
785      * </pre>
786      *
787      * <code>optional int32 max_pending_requests = 375558887;</code>
788      *
789      * @return The maxPendingRequests.
790      */
791     @java.lang.Override
getMaxPendingRequests()792     public int getMaxPendingRequests() {
793       return maxPendingRequests_;
794     }
795     /**
796      *
797      *
798      * <pre>
799      * The maximum number of pending requests allowed to the backend service. If not specified, there is no limit. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
800      * </pre>
801      *
802      * <code>optional int32 max_pending_requests = 375558887;</code>
803      *
804      * @param value The maxPendingRequests to set.
805      * @return This builder for chaining.
806      */
setMaxPendingRequests(int value)807     public Builder setMaxPendingRequests(int value) {
808 
809       maxPendingRequests_ = value;
810       bitField0_ |= 0x00000002;
811       onChanged();
812       return this;
813     }
814     /**
815      *
816      *
817      * <pre>
818      * The maximum number of pending requests allowed to the backend service. If not specified, there is no limit. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
819      * </pre>
820      *
821      * <code>optional int32 max_pending_requests = 375558887;</code>
822      *
823      * @return This builder for chaining.
824      */
clearMaxPendingRequests()825     public Builder clearMaxPendingRequests() {
826       bitField0_ = (bitField0_ & ~0x00000002);
827       maxPendingRequests_ = 0;
828       onChanged();
829       return this;
830     }
831 
832     private int maxRequests_;
833     /**
834      *
835      *
836      * <pre>
837      * The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
838      * </pre>
839      *
840      * <code>optional int32 max_requests = 28097599;</code>
841      *
842      * @return Whether the maxRequests field is set.
843      */
844     @java.lang.Override
hasMaxRequests()845     public boolean hasMaxRequests() {
846       return ((bitField0_ & 0x00000004) != 0);
847     }
848     /**
849      *
850      *
851      * <pre>
852      * The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
853      * </pre>
854      *
855      * <code>optional int32 max_requests = 28097599;</code>
856      *
857      * @return The maxRequests.
858      */
859     @java.lang.Override
getMaxRequests()860     public int getMaxRequests() {
861       return maxRequests_;
862     }
863     /**
864      *
865      *
866      * <pre>
867      * The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
868      * </pre>
869      *
870      * <code>optional int32 max_requests = 28097599;</code>
871      *
872      * @param value The maxRequests to set.
873      * @return This builder for chaining.
874      */
setMaxRequests(int value)875     public Builder setMaxRequests(int value) {
876 
877       maxRequests_ = value;
878       bitField0_ |= 0x00000004;
879       onChanged();
880       return this;
881     }
882     /**
883      *
884      *
885      * <pre>
886      * The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
887      * </pre>
888      *
889      * <code>optional int32 max_requests = 28097599;</code>
890      *
891      * @return This builder for chaining.
892      */
clearMaxRequests()893     public Builder clearMaxRequests() {
894       bitField0_ = (bitField0_ & ~0x00000004);
895       maxRequests_ = 0;
896       onChanged();
897       return this;
898     }
899 
900     private int maxRequestsPerConnection_;
901     /**
902      *
903      *
904      * <pre>
905      * Maximum requests for a single connection to the backend service. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
906      * </pre>
907      *
908      * <code>optional int32 max_requests_per_connection = 361630528;</code>
909      *
910      * @return Whether the maxRequestsPerConnection field is set.
911      */
912     @java.lang.Override
hasMaxRequestsPerConnection()913     public boolean hasMaxRequestsPerConnection() {
914       return ((bitField0_ & 0x00000008) != 0);
915     }
916     /**
917      *
918      *
919      * <pre>
920      * Maximum requests for a single connection to the backend service. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
921      * </pre>
922      *
923      * <code>optional int32 max_requests_per_connection = 361630528;</code>
924      *
925      * @return The maxRequestsPerConnection.
926      */
927     @java.lang.Override
getMaxRequestsPerConnection()928     public int getMaxRequestsPerConnection() {
929       return maxRequestsPerConnection_;
930     }
931     /**
932      *
933      *
934      * <pre>
935      * Maximum requests for a single connection to the backend service. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
936      * </pre>
937      *
938      * <code>optional int32 max_requests_per_connection = 361630528;</code>
939      *
940      * @param value The maxRequestsPerConnection to set.
941      * @return This builder for chaining.
942      */
setMaxRequestsPerConnection(int value)943     public Builder setMaxRequestsPerConnection(int value) {
944 
945       maxRequestsPerConnection_ = value;
946       bitField0_ |= 0x00000008;
947       onChanged();
948       return this;
949     }
950     /**
951      *
952      *
953      * <pre>
954      * Maximum requests for a single connection to the backend service. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
955      * </pre>
956      *
957      * <code>optional int32 max_requests_per_connection = 361630528;</code>
958      *
959      * @return This builder for chaining.
960      */
clearMaxRequestsPerConnection()961     public Builder clearMaxRequestsPerConnection() {
962       bitField0_ = (bitField0_ & ~0x00000008);
963       maxRequestsPerConnection_ = 0;
964       onChanged();
965       return this;
966     }
967 
968     private int maxRetries_;
969     /**
970      *
971      *
972      * <pre>
973      * The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
974      * </pre>
975      *
976      * <code>optional int32 max_retries = 55546219;</code>
977      *
978      * @return Whether the maxRetries field is set.
979      */
980     @java.lang.Override
hasMaxRetries()981     public boolean hasMaxRetries() {
982       return ((bitField0_ & 0x00000010) != 0);
983     }
984     /**
985      *
986      *
987      * <pre>
988      * The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
989      * </pre>
990      *
991      * <code>optional int32 max_retries = 55546219;</code>
992      *
993      * @return The maxRetries.
994      */
995     @java.lang.Override
getMaxRetries()996     public int getMaxRetries() {
997       return maxRetries_;
998     }
999     /**
1000      *
1001      *
1002      * <pre>
1003      * The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
1004      * </pre>
1005      *
1006      * <code>optional int32 max_retries = 55546219;</code>
1007      *
1008      * @param value The maxRetries to set.
1009      * @return This builder for chaining.
1010      */
setMaxRetries(int value)1011     public Builder setMaxRetries(int value) {
1012 
1013       maxRetries_ = value;
1014       bitField0_ |= 0x00000010;
1015       onChanged();
1016       return this;
1017     }
1018     /**
1019      *
1020      *
1021      * <pre>
1022      * The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
1023      * </pre>
1024      *
1025      * <code>optional int32 max_retries = 55546219;</code>
1026      *
1027      * @return This builder for chaining.
1028      */
clearMaxRetries()1029     public Builder clearMaxRetries() {
1030       bitField0_ = (bitField0_ & ~0x00000010);
1031       maxRetries_ = 0;
1032       onChanged();
1033       return this;
1034     }
1035 
1036     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1037     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1038       return super.setUnknownFields(unknownFields);
1039     }
1040 
1041     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1042     public final Builder mergeUnknownFields(
1043         final com.google.protobuf.UnknownFieldSet unknownFields) {
1044       return super.mergeUnknownFields(unknownFields);
1045     }
1046 
1047     // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.CircuitBreakers)
1048   }
1049 
1050   // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.CircuitBreakers)
1051   private static final com.google.cloud.compute.v1.CircuitBreakers DEFAULT_INSTANCE;
1052 
1053   static {
1054     DEFAULT_INSTANCE = new com.google.cloud.compute.v1.CircuitBreakers();
1055   }
1056 
getDefaultInstance()1057   public static com.google.cloud.compute.v1.CircuitBreakers getDefaultInstance() {
1058     return DEFAULT_INSTANCE;
1059   }
1060 
1061   private static final com.google.protobuf.Parser<CircuitBreakers> PARSER =
1062       new com.google.protobuf.AbstractParser<CircuitBreakers>() {
1063         @java.lang.Override
1064         public CircuitBreakers parsePartialFrom(
1065             com.google.protobuf.CodedInputStream input,
1066             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1067             throws com.google.protobuf.InvalidProtocolBufferException {
1068           Builder builder = newBuilder();
1069           try {
1070             builder.mergeFrom(input, extensionRegistry);
1071           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1072             throw e.setUnfinishedMessage(builder.buildPartial());
1073           } catch (com.google.protobuf.UninitializedMessageException e) {
1074             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1075           } catch (java.io.IOException e) {
1076             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1077                 .setUnfinishedMessage(builder.buildPartial());
1078           }
1079           return builder.buildPartial();
1080         }
1081       };
1082 
parser()1083   public static com.google.protobuf.Parser<CircuitBreakers> parser() {
1084     return PARSER;
1085   }
1086 
1087   @java.lang.Override
getParserForType()1088   public com.google.protobuf.Parser<CircuitBreakers> getParserForType() {
1089     return PARSER;
1090   }
1091 
1092   @java.lang.Override
getDefaultInstanceForType()1093   public com.google.cloud.compute.v1.CircuitBreakers getDefaultInstanceForType() {
1094     return DEFAULT_INSTANCE;
1095   }
1096 }
1097