• 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  * Represents a Target Pool resource. Target pools are used for network TCP/UDP load balancing. A target pool references member instances, an associated legacy HttpHealthCheck resource, and, optionally, a backup target pool. For more information, read Using target pools.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.compute.v1.TargetPool}
29  */
30 public final class TargetPool extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.TargetPool)
33     TargetPoolOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use TargetPool.newBuilder() to construct.
TargetPool(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private TargetPool(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
TargetPool()40   private TargetPool() {
41     backupPool_ = "";
42     creationTimestamp_ = "";
43     description_ = "";
44     healthChecks_ = com.google.protobuf.LazyStringArrayList.EMPTY;
45     instances_ = com.google.protobuf.LazyStringArrayList.EMPTY;
46     kind_ = "";
47     name_ = "";
48     region_ = "";
49     selfLink_ = "";
50     sessionAffinity_ = "";
51   }
52 
53   @java.lang.Override
54   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)55   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
56     return new TargetPool();
57   }
58 
59   @java.lang.Override
getUnknownFields()60   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
61     return this.unknownFields;
62   }
63 
getDescriptor()64   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
65     return com.google.cloud.compute.v1.Compute
66         .internal_static_google_cloud_compute_v1_TargetPool_descriptor;
67   }
68 
69   @java.lang.Override
70   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()71       internalGetFieldAccessorTable() {
72     return com.google.cloud.compute.v1.Compute
73         .internal_static_google_cloud_compute_v1_TargetPool_fieldAccessorTable
74         .ensureFieldAccessorsInitialized(
75             com.google.cloud.compute.v1.TargetPool.class,
76             com.google.cloud.compute.v1.TargetPool.Builder.class);
77   }
78 
79   /**
80    *
81    *
82    * <pre>
83    * Session affinity option, must be one of the following values: NONE: Connections from the same client IP may go to any instance in the pool. CLIENT_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy. CLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy.
84    * </pre>
85    *
86    * Protobuf enum {@code google.cloud.compute.v1.TargetPool.SessionAffinity}
87    */
88   public enum SessionAffinity implements com.google.protobuf.ProtocolMessageEnum {
89     /**
90      *
91      *
92      * <pre>
93      * A value indicating that the enum field is not set.
94      * </pre>
95      *
96      * <code>UNDEFINED_SESSION_AFFINITY = 0;</code>
97      */
98     UNDEFINED_SESSION_AFFINITY(0),
99     /**
100      *
101      *
102      * <pre>
103      * 2-tuple hash on packet's source and destination IP addresses. Connections from the same source IP address to the same destination IP address will be served by the same backend VM while that VM remains healthy.
104      * </pre>
105      *
106      * <code>CLIENT_IP = 345665051;</code>
107      */
108     CLIENT_IP(345665051),
109     /**
110      *
111      *
112      * <pre>
113      * 1-tuple hash only on packet's source IP address. Connections from the same source IP address will be served by the same backend VM while that VM remains healthy. This option can only be used for Internal TCP/UDP Load Balancing.
114      * </pre>
115      *
116      * <code>CLIENT_IP_NO_DESTINATION = 106122516;</code>
117      */
118     CLIENT_IP_NO_DESTINATION(106122516),
119     /**
120      *
121      *
122      * <pre>
123      * 5-tuple hash on packet's source and destination IP addresses, IP protocol, and source and destination ports. Connections for the same IP protocol from the same source IP address and port to the same destination IP address and port will be served by the same backend VM while that VM remains healthy. This option cannot be used for HTTP(S) load balancing.
124      * </pre>
125      *
126      * <code>CLIENT_IP_PORT_PROTO = 221722926;</code>
127      */
128     CLIENT_IP_PORT_PROTO(221722926),
129     /**
130      *
131      *
132      * <pre>
133      * 3-tuple hash on packet's source and destination IP addresses, and IP protocol. Connections for the same IP protocol from the same source IP address to the same destination IP address will be served by the same backend VM while that VM remains healthy. This option cannot be used for HTTP(S) load balancing.
134      * </pre>
135      *
136      * <code>CLIENT_IP_PROTO = 25322148;</code>
137      */
138     CLIENT_IP_PROTO(25322148),
139     /**
140      *
141      *
142      * <pre>
143      * Hash based on a cookie generated by the L7 loadbalancer. Only valid for HTTP(S) load balancing.
144      * </pre>
145      *
146      * <code>GENERATED_COOKIE = 370321204;</code>
147      */
148     GENERATED_COOKIE(370321204),
149     /**
150      *
151      *
152      * <pre>
153      * The hash is based on a user specified header field.
154      * </pre>
155      *
156      * <code>HEADER_FIELD = 200737960;</code>
157      */
158     HEADER_FIELD(200737960),
159     /**
160      *
161      *
162      * <pre>
163      * The hash is based on a user provided cookie.
164      * </pre>
165      *
166      * <code>HTTP_COOKIE = 494981627;</code>
167      */
168     HTTP_COOKIE(494981627),
169     /**
170      *
171      *
172      * <pre>
173      * No session affinity. Connections from the same client IP may go to any instance in the pool.
174      * </pre>
175      *
176      * <code>NONE = 2402104;</code>
177      */
178     NONE(2402104),
179     UNRECOGNIZED(-1),
180     ;
181 
182     /**
183      *
184      *
185      * <pre>
186      * A value indicating that the enum field is not set.
187      * </pre>
188      *
189      * <code>UNDEFINED_SESSION_AFFINITY = 0;</code>
190      */
191     public static final int UNDEFINED_SESSION_AFFINITY_VALUE = 0;
192     /**
193      *
194      *
195      * <pre>
196      * 2-tuple hash on packet's source and destination IP addresses. Connections from the same source IP address to the same destination IP address will be served by the same backend VM while that VM remains healthy.
197      * </pre>
198      *
199      * <code>CLIENT_IP = 345665051;</code>
200      */
201     public static final int CLIENT_IP_VALUE = 345665051;
202     /**
203      *
204      *
205      * <pre>
206      * 1-tuple hash only on packet's source IP address. Connections from the same source IP address will be served by the same backend VM while that VM remains healthy. This option can only be used for Internal TCP/UDP Load Balancing.
207      * </pre>
208      *
209      * <code>CLIENT_IP_NO_DESTINATION = 106122516;</code>
210      */
211     public static final int CLIENT_IP_NO_DESTINATION_VALUE = 106122516;
212     /**
213      *
214      *
215      * <pre>
216      * 5-tuple hash on packet's source and destination IP addresses, IP protocol, and source and destination ports. Connections for the same IP protocol from the same source IP address and port to the same destination IP address and port will be served by the same backend VM while that VM remains healthy. This option cannot be used for HTTP(S) load balancing.
217      * </pre>
218      *
219      * <code>CLIENT_IP_PORT_PROTO = 221722926;</code>
220      */
221     public static final int CLIENT_IP_PORT_PROTO_VALUE = 221722926;
222     /**
223      *
224      *
225      * <pre>
226      * 3-tuple hash on packet's source and destination IP addresses, and IP protocol. Connections for the same IP protocol from the same source IP address to the same destination IP address will be served by the same backend VM while that VM remains healthy. This option cannot be used for HTTP(S) load balancing.
227      * </pre>
228      *
229      * <code>CLIENT_IP_PROTO = 25322148;</code>
230      */
231     public static final int CLIENT_IP_PROTO_VALUE = 25322148;
232     /**
233      *
234      *
235      * <pre>
236      * Hash based on a cookie generated by the L7 loadbalancer. Only valid for HTTP(S) load balancing.
237      * </pre>
238      *
239      * <code>GENERATED_COOKIE = 370321204;</code>
240      */
241     public static final int GENERATED_COOKIE_VALUE = 370321204;
242     /**
243      *
244      *
245      * <pre>
246      * The hash is based on a user specified header field.
247      * </pre>
248      *
249      * <code>HEADER_FIELD = 200737960;</code>
250      */
251     public static final int HEADER_FIELD_VALUE = 200737960;
252     /**
253      *
254      *
255      * <pre>
256      * The hash is based on a user provided cookie.
257      * </pre>
258      *
259      * <code>HTTP_COOKIE = 494981627;</code>
260      */
261     public static final int HTTP_COOKIE_VALUE = 494981627;
262     /**
263      *
264      *
265      * <pre>
266      * No session affinity. Connections from the same client IP may go to any instance in the pool.
267      * </pre>
268      *
269      * <code>NONE = 2402104;</code>
270      */
271     public static final int NONE_VALUE = 2402104;
272 
getNumber()273     public final int getNumber() {
274       if (this == UNRECOGNIZED) {
275         throw new java.lang.IllegalArgumentException(
276             "Can't get the number of an unknown enum value.");
277       }
278       return value;
279     }
280 
281     /**
282      * @param value The numeric wire value of the corresponding enum entry.
283      * @return The enum associated with the given numeric wire value.
284      * @deprecated Use {@link #forNumber(int)} instead.
285      */
286     @java.lang.Deprecated
valueOf(int value)287     public static SessionAffinity valueOf(int value) {
288       return forNumber(value);
289     }
290 
291     /**
292      * @param value The numeric wire value of the corresponding enum entry.
293      * @return The enum associated with the given numeric wire value.
294      */
forNumber(int value)295     public static SessionAffinity forNumber(int value) {
296       switch (value) {
297         case 0:
298           return UNDEFINED_SESSION_AFFINITY;
299         case 345665051:
300           return CLIENT_IP;
301         case 106122516:
302           return CLIENT_IP_NO_DESTINATION;
303         case 221722926:
304           return CLIENT_IP_PORT_PROTO;
305         case 25322148:
306           return CLIENT_IP_PROTO;
307         case 370321204:
308           return GENERATED_COOKIE;
309         case 200737960:
310           return HEADER_FIELD;
311         case 494981627:
312           return HTTP_COOKIE;
313         case 2402104:
314           return NONE;
315         default:
316           return null;
317       }
318     }
319 
internalGetValueMap()320     public static com.google.protobuf.Internal.EnumLiteMap<SessionAffinity> internalGetValueMap() {
321       return internalValueMap;
322     }
323 
324     private static final com.google.protobuf.Internal.EnumLiteMap<SessionAffinity>
325         internalValueMap =
326             new com.google.protobuf.Internal.EnumLiteMap<SessionAffinity>() {
327               public SessionAffinity findValueByNumber(int number) {
328                 return SessionAffinity.forNumber(number);
329               }
330             };
331 
getValueDescriptor()332     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
333       if (this == UNRECOGNIZED) {
334         throw new java.lang.IllegalStateException(
335             "Can't get the descriptor of an unrecognized enum value.");
336       }
337       return getDescriptor().getValues().get(ordinal());
338     }
339 
getDescriptorForType()340     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
341       return getDescriptor();
342     }
343 
getDescriptor()344     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
345       return com.google.cloud.compute.v1.TargetPool.getDescriptor().getEnumTypes().get(0);
346     }
347 
348     private static final SessionAffinity[] VALUES = values();
349 
valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)350     public static SessionAffinity valueOf(
351         com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
352       if (desc.getType() != getDescriptor()) {
353         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
354       }
355       if (desc.getIndex() == -1) {
356         return UNRECOGNIZED;
357       }
358       return VALUES[desc.getIndex()];
359     }
360 
361     private final int value;
362 
SessionAffinity(int value)363     private SessionAffinity(int value) {
364       this.value = value;
365     }
366 
367     // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.TargetPool.SessionAffinity)
368   }
369 
370   private int bitField0_;
371   public static final int BACKUP_POOL_FIELD_NUMBER = 45884537;
372 
373   @SuppressWarnings("serial")
374   private volatile java.lang.Object backupPool_ = "";
375   /**
376    *
377    *
378    * <pre>
379    * The server-defined URL for the resource. This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1]. backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.
380    * </pre>
381    *
382    * <code>optional string backup_pool = 45884537;</code>
383    *
384    * @return Whether the backupPool field is set.
385    */
386   @java.lang.Override
hasBackupPool()387   public boolean hasBackupPool() {
388     return ((bitField0_ & 0x00000001) != 0);
389   }
390   /**
391    *
392    *
393    * <pre>
394    * The server-defined URL for the resource. This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1]. backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.
395    * </pre>
396    *
397    * <code>optional string backup_pool = 45884537;</code>
398    *
399    * @return The backupPool.
400    */
401   @java.lang.Override
getBackupPool()402   public java.lang.String getBackupPool() {
403     java.lang.Object ref = backupPool_;
404     if (ref instanceof java.lang.String) {
405       return (java.lang.String) ref;
406     } else {
407       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
408       java.lang.String s = bs.toStringUtf8();
409       backupPool_ = s;
410       return s;
411     }
412   }
413   /**
414    *
415    *
416    * <pre>
417    * The server-defined URL for the resource. This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1]. backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.
418    * </pre>
419    *
420    * <code>optional string backup_pool = 45884537;</code>
421    *
422    * @return The bytes for backupPool.
423    */
424   @java.lang.Override
getBackupPoolBytes()425   public com.google.protobuf.ByteString getBackupPoolBytes() {
426     java.lang.Object ref = backupPool_;
427     if (ref instanceof java.lang.String) {
428       com.google.protobuf.ByteString b =
429           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
430       backupPool_ = b;
431       return b;
432     } else {
433       return (com.google.protobuf.ByteString) ref;
434     }
435   }
436 
437   public static final int CREATION_TIMESTAMP_FIELD_NUMBER = 30525366;
438 
439   @SuppressWarnings("serial")
440   private volatile java.lang.Object creationTimestamp_ = "";
441   /**
442    *
443    *
444    * <pre>
445    * [Output Only] Creation timestamp in RFC3339 text format.
446    * </pre>
447    *
448    * <code>optional string creation_timestamp = 30525366;</code>
449    *
450    * @return Whether the creationTimestamp field is set.
451    */
452   @java.lang.Override
hasCreationTimestamp()453   public boolean hasCreationTimestamp() {
454     return ((bitField0_ & 0x00000002) != 0);
455   }
456   /**
457    *
458    *
459    * <pre>
460    * [Output Only] Creation timestamp in RFC3339 text format.
461    * </pre>
462    *
463    * <code>optional string creation_timestamp = 30525366;</code>
464    *
465    * @return The creationTimestamp.
466    */
467   @java.lang.Override
getCreationTimestamp()468   public java.lang.String getCreationTimestamp() {
469     java.lang.Object ref = creationTimestamp_;
470     if (ref instanceof java.lang.String) {
471       return (java.lang.String) ref;
472     } else {
473       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
474       java.lang.String s = bs.toStringUtf8();
475       creationTimestamp_ = s;
476       return s;
477     }
478   }
479   /**
480    *
481    *
482    * <pre>
483    * [Output Only] Creation timestamp in RFC3339 text format.
484    * </pre>
485    *
486    * <code>optional string creation_timestamp = 30525366;</code>
487    *
488    * @return The bytes for creationTimestamp.
489    */
490   @java.lang.Override
getCreationTimestampBytes()491   public com.google.protobuf.ByteString getCreationTimestampBytes() {
492     java.lang.Object ref = creationTimestamp_;
493     if (ref instanceof java.lang.String) {
494       com.google.protobuf.ByteString b =
495           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
496       creationTimestamp_ = b;
497       return b;
498     } else {
499       return (com.google.protobuf.ByteString) ref;
500     }
501   }
502 
503   public static final int DESCRIPTION_FIELD_NUMBER = 422937596;
504 
505   @SuppressWarnings("serial")
506   private volatile java.lang.Object description_ = "";
507   /**
508    *
509    *
510    * <pre>
511    * An optional description of this resource. Provide this property when you create the resource.
512    * </pre>
513    *
514    * <code>optional string description = 422937596;</code>
515    *
516    * @return Whether the description field is set.
517    */
518   @java.lang.Override
hasDescription()519   public boolean hasDescription() {
520     return ((bitField0_ & 0x00000004) != 0);
521   }
522   /**
523    *
524    *
525    * <pre>
526    * An optional description of this resource. Provide this property when you create the resource.
527    * </pre>
528    *
529    * <code>optional string description = 422937596;</code>
530    *
531    * @return The description.
532    */
533   @java.lang.Override
getDescription()534   public java.lang.String getDescription() {
535     java.lang.Object ref = description_;
536     if (ref instanceof java.lang.String) {
537       return (java.lang.String) ref;
538     } else {
539       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
540       java.lang.String s = bs.toStringUtf8();
541       description_ = s;
542       return s;
543     }
544   }
545   /**
546    *
547    *
548    * <pre>
549    * An optional description of this resource. Provide this property when you create the resource.
550    * </pre>
551    *
552    * <code>optional string description = 422937596;</code>
553    *
554    * @return The bytes for description.
555    */
556   @java.lang.Override
getDescriptionBytes()557   public com.google.protobuf.ByteString getDescriptionBytes() {
558     java.lang.Object ref = description_;
559     if (ref instanceof java.lang.String) {
560       com.google.protobuf.ByteString b =
561           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
562       description_ = b;
563       return b;
564     } else {
565       return (com.google.protobuf.ByteString) ref;
566     }
567   }
568 
569   public static final int FAILOVER_RATIO_FIELD_NUMBER = 212667006;
570   private float failoverRatio_ = 0F;
571   /**
572    *
573    *
574    * <pre>
575    * This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value of the field must be in [0, 1]. If set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio is not set or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.
576    * </pre>
577    *
578    * <code>optional float failover_ratio = 212667006;</code>
579    *
580    * @return Whether the failoverRatio field is set.
581    */
582   @java.lang.Override
hasFailoverRatio()583   public boolean hasFailoverRatio() {
584     return ((bitField0_ & 0x00000008) != 0);
585   }
586   /**
587    *
588    *
589    * <pre>
590    * This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value of the field must be in [0, 1]. If set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio is not set or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.
591    * </pre>
592    *
593    * <code>optional float failover_ratio = 212667006;</code>
594    *
595    * @return The failoverRatio.
596    */
597   @java.lang.Override
getFailoverRatio()598   public float getFailoverRatio() {
599     return failoverRatio_;
600   }
601 
602   public static final int HEALTH_CHECKS_FIELD_NUMBER = 448370606;
603 
604   @SuppressWarnings("serial")
605   private com.google.protobuf.LazyStringList healthChecks_;
606   /**
607    *
608    *
609    * <pre>
610    * The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. Only legacy HttpHealthChecks are supported. Only one health check may be specified.
611    * </pre>
612    *
613    * <code>repeated string health_checks = 448370606;</code>
614    *
615    * @return A list containing the healthChecks.
616    */
getHealthChecksList()617   public com.google.protobuf.ProtocolStringList getHealthChecksList() {
618     return healthChecks_;
619   }
620   /**
621    *
622    *
623    * <pre>
624    * The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. Only legacy HttpHealthChecks are supported. Only one health check may be specified.
625    * </pre>
626    *
627    * <code>repeated string health_checks = 448370606;</code>
628    *
629    * @return The count of healthChecks.
630    */
getHealthChecksCount()631   public int getHealthChecksCount() {
632     return healthChecks_.size();
633   }
634   /**
635    *
636    *
637    * <pre>
638    * The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. Only legacy HttpHealthChecks are supported. Only one health check may be specified.
639    * </pre>
640    *
641    * <code>repeated string health_checks = 448370606;</code>
642    *
643    * @param index The index of the element to return.
644    * @return The healthChecks at the given index.
645    */
getHealthChecks(int index)646   public java.lang.String getHealthChecks(int index) {
647     return healthChecks_.get(index);
648   }
649   /**
650    *
651    *
652    * <pre>
653    * The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. Only legacy HttpHealthChecks are supported. Only one health check may be specified.
654    * </pre>
655    *
656    * <code>repeated string health_checks = 448370606;</code>
657    *
658    * @param index The index of the value to return.
659    * @return The bytes of the healthChecks at the given index.
660    */
getHealthChecksBytes(int index)661   public com.google.protobuf.ByteString getHealthChecksBytes(int index) {
662     return healthChecks_.getByteString(index);
663   }
664 
665   public static final int ID_FIELD_NUMBER = 3355;
666   private long id_ = 0L;
667   /**
668    *
669    *
670    * <pre>
671    * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
672    * </pre>
673    *
674    * <code>optional uint64 id = 3355;</code>
675    *
676    * @return Whether the id field is set.
677    */
678   @java.lang.Override
hasId()679   public boolean hasId() {
680     return ((bitField0_ & 0x00000010) != 0);
681   }
682   /**
683    *
684    *
685    * <pre>
686    * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
687    * </pre>
688    *
689    * <code>optional uint64 id = 3355;</code>
690    *
691    * @return The id.
692    */
693   @java.lang.Override
getId()694   public long getId() {
695     return id_;
696   }
697 
698   public static final int INSTANCES_FIELD_NUMBER = 29097598;
699 
700   @SuppressWarnings("serial")
701   private com.google.protobuf.LazyStringList instances_;
702   /**
703    *
704    *
705    * <pre>
706    * A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool.
707    * </pre>
708    *
709    * <code>repeated string instances = 29097598;</code>
710    *
711    * @return A list containing the instances.
712    */
getInstancesList()713   public com.google.protobuf.ProtocolStringList getInstancesList() {
714     return instances_;
715   }
716   /**
717    *
718    *
719    * <pre>
720    * A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool.
721    * </pre>
722    *
723    * <code>repeated string instances = 29097598;</code>
724    *
725    * @return The count of instances.
726    */
getInstancesCount()727   public int getInstancesCount() {
728     return instances_.size();
729   }
730   /**
731    *
732    *
733    * <pre>
734    * A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool.
735    * </pre>
736    *
737    * <code>repeated string instances = 29097598;</code>
738    *
739    * @param index The index of the element to return.
740    * @return The instances at the given index.
741    */
getInstances(int index)742   public java.lang.String getInstances(int index) {
743     return instances_.get(index);
744   }
745   /**
746    *
747    *
748    * <pre>
749    * A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool.
750    * </pre>
751    *
752    * <code>repeated string instances = 29097598;</code>
753    *
754    * @param index The index of the value to return.
755    * @return The bytes of the instances at the given index.
756    */
getInstancesBytes(int index)757   public com.google.protobuf.ByteString getInstancesBytes(int index) {
758     return instances_.getByteString(index);
759   }
760 
761   public static final int KIND_FIELD_NUMBER = 3292052;
762 
763   @SuppressWarnings("serial")
764   private volatile java.lang.Object kind_ = "";
765   /**
766    *
767    *
768    * <pre>
769    * [Output Only] Type of the resource. Always compute#targetPool for target pools.
770    * </pre>
771    *
772    * <code>optional string kind = 3292052;</code>
773    *
774    * @return Whether the kind field is set.
775    */
776   @java.lang.Override
hasKind()777   public boolean hasKind() {
778     return ((bitField0_ & 0x00000020) != 0);
779   }
780   /**
781    *
782    *
783    * <pre>
784    * [Output Only] Type of the resource. Always compute#targetPool for target pools.
785    * </pre>
786    *
787    * <code>optional string kind = 3292052;</code>
788    *
789    * @return The kind.
790    */
791   @java.lang.Override
getKind()792   public java.lang.String getKind() {
793     java.lang.Object ref = kind_;
794     if (ref instanceof java.lang.String) {
795       return (java.lang.String) ref;
796     } else {
797       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
798       java.lang.String s = bs.toStringUtf8();
799       kind_ = s;
800       return s;
801     }
802   }
803   /**
804    *
805    *
806    * <pre>
807    * [Output Only] Type of the resource. Always compute#targetPool for target pools.
808    * </pre>
809    *
810    * <code>optional string kind = 3292052;</code>
811    *
812    * @return The bytes for kind.
813    */
814   @java.lang.Override
getKindBytes()815   public com.google.protobuf.ByteString getKindBytes() {
816     java.lang.Object ref = kind_;
817     if (ref instanceof java.lang.String) {
818       com.google.protobuf.ByteString b =
819           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
820       kind_ = b;
821       return b;
822     } else {
823       return (com.google.protobuf.ByteString) ref;
824     }
825   }
826 
827   public static final int NAME_FIELD_NUMBER = 3373707;
828 
829   @SuppressWarnings("serial")
830   private volatile java.lang.Object name_ = "";
831   /**
832    *
833    *
834    * <pre>
835    * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
836    * </pre>
837    *
838    * <code>optional string name = 3373707;</code>
839    *
840    * @return Whether the name field is set.
841    */
842   @java.lang.Override
hasName()843   public boolean hasName() {
844     return ((bitField0_ & 0x00000040) != 0);
845   }
846   /**
847    *
848    *
849    * <pre>
850    * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
851    * </pre>
852    *
853    * <code>optional string name = 3373707;</code>
854    *
855    * @return The name.
856    */
857   @java.lang.Override
getName()858   public java.lang.String getName() {
859     java.lang.Object ref = name_;
860     if (ref instanceof java.lang.String) {
861       return (java.lang.String) ref;
862     } else {
863       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
864       java.lang.String s = bs.toStringUtf8();
865       name_ = s;
866       return s;
867     }
868   }
869   /**
870    *
871    *
872    * <pre>
873    * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
874    * </pre>
875    *
876    * <code>optional string name = 3373707;</code>
877    *
878    * @return The bytes for name.
879    */
880   @java.lang.Override
getNameBytes()881   public com.google.protobuf.ByteString getNameBytes() {
882     java.lang.Object ref = name_;
883     if (ref instanceof java.lang.String) {
884       com.google.protobuf.ByteString b =
885           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
886       name_ = b;
887       return b;
888     } else {
889       return (com.google.protobuf.ByteString) ref;
890     }
891   }
892 
893   public static final int REGION_FIELD_NUMBER = 138946292;
894 
895   @SuppressWarnings("serial")
896   private volatile java.lang.Object region_ = "";
897   /**
898    *
899    *
900    * <pre>
901    * [Output Only] URL of the region where the target pool resides.
902    * </pre>
903    *
904    * <code>optional string region = 138946292;</code>
905    *
906    * @return Whether the region field is set.
907    */
908   @java.lang.Override
hasRegion()909   public boolean hasRegion() {
910     return ((bitField0_ & 0x00000080) != 0);
911   }
912   /**
913    *
914    *
915    * <pre>
916    * [Output Only] URL of the region where the target pool resides.
917    * </pre>
918    *
919    * <code>optional string region = 138946292;</code>
920    *
921    * @return The region.
922    */
923   @java.lang.Override
getRegion()924   public java.lang.String getRegion() {
925     java.lang.Object ref = region_;
926     if (ref instanceof java.lang.String) {
927       return (java.lang.String) ref;
928     } else {
929       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
930       java.lang.String s = bs.toStringUtf8();
931       region_ = s;
932       return s;
933     }
934   }
935   /**
936    *
937    *
938    * <pre>
939    * [Output Only] URL of the region where the target pool resides.
940    * </pre>
941    *
942    * <code>optional string region = 138946292;</code>
943    *
944    * @return The bytes for region.
945    */
946   @java.lang.Override
getRegionBytes()947   public com.google.protobuf.ByteString getRegionBytes() {
948     java.lang.Object ref = region_;
949     if (ref instanceof java.lang.String) {
950       com.google.protobuf.ByteString b =
951           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
952       region_ = b;
953       return b;
954     } else {
955       return (com.google.protobuf.ByteString) ref;
956     }
957   }
958 
959   public static final int SELF_LINK_FIELD_NUMBER = 456214797;
960 
961   @SuppressWarnings("serial")
962   private volatile java.lang.Object selfLink_ = "";
963   /**
964    *
965    *
966    * <pre>
967    * [Output Only] Server-defined URL for the resource.
968    * </pre>
969    *
970    * <code>optional string self_link = 456214797;</code>
971    *
972    * @return Whether the selfLink field is set.
973    */
974   @java.lang.Override
hasSelfLink()975   public boolean hasSelfLink() {
976     return ((bitField0_ & 0x00000100) != 0);
977   }
978   /**
979    *
980    *
981    * <pre>
982    * [Output Only] Server-defined URL for the resource.
983    * </pre>
984    *
985    * <code>optional string self_link = 456214797;</code>
986    *
987    * @return The selfLink.
988    */
989   @java.lang.Override
getSelfLink()990   public java.lang.String getSelfLink() {
991     java.lang.Object ref = selfLink_;
992     if (ref instanceof java.lang.String) {
993       return (java.lang.String) ref;
994     } else {
995       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
996       java.lang.String s = bs.toStringUtf8();
997       selfLink_ = s;
998       return s;
999     }
1000   }
1001   /**
1002    *
1003    *
1004    * <pre>
1005    * [Output Only] Server-defined URL for the resource.
1006    * </pre>
1007    *
1008    * <code>optional string self_link = 456214797;</code>
1009    *
1010    * @return The bytes for selfLink.
1011    */
1012   @java.lang.Override
getSelfLinkBytes()1013   public com.google.protobuf.ByteString getSelfLinkBytes() {
1014     java.lang.Object ref = selfLink_;
1015     if (ref instanceof java.lang.String) {
1016       com.google.protobuf.ByteString b =
1017           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1018       selfLink_ = b;
1019       return b;
1020     } else {
1021       return (com.google.protobuf.ByteString) ref;
1022     }
1023   }
1024 
1025   public static final int SESSION_AFFINITY_FIELD_NUMBER = 463888561;
1026 
1027   @SuppressWarnings("serial")
1028   private volatile java.lang.Object sessionAffinity_ = "";
1029   /**
1030    *
1031    *
1032    * <pre>
1033    * Session affinity option, must be one of the following values: NONE: Connections from the same client IP may go to any instance in the pool. CLIENT_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy. CLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy.
1034    * Check the SessionAffinity enum for the list of possible values.
1035    * </pre>
1036    *
1037    * <code>optional string session_affinity = 463888561;</code>
1038    *
1039    * @return Whether the sessionAffinity field is set.
1040    */
1041   @java.lang.Override
hasSessionAffinity()1042   public boolean hasSessionAffinity() {
1043     return ((bitField0_ & 0x00000200) != 0);
1044   }
1045   /**
1046    *
1047    *
1048    * <pre>
1049    * Session affinity option, must be one of the following values: NONE: Connections from the same client IP may go to any instance in the pool. CLIENT_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy. CLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy.
1050    * Check the SessionAffinity enum for the list of possible values.
1051    * </pre>
1052    *
1053    * <code>optional string session_affinity = 463888561;</code>
1054    *
1055    * @return The sessionAffinity.
1056    */
1057   @java.lang.Override
getSessionAffinity()1058   public java.lang.String getSessionAffinity() {
1059     java.lang.Object ref = sessionAffinity_;
1060     if (ref instanceof java.lang.String) {
1061       return (java.lang.String) ref;
1062     } else {
1063       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1064       java.lang.String s = bs.toStringUtf8();
1065       sessionAffinity_ = s;
1066       return s;
1067     }
1068   }
1069   /**
1070    *
1071    *
1072    * <pre>
1073    * Session affinity option, must be one of the following values: NONE: Connections from the same client IP may go to any instance in the pool. CLIENT_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy. CLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy.
1074    * Check the SessionAffinity enum for the list of possible values.
1075    * </pre>
1076    *
1077    * <code>optional string session_affinity = 463888561;</code>
1078    *
1079    * @return The bytes for sessionAffinity.
1080    */
1081   @java.lang.Override
getSessionAffinityBytes()1082   public com.google.protobuf.ByteString getSessionAffinityBytes() {
1083     java.lang.Object ref = sessionAffinity_;
1084     if (ref instanceof java.lang.String) {
1085       com.google.protobuf.ByteString b =
1086           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1087       sessionAffinity_ = b;
1088       return b;
1089     } else {
1090       return (com.google.protobuf.ByteString) ref;
1091     }
1092   }
1093 
1094   private byte memoizedIsInitialized = -1;
1095 
1096   @java.lang.Override
isInitialized()1097   public final boolean isInitialized() {
1098     byte isInitialized = memoizedIsInitialized;
1099     if (isInitialized == 1) return true;
1100     if (isInitialized == 0) return false;
1101 
1102     memoizedIsInitialized = 1;
1103     return true;
1104   }
1105 
1106   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)1107   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
1108     if (((bitField0_ & 0x00000010) != 0)) {
1109       output.writeUInt64(3355, id_);
1110     }
1111     if (((bitField0_ & 0x00000020) != 0)) {
1112       com.google.protobuf.GeneratedMessageV3.writeString(output, 3292052, kind_);
1113     }
1114     if (((bitField0_ & 0x00000040) != 0)) {
1115       com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_);
1116     }
1117     for (int i = 0; i < instances_.size(); i++) {
1118       com.google.protobuf.GeneratedMessageV3.writeString(output, 29097598, instances_.getRaw(i));
1119     }
1120     if (((bitField0_ & 0x00000002) != 0)) {
1121       com.google.protobuf.GeneratedMessageV3.writeString(output, 30525366, creationTimestamp_);
1122     }
1123     if (((bitField0_ & 0x00000001) != 0)) {
1124       com.google.protobuf.GeneratedMessageV3.writeString(output, 45884537, backupPool_);
1125     }
1126     if (((bitField0_ & 0x00000080) != 0)) {
1127       com.google.protobuf.GeneratedMessageV3.writeString(output, 138946292, region_);
1128     }
1129     if (((bitField0_ & 0x00000008) != 0)) {
1130       output.writeFloat(212667006, failoverRatio_);
1131     }
1132     if (((bitField0_ & 0x00000004) != 0)) {
1133       com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_);
1134     }
1135     for (int i = 0; i < healthChecks_.size(); i++) {
1136       com.google.protobuf.GeneratedMessageV3.writeString(
1137           output, 448370606, healthChecks_.getRaw(i));
1138     }
1139     if (((bitField0_ & 0x00000100) != 0)) {
1140       com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_);
1141     }
1142     if (((bitField0_ & 0x00000200) != 0)) {
1143       com.google.protobuf.GeneratedMessageV3.writeString(output, 463888561, sessionAffinity_);
1144     }
1145     getUnknownFields().writeTo(output);
1146   }
1147 
1148   @java.lang.Override
getSerializedSize()1149   public int getSerializedSize() {
1150     int size = memoizedSize;
1151     if (size != -1) return size;
1152 
1153     size = 0;
1154     if (((bitField0_ & 0x00000010) != 0)) {
1155       size += com.google.protobuf.CodedOutputStream.computeUInt64Size(3355, id_);
1156     }
1157     if (((bitField0_ & 0x00000020) != 0)) {
1158       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3292052, kind_);
1159     }
1160     if (((bitField0_ & 0x00000040) != 0)) {
1161       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_);
1162     }
1163     {
1164       int dataSize = 0;
1165       for (int i = 0; i < instances_.size(); i++) {
1166         dataSize += computeStringSizeNoTag(instances_.getRaw(i));
1167       }
1168       size += dataSize;
1169       size += 4 * getInstancesList().size();
1170     }
1171     if (((bitField0_ & 0x00000002) != 0)) {
1172       size +=
1173           com.google.protobuf.GeneratedMessageV3.computeStringSize(30525366, creationTimestamp_);
1174     }
1175     if (((bitField0_ & 0x00000001) != 0)) {
1176       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(45884537, backupPool_);
1177     }
1178     if (((bitField0_ & 0x00000080) != 0)) {
1179       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(138946292, region_);
1180     }
1181     if (((bitField0_ & 0x00000008) != 0)) {
1182       size += com.google.protobuf.CodedOutputStream.computeFloatSize(212667006, failoverRatio_);
1183     }
1184     if (((bitField0_ & 0x00000004) != 0)) {
1185       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_);
1186     }
1187     {
1188       int dataSize = 0;
1189       for (int i = 0; i < healthChecks_.size(); i++) {
1190         dataSize += computeStringSizeNoTag(healthChecks_.getRaw(i));
1191       }
1192       size += dataSize;
1193       size += 5 * getHealthChecksList().size();
1194     }
1195     if (((bitField0_ & 0x00000100) != 0)) {
1196       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_);
1197     }
1198     if (((bitField0_ & 0x00000200) != 0)) {
1199       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(463888561, sessionAffinity_);
1200     }
1201     size += getUnknownFields().getSerializedSize();
1202     memoizedSize = size;
1203     return size;
1204   }
1205 
1206   @java.lang.Override
equals(final java.lang.Object obj)1207   public boolean equals(final java.lang.Object obj) {
1208     if (obj == this) {
1209       return true;
1210     }
1211     if (!(obj instanceof com.google.cloud.compute.v1.TargetPool)) {
1212       return super.equals(obj);
1213     }
1214     com.google.cloud.compute.v1.TargetPool other = (com.google.cloud.compute.v1.TargetPool) obj;
1215 
1216     if (hasBackupPool() != other.hasBackupPool()) return false;
1217     if (hasBackupPool()) {
1218       if (!getBackupPool().equals(other.getBackupPool())) return false;
1219     }
1220     if (hasCreationTimestamp() != other.hasCreationTimestamp()) return false;
1221     if (hasCreationTimestamp()) {
1222       if (!getCreationTimestamp().equals(other.getCreationTimestamp())) return false;
1223     }
1224     if (hasDescription() != other.hasDescription()) return false;
1225     if (hasDescription()) {
1226       if (!getDescription().equals(other.getDescription())) return false;
1227     }
1228     if (hasFailoverRatio() != other.hasFailoverRatio()) return false;
1229     if (hasFailoverRatio()) {
1230       if (java.lang.Float.floatToIntBits(getFailoverRatio())
1231           != java.lang.Float.floatToIntBits(other.getFailoverRatio())) return false;
1232     }
1233     if (!getHealthChecksList().equals(other.getHealthChecksList())) return false;
1234     if (hasId() != other.hasId()) return false;
1235     if (hasId()) {
1236       if (getId() != other.getId()) return false;
1237     }
1238     if (!getInstancesList().equals(other.getInstancesList())) return false;
1239     if (hasKind() != other.hasKind()) return false;
1240     if (hasKind()) {
1241       if (!getKind().equals(other.getKind())) return false;
1242     }
1243     if (hasName() != other.hasName()) return false;
1244     if (hasName()) {
1245       if (!getName().equals(other.getName())) return false;
1246     }
1247     if (hasRegion() != other.hasRegion()) return false;
1248     if (hasRegion()) {
1249       if (!getRegion().equals(other.getRegion())) return false;
1250     }
1251     if (hasSelfLink() != other.hasSelfLink()) return false;
1252     if (hasSelfLink()) {
1253       if (!getSelfLink().equals(other.getSelfLink())) return false;
1254     }
1255     if (hasSessionAffinity() != other.hasSessionAffinity()) return false;
1256     if (hasSessionAffinity()) {
1257       if (!getSessionAffinity().equals(other.getSessionAffinity())) return false;
1258     }
1259     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1260     return true;
1261   }
1262 
1263   @java.lang.Override
hashCode()1264   public int hashCode() {
1265     if (memoizedHashCode != 0) {
1266       return memoizedHashCode;
1267     }
1268     int hash = 41;
1269     hash = (19 * hash) + getDescriptor().hashCode();
1270     if (hasBackupPool()) {
1271       hash = (37 * hash) + BACKUP_POOL_FIELD_NUMBER;
1272       hash = (53 * hash) + getBackupPool().hashCode();
1273     }
1274     if (hasCreationTimestamp()) {
1275       hash = (37 * hash) + CREATION_TIMESTAMP_FIELD_NUMBER;
1276       hash = (53 * hash) + getCreationTimestamp().hashCode();
1277     }
1278     if (hasDescription()) {
1279       hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
1280       hash = (53 * hash) + getDescription().hashCode();
1281     }
1282     if (hasFailoverRatio()) {
1283       hash = (37 * hash) + FAILOVER_RATIO_FIELD_NUMBER;
1284       hash = (53 * hash) + java.lang.Float.floatToIntBits(getFailoverRatio());
1285     }
1286     if (getHealthChecksCount() > 0) {
1287       hash = (37 * hash) + HEALTH_CHECKS_FIELD_NUMBER;
1288       hash = (53 * hash) + getHealthChecksList().hashCode();
1289     }
1290     if (hasId()) {
1291       hash = (37 * hash) + ID_FIELD_NUMBER;
1292       hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getId());
1293     }
1294     if (getInstancesCount() > 0) {
1295       hash = (37 * hash) + INSTANCES_FIELD_NUMBER;
1296       hash = (53 * hash) + getInstancesList().hashCode();
1297     }
1298     if (hasKind()) {
1299       hash = (37 * hash) + KIND_FIELD_NUMBER;
1300       hash = (53 * hash) + getKind().hashCode();
1301     }
1302     if (hasName()) {
1303       hash = (37 * hash) + NAME_FIELD_NUMBER;
1304       hash = (53 * hash) + getName().hashCode();
1305     }
1306     if (hasRegion()) {
1307       hash = (37 * hash) + REGION_FIELD_NUMBER;
1308       hash = (53 * hash) + getRegion().hashCode();
1309     }
1310     if (hasSelfLink()) {
1311       hash = (37 * hash) + SELF_LINK_FIELD_NUMBER;
1312       hash = (53 * hash) + getSelfLink().hashCode();
1313     }
1314     if (hasSessionAffinity()) {
1315       hash = (37 * hash) + SESSION_AFFINITY_FIELD_NUMBER;
1316       hash = (53 * hash) + getSessionAffinity().hashCode();
1317     }
1318     hash = (29 * hash) + getUnknownFields().hashCode();
1319     memoizedHashCode = hash;
1320     return hash;
1321   }
1322 
parseFrom(java.nio.ByteBuffer data)1323   public static com.google.cloud.compute.v1.TargetPool parseFrom(java.nio.ByteBuffer data)
1324       throws com.google.protobuf.InvalidProtocolBufferException {
1325     return PARSER.parseFrom(data);
1326   }
1327 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1328   public static com.google.cloud.compute.v1.TargetPool parseFrom(
1329       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1330       throws com.google.protobuf.InvalidProtocolBufferException {
1331     return PARSER.parseFrom(data, extensionRegistry);
1332   }
1333 
parseFrom( com.google.protobuf.ByteString data)1334   public static com.google.cloud.compute.v1.TargetPool parseFrom(
1335       com.google.protobuf.ByteString data)
1336       throws com.google.protobuf.InvalidProtocolBufferException {
1337     return PARSER.parseFrom(data);
1338   }
1339 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1340   public static com.google.cloud.compute.v1.TargetPool parseFrom(
1341       com.google.protobuf.ByteString data,
1342       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1343       throws com.google.protobuf.InvalidProtocolBufferException {
1344     return PARSER.parseFrom(data, extensionRegistry);
1345   }
1346 
parseFrom(byte[] data)1347   public static com.google.cloud.compute.v1.TargetPool parseFrom(byte[] data)
1348       throws com.google.protobuf.InvalidProtocolBufferException {
1349     return PARSER.parseFrom(data);
1350   }
1351 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1352   public static com.google.cloud.compute.v1.TargetPool parseFrom(
1353       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1354       throws com.google.protobuf.InvalidProtocolBufferException {
1355     return PARSER.parseFrom(data, extensionRegistry);
1356   }
1357 
parseFrom(java.io.InputStream input)1358   public static com.google.cloud.compute.v1.TargetPool parseFrom(java.io.InputStream input)
1359       throws java.io.IOException {
1360     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1361   }
1362 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1363   public static com.google.cloud.compute.v1.TargetPool parseFrom(
1364       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1365       throws java.io.IOException {
1366     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1367         PARSER, input, extensionRegistry);
1368   }
1369 
parseDelimitedFrom(java.io.InputStream input)1370   public static com.google.cloud.compute.v1.TargetPool parseDelimitedFrom(java.io.InputStream input)
1371       throws java.io.IOException {
1372     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
1373   }
1374 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1375   public static com.google.cloud.compute.v1.TargetPool parseDelimitedFrom(
1376       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1377       throws java.io.IOException {
1378     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
1379         PARSER, input, extensionRegistry);
1380   }
1381 
parseFrom( com.google.protobuf.CodedInputStream input)1382   public static com.google.cloud.compute.v1.TargetPool parseFrom(
1383       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
1384     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1385   }
1386 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1387   public static com.google.cloud.compute.v1.TargetPool parseFrom(
1388       com.google.protobuf.CodedInputStream input,
1389       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1390       throws java.io.IOException {
1391     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1392         PARSER, input, extensionRegistry);
1393   }
1394 
1395   @java.lang.Override
newBuilderForType()1396   public Builder newBuilderForType() {
1397     return newBuilder();
1398   }
1399 
newBuilder()1400   public static Builder newBuilder() {
1401     return DEFAULT_INSTANCE.toBuilder();
1402   }
1403 
newBuilder(com.google.cloud.compute.v1.TargetPool prototype)1404   public static Builder newBuilder(com.google.cloud.compute.v1.TargetPool prototype) {
1405     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1406   }
1407 
1408   @java.lang.Override
toBuilder()1409   public Builder toBuilder() {
1410     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
1411   }
1412 
1413   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1414   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1415     Builder builder = new Builder(parent);
1416     return builder;
1417   }
1418   /**
1419    *
1420    *
1421    * <pre>
1422    * Represents a Target Pool resource. Target pools are used for network TCP/UDP load balancing. A target pool references member instances, an associated legacy HttpHealthCheck resource, and, optionally, a backup target pool. For more information, read Using target pools.
1423    * </pre>
1424    *
1425    * Protobuf type {@code google.cloud.compute.v1.TargetPool}
1426    */
1427   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
1428       implements
1429       // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.TargetPool)
1430       com.google.cloud.compute.v1.TargetPoolOrBuilder {
getDescriptor()1431     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1432       return com.google.cloud.compute.v1.Compute
1433           .internal_static_google_cloud_compute_v1_TargetPool_descriptor;
1434     }
1435 
1436     @java.lang.Override
1437     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()1438         internalGetFieldAccessorTable() {
1439       return com.google.cloud.compute.v1.Compute
1440           .internal_static_google_cloud_compute_v1_TargetPool_fieldAccessorTable
1441           .ensureFieldAccessorsInitialized(
1442               com.google.cloud.compute.v1.TargetPool.class,
1443               com.google.cloud.compute.v1.TargetPool.Builder.class);
1444     }
1445 
1446     // Construct using com.google.cloud.compute.v1.TargetPool.newBuilder()
Builder()1447     private Builder() {}
1448 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1449     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1450       super(parent);
1451     }
1452 
1453     @java.lang.Override
clear()1454     public Builder clear() {
1455       super.clear();
1456       bitField0_ = 0;
1457       backupPool_ = "";
1458       creationTimestamp_ = "";
1459       description_ = "";
1460       failoverRatio_ = 0F;
1461       healthChecks_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1462       bitField0_ = (bitField0_ & ~0x00000010);
1463       id_ = 0L;
1464       instances_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1465       bitField0_ = (bitField0_ & ~0x00000040);
1466       kind_ = "";
1467       name_ = "";
1468       region_ = "";
1469       selfLink_ = "";
1470       sessionAffinity_ = "";
1471       return this;
1472     }
1473 
1474     @java.lang.Override
getDescriptorForType()1475     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
1476       return com.google.cloud.compute.v1.Compute
1477           .internal_static_google_cloud_compute_v1_TargetPool_descriptor;
1478     }
1479 
1480     @java.lang.Override
getDefaultInstanceForType()1481     public com.google.cloud.compute.v1.TargetPool getDefaultInstanceForType() {
1482       return com.google.cloud.compute.v1.TargetPool.getDefaultInstance();
1483     }
1484 
1485     @java.lang.Override
build()1486     public com.google.cloud.compute.v1.TargetPool build() {
1487       com.google.cloud.compute.v1.TargetPool result = buildPartial();
1488       if (!result.isInitialized()) {
1489         throw newUninitializedMessageException(result);
1490       }
1491       return result;
1492     }
1493 
1494     @java.lang.Override
buildPartial()1495     public com.google.cloud.compute.v1.TargetPool buildPartial() {
1496       com.google.cloud.compute.v1.TargetPool result =
1497           new com.google.cloud.compute.v1.TargetPool(this);
1498       buildPartialRepeatedFields(result);
1499       if (bitField0_ != 0) {
1500         buildPartial0(result);
1501       }
1502       onBuilt();
1503       return result;
1504     }
1505 
buildPartialRepeatedFields(com.google.cloud.compute.v1.TargetPool result)1506     private void buildPartialRepeatedFields(com.google.cloud.compute.v1.TargetPool result) {
1507       if (((bitField0_ & 0x00000010) != 0)) {
1508         healthChecks_ = healthChecks_.getUnmodifiableView();
1509         bitField0_ = (bitField0_ & ~0x00000010);
1510       }
1511       result.healthChecks_ = healthChecks_;
1512       if (((bitField0_ & 0x00000040) != 0)) {
1513         instances_ = instances_.getUnmodifiableView();
1514         bitField0_ = (bitField0_ & ~0x00000040);
1515       }
1516       result.instances_ = instances_;
1517     }
1518 
buildPartial0(com.google.cloud.compute.v1.TargetPool result)1519     private void buildPartial0(com.google.cloud.compute.v1.TargetPool result) {
1520       int from_bitField0_ = bitField0_;
1521       int to_bitField0_ = 0;
1522       if (((from_bitField0_ & 0x00000001) != 0)) {
1523         result.backupPool_ = backupPool_;
1524         to_bitField0_ |= 0x00000001;
1525       }
1526       if (((from_bitField0_ & 0x00000002) != 0)) {
1527         result.creationTimestamp_ = creationTimestamp_;
1528         to_bitField0_ |= 0x00000002;
1529       }
1530       if (((from_bitField0_ & 0x00000004) != 0)) {
1531         result.description_ = description_;
1532         to_bitField0_ |= 0x00000004;
1533       }
1534       if (((from_bitField0_ & 0x00000008) != 0)) {
1535         result.failoverRatio_ = failoverRatio_;
1536         to_bitField0_ |= 0x00000008;
1537       }
1538       if (((from_bitField0_ & 0x00000020) != 0)) {
1539         result.id_ = id_;
1540         to_bitField0_ |= 0x00000010;
1541       }
1542       if (((from_bitField0_ & 0x00000080) != 0)) {
1543         result.kind_ = kind_;
1544         to_bitField0_ |= 0x00000020;
1545       }
1546       if (((from_bitField0_ & 0x00000100) != 0)) {
1547         result.name_ = name_;
1548         to_bitField0_ |= 0x00000040;
1549       }
1550       if (((from_bitField0_ & 0x00000200) != 0)) {
1551         result.region_ = region_;
1552         to_bitField0_ |= 0x00000080;
1553       }
1554       if (((from_bitField0_ & 0x00000400) != 0)) {
1555         result.selfLink_ = selfLink_;
1556         to_bitField0_ |= 0x00000100;
1557       }
1558       if (((from_bitField0_ & 0x00000800) != 0)) {
1559         result.sessionAffinity_ = sessionAffinity_;
1560         to_bitField0_ |= 0x00000200;
1561       }
1562       result.bitField0_ |= to_bitField0_;
1563     }
1564 
1565     @java.lang.Override
clone()1566     public Builder clone() {
1567       return super.clone();
1568     }
1569 
1570     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1571     public Builder setField(
1572         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1573       return super.setField(field, value);
1574     }
1575 
1576     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1577     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1578       return super.clearField(field);
1579     }
1580 
1581     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1582     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1583       return super.clearOneof(oneof);
1584     }
1585 
1586     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1587     public Builder setRepeatedField(
1588         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
1589       return super.setRepeatedField(field, index, value);
1590     }
1591 
1592     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1593     public Builder addRepeatedField(
1594         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1595       return super.addRepeatedField(field, value);
1596     }
1597 
1598     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1599     public Builder mergeFrom(com.google.protobuf.Message other) {
1600       if (other instanceof com.google.cloud.compute.v1.TargetPool) {
1601         return mergeFrom((com.google.cloud.compute.v1.TargetPool) other);
1602       } else {
1603         super.mergeFrom(other);
1604         return this;
1605       }
1606     }
1607 
mergeFrom(com.google.cloud.compute.v1.TargetPool other)1608     public Builder mergeFrom(com.google.cloud.compute.v1.TargetPool other) {
1609       if (other == com.google.cloud.compute.v1.TargetPool.getDefaultInstance()) return this;
1610       if (other.hasBackupPool()) {
1611         backupPool_ = other.backupPool_;
1612         bitField0_ |= 0x00000001;
1613         onChanged();
1614       }
1615       if (other.hasCreationTimestamp()) {
1616         creationTimestamp_ = other.creationTimestamp_;
1617         bitField0_ |= 0x00000002;
1618         onChanged();
1619       }
1620       if (other.hasDescription()) {
1621         description_ = other.description_;
1622         bitField0_ |= 0x00000004;
1623         onChanged();
1624       }
1625       if (other.hasFailoverRatio()) {
1626         setFailoverRatio(other.getFailoverRatio());
1627       }
1628       if (!other.healthChecks_.isEmpty()) {
1629         if (healthChecks_.isEmpty()) {
1630           healthChecks_ = other.healthChecks_;
1631           bitField0_ = (bitField0_ & ~0x00000010);
1632         } else {
1633           ensureHealthChecksIsMutable();
1634           healthChecks_.addAll(other.healthChecks_);
1635         }
1636         onChanged();
1637       }
1638       if (other.hasId()) {
1639         setId(other.getId());
1640       }
1641       if (!other.instances_.isEmpty()) {
1642         if (instances_.isEmpty()) {
1643           instances_ = other.instances_;
1644           bitField0_ = (bitField0_ & ~0x00000040);
1645         } else {
1646           ensureInstancesIsMutable();
1647           instances_.addAll(other.instances_);
1648         }
1649         onChanged();
1650       }
1651       if (other.hasKind()) {
1652         kind_ = other.kind_;
1653         bitField0_ |= 0x00000080;
1654         onChanged();
1655       }
1656       if (other.hasName()) {
1657         name_ = other.name_;
1658         bitField0_ |= 0x00000100;
1659         onChanged();
1660       }
1661       if (other.hasRegion()) {
1662         region_ = other.region_;
1663         bitField0_ |= 0x00000200;
1664         onChanged();
1665       }
1666       if (other.hasSelfLink()) {
1667         selfLink_ = other.selfLink_;
1668         bitField0_ |= 0x00000400;
1669         onChanged();
1670       }
1671       if (other.hasSessionAffinity()) {
1672         sessionAffinity_ = other.sessionAffinity_;
1673         bitField0_ |= 0x00000800;
1674         onChanged();
1675       }
1676       this.mergeUnknownFields(other.getUnknownFields());
1677       onChanged();
1678       return this;
1679     }
1680 
1681     @java.lang.Override
isInitialized()1682     public final boolean isInitialized() {
1683       return true;
1684     }
1685 
1686     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1687     public Builder mergeFrom(
1688         com.google.protobuf.CodedInputStream input,
1689         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1690         throws java.io.IOException {
1691       if (extensionRegistry == null) {
1692         throw new java.lang.NullPointerException();
1693       }
1694       try {
1695         boolean done = false;
1696         while (!done) {
1697           int tag = input.readTag();
1698           switch (tag) {
1699             case 0:
1700               done = true;
1701               break;
1702             case 26840:
1703               {
1704                 id_ = input.readUInt64();
1705                 bitField0_ |= 0x00000020;
1706                 break;
1707               } // case 26840
1708             case 26336418:
1709               {
1710                 kind_ = input.readStringRequireUtf8();
1711                 bitField0_ |= 0x00000080;
1712                 break;
1713               } // case 26336418
1714             case 26989658:
1715               {
1716                 name_ = input.readStringRequireUtf8();
1717                 bitField0_ |= 0x00000100;
1718                 break;
1719               } // case 26989658
1720             case 232780786:
1721               {
1722                 java.lang.String s = input.readStringRequireUtf8();
1723                 ensureInstancesIsMutable();
1724                 instances_.add(s);
1725                 break;
1726               } // case 232780786
1727             case 244202930:
1728               {
1729                 creationTimestamp_ = input.readStringRequireUtf8();
1730                 bitField0_ |= 0x00000002;
1731                 break;
1732               } // case 244202930
1733             case 367076298:
1734               {
1735                 backupPool_ = input.readStringRequireUtf8();
1736                 bitField0_ |= 0x00000001;
1737                 break;
1738               } // case 367076298
1739             case 1111570338:
1740               {
1741                 region_ = input.readStringRequireUtf8();
1742                 bitField0_ |= 0x00000200;
1743                 break;
1744               } // case 1111570338
1745             case 1701336053:
1746               {
1747                 failoverRatio_ = input.readFloat();
1748                 bitField0_ |= 0x00000008;
1749                 break;
1750               } // case 1701336053
1751             case -911466526:
1752               {
1753                 description_ = input.readStringRequireUtf8();
1754                 bitField0_ |= 0x00000004;
1755                 break;
1756               } // case -911466526
1757             case -708002446:
1758               {
1759                 java.lang.String s = input.readStringRequireUtf8();
1760                 ensureHealthChecksIsMutable();
1761                 healthChecks_.add(s);
1762                 break;
1763               } // case -708002446
1764             case -645248918:
1765               {
1766                 selfLink_ = input.readStringRequireUtf8();
1767                 bitField0_ |= 0x00000400;
1768                 break;
1769               } // case -645248918
1770             case -583858806:
1771               {
1772                 sessionAffinity_ = input.readStringRequireUtf8();
1773                 bitField0_ |= 0x00000800;
1774                 break;
1775               } // case -583858806
1776             default:
1777               {
1778                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1779                   done = true; // was an endgroup tag
1780                 }
1781                 break;
1782               } // default:
1783           } // switch (tag)
1784         } // while (!done)
1785       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1786         throw e.unwrapIOException();
1787       } finally {
1788         onChanged();
1789       } // finally
1790       return this;
1791     }
1792 
1793     private int bitField0_;
1794 
1795     private java.lang.Object backupPool_ = "";
1796     /**
1797      *
1798      *
1799      * <pre>
1800      * The server-defined URL for the resource. This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1]. backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.
1801      * </pre>
1802      *
1803      * <code>optional string backup_pool = 45884537;</code>
1804      *
1805      * @return Whether the backupPool field is set.
1806      */
hasBackupPool()1807     public boolean hasBackupPool() {
1808       return ((bitField0_ & 0x00000001) != 0);
1809     }
1810     /**
1811      *
1812      *
1813      * <pre>
1814      * The server-defined URL for the resource. This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1]. backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.
1815      * </pre>
1816      *
1817      * <code>optional string backup_pool = 45884537;</code>
1818      *
1819      * @return The backupPool.
1820      */
getBackupPool()1821     public java.lang.String getBackupPool() {
1822       java.lang.Object ref = backupPool_;
1823       if (!(ref instanceof java.lang.String)) {
1824         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1825         java.lang.String s = bs.toStringUtf8();
1826         backupPool_ = s;
1827         return s;
1828       } else {
1829         return (java.lang.String) ref;
1830       }
1831     }
1832     /**
1833      *
1834      *
1835      * <pre>
1836      * The server-defined URL for the resource. This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1]. backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.
1837      * </pre>
1838      *
1839      * <code>optional string backup_pool = 45884537;</code>
1840      *
1841      * @return The bytes for backupPool.
1842      */
getBackupPoolBytes()1843     public com.google.protobuf.ByteString getBackupPoolBytes() {
1844       java.lang.Object ref = backupPool_;
1845       if (ref instanceof String) {
1846         com.google.protobuf.ByteString b =
1847             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1848         backupPool_ = b;
1849         return b;
1850       } else {
1851         return (com.google.protobuf.ByteString) ref;
1852       }
1853     }
1854     /**
1855      *
1856      *
1857      * <pre>
1858      * The server-defined URL for the resource. This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1]. backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.
1859      * </pre>
1860      *
1861      * <code>optional string backup_pool = 45884537;</code>
1862      *
1863      * @param value The backupPool to set.
1864      * @return This builder for chaining.
1865      */
setBackupPool(java.lang.String value)1866     public Builder setBackupPool(java.lang.String value) {
1867       if (value == null) {
1868         throw new NullPointerException();
1869       }
1870       backupPool_ = value;
1871       bitField0_ |= 0x00000001;
1872       onChanged();
1873       return this;
1874     }
1875     /**
1876      *
1877      *
1878      * <pre>
1879      * The server-defined URL for the resource. This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1]. backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.
1880      * </pre>
1881      *
1882      * <code>optional string backup_pool = 45884537;</code>
1883      *
1884      * @return This builder for chaining.
1885      */
clearBackupPool()1886     public Builder clearBackupPool() {
1887       backupPool_ = getDefaultInstance().getBackupPool();
1888       bitField0_ = (bitField0_ & ~0x00000001);
1889       onChanged();
1890       return this;
1891     }
1892     /**
1893      *
1894      *
1895      * <pre>
1896      * The server-defined URL for the resource. This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1]. backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.
1897      * </pre>
1898      *
1899      * <code>optional string backup_pool = 45884537;</code>
1900      *
1901      * @param value The bytes for backupPool to set.
1902      * @return This builder for chaining.
1903      */
setBackupPoolBytes(com.google.protobuf.ByteString value)1904     public Builder setBackupPoolBytes(com.google.protobuf.ByteString value) {
1905       if (value == null) {
1906         throw new NullPointerException();
1907       }
1908       checkByteStringIsUtf8(value);
1909       backupPool_ = value;
1910       bitField0_ |= 0x00000001;
1911       onChanged();
1912       return this;
1913     }
1914 
1915     private java.lang.Object creationTimestamp_ = "";
1916     /**
1917      *
1918      *
1919      * <pre>
1920      * [Output Only] Creation timestamp in RFC3339 text format.
1921      * </pre>
1922      *
1923      * <code>optional string creation_timestamp = 30525366;</code>
1924      *
1925      * @return Whether the creationTimestamp field is set.
1926      */
hasCreationTimestamp()1927     public boolean hasCreationTimestamp() {
1928       return ((bitField0_ & 0x00000002) != 0);
1929     }
1930     /**
1931      *
1932      *
1933      * <pre>
1934      * [Output Only] Creation timestamp in RFC3339 text format.
1935      * </pre>
1936      *
1937      * <code>optional string creation_timestamp = 30525366;</code>
1938      *
1939      * @return The creationTimestamp.
1940      */
getCreationTimestamp()1941     public java.lang.String getCreationTimestamp() {
1942       java.lang.Object ref = creationTimestamp_;
1943       if (!(ref instanceof java.lang.String)) {
1944         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1945         java.lang.String s = bs.toStringUtf8();
1946         creationTimestamp_ = s;
1947         return s;
1948       } else {
1949         return (java.lang.String) ref;
1950       }
1951     }
1952     /**
1953      *
1954      *
1955      * <pre>
1956      * [Output Only] Creation timestamp in RFC3339 text format.
1957      * </pre>
1958      *
1959      * <code>optional string creation_timestamp = 30525366;</code>
1960      *
1961      * @return The bytes for creationTimestamp.
1962      */
getCreationTimestampBytes()1963     public com.google.protobuf.ByteString getCreationTimestampBytes() {
1964       java.lang.Object ref = creationTimestamp_;
1965       if (ref instanceof String) {
1966         com.google.protobuf.ByteString b =
1967             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1968         creationTimestamp_ = b;
1969         return b;
1970       } else {
1971         return (com.google.protobuf.ByteString) ref;
1972       }
1973     }
1974     /**
1975      *
1976      *
1977      * <pre>
1978      * [Output Only] Creation timestamp in RFC3339 text format.
1979      * </pre>
1980      *
1981      * <code>optional string creation_timestamp = 30525366;</code>
1982      *
1983      * @param value The creationTimestamp to set.
1984      * @return This builder for chaining.
1985      */
setCreationTimestamp(java.lang.String value)1986     public Builder setCreationTimestamp(java.lang.String value) {
1987       if (value == null) {
1988         throw new NullPointerException();
1989       }
1990       creationTimestamp_ = value;
1991       bitField0_ |= 0x00000002;
1992       onChanged();
1993       return this;
1994     }
1995     /**
1996      *
1997      *
1998      * <pre>
1999      * [Output Only] Creation timestamp in RFC3339 text format.
2000      * </pre>
2001      *
2002      * <code>optional string creation_timestamp = 30525366;</code>
2003      *
2004      * @return This builder for chaining.
2005      */
clearCreationTimestamp()2006     public Builder clearCreationTimestamp() {
2007       creationTimestamp_ = getDefaultInstance().getCreationTimestamp();
2008       bitField0_ = (bitField0_ & ~0x00000002);
2009       onChanged();
2010       return this;
2011     }
2012     /**
2013      *
2014      *
2015      * <pre>
2016      * [Output Only] Creation timestamp in RFC3339 text format.
2017      * </pre>
2018      *
2019      * <code>optional string creation_timestamp = 30525366;</code>
2020      *
2021      * @param value The bytes for creationTimestamp to set.
2022      * @return This builder for chaining.
2023      */
setCreationTimestampBytes(com.google.protobuf.ByteString value)2024     public Builder setCreationTimestampBytes(com.google.protobuf.ByteString value) {
2025       if (value == null) {
2026         throw new NullPointerException();
2027       }
2028       checkByteStringIsUtf8(value);
2029       creationTimestamp_ = value;
2030       bitField0_ |= 0x00000002;
2031       onChanged();
2032       return this;
2033     }
2034 
2035     private java.lang.Object description_ = "";
2036     /**
2037      *
2038      *
2039      * <pre>
2040      * An optional description of this resource. Provide this property when you create the resource.
2041      * </pre>
2042      *
2043      * <code>optional string description = 422937596;</code>
2044      *
2045      * @return Whether the description field is set.
2046      */
hasDescription()2047     public boolean hasDescription() {
2048       return ((bitField0_ & 0x00000004) != 0);
2049     }
2050     /**
2051      *
2052      *
2053      * <pre>
2054      * An optional description of this resource. Provide this property when you create the resource.
2055      * </pre>
2056      *
2057      * <code>optional string description = 422937596;</code>
2058      *
2059      * @return The description.
2060      */
getDescription()2061     public java.lang.String getDescription() {
2062       java.lang.Object ref = description_;
2063       if (!(ref instanceof java.lang.String)) {
2064         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2065         java.lang.String s = bs.toStringUtf8();
2066         description_ = s;
2067         return s;
2068       } else {
2069         return (java.lang.String) ref;
2070       }
2071     }
2072     /**
2073      *
2074      *
2075      * <pre>
2076      * An optional description of this resource. Provide this property when you create the resource.
2077      * </pre>
2078      *
2079      * <code>optional string description = 422937596;</code>
2080      *
2081      * @return The bytes for description.
2082      */
getDescriptionBytes()2083     public com.google.protobuf.ByteString getDescriptionBytes() {
2084       java.lang.Object ref = description_;
2085       if (ref instanceof String) {
2086         com.google.protobuf.ByteString b =
2087             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2088         description_ = b;
2089         return b;
2090       } else {
2091         return (com.google.protobuf.ByteString) ref;
2092       }
2093     }
2094     /**
2095      *
2096      *
2097      * <pre>
2098      * An optional description of this resource. Provide this property when you create the resource.
2099      * </pre>
2100      *
2101      * <code>optional string description = 422937596;</code>
2102      *
2103      * @param value The description to set.
2104      * @return This builder for chaining.
2105      */
setDescription(java.lang.String value)2106     public Builder setDescription(java.lang.String value) {
2107       if (value == null) {
2108         throw new NullPointerException();
2109       }
2110       description_ = value;
2111       bitField0_ |= 0x00000004;
2112       onChanged();
2113       return this;
2114     }
2115     /**
2116      *
2117      *
2118      * <pre>
2119      * An optional description of this resource. Provide this property when you create the resource.
2120      * </pre>
2121      *
2122      * <code>optional string description = 422937596;</code>
2123      *
2124      * @return This builder for chaining.
2125      */
clearDescription()2126     public Builder clearDescription() {
2127       description_ = getDefaultInstance().getDescription();
2128       bitField0_ = (bitField0_ & ~0x00000004);
2129       onChanged();
2130       return this;
2131     }
2132     /**
2133      *
2134      *
2135      * <pre>
2136      * An optional description of this resource. Provide this property when you create the resource.
2137      * </pre>
2138      *
2139      * <code>optional string description = 422937596;</code>
2140      *
2141      * @param value The bytes for description to set.
2142      * @return This builder for chaining.
2143      */
setDescriptionBytes(com.google.protobuf.ByteString value)2144     public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
2145       if (value == null) {
2146         throw new NullPointerException();
2147       }
2148       checkByteStringIsUtf8(value);
2149       description_ = value;
2150       bitField0_ |= 0x00000004;
2151       onChanged();
2152       return this;
2153     }
2154 
2155     private float failoverRatio_;
2156     /**
2157      *
2158      *
2159      * <pre>
2160      * This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value of the field must be in [0, 1]. If set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio is not set or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.
2161      * </pre>
2162      *
2163      * <code>optional float failover_ratio = 212667006;</code>
2164      *
2165      * @return Whether the failoverRatio field is set.
2166      */
2167     @java.lang.Override
hasFailoverRatio()2168     public boolean hasFailoverRatio() {
2169       return ((bitField0_ & 0x00000008) != 0);
2170     }
2171     /**
2172      *
2173      *
2174      * <pre>
2175      * This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value of the field must be in [0, 1]. If set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio is not set or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.
2176      * </pre>
2177      *
2178      * <code>optional float failover_ratio = 212667006;</code>
2179      *
2180      * @return The failoverRatio.
2181      */
2182     @java.lang.Override
getFailoverRatio()2183     public float getFailoverRatio() {
2184       return failoverRatio_;
2185     }
2186     /**
2187      *
2188      *
2189      * <pre>
2190      * This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value of the field must be in [0, 1]. If set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio is not set or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.
2191      * </pre>
2192      *
2193      * <code>optional float failover_ratio = 212667006;</code>
2194      *
2195      * @param value The failoverRatio to set.
2196      * @return This builder for chaining.
2197      */
setFailoverRatio(float value)2198     public Builder setFailoverRatio(float value) {
2199 
2200       failoverRatio_ = value;
2201       bitField0_ |= 0x00000008;
2202       onChanged();
2203       return this;
2204     }
2205     /**
2206      *
2207      *
2208      * <pre>
2209      * This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value of the field must be in [0, 1]. If set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio is not set or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy.
2210      * </pre>
2211      *
2212      * <code>optional float failover_ratio = 212667006;</code>
2213      *
2214      * @return This builder for chaining.
2215      */
clearFailoverRatio()2216     public Builder clearFailoverRatio() {
2217       bitField0_ = (bitField0_ & ~0x00000008);
2218       failoverRatio_ = 0F;
2219       onChanged();
2220       return this;
2221     }
2222 
2223     private com.google.protobuf.LazyStringList healthChecks_ =
2224         com.google.protobuf.LazyStringArrayList.EMPTY;
2225 
ensureHealthChecksIsMutable()2226     private void ensureHealthChecksIsMutable() {
2227       if (!((bitField0_ & 0x00000010) != 0)) {
2228         healthChecks_ = new com.google.protobuf.LazyStringArrayList(healthChecks_);
2229         bitField0_ |= 0x00000010;
2230       }
2231     }
2232     /**
2233      *
2234      *
2235      * <pre>
2236      * The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. Only legacy HttpHealthChecks are supported. Only one health check may be specified.
2237      * </pre>
2238      *
2239      * <code>repeated string health_checks = 448370606;</code>
2240      *
2241      * @return A list containing the healthChecks.
2242      */
getHealthChecksList()2243     public com.google.protobuf.ProtocolStringList getHealthChecksList() {
2244       return healthChecks_.getUnmodifiableView();
2245     }
2246     /**
2247      *
2248      *
2249      * <pre>
2250      * The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. Only legacy HttpHealthChecks are supported. Only one health check may be specified.
2251      * </pre>
2252      *
2253      * <code>repeated string health_checks = 448370606;</code>
2254      *
2255      * @return The count of healthChecks.
2256      */
getHealthChecksCount()2257     public int getHealthChecksCount() {
2258       return healthChecks_.size();
2259     }
2260     /**
2261      *
2262      *
2263      * <pre>
2264      * The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. Only legacy HttpHealthChecks are supported. Only one health check may be specified.
2265      * </pre>
2266      *
2267      * <code>repeated string health_checks = 448370606;</code>
2268      *
2269      * @param index The index of the element to return.
2270      * @return The healthChecks at the given index.
2271      */
getHealthChecks(int index)2272     public java.lang.String getHealthChecks(int index) {
2273       return healthChecks_.get(index);
2274     }
2275     /**
2276      *
2277      *
2278      * <pre>
2279      * The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. Only legacy HttpHealthChecks are supported. Only one health check may be specified.
2280      * </pre>
2281      *
2282      * <code>repeated string health_checks = 448370606;</code>
2283      *
2284      * @param index The index of the value to return.
2285      * @return The bytes of the healthChecks at the given index.
2286      */
getHealthChecksBytes(int index)2287     public com.google.protobuf.ByteString getHealthChecksBytes(int index) {
2288       return healthChecks_.getByteString(index);
2289     }
2290     /**
2291      *
2292      *
2293      * <pre>
2294      * The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. Only legacy HttpHealthChecks are supported. Only one health check may be specified.
2295      * </pre>
2296      *
2297      * <code>repeated string health_checks = 448370606;</code>
2298      *
2299      * @param index The index to set the value at.
2300      * @param value The healthChecks to set.
2301      * @return This builder for chaining.
2302      */
setHealthChecks(int index, java.lang.String value)2303     public Builder setHealthChecks(int index, java.lang.String value) {
2304       if (value == null) {
2305         throw new NullPointerException();
2306       }
2307       ensureHealthChecksIsMutable();
2308       healthChecks_.set(index, value);
2309       onChanged();
2310       return this;
2311     }
2312     /**
2313      *
2314      *
2315      * <pre>
2316      * The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. Only legacy HttpHealthChecks are supported. Only one health check may be specified.
2317      * </pre>
2318      *
2319      * <code>repeated string health_checks = 448370606;</code>
2320      *
2321      * @param value The healthChecks to add.
2322      * @return This builder for chaining.
2323      */
addHealthChecks(java.lang.String value)2324     public Builder addHealthChecks(java.lang.String value) {
2325       if (value == null) {
2326         throw new NullPointerException();
2327       }
2328       ensureHealthChecksIsMutable();
2329       healthChecks_.add(value);
2330       onChanged();
2331       return this;
2332     }
2333     /**
2334      *
2335      *
2336      * <pre>
2337      * The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. Only legacy HttpHealthChecks are supported. Only one health check may be specified.
2338      * </pre>
2339      *
2340      * <code>repeated string health_checks = 448370606;</code>
2341      *
2342      * @param values The healthChecks to add.
2343      * @return This builder for chaining.
2344      */
addAllHealthChecks(java.lang.Iterable<java.lang.String> values)2345     public Builder addAllHealthChecks(java.lang.Iterable<java.lang.String> values) {
2346       ensureHealthChecksIsMutable();
2347       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, healthChecks_);
2348       onChanged();
2349       return this;
2350     }
2351     /**
2352      *
2353      *
2354      * <pre>
2355      * The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. Only legacy HttpHealthChecks are supported. Only one health check may be specified.
2356      * </pre>
2357      *
2358      * <code>repeated string health_checks = 448370606;</code>
2359      *
2360      * @return This builder for chaining.
2361      */
clearHealthChecks()2362     public Builder clearHealthChecks() {
2363       healthChecks_ = com.google.protobuf.LazyStringArrayList.EMPTY;
2364       bitField0_ = (bitField0_ & ~0x00000010);
2365       onChanged();
2366       return this;
2367     }
2368     /**
2369      *
2370      *
2371      * <pre>
2372      * The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. Only legacy HttpHealthChecks are supported. Only one health check may be specified.
2373      * </pre>
2374      *
2375      * <code>repeated string health_checks = 448370606;</code>
2376      *
2377      * @param value The bytes of the healthChecks to add.
2378      * @return This builder for chaining.
2379      */
addHealthChecksBytes(com.google.protobuf.ByteString value)2380     public Builder addHealthChecksBytes(com.google.protobuf.ByteString value) {
2381       if (value == null) {
2382         throw new NullPointerException();
2383       }
2384       checkByteStringIsUtf8(value);
2385       ensureHealthChecksIsMutable();
2386       healthChecks_.add(value);
2387       onChanged();
2388       return this;
2389     }
2390 
2391     private long id_;
2392     /**
2393      *
2394      *
2395      * <pre>
2396      * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2397      * </pre>
2398      *
2399      * <code>optional uint64 id = 3355;</code>
2400      *
2401      * @return Whether the id field is set.
2402      */
2403     @java.lang.Override
hasId()2404     public boolean hasId() {
2405       return ((bitField0_ & 0x00000020) != 0);
2406     }
2407     /**
2408      *
2409      *
2410      * <pre>
2411      * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2412      * </pre>
2413      *
2414      * <code>optional uint64 id = 3355;</code>
2415      *
2416      * @return The id.
2417      */
2418     @java.lang.Override
getId()2419     public long getId() {
2420       return id_;
2421     }
2422     /**
2423      *
2424      *
2425      * <pre>
2426      * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2427      * </pre>
2428      *
2429      * <code>optional uint64 id = 3355;</code>
2430      *
2431      * @param value The id to set.
2432      * @return This builder for chaining.
2433      */
setId(long value)2434     public Builder setId(long value) {
2435 
2436       id_ = value;
2437       bitField0_ |= 0x00000020;
2438       onChanged();
2439       return this;
2440     }
2441     /**
2442      *
2443      *
2444      * <pre>
2445      * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2446      * </pre>
2447      *
2448      * <code>optional uint64 id = 3355;</code>
2449      *
2450      * @return This builder for chaining.
2451      */
clearId()2452     public Builder clearId() {
2453       bitField0_ = (bitField0_ & ~0x00000020);
2454       id_ = 0L;
2455       onChanged();
2456       return this;
2457     }
2458 
2459     private com.google.protobuf.LazyStringList instances_ =
2460         com.google.protobuf.LazyStringArrayList.EMPTY;
2461 
ensureInstancesIsMutable()2462     private void ensureInstancesIsMutable() {
2463       if (!((bitField0_ & 0x00000040) != 0)) {
2464         instances_ = new com.google.protobuf.LazyStringArrayList(instances_);
2465         bitField0_ |= 0x00000040;
2466       }
2467     }
2468     /**
2469      *
2470      *
2471      * <pre>
2472      * A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool.
2473      * </pre>
2474      *
2475      * <code>repeated string instances = 29097598;</code>
2476      *
2477      * @return A list containing the instances.
2478      */
getInstancesList()2479     public com.google.protobuf.ProtocolStringList getInstancesList() {
2480       return instances_.getUnmodifiableView();
2481     }
2482     /**
2483      *
2484      *
2485      * <pre>
2486      * A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool.
2487      * </pre>
2488      *
2489      * <code>repeated string instances = 29097598;</code>
2490      *
2491      * @return The count of instances.
2492      */
getInstancesCount()2493     public int getInstancesCount() {
2494       return instances_.size();
2495     }
2496     /**
2497      *
2498      *
2499      * <pre>
2500      * A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool.
2501      * </pre>
2502      *
2503      * <code>repeated string instances = 29097598;</code>
2504      *
2505      * @param index The index of the element to return.
2506      * @return The instances at the given index.
2507      */
getInstances(int index)2508     public java.lang.String getInstances(int index) {
2509       return instances_.get(index);
2510     }
2511     /**
2512      *
2513      *
2514      * <pre>
2515      * A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool.
2516      * </pre>
2517      *
2518      * <code>repeated string instances = 29097598;</code>
2519      *
2520      * @param index The index of the value to return.
2521      * @return The bytes of the instances at the given index.
2522      */
getInstancesBytes(int index)2523     public com.google.protobuf.ByteString getInstancesBytes(int index) {
2524       return instances_.getByteString(index);
2525     }
2526     /**
2527      *
2528      *
2529      * <pre>
2530      * A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool.
2531      * </pre>
2532      *
2533      * <code>repeated string instances = 29097598;</code>
2534      *
2535      * @param index The index to set the value at.
2536      * @param value The instances to set.
2537      * @return This builder for chaining.
2538      */
setInstances(int index, java.lang.String value)2539     public Builder setInstances(int index, java.lang.String value) {
2540       if (value == null) {
2541         throw new NullPointerException();
2542       }
2543       ensureInstancesIsMutable();
2544       instances_.set(index, value);
2545       onChanged();
2546       return this;
2547     }
2548     /**
2549      *
2550      *
2551      * <pre>
2552      * A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool.
2553      * </pre>
2554      *
2555      * <code>repeated string instances = 29097598;</code>
2556      *
2557      * @param value The instances to add.
2558      * @return This builder for chaining.
2559      */
addInstances(java.lang.String value)2560     public Builder addInstances(java.lang.String value) {
2561       if (value == null) {
2562         throw new NullPointerException();
2563       }
2564       ensureInstancesIsMutable();
2565       instances_.add(value);
2566       onChanged();
2567       return this;
2568     }
2569     /**
2570      *
2571      *
2572      * <pre>
2573      * A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool.
2574      * </pre>
2575      *
2576      * <code>repeated string instances = 29097598;</code>
2577      *
2578      * @param values The instances to add.
2579      * @return This builder for chaining.
2580      */
addAllInstances(java.lang.Iterable<java.lang.String> values)2581     public Builder addAllInstances(java.lang.Iterable<java.lang.String> values) {
2582       ensureInstancesIsMutable();
2583       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instances_);
2584       onChanged();
2585       return this;
2586     }
2587     /**
2588      *
2589      *
2590      * <pre>
2591      * A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool.
2592      * </pre>
2593      *
2594      * <code>repeated string instances = 29097598;</code>
2595      *
2596      * @return This builder for chaining.
2597      */
clearInstances()2598     public Builder clearInstances() {
2599       instances_ = com.google.protobuf.LazyStringArrayList.EMPTY;
2600       bitField0_ = (bitField0_ & ~0x00000040);
2601       onChanged();
2602       return this;
2603     }
2604     /**
2605      *
2606      *
2607      * <pre>
2608      * A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool.
2609      * </pre>
2610      *
2611      * <code>repeated string instances = 29097598;</code>
2612      *
2613      * @param value The bytes of the instances to add.
2614      * @return This builder for chaining.
2615      */
addInstancesBytes(com.google.protobuf.ByteString value)2616     public Builder addInstancesBytes(com.google.protobuf.ByteString value) {
2617       if (value == null) {
2618         throw new NullPointerException();
2619       }
2620       checkByteStringIsUtf8(value);
2621       ensureInstancesIsMutable();
2622       instances_.add(value);
2623       onChanged();
2624       return this;
2625     }
2626 
2627     private java.lang.Object kind_ = "";
2628     /**
2629      *
2630      *
2631      * <pre>
2632      * [Output Only] Type of the resource. Always compute#targetPool for target pools.
2633      * </pre>
2634      *
2635      * <code>optional string kind = 3292052;</code>
2636      *
2637      * @return Whether the kind field is set.
2638      */
hasKind()2639     public boolean hasKind() {
2640       return ((bitField0_ & 0x00000080) != 0);
2641     }
2642     /**
2643      *
2644      *
2645      * <pre>
2646      * [Output Only] Type of the resource. Always compute#targetPool for target pools.
2647      * </pre>
2648      *
2649      * <code>optional string kind = 3292052;</code>
2650      *
2651      * @return The kind.
2652      */
getKind()2653     public java.lang.String getKind() {
2654       java.lang.Object ref = kind_;
2655       if (!(ref instanceof java.lang.String)) {
2656         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2657         java.lang.String s = bs.toStringUtf8();
2658         kind_ = s;
2659         return s;
2660       } else {
2661         return (java.lang.String) ref;
2662       }
2663     }
2664     /**
2665      *
2666      *
2667      * <pre>
2668      * [Output Only] Type of the resource. Always compute#targetPool for target pools.
2669      * </pre>
2670      *
2671      * <code>optional string kind = 3292052;</code>
2672      *
2673      * @return The bytes for kind.
2674      */
getKindBytes()2675     public com.google.protobuf.ByteString getKindBytes() {
2676       java.lang.Object ref = kind_;
2677       if (ref instanceof String) {
2678         com.google.protobuf.ByteString b =
2679             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2680         kind_ = b;
2681         return b;
2682       } else {
2683         return (com.google.protobuf.ByteString) ref;
2684       }
2685     }
2686     /**
2687      *
2688      *
2689      * <pre>
2690      * [Output Only] Type of the resource. Always compute#targetPool for target pools.
2691      * </pre>
2692      *
2693      * <code>optional string kind = 3292052;</code>
2694      *
2695      * @param value The kind to set.
2696      * @return This builder for chaining.
2697      */
setKind(java.lang.String value)2698     public Builder setKind(java.lang.String value) {
2699       if (value == null) {
2700         throw new NullPointerException();
2701       }
2702       kind_ = value;
2703       bitField0_ |= 0x00000080;
2704       onChanged();
2705       return this;
2706     }
2707     /**
2708      *
2709      *
2710      * <pre>
2711      * [Output Only] Type of the resource. Always compute#targetPool for target pools.
2712      * </pre>
2713      *
2714      * <code>optional string kind = 3292052;</code>
2715      *
2716      * @return This builder for chaining.
2717      */
clearKind()2718     public Builder clearKind() {
2719       kind_ = getDefaultInstance().getKind();
2720       bitField0_ = (bitField0_ & ~0x00000080);
2721       onChanged();
2722       return this;
2723     }
2724     /**
2725      *
2726      *
2727      * <pre>
2728      * [Output Only] Type of the resource. Always compute#targetPool for target pools.
2729      * </pre>
2730      *
2731      * <code>optional string kind = 3292052;</code>
2732      *
2733      * @param value The bytes for kind to set.
2734      * @return This builder for chaining.
2735      */
setKindBytes(com.google.protobuf.ByteString value)2736     public Builder setKindBytes(com.google.protobuf.ByteString value) {
2737       if (value == null) {
2738         throw new NullPointerException();
2739       }
2740       checkByteStringIsUtf8(value);
2741       kind_ = value;
2742       bitField0_ |= 0x00000080;
2743       onChanged();
2744       return this;
2745     }
2746 
2747     private java.lang.Object name_ = "";
2748     /**
2749      *
2750      *
2751      * <pre>
2752      * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
2753      * </pre>
2754      *
2755      * <code>optional string name = 3373707;</code>
2756      *
2757      * @return Whether the name field is set.
2758      */
hasName()2759     public boolean hasName() {
2760       return ((bitField0_ & 0x00000100) != 0);
2761     }
2762     /**
2763      *
2764      *
2765      * <pre>
2766      * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
2767      * </pre>
2768      *
2769      * <code>optional string name = 3373707;</code>
2770      *
2771      * @return The name.
2772      */
getName()2773     public java.lang.String getName() {
2774       java.lang.Object ref = name_;
2775       if (!(ref instanceof java.lang.String)) {
2776         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2777         java.lang.String s = bs.toStringUtf8();
2778         name_ = s;
2779         return s;
2780       } else {
2781         return (java.lang.String) ref;
2782       }
2783     }
2784     /**
2785      *
2786      *
2787      * <pre>
2788      * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
2789      * </pre>
2790      *
2791      * <code>optional string name = 3373707;</code>
2792      *
2793      * @return The bytes for name.
2794      */
getNameBytes()2795     public com.google.protobuf.ByteString getNameBytes() {
2796       java.lang.Object ref = name_;
2797       if (ref instanceof String) {
2798         com.google.protobuf.ByteString b =
2799             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2800         name_ = b;
2801         return b;
2802       } else {
2803         return (com.google.protobuf.ByteString) ref;
2804       }
2805     }
2806     /**
2807      *
2808      *
2809      * <pre>
2810      * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
2811      * </pre>
2812      *
2813      * <code>optional string name = 3373707;</code>
2814      *
2815      * @param value The name to set.
2816      * @return This builder for chaining.
2817      */
setName(java.lang.String value)2818     public Builder setName(java.lang.String value) {
2819       if (value == null) {
2820         throw new NullPointerException();
2821       }
2822       name_ = value;
2823       bitField0_ |= 0x00000100;
2824       onChanged();
2825       return this;
2826     }
2827     /**
2828      *
2829      *
2830      * <pre>
2831      * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
2832      * </pre>
2833      *
2834      * <code>optional string name = 3373707;</code>
2835      *
2836      * @return This builder for chaining.
2837      */
clearName()2838     public Builder clearName() {
2839       name_ = getDefaultInstance().getName();
2840       bitField0_ = (bitField0_ & ~0x00000100);
2841       onChanged();
2842       return this;
2843     }
2844     /**
2845      *
2846      *
2847      * <pre>
2848      * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
2849      * </pre>
2850      *
2851      * <code>optional string name = 3373707;</code>
2852      *
2853      * @param value The bytes for name to set.
2854      * @return This builder for chaining.
2855      */
setNameBytes(com.google.protobuf.ByteString value)2856     public Builder setNameBytes(com.google.protobuf.ByteString value) {
2857       if (value == null) {
2858         throw new NullPointerException();
2859       }
2860       checkByteStringIsUtf8(value);
2861       name_ = value;
2862       bitField0_ |= 0x00000100;
2863       onChanged();
2864       return this;
2865     }
2866 
2867     private java.lang.Object region_ = "";
2868     /**
2869      *
2870      *
2871      * <pre>
2872      * [Output Only] URL of the region where the target pool resides.
2873      * </pre>
2874      *
2875      * <code>optional string region = 138946292;</code>
2876      *
2877      * @return Whether the region field is set.
2878      */
hasRegion()2879     public boolean hasRegion() {
2880       return ((bitField0_ & 0x00000200) != 0);
2881     }
2882     /**
2883      *
2884      *
2885      * <pre>
2886      * [Output Only] URL of the region where the target pool resides.
2887      * </pre>
2888      *
2889      * <code>optional string region = 138946292;</code>
2890      *
2891      * @return The region.
2892      */
getRegion()2893     public java.lang.String getRegion() {
2894       java.lang.Object ref = region_;
2895       if (!(ref instanceof java.lang.String)) {
2896         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2897         java.lang.String s = bs.toStringUtf8();
2898         region_ = s;
2899         return s;
2900       } else {
2901         return (java.lang.String) ref;
2902       }
2903     }
2904     /**
2905      *
2906      *
2907      * <pre>
2908      * [Output Only] URL of the region where the target pool resides.
2909      * </pre>
2910      *
2911      * <code>optional string region = 138946292;</code>
2912      *
2913      * @return The bytes for region.
2914      */
getRegionBytes()2915     public com.google.protobuf.ByteString getRegionBytes() {
2916       java.lang.Object ref = region_;
2917       if (ref instanceof String) {
2918         com.google.protobuf.ByteString b =
2919             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2920         region_ = b;
2921         return b;
2922       } else {
2923         return (com.google.protobuf.ByteString) ref;
2924       }
2925     }
2926     /**
2927      *
2928      *
2929      * <pre>
2930      * [Output Only] URL of the region where the target pool resides.
2931      * </pre>
2932      *
2933      * <code>optional string region = 138946292;</code>
2934      *
2935      * @param value The region to set.
2936      * @return This builder for chaining.
2937      */
setRegion(java.lang.String value)2938     public Builder setRegion(java.lang.String value) {
2939       if (value == null) {
2940         throw new NullPointerException();
2941       }
2942       region_ = value;
2943       bitField0_ |= 0x00000200;
2944       onChanged();
2945       return this;
2946     }
2947     /**
2948      *
2949      *
2950      * <pre>
2951      * [Output Only] URL of the region where the target pool resides.
2952      * </pre>
2953      *
2954      * <code>optional string region = 138946292;</code>
2955      *
2956      * @return This builder for chaining.
2957      */
clearRegion()2958     public Builder clearRegion() {
2959       region_ = getDefaultInstance().getRegion();
2960       bitField0_ = (bitField0_ & ~0x00000200);
2961       onChanged();
2962       return this;
2963     }
2964     /**
2965      *
2966      *
2967      * <pre>
2968      * [Output Only] URL of the region where the target pool resides.
2969      * </pre>
2970      *
2971      * <code>optional string region = 138946292;</code>
2972      *
2973      * @param value The bytes for region to set.
2974      * @return This builder for chaining.
2975      */
setRegionBytes(com.google.protobuf.ByteString value)2976     public Builder setRegionBytes(com.google.protobuf.ByteString value) {
2977       if (value == null) {
2978         throw new NullPointerException();
2979       }
2980       checkByteStringIsUtf8(value);
2981       region_ = value;
2982       bitField0_ |= 0x00000200;
2983       onChanged();
2984       return this;
2985     }
2986 
2987     private java.lang.Object selfLink_ = "";
2988     /**
2989      *
2990      *
2991      * <pre>
2992      * [Output Only] Server-defined URL for the resource.
2993      * </pre>
2994      *
2995      * <code>optional string self_link = 456214797;</code>
2996      *
2997      * @return Whether the selfLink field is set.
2998      */
hasSelfLink()2999     public boolean hasSelfLink() {
3000       return ((bitField0_ & 0x00000400) != 0);
3001     }
3002     /**
3003      *
3004      *
3005      * <pre>
3006      * [Output Only] Server-defined URL for the resource.
3007      * </pre>
3008      *
3009      * <code>optional string self_link = 456214797;</code>
3010      *
3011      * @return The selfLink.
3012      */
getSelfLink()3013     public java.lang.String getSelfLink() {
3014       java.lang.Object ref = selfLink_;
3015       if (!(ref instanceof java.lang.String)) {
3016         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3017         java.lang.String s = bs.toStringUtf8();
3018         selfLink_ = s;
3019         return s;
3020       } else {
3021         return (java.lang.String) ref;
3022       }
3023     }
3024     /**
3025      *
3026      *
3027      * <pre>
3028      * [Output Only] Server-defined URL for the resource.
3029      * </pre>
3030      *
3031      * <code>optional string self_link = 456214797;</code>
3032      *
3033      * @return The bytes for selfLink.
3034      */
getSelfLinkBytes()3035     public com.google.protobuf.ByteString getSelfLinkBytes() {
3036       java.lang.Object ref = selfLink_;
3037       if (ref instanceof String) {
3038         com.google.protobuf.ByteString b =
3039             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3040         selfLink_ = b;
3041         return b;
3042       } else {
3043         return (com.google.protobuf.ByteString) ref;
3044       }
3045     }
3046     /**
3047      *
3048      *
3049      * <pre>
3050      * [Output Only] Server-defined URL for the resource.
3051      * </pre>
3052      *
3053      * <code>optional string self_link = 456214797;</code>
3054      *
3055      * @param value The selfLink to set.
3056      * @return This builder for chaining.
3057      */
setSelfLink(java.lang.String value)3058     public Builder setSelfLink(java.lang.String value) {
3059       if (value == null) {
3060         throw new NullPointerException();
3061       }
3062       selfLink_ = value;
3063       bitField0_ |= 0x00000400;
3064       onChanged();
3065       return this;
3066     }
3067     /**
3068      *
3069      *
3070      * <pre>
3071      * [Output Only] Server-defined URL for the resource.
3072      * </pre>
3073      *
3074      * <code>optional string self_link = 456214797;</code>
3075      *
3076      * @return This builder for chaining.
3077      */
clearSelfLink()3078     public Builder clearSelfLink() {
3079       selfLink_ = getDefaultInstance().getSelfLink();
3080       bitField0_ = (bitField0_ & ~0x00000400);
3081       onChanged();
3082       return this;
3083     }
3084     /**
3085      *
3086      *
3087      * <pre>
3088      * [Output Only] Server-defined URL for the resource.
3089      * </pre>
3090      *
3091      * <code>optional string self_link = 456214797;</code>
3092      *
3093      * @param value The bytes for selfLink to set.
3094      * @return This builder for chaining.
3095      */
setSelfLinkBytes(com.google.protobuf.ByteString value)3096     public Builder setSelfLinkBytes(com.google.protobuf.ByteString value) {
3097       if (value == null) {
3098         throw new NullPointerException();
3099       }
3100       checkByteStringIsUtf8(value);
3101       selfLink_ = value;
3102       bitField0_ |= 0x00000400;
3103       onChanged();
3104       return this;
3105     }
3106 
3107     private java.lang.Object sessionAffinity_ = "";
3108     /**
3109      *
3110      *
3111      * <pre>
3112      * Session affinity option, must be one of the following values: NONE: Connections from the same client IP may go to any instance in the pool. CLIENT_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy. CLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy.
3113      * Check the SessionAffinity enum for the list of possible values.
3114      * </pre>
3115      *
3116      * <code>optional string session_affinity = 463888561;</code>
3117      *
3118      * @return Whether the sessionAffinity field is set.
3119      */
hasSessionAffinity()3120     public boolean hasSessionAffinity() {
3121       return ((bitField0_ & 0x00000800) != 0);
3122     }
3123     /**
3124      *
3125      *
3126      * <pre>
3127      * Session affinity option, must be one of the following values: NONE: Connections from the same client IP may go to any instance in the pool. CLIENT_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy. CLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy.
3128      * Check the SessionAffinity enum for the list of possible values.
3129      * </pre>
3130      *
3131      * <code>optional string session_affinity = 463888561;</code>
3132      *
3133      * @return The sessionAffinity.
3134      */
getSessionAffinity()3135     public java.lang.String getSessionAffinity() {
3136       java.lang.Object ref = sessionAffinity_;
3137       if (!(ref instanceof java.lang.String)) {
3138         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3139         java.lang.String s = bs.toStringUtf8();
3140         sessionAffinity_ = s;
3141         return s;
3142       } else {
3143         return (java.lang.String) ref;
3144       }
3145     }
3146     /**
3147      *
3148      *
3149      * <pre>
3150      * Session affinity option, must be one of the following values: NONE: Connections from the same client IP may go to any instance in the pool. CLIENT_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy. CLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy.
3151      * Check the SessionAffinity enum for the list of possible values.
3152      * </pre>
3153      *
3154      * <code>optional string session_affinity = 463888561;</code>
3155      *
3156      * @return The bytes for sessionAffinity.
3157      */
getSessionAffinityBytes()3158     public com.google.protobuf.ByteString getSessionAffinityBytes() {
3159       java.lang.Object ref = sessionAffinity_;
3160       if (ref instanceof String) {
3161         com.google.protobuf.ByteString b =
3162             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3163         sessionAffinity_ = b;
3164         return b;
3165       } else {
3166         return (com.google.protobuf.ByteString) ref;
3167       }
3168     }
3169     /**
3170      *
3171      *
3172      * <pre>
3173      * Session affinity option, must be one of the following values: NONE: Connections from the same client IP may go to any instance in the pool. CLIENT_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy. CLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy.
3174      * Check the SessionAffinity enum for the list of possible values.
3175      * </pre>
3176      *
3177      * <code>optional string session_affinity = 463888561;</code>
3178      *
3179      * @param value The sessionAffinity to set.
3180      * @return This builder for chaining.
3181      */
setSessionAffinity(java.lang.String value)3182     public Builder setSessionAffinity(java.lang.String value) {
3183       if (value == null) {
3184         throw new NullPointerException();
3185       }
3186       sessionAffinity_ = value;
3187       bitField0_ |= 0x00000800;
3188       onChanged();
3189       return this;
3190     }
3191     /**
3192      *
3193      *
3194      * <pre>
3195      * Session affinity option, must be one of the following values: NONE: Connections from the same client IP may go to any instance in the pool. CLIENT_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy. CLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy.
3196      * Check the SessionAffinity enum for the list of possible values.
3197      * </pre>
3198      *
3199      * <code>optional string session_affinity = 463888561;</code>
3200      *
3201      * @return This builder for chaining.
3202      */
clearSessionAffinity()3203     public Builder clearSessionAffinity() {
3204       sessionAffinity_ = getDefaultInstance().getSessionAffinity();
3205       bitField0_ = (bitField0_ & ~0x00000800);
3206       onChanged();
3207       return this;
3208     }
3209     /**
3210      *
3211      *
3212      * <pre>
3213      * Session affinity option, must be one of the following values: NONE: Connections from the same client IP may go to any instance in the pool. CLIENT_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy. CLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy.
3214      * Check the SessionAffinity enum for the list of possible values.
3215      * </pre>
3216      *
3217      * <code>optional string session_affinity = 463888561;</code>
3218      *
3219      * @param value The bytes for sessionAffinity to set.
3220      * @return This builder for chaining.
3221      */
setSessionAffinityBytes(com.google.protobuf.ByteString value)3222     public Builder setSessionAffinityBytes(com.google.protobuf.ByteString value) {
3223       if (value == null) {
3224         throw new NullPointerException();
3225       }
3226       checkByteStringIsUtf8(value);
3227       sessionAffinity_ = value;
3228       bitField0_ |= 0x00000800;
3229       onChanged();
3230       return this;
3231     }
3232 
3233     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)3234     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
3235       return super.setUnknownFields(unknownFields);
3236     }
3237 
3238     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3239     public final Builder mergeUnknownFields(
3240         final com.google.protobuf.UnknownFieldSet unknownFields) {
3241       return super.mergeUnknownFields(unknownFields);
3242     }
3243 
3244     // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.TargetPool)
3245   }
3246 
3247   // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.TargetPool)
3248   private static final com.google.cloud.compute.v1.TargetPool DEFAULT_INSTANCE;
3249 
3250   static {
3251     DEFAULT_INSTANCE = new com.google.cloud.compute.v1.TargetPool();
3252   }
3253 
getDefaultInstance()3254   public static com.google.cloud.compute.v1.TargetPool getDefaultInstance() {
3255     return DEFAULT_INSTANCE;
3256   }
3257 
3258   private static final com.google.protobuf.Parser<TargetPool> PARSER =
3259       new com.google.protobuf.AbstractParser<TargetPool>() {
3260         @java.lang.Override
3261         public TargetPool parsePartialFrom(
3262             com.google.protobuf.CodedInputStream input,
3263             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3264             throws com.google.protobuf.InvalidProtocolBufferException {
3265           Builder builder = newBuilder();
3266           try {
3267             builder.mergeFrom(input, extensionRegistry);
3268           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3269             throw e.setUnfinishedMessage(builder.buildPartial());
3270           } catch (com.google.protobuf.UninitializedMessageException e) {
3271             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
3272           } catch (java.io.IOException e) {
3273             throw new com.google.protobuf.InvalidProtocolBufferException(e)
3274                 .setUnfinishedMessage(builder.buildPartial());
3275           }
3276           return builder.buildPartial();
3277         }
3278       };
3279 
parser()3280   public static com.google.protobuf.Parser<TargetPool> parser() {
3281     return PARSER;
3282   }
3283 
3284   @java.lang.Override
getParserForType()3285   public com.google.protobuf.Parser<TargetPool> getParserForType() {
3286     return PARSER;
3287   }
3288 
3289   @java.lang.Override
getDefaultInstanceForType()3290   public com.google.cloud.compute.v1.TargetPool getDefaultInstanceForType() {
3291     return DEFAULT_INSTANCE;
3292   }
3293 }
3294