• 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  * Subnetwork which the current user has compute.subnetworks.use permission on.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.compute.v1.UsableSubnetwork}
29  */
30 public final class UsableSubnetwork extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.UsableSubnetwork)
33     UsableSubnetworkOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use UsableSubnetwork.newBuilder() to construct.
UsableSubnetwork(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private UsableSubnetwork(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
UsableSubnetwork()40   private UsableSubnetwork() {
41     externalIpv6Prefix_ = "";
42     internalIpv6Prefix_ = "";
43     ipCidrRange_ = "";
44     ipv6AccessType_ = "";
45     network_ = "";
46     purpose_ = "";
47     role_ = "";
48     secondaryIpRanges_ = java.util.Collections.emptyList();
49     stackType_ = "";
50     subnetwork_ = "";
51   }
52 
53   @java.lang.Override
54   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)55   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
56     return new UsableSubnetwork();
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_UsableSubnetwork_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_UsableSubnetwork_fieldAccessorTable
74         .ensureFieldAccessorsInitialized(
75             com.google.cloud.compute.v1.UsableSubnetwork.class,
76             com.google.cloud.compute.v1.UsableSubnetwork.Builder.class);
77   }
78 
79   /**
80    *
81    *
82    * <pre>
83    * The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4_IPV6 dual stack.
84    * </pre>
85    *
86    * Protobuf enum {@code google.cloud.compute.v1.UsableSubnetwork.Ipv6AccessType}
87    */
88   public enum Ipv6AccessType 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_IPV6_ACCESS_TYPE = 0;</code>
97      */
98     UNDEFINED_IPV6_ACCESS_TYPE(0),
99     /**
100      *
101      *
102      * <pre>
103      * VMs on this subnet will be assigned IPv6 addresses that are accessible via the Internet, as well as the VPC network.
104      * </pre>
105      *
106      * <code>EXTERNAL = 35607499;</code>
107      */
108     EXTERNAL(35607499),
109     /**
110      *
111      *
112      * <pre>
113      * VMs on this subnet will be assigned IPv6 addresses that are only accessible over the VPC network.
114      * </pre>
115      *
116      * <code>INTERNAL = 279295677;</code>
117      */
118     INTERNAL(279295677),
119     UNRECOGNIZED(-1),
120     ;
121 
122     /**
123      *
124      *
125      * <pre>
126      * A value indicating that the enum field is not set.
127      * </pre>
128      *
129      * <code>UNDEFINED_IPV6_ACCESS_TYPE = 0;</code>
130      */
131     public static final int UNDEFINED_IPV6_ACCESS_TYPE_VALUE = 0;
132     /**
133      *
134      *
135      * <pre>
136      * VMs on this subnet will be assigned IPv6 addresses that are accessible via the Internet, as well as the VPC network.
137      * </pre>
138      *
139      * <code>EXTERNAL = 35607499;</code>
140      */
141     public static final int EXTERNAL_VALUE = 35607499;
142     /**
143      *
144      *
145      * <pre>
146      * VMs on this subnet will be assigned IPv6 addresses that are only accessible over the VPC network.
147      * </pre>
148      *
149      * <code>INTERNAL = 279295677;</code>
150      */
151     public static final int INTERNAL_VALUE = 279295677;
152 
getNumber()153     public final int getNumber() {
154       if (this == UNRECOGNIZED) {
155         throw new java.lang.IllegalArgumentException(
156             "Can't get the number of an unknown enum value.");
157       }
158       return value;
159     }
160 
161     /**
162      * @param value The numeric wire value of the corresponding enum entry.
163      * @return The enum associated with the given numeric wire value.
164      * @deprecated Use {@link #forNumber(int)} instead.
165      */
166     @java.lang.Deprecated
valueOf(int value)167     public static Ipv6AccessType valueOf(int value) {
168       return forNumber(value);
169     }
170 
171     /**
172      * @param value The numeric wire value of the corresponding enum entry.
173      * @return The enum associated with the given numeric wire value.
174      */
forNumber(int value)175     public static Ipv6AccessType forNumber(int value) {
176       switch (value) {
177         case 0:
178           return UNDEFINED_IPV6_ACCESS_TYPE;
179         case 35607499:
180           return EXTERNAL;
181         case 279295677:
182           return INTERNAL;
183         default:
184           return null;
185       }
186     }
187 
internalGetValueMap()188     public static com.google.protobuf.Internal.EnumLiteMap<Ipv6AccessType> internalGetValueMap() {
189       return internalValueMap;
190     }
191 
192     private static final com.google.protobuf.Internal.EnumLiteMap<Ipv6AccessType> internalValueMap =
193         new com.google.protobuf.Internal.EnumLiteMap<Ipv6AccessType>() {
194           public Ipv6AccessType findValueByNumber(int number) {
195             return Ipv6AccessType.forNumber(number);
196           }
197         };
198 
getValueDescriptor()199     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
200       if (this == UNRECOGNIZED) {
201         throw new java.lang.IllegalStateException(
202             "Can't get the descriptor of an unrecognized enum value.");
203       }
204       return getDescriptor().getValues().get(ordinal());
205     }
206 
getDescriptorForType()207     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
208       return getDescriptor();
209     }
210 
getDescriptor()211     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
212       return com.google.cloud.compute.v1.UsableSubnetwork.getDescriptor().getEnumTypes().get(0);
213     }
214 
215     private static final Ipv6AccessType[] VALUES = values();
216 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)217     public static Ipv6AccessType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
218       if (desc.getType() != getDescriptor()) {
219         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
220       }
221       if (desc.getIndex() == -1) {
222         return UNRECOGNIZED;
223       }
224       return VALUES[desc.getIndex()];
225     }
226 
227     private final int value;
228 
Ipv6AccessType(int value)229     private Ipv6AccessType(int value) {
230       this.value = value;
231     }
232 
233     // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.UsableSubnetwork.Ipv6AccessType)
234   }
235 
236   /**
237    *
238    *
239    * <pre>
240    * The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918. The enableFlowLogs field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.
241    * </pre>
242    *
243    * Protobuf enum {@code google.cloud.compute.v1.UsableSubnetwork.Purpose}
244    */
245   public enum Purpose implements com.google.protobuf.ProtocolMessageEnum {
246     /**
247      *
248      *
249      * <pre>
250      * A value indicating that the enum field is not set.
251      * </pre>
252      *
253      * <code>UNDEFINED_PURPOSE = 0;</code>
254      */
255     UNDEFINED_PURPOSE(0),
256     /**
257      *
258      *
259      * <pre>
260      * Subnet reserved for Internal HTTP(S) Load Balancing.
261      * </pre>
262      *
263      * <code>INTERNAL_HTTPS_LOAD_BALANCER = 248748889;</code>
264      */
265     INTERNAL_HTTPS_LOAD_BALANCER(248748889),
266     /**
267      *
268      *
269      * <pre>
270      * Regular user created or automatically created subnet.
271      * </pre>
272      *
273      * <code>PRIVATE = 403485027;</code>
274      */
275     PRIVATE(403485027),
276     /**
277      *
278      *
279      * <pre>
280      * Regular user created or automatically created subnet.
281      * </pre>
282      *
283      * <code>PRIVATE_RFC_1918 = 254902107;</code>
284      */
285     PRIVATE_RFC_1918(254902107),
286     /**
287      *
288      *
289      * <pre>
290      * Subnetworks created for Private Service Connect in the producer network.
291      * </pre>
292      *
293      * <code>PRIVATE_SERVICE_CONNECT = 48134724;</code>
294      */
295     PRIVATE_SERVICE_CONNECT(48134724),
296     /**
297      *
298      *
299      * <pre>
300      * Subnetwork used for Regional Internal/External HTTP(S) Load Balancing.
301      * </pre>
302      *
303      * <code>REGIONAL_MANAGED_PROXY = 153049966;</code>
304      */
305     REGIONAL_MANAGED_PROXY(153049966),
306     UNRECOGNIZED(-1),
307     ;
308 
309     /**
310      *
311      *
312      * <pre>
313      * A value indicating that the enum field is not set.
314      * </pre>
315      *
316      * <code>UNDEFINED_PURPOSE = 0;</code>
317      */
318     public static final int UNDEFINED_PURPOSE_VALUE = 0;
319     /**
320      *
321      *
322      * <pre>
323      * Subnet reserved for Internal HTTP(S) Load Balancing.
324      * </pre>
325      *
326      * <code>INTERNAL_HTTPS_LOAD_BALANCER = 248748889;</code>
327      */
328     public static final int INTERNAL_HTTPS_LOAD_BALANCER_VALUE = 248748889;
329     /**
330      *
331      *
332      * <pre>
333      * Regular user created or automatically created subnet.
334      * </pre>
335      *
336      * <code>PRIVATE = 403485027;</code>
337      */
338     public static final int PRIVATE_VALUE = 403485027;
339     /**
340      *
341      *
342      * <pre>
343      * Regular user created or automatically created subnet.
344      * </pre>
345      *
346      * <code>PRIVATE_RFC_1918 = 254902107;</code>
347      */
348     public static final int PRIVATE_RFC_1918_VALUE = 254902107;
349     /**
350      *
351      *
352      * <pre>
353      * Subnetworks created for Private Service Connect in the producer network.
354      * </pre>
355      *
356      * <code>PRIVATE_SERVICE_CONNECT = 48134724;</code>
357      */
358     public static final int PRIVATE_SERVICE_CONNECT_VALUE = 48134724;
359     /**
360      *
361      *
362      * <pre>
363      * Subnetwork used for Regional Internal/External HTTP(S) Load Balancing.
364      * </pre>
365      *
366      * <code>REGIONAL_MANAGED_PROXY = 153049966;</code>
367      */
368     public static final int REGIONAL_MANAGED_PROXY_VALUE = 153049966;
369 
getNumber()370     public final int getNumber() {
371       if (this == UNRECOGNIZED) {
372         throw new java.lang.IllegalArgumentException(
373             "Can't get the number of an unknown enum value.");
374       }
375       return value;
376     }
377 
378     /**
379      * @param value The numeric wire value of the corresponding enum entry.
380      * @return The enum associated with the given numeric wire value.
381      * @deprecated Use {@link #forNumber(int)} instead.
382      */
383     @java.lang.Deprecated
valueOf(int value)384     public static Purpose valueOf(int value) {
385       return forNumber(value);
386     }
387 
388     /**
389      * @param value The numeric wire value of the corresponding enum entry.
390      * @return The enum associated with the given numeric wire value.
391      */
forNumber(int value)392     public static Purpose forNumber(int value) {
393       switch (value) {
394         case 0:
395           return UNDEFINED_PURPOSE;
396         case 248748889:
397           return INTERNAL_HTTPS_LOAD_BALANCER;
398         case 403485027:
399           return PRIVATE;
400         case 254902107:
401           return PRIVATE_RFC_1918;
402         case 48134724:
403           return PRIVATE_SERVICE_CONNECT;
404         case 153049966:
405           return REGIONAL_MANAGED_PROXY;
406         default:
407           return null;
408       }
409     }
410 
internalGetValueMap()411     public static com.google.protobuf.Internal.EnumLiteMap<Purpose> internalGetValueMap() {
412       return internalValueMap;
413     }
414 
415     private static final com.google.protobuf.Internal.EnumLiteMap<Purpose> internalValueMap =
416         new com.google.protobuf.Internal.EnumLiteMap<Purpose>() {
417           public Purpose findValueByNumber(int number) {
418             return Purpose.forNumber(number);
419           }
420         };
421 
getValueDescriptor()422     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
423       if (this == UNRECOGNIZED) {
424         throw new java.lang.IllegalStateException(
425             "Can't get the descriptor of an unrecognized enum value.");
426       }
427       return getDescriptor().getValues().get(ordinal());
428     }
429 
getDescriptorForType()430     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
431       return getDescriptor();
432     }
433 
getDescriptor()434     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
435       return com.google.cloud.compute.v1.UsableSubnetwork.getDescriptor().getEnumTypes().get(1);
436     }
437 
438     private static final Purpose[] VALUES = values();
439 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)440     public static Purpose valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
441       if (desc.getType() != getDescriptor()) {
442         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
443       }
444       if (desc.getIndex() == -1) {
445         return UNRECOGNIZED;
446       }
447       return VALUES[desc.getIndex()];
448     }
449 
450     private final int value;
451 
Purpose(int value)452     private Purpose(int value) {
453       this.value = value;
454     }
455 
456     // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.UsableSubnetwork.Purpose)
457   }
458 
459   /**
460    *
461    *
462    * <pre>
463    * The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.
464    * </pre>
465    *
466    * Protobuf enum {@code google.cloud.compute.v1.UsableSubnetwork.Role}
467    */
468   public enum Role implements com.google.protobuf.ProtocolMessageEnum {
469     /**
470      *
471      *
472      * <pre>
473      * A value indicating that the enum field is not set.
474      * </pre>
475      *
476      * <code>UNDEFINED_ROLE = 0;</code>
477      */
478     UNDEFINED_ROLE(0),
479     /**
480      *
481      *
482      * <pre>
483      * The ACTIVE subnet that is currently used.
484      * </pre>
485      *
486      * <code>ACTIVE = 314733318;</code>
487      */
488     ACTIVE(314733318),
489     /**
490      *
491      *
492      * <pre>
493      * The BACKUP subnet that could be promoted to ACTIVE.
494      * </pre>
495      *
496      * <code>BACKUP = 341010882;</code>
497      */
498     BACKUP(341010882),
499     UNRECOGNIZED(-1),
500     ;
501 
502     /**
503      *
504      *
505      * <pre>
506      * A value indicating that the enum field is not set.
507      * </pre>
508      *
509      * <code>UNDEFINED_ROLE = 0;</code>
510      */
511     public static final int UNDEFINED_ROLE_VALUE = 0;
512     /**
513      *
514      *
515      * <pre>
516      * The ACTIVE subnet that is currently used.
517      * </pre>
518      *
519      * <code>ACTIVE = 314733318;</code>
520      */
521     public static final int ACTIVE_VALUE = 314733318;
522     /**
523      *
524      *
525      * <pre>
526      * The BACKUP subnet that could be promoted to ACTIVE.
527      * </pre>
528      *
529      * <code>BACKUP = 341010882;</code>
530      */
531     public static final int BACKUP_VALUE = 341010882;
532 
getNumber()533     public final int getNumber() {
534       if (this == UNRECOGNIZED) {
535         throw new java.lang.IllegalArgumentException(
536             "Can't get the number of an unknown enum value.");
537       }
538       return value;
539     }
540 
541     /**
542      * @param value The numeric wire value of the corresponding enum entry.
543      * @return The enum associated with the given numeric wire value.
544      * @deprecated Use {@link #forNumber(int)} instead.
545      */
546     @java.lang.Deprecated
valueOf(int value)547     public static Role valueOf(int value) {
548       return forNumber(value);
549     }
550 
551     /**
552      * @param value The numeric wire value of the corresponding enum entry.
553      * @return The enum associated with the given numeric wire value.
554      */
forNumber(int value)555     public static Role forNumber(int value) {
556       switch (value) {
557         case 0:
558           return UNDEFINED_ROLE;
559         case 314733318:
560           return ACTIVE;
561         case 341010882:
562           return BACKUP;
563         default:
564           return null;
565       }
566     }
567 
internalGetValueMap()568     public static com.google.protobuf.Internal.EnumLiteMap<Role> internalGetValueMap() {
569       return internalValueMap;
570     }
571 
572     private static final com.google.protobuf.Internal.EnumLiteMap<Role> internalValueMap =
573         new com.google.protobuf.Internal.EnumLiteMap<Role>() {
574           public Role findValueByNumber(int number) {
575             return Role.forNumber(number);
576           }
577         };
578 
getValueDescriptor()579     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
580       if (this == UNRECOGNIZED) {
581         throw new java.lang.IllegalStateException(
582             "Can't get the descriptor of an unrecognized enum value.");
583       }
584       return getDescriptor().getValues().get(ordinal());
585     }
586 
getDescriptorForType()587     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
588       return getDescriptor();
589     }
590 
getDescriptor()591     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
592       return com.google.cloud.compute.v1.UsableSubnetwork.getDescriptor().getEnumTypes().get(2);
593     }
594 
595     private static final Role[] VALUES = values();
596 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)597     public static Role valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
598       if (desc.getType() != getDescriptor()) {
599         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
600       }
601       if (desc.getIndex() == -1) {
602         return UNRECOGNIZED;
603       }
604       return VALUES[desc.getIndex()];
605     }
606 
607     private final int value;
608 
Role(int value)609     private Role(int value) {
610       this.value = value;
611     }
612 
613     // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.UsableSubnetwork.Role)
614   }
615 
616   /**
617    *
618    *
619    * <pre>
620    * The stack type for the subnet. If set to IPV4_ONLY, new VMs in the subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4_ONLY is used. This field can be both set at resource creation time and updated using patch.
621    * </pre>
622    *
623    * Protobuf enum {@code google.cloud.compute.v1.UsableSubnetwork.StackType}
624    */
625   public enum StackType implements com.google.protobuf.ProtocolMessageEnum {
626     /**
627      *
628      *
629      * <pre>
630      * A value indicating that the enum field is not set.
631      * </pre>
632      *
633      * <code>UNDEFINED_STACK_TYPE = 0;</code>
634      */
635     UNDEFINED_STACK_TYPE(0),
636     /**
637      *
638      *
639      * <pre>
640      * New VMs in this subnet can have both IPv4 and IPv6 addresses.
641      * </pre>
642      *
643      * <code>IPV4_IPV6 = 22197249;</code>
644      */
645     IPV4_IPV6(22197249),
646     /**
647      *
648      *
649      * <pre>
650      * New VMs in this subnet will only be assigned IPv4 addresses.
651      * </pre>
652      *
653      * <code>IPV4_ONLY = 22373798;</code>
654      */
655     IPV4_ONLY(22373798),
656     UNRECOGNIZED(-1),
657     ;
658 
659     /**
660      *
661      *
662      * <pre>
663      * A value indicating that the enum field is not set.
664      * </pre>
665      *
666      * <code>UNDEFINED_STACK_TYPE = 0;</code>
667      */
668     public static final int UNDEFINED_STACK_TYPE_VALUE = 0;
669     /**
670      *
671      *
672      * <pre>
673      * New VMs in this subnet can have both IPv4 and IPv6 addresses.
674      * </pre>
675      *
676      * <code>IPV4_IPV6 = 22197249;</code>
677      */
678     public static final int IPV4_IPV6_VALUE = 22197249;
679     /**
680      *
681      *
682      * <pre>
683      * New VMs in this subnet will only be assigned IPv4 addresses.
684      * </pre>
685      *
686      * <code>IPV4_ONLY = 22373798;</code>
687      */
688     public static final int IPV4_ONLY_VALUE = 22373798;
689 
getNumber()690     public final int getNumber() {
691       if (this == UNRECOGNIZED) {
692         throw new java.lang.IllegalArgumentException(
693             "Can't get the number of an unknown enum value.");
694       }
695       return value;
696     }
697 
698     /**
699      * @param value The numeric wire value of the corresponding enum entry.
700      * @return The enum associated with the given numeric wire value.
701      * @deprecated Use {@link #forNumber(int)} instead.
702      */
703     @java.lang.Deprecated
valueOf(int value)704     public static StackType valueOf(int value) {
705       return forNumber(value);
706     }
707 
708     /**
709      * @param value The numeric wire value of the corresponding enum entry.
710      * @return The enum associated with the given numeric wire value.
711      */
forNumber(int value)712     public static StackType forNumber(int value) {
713       switch (value) {
714         case 0:
715           return UNDEFINED_STACK_TYPE;
716         case 22197249:
717           return IPV4_IPV6;
718         case 22373798:
719           return IPV4_ONLY;
720         default:
721           return null;
722       }
723     }
724 
internalGetValueMap()725     public static com.google.protobuf.Internal.EnumLiteMap<StackType> internalGetValueMap() {
726       return internalValueMap;
727     }
728 
729     private static final com.google.protobuf.Internal.EnumLiteMap<StackType> internalValueMap =
730         new com.google.protobuf.Internal.EnumLiteMap<StackType>() {
731           public StackType findValueByNumber(int number) {
732             return StackType.forNumber(number);
733           }
734         };
735 
getValueDescriptor()736     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
737       if (this == UNRECOGNIZED) {
738         throw new java.lang.IllegalStateException(
739             "Can't get the descriptor of an unrecognized enum value.");
740       }
741       return getDescriptor().getValues().get(ordinal());
742     }
743 
getDescriptorForType()744     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
745       return getDescriptor();
746     }
747 
getDescriptor()748     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
749       return com.google.cloud.compute.v1.UsableSubnetwork.getDescriptor().getEnumTypes().get(3);
750     }
751 
752     private static final StackType[] VALUES = values();
753 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)754     public static StackType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
755       if (desc.getType() != getDescriptor()) {
756         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
757       }
758       if (desc.getIndex() == -1) {
759         return UNRECOGNIZED;
760       }
761       return VALUES[desc.getIndex()];
762     }
763 
764     private final int value;
765 
StackType(int value)766     private StackType(int value) {
767       this.value = value;
768     }
769 
770     // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.UsableSubnetwork.StackType)
771   }
772 
773   private int bitField0_;
774   public static final int EXTERNAL_IPV6_PREFIX_FIELD_NUMBER = 139299190;
775 
776   @SuppressWarnings("serial")
777   private volatile java.lang.Object externalIpv6Prefix_ = "";
778   /**
779    *
780    *
781    * <pre>
782    * [Output Only] The external IPv6 address range that is assigned to this subnetwork.
783    * </pre>
784    *
785    * <code>optional string external_ipv6_prefix = 139299190;</code>
786    *
787    * @return Whether the externalIpv6Prefix field is set.
788    */
789   @java.lang.Override
hasExternalIpv6Prefix()790   public boolean hasExternalIpv6Prefix() {
791     return ((bitField0_ & 0x00000001) != 0);
792   }
793   /**
794    *
795    *
796    * <pre>
797    * [Output Only] The external IPv6 address range that is assigned to this subnetwork.
798    * </pre>
799    *
800    * <code>optional string external_ipv6_prefix = 139299190;</code>
801    *
802    * @return The externalIpv6Prefix.
803    */
804   @java.lang.Override
getExternalIpv6Prefix()805   public java.lang.String getExternalIpv6Prefix() {
806     java.lang.Object ref = externalIpv6Prefix_;
807     if (ref instanceof java.lang.String) {
808       return (java.lang.String) ref;
809     } else {
810       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
811       java.lang.String s = bs.toStringUtf8();
812       externalIpv6Prefix_ = s;
813       return s;
814     }
815   }
816   /**
817    *
818    *
819    * <pre>
820    * [Output Only] The external IPv6 address range that is assigned to this subnetwork.
821    * </pre>
822    *
823    * <code>optional string external_ipv6_prefix = 139299190;</code>
824    *
825    * @return The bytes for externalIpv6Prefix.
826    */
827   @java.lang.Override
getExternalIpv6PrefixBytes()828   public com.google.protobuf.ByteString getExternalIpv6PrefixBytes() {
829     java.lang.Object ref = externalIpv6Prefix_;
830     if (ref instanceof java.lang.String) {
831       com.google.protobuf.ByteString b =
832           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
833       externalIpv6Prefix_ = b;
834       return b;
835     } else {
836       return (com.google.protobuf.ByteString) ref;
837     }
838   }
839 
840   public static final int INTERNAL_IPV6_PREFIX_FIELD_NUMBER = 506270056;
841 
842   @SuppressWarnings("serial")
843   private volatile java.lang.Object internalIpv6Prefix_ = "";
844   /**
845    *
846    *
847    * <pre>
848    * [Output Only] The internal IPv6 address range that is assigned to this subnetwork.
849    * </pre>
850    *
851    * <code>optional string internal_ipv6_prefix = 506270056;</code>
852    *
853    * @return Whether the internalIpv6Prefix field is set.
854    */
855   @java.lang.Override
hasInternalIpv6Prefix()856   public boolean hasInternalIpv6Prefix() {
857     return ((bitField0_ & 0x00000002) != 0);
858   }
859   /**
860    *
861    *
862    * <pre>
863    * [Output Only] The internal IPv6 address range that is assigned to this subnetwork.
864    * </pre>
865    *
866    * <code>optional string internal_ipv6_prefix = 506270056;</code>
867    *
868    * @return The internalIpv6Prefix.
869    */
870   @java.lang.Override
getInternalIpv6Prefix()871   public java.lang.String getInternalIpv6Prefix() {
872     java.lang.Object ref = internalIpv6Prefix_;
873     if (ref instanceof java.lang.String) {
874       return (java.lang.String) ref;
875     } else {
876       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
877       java.lang.String s = bs.toStringUtf8();
878       internalIpv6Prefix_ = s;
879       return s;
880     }
881   }
882   /**
883    *
884    *
885    * <pre>
886    * [Output Only] The internal IPv6 address range that is assigned to this subnetwork.
887    * </pre>
888    *
889    * <code>optional string internal_ipv6_prefix = 506270056;</code>
890    *
891    * @return The bytes for internalIpv6Prefix.
892    */
893   @java.lang.Override
getInternalIpv6PrefixBytes()894   public com.google.protobuf.ByteString getInternalIpv6PrefixBytes() {
895     java.lang.Object ref = internalIpv6Prefix_;
896     if (ref instanceof java.lang.String) {
897       com.google.protobuf.ByteString b =
898           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
899       internalIpv6Prefix_ = b;
900       return b;
901     } else {
902       return (com.google.protobuf.ByteString) ref;
903     }
904   }
905 
906   public static final int IP_CIDR_RANGE_FIELD_NUMBER = 98117322;
907 
908   @SuppressWarnings("serial")
909   private volatile java.lang.Object ipCidrRange_ = "";
910   /**
911    *
912    *
913    * <pre>
914    * The range of internal addresses that are owned by this subnetwork.
915    * </pre>
916    *
917    * <code>optional string ip_cidr_range = 98117322;</code>
918    *
919    * @return Whether the ipCidrRange field is set.
920    */
921   @java.lang.Override
hasIpCidrRange()922   public boolean hasIpCidrRange() {
923     return ((bitField0_ & 0x00000004) != 0);
924   }
925   /**
926    *
927    *
928    * <pre>
929    * The range of internal addresses that are owned by this subnetwork.
930    * </pre>
931    *
932    * <code>optional string ip_cidr_range = 98117322;</code>
933    *
934    * @return The ipCidrRange.
935    */
936   @java.lang.Override
getIpCidrRange()937   public java.lang.String getIpCidrRange() {
938     java.lang.Object ref = ipCidrRange_;
939     if (ref instanceof java.lang.String) {
940       return (java.lang.String) ref;
941     } else {
942       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
943       java.lang.String s = bs.toStringUtf8();
944       ipCidrRange_ = s;
945       return s;
946     }
947   }
948   /**
949    *
950    *
951    * <pre>
952    * The range of internal addresses that are owned by this subnetwork.
953    * </pre>
954    *
955    * <code>optional string ip_cidr_range = 98117322;</code>
956    *
957    * @return The bytes for ipCidrRange.
958    */
959   @java.lang.Override
getIpCidrRangeBytes()960   public com.google.protobuf.ByteString getIpCidrRangeBytes() {
961     java.lang.Object ref = ipCidrRange_;
962     if (ref instanceof java.lang.String) {
963       com.google.protobuf.ByteString b =
964           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
965       ipCidrRange_ = b;
966       return b;
967     } else {
968       return (com.google.protobuf.ByteString) ref;
969     }
970   }
971 
972   public static final int IPV6_ACCESS_TYPE_FIELD_NUMBER = 504658653;
973 
974   @SuppressWarnings("serial")
975   private volatile java.lang.Object ipv6AccessType_ = "";
976   /**
977    *
978    *
979    * <pre>
980    * The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4_IPV6 dual stack.
981    * Check the Ipv6AccessType enum for the list of possible values.
982    * </pre>
983    *
984    * <code>optional string ipv6_access_type = 504658653;</code>
985    *
986    * @return Whether the ipv6AccessType field is set.
987    */
988   @java.lang.Override
hasIpv6AccessType()989   public boolean hasIpv6AccessType() {
990     return ((bitField0_ & 0x00000008) != 0);
991   }
992   /**
993    *
994    *
995    * <pre>
996    * The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4_IPV6 dual stack.
997    * Check the Ipv6AccessType enum for the list of possible values.
998    * </pre>
999    *
1000    * <code>optional string ipv6_access_type = 504658653;</code>
1001    *
1002    * @return The ipv6AccessType.
1003    */
1004   @java.lang.Override
getIpv6AccessType()1005   public java.lang.String getIpv6AccessType() {
1006     java.lang.Object ref = ipv6AccessType_;
1007     if (ref instanceof java.lang.String) {
1008       return (java.lang.String) ref;
1009     } else {
1010       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1011       java.lang.String s = bs.toStringUtf8();
1012       ipv6AccessType_ = s;
1013       return s;
1014     }
1015   }
1016   /**
1017    *
1018    *
1019    * <pre>
1020    * The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4_IPV6 dual stack.
1021    * Check the Ipv6AccessType enum for the list of possible values.
1022    * </pre>
1023    *
1024    * <code>optional string ipv6_access_type = 504658653;</code>
1025    *
1026    * @return The bytes for ipv6AccessType.
1027    */
1028   @java.lang.Override
getIpv6AccessTypeBytes()1029   public com.google.protobuf.ByteString getIpv6AccessTypeBytes() {
1030     java.lang.Object ref = ipv6AccessType_;
1031     if (ref instanceof java.lang.String) {
1032       com.google.protobuf.ByteString b =
1033           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1034       ipv6AccessType_ = b;
1035       return b;
1036     } else {
1037       return (com.google.protobuf.ByteString) ref;
1038     }
1039   }
1040 
1041   public static final int NETWORK_FIELD_NUMBER = 232872494;
1042 
1043   @SuppressWarnings("serial")
1044   private volatile java.lang.Object network_ = "";
1045   /**
1046    *
1047    *
1048    * <pre>
1049    * Network URL.
1050    * </pre>
1051    *
1052    * <code>optional string network = 232872494;</code>
1053    *
1054    * @return Whether the network field is set.
1055    */
1056   @java.lang.Override
hasNetwork()1057   public boolean hasNetwork() {
1058     return ((bitField0_ & 0x00000010) != 0);
1059   }
1060   /**
1061    *
1062    *
1063    * <pre>
1064    * Network URL.
1065    * </pre>
1066    *
1067    * <code>optional string network = 232872494;</code>
1068    *
1069    * @return The network.
1070    */
1071   @java.lang.Override
getNetwork()1072   public java.lang.String getNetwork() {
1073     java.lang.Object ref = network_;
1074     if (ref instanceof java.lang.String) {
1075       return (java.lang.String) ref;
1076     } else {
1077       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1078       java.lang.String s = bs.toStringUtf8();
1079       network_ = s;
1080       return s;
1081     }
1082   }
1083   /**
1084    *
1085    *
1086    * <pre>
1087    * Network URL.
1088    * </pre>
1089    *
1090    * <code>optional string network = 232872494;</code>
1091    *
1092    * @return The bytes for network.
1093    */
1094   @java.lang.Override
getNetworkBytes()1095   public com.google.protobuf.ByteString getNetworkBytes() {
1096     java.lang.Object ref = network_;
1097     if (ref instanceof java.lang.String) {
1098       com.google.protobuf.ByteString b =
1099           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1100       network_ = b;
1101       return b;
1102     } else {
1103       return (com.google.protobuf.ByteString) ref;
1104     }
1105   }
1106 
1107   public static final int PURPOSE_FIELD_NUMBER = 316407070;
1108 
1109   @SuppressWarnings("serial")
1110   private volatile java.lang.Object purpose_ = "";
1111   /**
1112    *
1113    *
1114    * <pre>
1115    * The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918. The enableFlowLogs field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.
1116    * Check the Purpose enum for the list of possible values.
1117    * </pre>
1118    *
1119    * <code>optional string purpose = 316407070;</code>
1120    *
1121    * @return Whether the purpose field is set.
1122    */
1123   @java.lang.Override
hasPurpose()1124   public boolean hasPurpose() {
1125     return ((bitField0_ & 0x00000020) != 0);
1126   }
1127   /**
1128    *
1129    *
1130    * <pre>
1131    * The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918. The enableFlowLogs field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.
1132    * Check the Purpose enum for the list of possible values.
1133    * </pre>
1134    *
1135    * <code>optional string purpose = 316407070;</code>
1136    *
1137    * @return The purpose.
1138    */
1139   @java.lang.Override
getPurpose()1140   public java.lang.String getPurpose() {
1141     java.lang.Object ref = purpose_;
1142     if (ref instanceof java.lang.String) {
1143       return (java.lang.String) ref;
1144     } else {
1145       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1146       java.lang.String s = bs.toStringUtf8();
1147       purpose_ = s;
1148       return s;
1149     }
1150   }
1151   /**
1152    *
1153    *
1154    * <pre>
1155    * The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918. The enableFlowLogs field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.
1156    * Check the Purpose enum for the list of possible values.
1157    * </pre>
1158    *
1159    * <code>optional string purpose = 316407070;</code>
1160    *
1161    * @return The bytes for purpose.
1162    */
1163   @java.lang.Override
getPurposeBytes()1164   public com.google.protobuf.ByteString getPurposeBytes() {
1165     java.lang.Object ref = purpose_;
1166     if (ref instanceof java.lang.String) {
1167       com.google.protobuf.ByteString b =
1168           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1169       purpose_ = b;
1170       return b;
1171     } else {
1172       return (com.google.protobuf.ByteString) ref;
1173     }
1174   }
1175 
1176   public static final int ROLE_FIELD_NUMBER = 3506294;
1177 
1178   @SuppressWarnings("serial")
1179   private volatile java.lang.Object role_ = "";
1180   /**
1181    *
1182    *
1183    * <pre>
1184    * The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.
1185    * Check the Role enum for the list of possible values.
1186    * </pre>
1187    *
1188    * <code>optional string role = 3506294;</code>
1189    *
1190    * @return Whether the role field is set.
1191    */
1192   @java.lang.Override
hasRole()1193   public boolean hasRole() {
1194     return ((bitField0_ & 0x00000040) != 0);
1195   }
1196   /**
1197    *
1198    *
1199    * <pre>
1200    * The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.
1201    * Check the Role enum for the list of possible values.
1202    * </pre>
1203    *
1204    * <code>optional string role = 3506294;</code>
1205    *
1206    * @return The role.
1207    */
1208   @java.lang.Override
getRole()1209   public java.lang.String getRole() {
1210     java.lang.Object ref = role_;
1211     if (ref instanceof java.lang.String) {
1212       return (java.lang.String) ref;
1213     } else {
1214       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1215       java.lang.String s = bs.toStringUtf8();
1216       role_ = s;
1217       return s;
1218     }
1219   }
1220   /**
1221    *
1222    *
1223    * <pre>
1224    * The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.
1225    * Check the Role enum for the list of possible values.
1226    * </pre>
1227    *
1228    * <code>optional string role = 3506294;</code>
1229    *
1230    * @return The bytes for role.
1231    */
1232   @java.lang.Override
getRoleBytes()1233   public com.google.protobuf.ByteString getRoleBytes() {
1234     java.lang.Object ref = role_;
1235     if (ref instanceof java.lang.String) {
1236       com.google.protobuf.ByteString b =
1237           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1238       role_ = b;
1239       return b;
1240     } else {
1241       return (com.google.protobuf.ByteString) ref;
1242     }
1243   }
1244 
1245   public static final int SECONDARY_IP_RANGES_FIELD_NUMBER = 136658915;
1246 
1247   @SuppressWarnings("serial")
1248   private java.util.List<com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange>
1249       secondaryIpRanges_;
1250   /**
1251    *
1252    *
1253    * <pre>
1254    * Secondary IP ranges.
1255    * </pre>
1256    *
1257    * <code>
1258    * repeated .google.cloud.compute.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 136658915;
1259    * </code>
1260    */
1261   @java.lang.Override
1262   public java.util.List<com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange>
getSecondaryIpRangesList()1263       getSecondaryIpRangesList() {
1264     return secondaryIpRanges_;
1265   }
1266   /**
1267    *
1268    *
1269    * <pre>
1270    * Secondary IP ranges.
1271    * </pre>
1272    *
1273    * <code>
1274    * repeated .google.cloud.compute.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 136658915;
1275    * </code>
1276    */
1277   @java.lang.Override
1278   public java.util.List<
1279           ? extends com.google.cloud.compute.v1.UsableSubnetworkSecondaryRangeOrBuilder>
getSecondaryIpRangesOrBuilderList()1280       getSecondaryIpRangesOrBuilderList() {
1281     return secondaryIpRanges_;
1282   }
1283   /**
1284    *
1285    *
1286    * <pre>
1287    * Secondary IP ranges.
1288    * </pre>
1289    *
1290    * <code>
1291    * repeated .google.cloud.compute.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 136658915;
1292    * </code>
1293    */
1294   @java.lang.Override
getSecondaryIpRangesCount()1295   public int getSecondaryIpRangesCount() {
1296     return secondaryIpRanges_.size();
1297   }
1298   /**
1299    *
1300    *
1301    * <pre>
1302    * Secondary IP ranges.
1303    * </pre>
1304    *
1305    * <code>
1306    * repeated .google.cloud.compute.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 136658915;
1307    * </code>
1308    */
1309   @java.lang.Override
getSecondaryIpRanges( int index)1310   public com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange getSecondaryIpRanges(
1311       int index) {
1312     return secondaryIpRanges_.get(index);
1313   }
1314   /**
1315    *
1316    *
1317    * <pre>
1318    * Secondary IP ranges.
1319    * </pre>
1320    *
1321    * <code>
1322    * repeated .google.cloud.compute.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 136658915;
1323    * </code>
1324    */
1325   @java.lang.Override
1326   public com.google.cloud.compute.v1.UsableSubnetworkSecondaryRangeOrBuilder
getSecondaryIpRangesOrBuilder(int index)1327       getSecondaryIpRangesOrBuilder(int index) {
1328     return secondaryIpRanges_.get(index);
1329   }
1330 
1331   public static final int STACK_TYPE_FIELD_NUMBER = 425908881;
1332 
1333   @SuppressWarnings("serial")
1334   private volatile java.lang.Object stackType_ = "";
1335   /**
1336    *
1337    *
1338    * <pre>
1339    * The stack type for the subnet. If set to IPV4_ONLY, new VMs in the subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4_ONLY is used. This field can be both set at resource creation time and updated using patch.
1340    * Check the StackType enum for the list of possible values.
1341    * </pre>
1342    *
1343    * <code>optional string stack_type = 425908881;</code>
1344    *
1345    * @return Whether the stackType field is set.
1346    */
1347   @java.lang.Override
hasStackType()1348   public boolean hasStackType() {
1349     return ((bitField0_ & 0x00000080) != 0);
1350   }
1351   /**
1352    *
1353    *
1354    * <pre>
1355    * The stack type for the subnet. If set to IPV4_ONLY, new VMs in the subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4_ONLY is used. This field can be both set at resource creation time and updated using patch.
1356    * Check the StackType enum for the list of possible values.
1357    * </pre>
1358    *
1359    * <code>optional string stack_type = 425908881;</code>
1360    *
1361    * @return The stackType.
1362    */
1363   @java.lang.Override
getStackType()1364   public java.lang.String getStackType() {
1365     java.lang.Object ref = stackType_;
1366     if (ref instanceof java.lang.String) {
1367       return (java.lang.String) ref;
1368     } else {
1369       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1370       java.lang.String s = bs.toStringUtf8();
1371       stackType_ = s;
1372       return s;
1373     }
1374   }
1375   /**
1376    *
1377    *
1378    * <pre>
1379    * The stack type for the subnet. If set to IPV4_ONLY, new VMs in the subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4_ONLY is used. This field can be both set at resource creation time and updated using patch.
1380    * Check the StackType enum for the list of possible values.
1381    * </pre>
1382    *
1383    * <code>optional string stack_type = 425908881;</code>
1384    *
1385    * @return The bytes for stackType.
1386    */
1387   @java.lang.Override
getStackTypeBytes()1388   public com.google.protobuf.ByteString getStackTypeBytes() {
1389     java.lang.Object ref = stackType_;
1390     if (ref instanceof java.lang.String) {
1391       com.google.protobuf.ByteString b =
1392           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1393       stackType_ = b;
1394       return b;
1395     } else {
1396       return (com.google.protobuf.ByteString) ref;
1397     }
1398   }
1399 
1400   public static final int SUBNETWORK_FIELD_NUMBER = 307827694;
1401 
1402   @SuppressWarnings("serial")
1403   private volatile java.lang.Object subnetwork_ = "";
1404   /**
1405    *
1406    *
1407    * <pre>
1408    * Subnetwork URL.
1409    * </pre>
1410    *
1411    * <code>optional string subnetwork = 307827694;</code>
1412    *
1413    * @return Whether the subnetwork field is set.
1414    */
1415   @java.lang.Override
hasSubnetwork()1416   public boolean hasSubnetwork() {
1417     return ((bitField0_ & 0x00000100) != 0);
1418   }
1419   /**
1420    *
1421    *
1422    * <pre>
1423    * Subnetwork URL.
1424    * </pre>
1425    *
1426    * <code>optional string subnetwork = 307827694;</code>
1427    *
1428    * @return The subnetwork.
1429    */
1430   @java.lang.Override
getSubnetwork()1431   public java.lang.String getSubnetwork() {
1432     java.lang.Object ref = subnetwork_;
1433     if (ref instanceof java.lang.String) {
1434       return (java.lang.String) ref;
1435     } else {
1436       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1437       java.lang.String s = bs.toStringUtf8();
1438       subnetwork_ = s;
1439       return s;
1440     }
1441   }
1442   /**
1443    *
1444    *
1445    * <pre>
1446    * Subnetwork URL.
1447    * </pre>
1448    *
1449    * <code>optional string subnetwork = 307827694;</code>
1450    *
1451    * @return The bytes for subnetwork.
1452    */
1453   @java.lang.Override
getSubnetworkBytes()1454   public com.google.protobuf.ByteString getSubnetworkBytes() {
1455     java.lang.Object ref = subnetwork_;
1456     if (ref instanceof java.lang.String) {
1457       com.google.protobuf.ByteString b =
1458           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1459       subnetwork_ = b;
1460       return b;
1461     } else {
1462       return (com.google.protobuf.ByteString) ref;
1463     }
1464   }
1465 
1466   private byte memoizedIsInitialized = -1;
1467 
1468   @java.lang.Override
isInitialized()1469   public final boolean isInitialized() {
1470     byte isInitialized = memoizedIsInitialized;
1471     if (isInitialized == 1) return true;
1472     if (isInitialized == 0) return false;
1473 
1474     memoizedIsInitialized = 1;
1475     return true;
1476   }
1477 
1478   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)1479   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
1480     if (((bitField0_ & 0x00000040) != 0)) {
1481       com.google.protobuf.GeneratedMessageV3.writeString(output, 3506294, role_);
1482     }
1483     if (((bitField0_ & 0x00000004) != 0)) {
1484       com.google.protobuf.GeneratedMessageV3.writeString(output, 98117322, ipCidrRange_);
1485     }
1486     for (int i = 0; i < secondaryIpRanges_.size(); i++) {
1487       output.writeMessage(136658915, secondaryIpRanges_.get(i));
1488     }
1489     if (((bitField0_ & 0x00000001) != 0)) {
1490       com.google.protobuf.GeneratedMessageV3.writeString(output, 139299190, externalIpv6Prefix_);
1491     }
1492     if (((bitField0_ & 0x00000010) != 0)) {
1493       com.google.protobuf.GeneratedMessageV3.writeString(output, 232872494, network_);
1494     }
1495     if (((bitField0_ & 0x00000100) != 0)) {
1496       com.google.protobuf.GeneratedMessageV3.writeString(output, 307827694, subnetwork_);
1497     }
1498     if (((bitField0_ & 0x00000020) != 0)) {
1499       com.google.protobuf.GeneratedMessageV3.writeString(output, 316407070, purpose_);
1500     }
1501     if (((bitField0_ & 0x00000080) != 0)) {
1502       com.google.protobuf.GeneratedMessageV3.writeString(output, 425908881, stackType_);
1503     }
1504     if (((bitField0_ & 0x00000008) != 0)) {
1505       com.google.protobuf.GeneratedMessageV3.writeString(output, 504658653, ipv6AccessType_);
1506     }
1507     if (((bitField0_ & 0x00000002) != 0)) {
1508       com.google.protobuf.GeneratedMessageV3.writeString(output, 506270056, internalIpv6Prefix_);
1509     }
1510     getUnknownFields().writeTo(output);
1511   }
1512 
1513   @java.lang.Override
getSerializedSize()1514   public int getSerializedSize() {
1515     int size = memoizedSize;
1516     if (size != -1) return size;
1517 
1518     size = 0;
1519     if (((bitField0_ & 0x00000040) != 0)) {
1520       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3506294, role_);
1521     }
1522     if (((bitField0_ & 0x00000004) != 0)) {
1523       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(98117322, ipCidrRange_);
1524     }
1525     for (int i = 0; i < secondaryIpRanges_.size(); i++) {
1526       size +=
1527           com.google.protobuf.CodedOutputStream.computeMessageSize(
1528               136658915, secondaryIpRanges_.get(i));
1529     }
1530     if (((bitField0_ & 0x00000001) != 0)) {
1531       size +=
1532           com.google.protobuf.GeneratedMessageV3.computeStringSize(139299190, externalIpv6Prefix_);
1533     }
1534     if (((bitField0_ & 0x00000010) != 0)) {
1535       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(232872494, network_);
1536     }
1537     if (((bitField0_ & 0x00000100) != 0)) {
1538       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(307827694, subnetwork_);
1539     }
1540     if (((bitField0_ & 0x00000020) != 0)) {
1541       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(316407070, purpose_);
1542     }
1543     if (((bitField0_ & 0x00000080) != 0)) {
1544       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(425908881, stackType_);
1545     }
1546     if (((bitField0_ & 0x00000008) != 0)) {
1547       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(504658653, ipv6AccessType_);
1548     }
1549     if (((bitField0_ & 0x00000002) != 0)) {
1550       size +=
1551           com.google.protobuf.GeneratedMessageV3.computeStringSize(506270056, internalIpv6Prefix_);
1552     }
1553     size += getUnknownFields().getSerializedSize();
1554     memoizedSize = size;
1555     return size;
1556   }
1557 
1558   @java.lang.Override
equals(final java.lang.Object obj)1559   public boolean equals(final java.lang.Object obj) {
1560     if (obj == this) {
1561       return true;
1562     }
1563     if (!(obj instanceof com.google.cloud.compute.v1.UsableSubnetwork)) {
1564       return super.equals(obj);
1565     }
1566     com.google.cloud.compute.v1.UsableSubnetwork other =
1567         (com.google.cloud.compute.v1.UsableSubnetwork) obj;
1568 
1569     if (hasExternalIpv6Prefix() != other.hasExternalIpv6Prefix()) return false;
1570     if (hasExternalIpv6Prefix()) {
1571       if (!getExternalIpv6Prefix().equals(other.getExternalIpv6Prefix())) return false;
1572     }
1573     if (hasInternalIpv6Prefix() != other.hasInternalIpv6Prefix()) return false;
1574     if (hasInternalIpv6Prefix()) {
1575       if (!getInternalIpv6Prefix().equals(other.getInternalIpv6Prefix())) return false;
1576     }
1577     if (hasIpCidrRange() != other.hasIpCidrRange()) return false;
1578     if (hasIpCidrRange()) {
1579       if (!getIpCidrRange().equals(other.getIpCidrRange())) return false;
1580     }
1581     if (hasIpv6AccessType() != other.hasIpv6AccessType()) return false;
1582     if (hasIpv6AccessType()) {
1583       if (!getIpv6AccessType().equals(other.getIpv6AccessType())) return false;
1584     }
1585     if (hasNetwork() != other.hasNetwork()) return false;
1586     if (hasNetwork()) {
1587       if (!getNetwork().equals(other.getNetwork())) return false;
1588     }
1589     if (hasPurpose() != other.hasPurpose()) return false;
1590     if (hasPurpose()) {
1591       if (!getPurpose().equals(other.getPurpose())) return false;
1592     }
1593     if (hasRole() != other.hasRole()) return false;
1594     if (hasRole()) {
1595       if (!getRole().equals(other.getRole())) return false;
1596     }
1597     if (!getSecondaryIpRangesList().equals(other.getSecondaryIpRangesList())) return false;
1598     if (hasStackType() != other.hasStackType()) return false;
1599     if (hasStackType()) {
1600       if (!getStackType().equals(other.getStackType())) return false;
1601     }
1602     if (hasSubnetwork() != other.hasSubnetwork()) return false;
1603     if (hasSubnetwork()) {
1604       if (!getSubnetwork().equals(other.getSubnetwork())) return false;
1605     }
1606     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1607     return true;
1608   }
1609 
1610   @java.lang.Override
hashCode()1611   public int hashCode() {
1612     if (memoizedHashCode != 0) {
1613       return memoizedHashCode;
1614     }
1615     int hash = 41;
1616     hash = (19 * hash) + getDescriptor().hashCode();
1617     if (hasExternalIpv6Prefix()) {
1618       hash = (37 * hash) + EXTERNAL_IPV6_PREFIX_FIELD_NUMBER;
1619       hash = (53 * hash) + getExternalIpv6Prefix().hashCode();
1620     }
1621     if (hasInternalIpv6Prefix()) {
1622       hash = (37 * hash) + INTERNAL_IPV6_PREFIX_FIELD_NUMBER;
1623       hash = (53 * hash) + getInternalIpv6Prefix().hashCode();
1624     }
1625     if (hasIpCidrRange()) {
1626       hash = (37 * hash) + IP_CIDR_RANGE_FIELD_NUMBER;
1627       hash = (53 * hash) + getIpCidrRange().hashCode();
1628     }
1629     if (hasIpv6AccessType()) {
1630       hash = (37 * hash) + IPV6_ACCESS_TYPE_FIELD_NUMBER;
1631       hash = (53 * hash) + getIpv6AccessType().hashCode();
1632     }
1633     if (hasNetwork()) {
1634       hash = (37 * hash) + NETWORK_FIELD_NUMBER;
1635       hash = (53 * hash) + getNetwork().hashCode();
1636     }
1637     if (hasPurpose()) {
1638       hash = (37 * hash) + PURPOSE_FIELD_NUMBER;
1639       hash = (53 * hash) + getPurpose().hashCode();
1640     }
1641     if (hasRole()) {
1642       hash = (37 * hash) + ROLE_FIELD_NUMBER;
1643       hash = (53 * hash) + getRole().hashCode();
1644     }
1645     if (getSecondaryIpRangesCount() > 0) {
1646       hash = (37 * hash) + SECONDARY_IP_RANGES_FIELD_NUMBER;
1647       hash = (53 * hash) + getSecondaryIpRangesList().hashCode();
1648     }
1649     if (hasStackType()) {
1650       hash = (37 * hash) + STACK_TYPE_FIELD_NUMBER;
1651       hash = (53 * hash) + getStackType().hashCode();
1652     }
1653     if (hasSubnetwork()) {
1654       hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER;
1655       hash = (53 * hash) + getSubnetwork().hashCode();
1656     }
1657     hash = (29 * hash) + getUnknownFields().hashCode();
1658     memoizedHashCode = hash;
1659     return hash;
1660   }
1661 
parseFrom(java.nio.ByteBuffer data)1662   public static com.google.cloud.compute.v1.UsableSubnetwork parseFrom(java.nio.ByteBuffer data)
1663       throws com.google.protobuf.InvalidProtocolBufferException {
1664     return PARSER.parseFrom(data);
1665   }
1666 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1667   public static com.google.cloud.compute.v1.UsableSubnetwork parseFrom(
1668       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1669       throws com.google.protobuf.InvalidProtocolBufferException {
1670     return PARSER.parseFrom(data, extensionRegistry);
1671   }
1672 
parseFrom( com.google.protobuf.ByteString data)1673   public static com.google.cloud.compute.v1.UsableSubnetwork parseFrom(
1674       com.google.protobuf.ByteString data)
1675       throws com.google.protobuf.InvalidProtocolBufferException {
1676     return PARSER.parseFrom(data);
1677   }
1678 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1679   public static com.google.cloud.compute.v1.UsableSubnetwork parseFrom(
1680       com.google.protobuf.ByteString data,
1681       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1682       throws com.google.protobuf.InvalidProtocolBufferException {
1683     return PARSER.parseFrom(data, extensionRegistry);
1684   }
1685 
parseFrom(byte[] data)1686   public static com.google.cloud.compute.v1.UsableSubnetwork parseFrom(byte[] data)
1687       throws com.google.protobuf.InvalidProtocolBufferException {
1688     return PARSER.parseFrom(data);
1689   }
1690 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1691   public static com.google.cloud.compute.v1.UsableSubnetwork parseFrom(
1692       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1693       throws com.google.protobuf.InvalidProtocolBufferException {
1694     return PARSER.parseFrom(data, extensionRegistry);
1695   }
1696 
parseFrom(java.io.InputStream input)1697   public static com.google.cloud.compute.v1.UsableSubnetwork parseFrom(java.io.InputStream input)
1698       throws java.io.IOException {
1699     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1700   }
1701 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1702   public static com.google.cloud.compute.v1.UsableSubnetwork parseFrom(
1703       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1704       throws java.io.IOException {
1705     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1706         PARSER, input, extensionRegistry);
1707   }
1708 
parseDelimitedFrom( java.io.InputStream input)1709   public static com.google.cloud.compute.v1.UsableSubnetwork parseDelimitedFrom(
1710       java.io.InputStream input) throws java.io.IOException {
1711     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
1712   }
1713 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1714   public static com.google.cloud.compute.v1.UsableSubnetwork parseDelimitedFrom(
1715       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1716       throws java.io.IOException {
1717     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
1718         PARSER, input, extensionRegistry);
1719   }
1720 
parseFrom( com.google.protobuf.CodedInputStream input)1721   public static com.google.cloud.compute.v1.UsableSubnetwork parseFrom(
1722       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
1723     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1724   }
1725 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1726   public static com.google.cloud.compute.v1.UsableSubnetwork parseFrom(
1727       com.google.protobuf.CodedInputStream input,
1728       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1729       throws java.io.IOException {
1730     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1731         PARSER, input, extensionRegistry);
1732   }
1733 
1734   @java.lang.Override
newBuilderForType()1735   public Builder newBuilderForType() {
1736     return newBuilder();
1737   }
1738 
newBuilder()1739   public static Builder newBuilder() {
1740     return DEFAULT_INSTANCE.toBuilder();
1741   }
1742 
newBuilder(com.google.cloud.compute.v1.UsableSubnetwork prototype)1743   public static Builder newBuilder(com.google.cloud.compute.v1.UsableSubnetwork prototype) {
1744     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1745   }
1746 
1747   @java.lang.Override
toBuilder()1748   public Builder toBuilder() {
1749     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
1750   }
1751 
1752   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1753   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1754     Builder builder = new Builder(parent);
1755     return builder;
1756   }
1757   /**
1758    *
1759    *
1760    * <pre>
1761    * Subnetwork which the current user has compute.subnetworks.use permission on.
1762    * </pre>
1763    *
1764    * Protobuf type {@code google.cloud.compute.v1.UsableSubnetwork}
1765    */
1766   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
1767       implements
1768       // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.UsableSubnetwork)
1769       com.google.cloud.compute.v1.UsableSubnetworkOrBuilder {
getDescriptor()1770     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1771       return com.google.cloud.compute.v1.Compute
1772           .internal_static_google_cloud_compute_v1_UsableSubnetwork_descriptor;
1773     }
1774 
1775     @java.lang.Override
1776     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()1777         internalGetFieldAccessorTable() {
1778       return com.google.cloud.compute.v1.Compute
1779           .internal_static_google_cloud_compute_v1_UsableSubnetwork_fieldAccessorTable
1780           .ensureFieldAccessorsInitialized(
1781               com.google.cloud.compute.v1.UsableSubnetwork.class,
1782               com.google.cloud.compute.v1.UsableSubnetwork.Builder.class);
1783     }
1784 
1785     // Construct using com.google.cloud.compute.v1.UsableSubnetwork.newBuilder()
Builder()1786     private Builder() {}
1787 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1788     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1789       super(parent);
1790     }
1791 
1792     @java.lang.Override
clear()1793     public Builder clear() {
1794       super.clear();
1795       bitField0_ = 0;
1796       externalIpv6Prefix_ = "";
1797       internalIpv6Prefix_ = "";
1798       ipCidrRange_ = "";
1799       ipv6AccessType_ = "";
1800       network_ = "";
1801       purpose_ = "";
1802       role_ = "";
1803       if (secondaryIpRangesBuilder_ == null) {
1804         secondaryIpRanges_ = java.util.Collections.emptyList();
1805       } else {
1806         secondaryIpRanges_ = null;
1807         secondaryIpRangesBuilder_.clear();
1808       }
1809       bitField0_ = (bitField0_ & ~0x00000080);
1810       stackType_ = "";
1811       subnetwork_ = "";
1812       return this;
1813     }
1814 
1815     @java.lang.Override
getDescriptorForType()1816     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
1817       return com.google.cloud.compute.v1.Compute
1818           .internal_static_google_cloud_compute_v1_UsableSubnetwork_descriptor;
1819     }
1820 
1821     @java.lang.Override
getDefaultInstanceForType()1822     public com.google.cloud.compute.v1.UsableSubnetwork getDefaultInstanceForType() {
1823       return com.google.cloud.compute.v1.UsableSubnetwork.getDefaultInstance();
1824     }
1825 
1826     @java.lang.Override
build()1827     public com.google.cloud.compute.v1.UsableSubnetwork build() {
1828       com.google.cloud.compute.v1.UsableSubnetwork result = buildPartial();
1829       if (!result.isInitialized()) {
1830         throw newUninitializedMessageException(result);
1831       }
1832       return result;
1833     }
1834 
1835     @java.lang.Override
buildPartial()1836     public com.google.cloud.compute.v1.UsableSubnetwork buildPartial() {
1837       com.google.cloud.compute.v1.UsableSubnetwork result =
1838           new com.google.cloud.compute.v1.UsableSubnetwork(this);
1839       buildPartialRepeatedFields(result);
1840       if (bitField0_ != 0) {
1841         buildPartial0(result);
1842       }
1843       onBuilt();
1844       return result;
1845     }
1846 
buildPartialRepeatedFields(com.google.cloud.compute.v1.UsableSubnetwork result)1847     private void buildPartialRepeatedFields(com.google.cloud.compute.v1.UsableSubnetwork result) {
1848       if (secondaryIpRangesBuilder_ == null) {
1849         if (((bitField0_ & 0x00000080) != 0)) {
1850           secondaryIpRanges_ = java.util.Collections.unmodifiableList(secondaryIpRanges_);
1851           bitField0_ = (bitField0_ & ~0x00000080);
1852         }
1853         result.secondaryIpRanges_ = secondaryIpRanges_;
1854       } else {
1855         result.secondaryIpRanges_ = secondaryIpRangesBuilder_.build();
1856       }
1857     }
1858 
buildPartial0(com.google.cloud.compute.v1.UsableSubnetwork result)1859     private void buildPartial0(com.google.cloud.compute.v1.UsableSubnetwork result) {
1860       int from_bitField0_ = bitField0_;
1861       int to_bitField0_ = 0;
1862       if (((from_bitField0_ & 0x00000001) != 0)) {
1863         result.externalIpv6Prefix_ = externalIpv6Prefix_;
1864         to_bitField0_ |= 0x00000001;
1865       }
1866       if (((from_bitField0_ & 0x00000002) != 0)) {
1867         result.internalIpv6Prefix_ = internalIpv6Prefix_;
1868         to_bitField0_ |= 0x00000002;
1869       }
1870       if (((from_bitField0_ & 0x00000004) != 0)) {
1871         result.ipCidrRange_ = ipCidrRange_;
1872         to_bitField0_ |= 0x00000004;
1873       }
1874       if (((from_bitField0_ & 0x00000008) != 0)) {
1875         result.ipv6AccessType_ = ipv6AccessType_;
1876         to_bitField0_ |= 0x00000008;
1877       }
1878       if (((from_bitField0_ & 0x00000010) != 0)) {
1879         result.network_ = network_;
1880         to_bitField0_ |= 0x00000010;
1881       }
1882       if (((from_bitField0_ & 0x00000020) != 0)) {
1883         result.purpose_ = purpose_;
1884         to_bitField0_ |= 0x00000020;
1885       }
1886       if (((from_bitField0_ & 0x00000040) != 0)) {
1887         result.role_ = role_;
1888         to_bitField0_ |= 0x00000040;
1889       }
1890       if (((from_bitField0_ & 0x00000100) != 0)) {
1891         result.stackType_ = stackType_;
1892         to_bitField0_ |= 0x00000080;
1893       }
1894       if (((from_bitField0_ & 0x00000200) != 0)) {
1895         result.subnetwork_ = subnetwork_;
1896         to_bitField0_ |= 0x00000100;
1897       }
1898       result.bitField0_ |= to_bitField0_;
1899     }
1900 
1901     @java.lang.Override
clone()1902     public Builder clone() {
1903       return super.clone();
1904     }
1905 
1906     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1907     public Builder setField(
1908         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1909       return super.setField(field, value);
1910     }
1911 
1912     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1913     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1914       return super.clearField(field);
1915     }
1916 
1917     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1918     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1919       return super.clearOneof(oneof);
1920     }
1921 
1922     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1923     public Builder setRepeatedField(
1924         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
1925       return super.setRepeatedField(field, index, value);
1926     }
1927 
1928     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1929     public Builder addRepeatedField(
1930         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1931       return super.addRepeatedField(field, value);
1932     }
1933 
1934     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1935     public Builder mergeFrom(com.google.protobuf.Message other) {
1936       if (other instanceof com.google.cloud.compute.v1.UsableSubnetwork) {
1937         return mergeFrom((com.google.cloud.compute.v1.UsableSubnetwork) other);
1938       } else {
1939         super.mergeFrom(other);
1940         return this;
1941       }
1942     }
1943 
mergeFrom(com.google.cloud.compute.v1.UsableSubnetwork other)1944     public Builder mergeFrom(com.google.cloud.compute.v1.UsableSubnetwork other) {
1945       if (other == com.google.cloud.compute.v1.UsableSubnetwork.getDefaultInstance()) return this;
1946       if (other.hasExternalIpv6Prefix()) {
1947         externalIpv6Prefix_ = other.externalIpv6Prefix_;
1948         bitField0_ |= 0x00000001;
1949         onChanged();
1950       }
1951       if (other.hasInternalIpv6Prefix()) {
1952         internalIpv6Prefix_ = other.internalIpv6Prefix_;
1953         bitField0_ |= 0x00000002;
1954         onChanged();
1955       }
1956       if (other.hasIpCidrRange()) {
1957         ipCidrRange_ = other.ipCidrRange_;
1958         bitField0_ |= 0x00000004;
1959         onChanged();
1960       }
1961       if (other.hasIpv6AccessType()) {
1962         ipv6AccessType_ = other.ipv6AccessType_;
1963         bitField0_ |= 0x00000008;
1964         onChanged();
1965       }
1966       if (other.hasNetwork()) {
1967         network_ = other.network_;
1968         bitField0_ |= 0x00000010;
1969         onChanged();
1970       }
1971       if (other.hasPurpose()) {
1972         purpose_ = other.purpose_;
1973         bitField0_ |= 0x00000020;
1974         onChanged();
1975       }
1976       if (other.hasRole()) {
1977         role_ = other.role_;
1978         bitField0_ |= 0x00000040;
1979         onChanged();
1980       }
1981       if (secondaryIpRangesBuilder_ == null) {
1982         if (!other.secondaryIpRanges_.isEmpty()) {
1983           if (secondaryIpRanges_.isEmpty()) {
1984             secondaryIpRanges_ = other.secondaryIpRanges_;
1985             bitField0_ = (bitField0_ & ~0x00000080);
1986           } else {
1987             ensureSecondaryIpRangesIsMutable();
1988             secondaryIpRanges_.addAll(other.secondaryIpRanges_);
1989           }
1990           onChanged();
1991         }
1992       } else {
1993         if (!other.secondaryIpRanges_.isEmpty()) {
1994           if (secondaryIpRangesBuilder_.isEmpty()) {
1995             secondaryIpRangesBuilder_.dispose();
1996             secondaryIpRangesBuilder_ = null;
1997             secondaryIpRanges_ = other.secondaryIpRanges_;
1998             bitField0_ = (bitField0_ & ~0x00000080);
1999             secondaryIpRangesBuilder_ =
2000                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
2001                     ? getSecondaryIpRangesFieldBuilder()
2002                     : null;
2003           } else {
2004             secondaryIpRangesBuilder_.addAllMessages(other.secondaryIpRanges_);
2005           }
2006         }
2007       }
2008       if (other.hasStackType()) {
2009         stackType_ = other.stackType_;
2010         bitField0_ |= 0x00000100;
2011         onChanged();
2012       }
2013       if (other.hasSubnetwork()) {
2014         subnetwork_ = other.subnetwork_;
2015         bitField0_ |= 0x00000200;
2016         onChanged();
2017       }
2018       this.mergeUnknownFields(other.getUnknownFields());
2019       onChanged();
2020       return this;
2021     }
2022 
2023     @java.lang.Override
isInitialized()2024     public final boolean isInitialized() {
2025       return true;
2026     }
2027 
2028     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2029     public Builder mergeFrom(
2030         com.google.protobuf.CodedInputStream input,
2031         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2032         throws java.io.IOException {
2033       if (extensionRegistry == null) {
2034         throw new java.lang.NullPointerException();
2035       }
2036       try {
2037         boolean done = false;
2038         while (!done) {
2039           int tag = input.readTag();
2040           switch (tag) {
2041             case 0:
2042               done = true;
2043               break;
2044             case 28050354:
2045               {
2046                 role_ = input.readStringRequireUtf8();
2047                 bitField0_ |= 0x00000040;
2048                 break;
2049               } // case 28050354
2050             case 784938578:
2051               {
2052                 ipCidrRange_ = input.readStringRequireUtf8();
2053                 bitField0_ |= 0x00000004;
2054                 break;
2055               } // case 784938578
2056             case 1093271322:
2057               {
2058                 com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange m =
2059                     input.readMessage(
2060                         com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange.parser(),
2061                         extensionRegistry);
2062                 if (secondaryIpRangesBuilder_ == null) {
2063                   ensureSecondaryIpRangesIsMutable();
2064                   secondaryIpRanges_.add(m);
2065                 } else {
2066                   secondaryIpRangesBuilder_.addMessage(m);
2067                 }
2068                 break;
2069               } // case 1093271322
2070             case 1114393522:
2071               {
2072                 externalIpv6Prefix_ = input.readStringRequireUtf8();
2073                 bitField0_ |= 0x00000001;
2074                 break;
2075               } // case 1114393522
2076             case 1862979954:
2077               {
2078                 network_ = input.readStringRequireUtf8();
2079                 bitField0_ |= 0x00000010;
2080                 break;
2081               } // case 1862979954
2082             case -1832345742:
2083               {
2084                 subnetwork_ = input.readStringRequireUtf8();
2085                 bitField0_ |= 0x00000200;
2086                 break;
2087               } // case -1832345742
2088             case -1763710734:
2089               {
2090                 purpose_ = input.readStringRequireUtf8();
2091                 bitField0_ |= 0x00000020;
2092                 break;
2093               } // case -1763710734
2094             case -887696246:
2095               {
2096                 stackType_ = input.readStringRequireUtf8();
2097                 bitField0_ |= 0x00000100;
2098                 break;
2099               } // case -887696246
2100             case -257698070:
2101               {
2102                 ipv6AccessType_ = input.readStringRequireUtf8();
2103                 bitField0_ |= 0x00000008;
2104                 break;
2105               } // case -257698070
2106             case -244806846:
2107               {
2108                 internalIpv6Prefix_ = input.readStringRequireUtf8();
2109                 bitField0_ |= 0x00000002;
2110                 break;
2111               } // case -244806846
2112             default:
2113               {
2114                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
2115                   done = true; // was an endgroup tag
2116                 }
2117                 break;
2118               } // default:
2119           } // switch (tag)
2120         } // while (!done)
2121       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2122         throw e.unwrapIOException();
2123       } finally {
2124         onChanged();
2125       } // finally
2126       return this;
2127     }
2128 
2129     private int bitField0_;
2130 
2131     private java.lang.Object externalIpv6Prefix_ = "";
2132     /**
2133      *
2134      *
2135      * <pre>
2136      * [Output Only] The external IPv6 address range that is assigned to this subnetwork.
2137      * </pre>
2138      *
2139      * <code>optional string external_ipv6_prefix = 139299190;</code>
2140      *
2141      * @return Whether the externalIpv6Prefix field is set.
2142      */
hasExternalIpv6Prefix()2143     public boolean hasExternalIpv6Prefix() {
2144       return ((bitField0_ & 0x00000001) != 0);
2145     }
2146     /**
2147      *
2148      *
2149      * <pre>
2150      * [Output Only] The external IPv6 address range that is assigned to this subnetwork.
2151      * </pre>
2152      *
2153      * <code>optional string external_ipv6_prefix = 139299190;</code>
2154      *
2155      * @return The externalIpv6Prefix.
2156      */
getExternalIpv6Prefix()2157     public java.lang.String getExternalIpv6Prefix() {
2158       java.lang.Object ref = externalIpv6Prefix_;
2159       if (!(ref instanceof java.lang.String)) {
2160         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2161         java.lang.String s = bs.toStringUtf8();
2162         externalIpv6Prefix_ = s;
2163         return s;
2164       } else {
2165         return (java.lang.String) ref;
2166       }
2167     }
2168     /**
2169      *
2170      *
2171      * <pre>
2172      * [Output Only] The external IPv6 address range that is assigned to this subnetwork.
2173      * </pre>
2174      *
2175      * <code>optional string external_ipv6_prefix = 139299190;</code>
2176      *
2177      * @return The bytes for externalIpv6Prefix.
2178      */
getExternalIpv6PrefixBytes()2179     public com.google.protobuf.ByteString getExternalIpv6PrefixBytes() {
2180       java.lang.Object ref = externalIpv6Prefix_;
2181       if (ref instanceof String) {
2182         com.google.protobuf.ByteString b =
2183             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2184         externalIpv6Prefix_ = b;
2185         return b;
2186       } else {
2187         return (com.google.protobuf.ByteString) ref;
2188       }
2189     }
2190     /**
2191      *
2192      *
2193      * <pre>
2194      * [Output Only] The external IPv6 address range that is assigned to this subnetwork.
2195      * </pre>
2196      *
2197      * <code>optional string external_ipv6_prefix = 139299190;</code>
2198      *
2199      * @param value The externalIpv6Prefix to set.
2200      * @return This builder for chaining.
2201      */
setExternalIpv6Prefix(java.lang.String value)2202     public Builder setExternalIpv6Prefix(java.lang.String value) {
2203       if (value == null) {
2204         throw new NullPointerException();
2205       }
2206       externalIpv6Prefix_ = value;
2207       bitField0_ |= 0x00000001;
2208       onChanged();
2209       return this;
2210     }
2211     /**
2212      *
2213      *
2214      * <pre>
2215      * [Output Only] The external IPv6 address range that is assigned to this subnetwork.
2216      * </pre>
2217      *
2218      * <code>optional string external_ipv6_prefix = 139299190;</code>
2219      *
2220      * @return This builder for chaining.
2221      */
clearExternalIpv6Prefix()2222     public Builder clearExternalIpv6Prefix() {
2223       externalIpv6Prefix_ = getDefaultInstance().getExternalIpv6Prefix();
2224       bitField0_ = (bitField0_ & ~0x00000001);
2225       onChanged();
2226       return this;
2227     }
2228     /**
2229      *
2230      *
2231      * <pre>
2232      * [Output Only] The external IPv6 address range that is assigned to this subnetwork.
2233      * </pre>
2234      *
2235      * <code>optional string external_ipv6_prefix = 139299190;</code>
2236      *
2237      * @param value The bytes for externalIpv6Prefix to set.
2238      * @return This builder for chaining.
2239      */
setExternalIpv6PrefixBytes(com.google.protobuf.ByteString value)2240     public Builder setExternalIpv6PrefixBytes(com.google.protobuf.ByteString value) {
2241       if (value == null) {
2242         throw new NullPointerException();
2243       }
2244       checkByteStringIsUtf8(value);
2245       externalIpv6Prefix_ = value;
2246       bitField0_ |= 0x00000001;
2247       onChanged();
2248       return this;
2249     }
2250 
2251     private java.lang.Object internalIpv6Prefix_ = "";
2252     /**
2253      *
2254      *
2255      * <pre>
2256      * [Output Only] The internal IPv6 address range that is assigned to this subnetwork.
2257      * </pre>
2258      *
2259      * <code>optional string internal_ipv6_prefix = 506270056;</code>
2260      *
2261      * @return Whether the internalIpv6Prefix field is set.
2262      */
hasInternalIpv6Prefix()2263     public boolean hasInternalIpv6Prefix() {
2264       return ((bitField0_ & 0x00000002) != 0);
2265     }
2266     /**
2267      *
2268      *
2269      * <pre>
2270      * [Output Only] The internal IPv6 address range that is assigned to this subnetwork.
2271      * </pre>
2272      *
2273      * <code>optional string internal_ipv6_prefix = 506270056;</code>
2274      *
2275      * @return The internalIpv6Prefix.
2276      */
getInternalIpv6Prefix()2277     public java.lang.String getInternalIpv6Prefix() {
2278       java.lang.Object ref = internalIpv6Prefix_;
2279       if (!(ref instanceof java.lang.String)) {
2280         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2281         java.lang.String s = bs.toStringUtf8();
2282         internalIpv6Prefix_ = s;
2283         return s;
2284       } else {
2285         return (java.lang.String) ref;
2286       }
2287     }
2288     /**
2289      *
2290      *
2291      * <pre>
2292      * [Output Only] The internal IPv6 address range that is assigned to this subnetwork.
2293      * </pre>
2294      *
2295      * <code>optional string internal_ipv6_prefix = 506270056;</code>
2296      *
2297      * @return The bytes for internalIpv6Prefix.
2298      */
getInternalIpv6PrefixBytes()2299     public com.google.protobuf.ByteString getInternalIpv6PrefixBytes() {
2300       java.lang.Object ref = internalIpv6Prefix_;
2301       if (ref instanceof String) {
2302         com.google.protobuf.ByteString b =
2303             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2304         internalIpv6Prefix_ = b;
2305         return b;
2306       } else {
2307         return (com.google.protobuf.ByteString) ref;
2308       }
2309     }
2310     /**
2311      *
2312      *
2313      * <pre>
2314      * [Output Only] The internal IPv6 address range that is assigned to this subnetwork.
2315      * </pre>
2316      *
2317      * <code>optional string internal_ipv6_prefix = 506270056;</code>
2318      *
2319      * @param value The internalIpv6Prefix to set.
2320      * @return This builder for chaining.
2321      */
setInternalIpv6Prefix(java.lang.String value)2322     public Builder setInternalIpv6Prefix(java.lang.String value) {
2323       if (value == null) {
2324         throw new NullPointerException();
2325       }
2326       internalIpv6Prefix_ = value;
2327       bitField0_ |= 0x00000002;
2328       onChanged();
2329       return this;
2330     }
2331     /**
2332      *
2333      *
2334      * <pre>
2335      * [Output Only] The internal IPv6 address range that is assigned to this subnetwork.
2336      * </pre>
2337      *
2338      * <code>optional string internal_ipv6_prefix = 506270056;</code>
2339      *
2340      * @return This builder for chaining.
2341      */
clearInternalIpv6Prefix()2342     public Builder clearInternalIpv6Prefix() {
2343       internalIpv6Prefix_ = getDefaultInstance().getInternalIpv6Prefix();
2344       bitField0_ = (bitField0_ & ~0x00000002);
2345       onChanged();
2346       return this;
2347     }
2348     /**
2349      *
2350      *
2351      * <pre>
2352      * [Output Only] The internal IPv6 address range that is assigned to this subnetwork.
2353      * </pre>
2354      *
2355      * <code>optional string internal_ipv6_prefix = 506270056;</code>
2356      *
2357      * @param value The bytes for internalIpv6Prefix to set.
2358      * @return This builder for chaining.
2359      */
setInternalIpv6PrefixBytes(com.google.protobuf.ByteString value)2360     public Builder setInternalIpv6PrefixBytes(com.google.protobuf.ByteString value) {
2361       if (value == null) {
2362         throw new NullPointerException();
2363       }
2364       checkByteStringIsUtf8(value);
2365       internalIpv6Prefix_ = value;
2366       bitField0_ |= 0x00000002;
2367       onChanged();
2368       return this;
2369     }
2370 
2371     private java.lang.Object ipCidrRange_ = "";
2372     /**
2373      *
2374      *
2375      * <pre>
2376      * The range of internal addresses that are owned by this subnetwork.
2377      * </pre>
2378      *
2379      * <code>optional string ip_cidr_range = 98117322;</code>
2380      *
2381      * @return Whether the ipCidrRange field is set.
2382      */
hasIpCidrRange()2383     public boolean hasIpCidrRange() {
2384       return ((bitField0_ & 0x00000004) != 0);
2385     }
2386     /**
2387      *
2388      *
2389      * <pre>
2390      * The range of internal addresses that are owned by this subnetwork.
2391      * </pre>
2392      *
2393      * <code>optional string ip_cidr_range = 98117322;</code>
2394      *
2395      * @return The ipCidrRange.
2396      */
getIpCidrRange()2397     public java.lang.String getIpCidrRange() {
2398       java.lang.Object ref = ipCidrRange_;
2399       if (!(ref instanceof java.lang.String)) {
2400         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2401         java.lang.String s = bs.toStringUtf8();
2402         ipCidrRange_ = s;
2403         return s;
2404       } else {
2405         return (java.lang.String) ref;
2406       }
2407     }
2408     /**
2409      *
2410      *
2411      * <pre>
2412      * The range of internal addresses that are owned by this subnetwork.
2413      * </pre>
2414      *
2415      * <code>optional string ip_cidr_range = 98117322;</code>
2416      *
2417      * @return The bytes for ipCidrRange.
2418      */
getIpCidrRangeBytes()2419     public com.google.protobuf.ByteString getIpCidrRangeBytes() {
2420       java.lang.Object ref = ipCidrRange_;
2421       if (ref instanceof String) {
2422         com.google.protobuf.ByteString b =
2423             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2424         ipCidrRange_ = b;
2425         return b;
2426       } else {
2427         return (com.google.protobuf.ByteString) ref;
2428       }
2429     }
2430     /**
2431      *
2432      *
2433      * <pre>
2434      * The range of internal addresses that are owned by this subnetwork.
2435      * </pre>
2436      *
2437      * <code>optional string ip_cidr_range = 98117322;</code>
2438      *
2439      * @param value The ipCidrRange to set.
2440      * @return This builder for chaining.
2441      */
setIpCidrRange(java.lang.String value)2442     public Builder setIpCidrRange(java.lang.String value) {
2443       if (value == null) {
2444         throw new NullPointerException();
2445       }
2446       ipCidrRange_ = value;
2447       bitField0_ |= 0x00000004;
2448       onChanged();
2449       return this;
2450     }
2451     /**
2452      *
2453      *
2454      * <pre>
2455      * The range of internal addresses that are owned by this subnetwork.
2456      * </pre>
2457      *
2458      * <code>optional string ip_cidr_range = 98117322;</code>
2459      *
2460      * @return This builder for chaining.
2461      */
clearIpCidrRange()2462     public Builder clearIpCidrRange() {
2463       ipCidrRange_ = getDefaultInstance().getIpCidrRange();
2464       bitField0_ = (bitField0_ & ~0x00000004);
2465       onChanged();
2466       return this;
2467     }
2468     /**
2469      *
2470      *
2471      * <pre>
2472      * The range of internal addresses that are owned by this subnetwork.
2473      * </pre>
2474      *
2475      * <code>optional string ip_cidr_range = 98117322;</code>
2476      *
2477      * @param value The bytes for ipCidrRange to set.
2478      * @return This builder for chaining.
2479      */
setIpCidrRangeBytes(com.google.protobuf.ByteString value)2480     public Builder setIpCidrRangeBytes(com.google.protobuf.ByteString value) {
2481       if (value == null) {
2482         throw new NullPointerException();
2483       }
2484       checkByteStringIsUtf8(value);
2485       ipCidrRange_ = value;
2486       bitField0_ |= 0x00000004;
2487       onChanged();
2488       return this;
2489     }
2490 
2491     private java.lang.Object ipv6AccessType_ = "";
2492     /**
2493      *
2494      *
2495      * <pre>
2496      * The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4_IPV6 dual stack.
2497      * Check the Ipv6AccessType enum for the list of possible values.
2498      * </pre>
2499      *
2500      * <code>optional string ipv6_access_type = 504658653;</code>
2501      *
2502      * @return Whether the ipv6AccessType field is set.
2503      */
hasIpv6AccessType()2504     public boolean hasIpv6AccessType() {
2505       return ((bitField0_ & 0x00000008) != 0);
2506     }
2507     /**
2508      *
2509      *
2510      * <pre>
2511      * The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4_IPV6 dual stack.
2512      * Check the Ipv6AccessType enum for the list of possible values.
2513      * </pre>
2514      *
2515      * <code>optional string ipv6_access_type = 504658653;</code>
2516      *
2517      * @return The ipv6AccessType.
2518      */
getIpv6AccessType()2519     public java.lang.String getIpv6AccessType() {
2520       java.lang.Object ref = ipv6AccessType_;
2521       if (!(ref instanceof java.lang.String)) {
2522         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2523         java.lang.String s = bs.toStringUtf8();
2524         ipv6AccessType_ = s;
2525         return s;
2526       } else {
2527         return (java.lang.String) ref;
2528       }
2529     }
2530     /**
2531      *
2532      *
2533      * <pre>
2534      * The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4_IPV6 dual stack.
2535      * Check the Ipv6AccessType enum for the list of possible values.
2536      * </pre>
2537      *
2538      * <code>optional string ipv6_access_type = 504658653;</code>
2539      *
2540      * @return The bytes for ipv6AccessType.
2541      */
getIpv6AccessTypeBytes()2542     public com.google.protobuf.ByteString getIpv6AccessTypeBytes() {
2543       java.lang.Object ref = ipv6AccessType_;
2544       if (ref instanceof String) {
2545         com.google.protobuf.ByteString b =
2546             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2547         ipv6AccessType_ = b;
2548         return b;
2549       } else {
2550         return (com.google.protobuf.ByteString) ref;
2551       }
2552     }
2553     /**
2554      *
2555      *
2556      * <pre>
2557      * The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4_IPV6 dual stack.
2558      * Check the Ipv6AccessType enum for the list of possible values.
2559      * </pre>
2560      *
2561      * <code>optional string ipv6_access_type = 504658653;</code>
2562      *
2563      * @param value The ipv6AccessType to set.
2564      * @return This builder for chaining.
2565      */
setIpv6AccessType(java.lang.String value)2566     public Builder setIpv6AccessType(java.lang.String value) {
2567       if (value == null) {
2568         throw new NullPointerException();
2569       }
2570       ipv6AccessType_ = value;
2571       bitField0_ |= 0x00000008;
2572       onChanged();
2573       return this;
2574     }
2575     /**
2576      *
2577      *
2578      * <pre>
2579      * The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4_IPV6 dual stack.
2580      * Check the Ipv6AccessType enum for the list of possible values.
2581      * </pre>
2582      *
2583      * <code>optional string ipv6_access_type = 504658653;</code>
2584      *
2585      * @return This builder for chaining.
2586      */
clearIpv6AccessType()2587     public Builder clearIpv6AccessType() {
2588       ipv6AccessType_ = getDefaultInstance().getIpv6AccessType();
2589       bitField0_ = (bitField0_ & ~0x00000008);
2590       onChanged();
2591       return this;
2592     }
2593     /**
2594      *
2595      *
2596      * <pre>
2597      * The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4_IPV6 dual stack.
2598      * Check the Ipv6AccessType enum for the list of possible values.
2599      * </pre>
2600      *
2601      * <code>optional string ipv6_access_type = 504658653;</code>
2602      *
2603      * @param value The bytes for ipv6AccessType to set.
2604      * @return This builder for chaining.
2605      */
setIpv6AccessTypeBytes(com.google.protobuf.ByteString value)2606     public Builder setIpv6AccessTypeBytes(com.google.protobuf.ByteString value) {
2607       if (value == null) {
2608         throw new NullPointerException();
2609       }
2610       checkByteStringIsUtf8(value);
2611       ipv6AccessType_ = value;
2612       bitField0_ |= 0x00000008;
2613       onChanged();
2614       return this;
2615     }
2616 
2617     private java.lang.Object network_ = "";
2618     /**
2619      *
2620      *
2621      * <pre>
2622      * Network URL.
2623      * </pre>
2624      *
2625      * <code>optional string network = 232872494;</code>
2626      *
2627      * @return Whether the network field is set.
2628      */
hasNetwork()2629     public boolean hasNetwork() {
2630       return ((bitField0_ & 0x00000010) != 0);
2631     }
2632     /**
2633      *
2634      *
2635      * <pre>
2636      * Network URL.
2637      * </pre>
2638      *
2639      * <code>optional string network = 232872494;</code>
2640      *
2641      * @return The network.
2642      */
getNetwork()2643     public java.lang.String getNetwork() {
2644       java.lang.Object ref = network_;
2645       if (!(ref instanceof java.lang.String)) {
2646         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2647         java.lang.String s = bs.toStringUtf8();
2648         network_ = s;
2649         return s;
2650       } else {
2651         return (java.lang.String) ref;
2652       }
2653     }
2654     /**
2655      *
2656      *
2657      * <pre>
2658      * Network URL.
2659      * </pre>
2660      *
2661      * <code>optional string network = 232872494;</code>
2662      *
2663      * @return The bytes for network.
2664      */
getNetworkBytes()2665     public com.google.protobuf.ByteString getNetworkBytes() {
2666       java.lang.Object ref = network_;
2667       if (ref instanceof String) {
2668         com.google.protobuf.ByteString b =
2669             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2670         network_ = b;
2671         return b;
2672       } else {
2673         return (com.google.protobuf.ByteString) ref;
2674       }
2675     }
2676     /**
2677      *
2678      *
2679      * <pre>
2680      * Network URL.
2681      * </pre>
2682      *
2683      * <code>optional string network = 232872494;</code>
2684      *
2685      * @param value The network to set.
2686      * @return This builder for chaining.
2687      */
setNetwork(java.lang.String value)2688     public Builder setNetwork(java.lang.String value) {
2689       if (value == null) {
2690         throw new NullPointerException();
2691       }
2692       network_ = value;
2693       bitField0_ |= 0x00000010;
2694       onChanged();
2695       return this;
2696     }
2697     /**
2698      *
2699      *
2700      * <pre>
2701      * Network URL.
2702      * </pre>
2703      *
2704      * <code>optional string network = 232872494;</code>
2705      *
2706      * @return This builder for chaining.
2707      */
clearNetwork()2708     public Builder clearNetwork() {
2709       network_ = getDefaultInstance().getNetwork();
2710       bitField0_ = (bitField0_ & ~0x00000010);
2711       onChanged();
2712       return this;
2713     }
2714     /**
2715      *
2716      *
2717      * <pre>
2718      * Network URL.
2719      * </pre>
2720      *
2721      * <code>optional string network = 232872494;</code>
2722      *
2723      * @param value The bytes for network to set.
2724      * @return This builder for chaining.
2725      */
setNetworkBytes(com.google.protobuf.ByteString value)2726     public Builder setNetworkBytes(com.google.protobuf.ByteString value) {
2727       if (value == null) {
2728         throw new NullPointerException();
2729       }
2730       checkByteStringIsUtf8(value);
2731       network_ = value;
2732       bitField0_ |= 0x00000010;
2733       onChanged();
2734       return this;
2735     }
2736 
2737     private java.lang.Object purpose_ = "";
2738     /**
2739      *
2740      *
2741      * <pre>
2742      * The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918. The enableFlowLogs field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.
2743      * Check the Purpose enum for the list of possible values.
2744      * </pre>
2745      *
2746      * <code>optional string purpose = 316407070;</code>
2747      *
2748      * @return Whether the purpose field is set.
2749      */
hasPurpose()2750     public boolean hasPurpose() {
2751       return ((bitField0_ & 0x00000020) != 0);
2752     }
2753     /**
2754      *
2755      *
2756      * <pre>
2757      * The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918. The enableFlowLogs field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.
2758      * Check the Purpose enum for the list of possible values.
2759      * </pre>
2760      *
2761      * <code>optional string purpose = 316407070;</code>
2762      *
2763      * @return The purpose.
2764      */
getPurpose()2765     public java.lang.String getPurpose() {
2766       java.lang.Object ref = purpose_;
2767       if (!(ref instanceof java.lang.String)) {
2768         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2769         java.lang.String s = bs.toStringUtf8();
2770         purpose_ = s;
2771         return s;
2772       } else {
2773         return (java.lang.String) ref;
2774       }
2775     }
2776     /**
2777      *
2778      *
2779      * <pre>
2780      * The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918. The enableFlowLogs field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.
2781      * Check the Purpose enum for the list of possible values.
2782      * </pre>
2783      *
2784      * <code>optional string purpose = 316407070;</code>
2785      *
2786      * @return The bytes for purpose.
2787      */
getPurposeBytes()2788     public com.google.protobuf.ByteString getPurposeBytes() {
2789       java.lang.Object ref = purpose_;
2790       if (ref instanceof String) {
2791         com.google.protobuf.ByteString b =
2792             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2793         purpose_ = b;
2794         return b;
2795       } else {
2796         return (com.google.protobuf.ByteString) ref;
2797       }
2798     }
2799     /**
2800      *
2801      *
2802      * <pre>
2803      * The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918. The enableFlowLogs field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.
2804      * Check the Purpose enum for the list of possible values.
2805      * </pre>
2806      *
2807      * <code>optional string purpose = 316407070;</code>
2808      *
2809      * @param value The purpose to set.
2810      * @return This builder for chaining.
2811      */
setPurpose(java.lang.String value)2812     public Builder setPurpose(java.lang.String value) {
2813       if (value == null) {
2814         throw new NullPointerException();
2815       }
2816       purpose_ = value;
2817       bitField0_ |= 0x00000020;
2818       onChanged();
2819       return this;
2820     }
2821     /**
2822      *
2823      *
2824      * <pre>
2825      * The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918. The enableFlowLogs field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.
2826      * Check the Purpose enum for the list of possible values.
2827      * </pre>
2828      *
2829      * <code>optional string purpose = 316407070;</code>
2830      *
2831      * @return This builder for chaining.
2832      */
clearPurpose()2833     public Builder clearPurpose() {
2834       purpose_ = getDefaultInstance().getPurpose();
2835       bitField0_ = (bitField0_ & ~0x00000020);
2836       onChanged();
2837       return this;
2838     }
2839     /**
2840      *
2841      *
2842      * <pre>
2843      * The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918. The enableFlowLogs field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.
2844      * Check the Purpose enum for the list of possible values.
2845      * </pre>
2846      *
2847      * <code>optional string purpose = 316407070;</code>
2848      *
2849      * @param value The bytes for purpose to set.
2850      * @return This builder for chaining.
2851      */
setPurposeBytes(com.google.protobuf.ByteString value)2852     public Builder setPurposeBytes(com.google.protobuf.ByteString value) {
2853       if (value == null) {
2854         throw new NullPointerException();
2855       }
2856       checkByteStringIsUtf8(value);
2857       purpose_ = value;
2858       bitField0_ |= 0x00000020;
2859       onChanged();
2860       return this;
2861     }
2862 
2863     private java.lang.Object role_ = "";
2864     /**
2865      *
2866      *
2867      * <pre>
2868      * The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.
2869      * Check the Role enum for the list of possible values.
2870      * </pre>
2871      *
2872      * <code>optional string role = 3506294;</code>
2873      *
2874      * @return Whether the role field is set.
2875      */
hasRole()2876     public boolean hasRole() {
2877       return ((bitField0_ & 0x00000040) != 0);
2878     }
2879     /**
2880      *
2881      *
2882      * <pre>
2883      * The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.
2884      * Check the Role enum for the list of possible values.
2885      * </pre>
2886      *
2887      * <code>optional string role = 3506294;</code>
2888      *
2889      * @return The role.
2890      */
getRole()2891     public java.lang.String getRole() {
2892       java.lang.Object ref = role_;
2893       if (!(ref instanceof java.lang.String)) {
2894         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2895         java.lang.String s = bs.toStringUtf8();
2896         role_ = s;
2897         return s;
2898       } else {
2899         return (java.lang.String) ref;
2900       }
2901     }
2902     /**
2903      *
2904      *
2905      * <pre>
2906      * The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.
2907      * Check the Role enum for the list of possible values.
2908      * </pre>
2909      *
2910      * <code>optional string role = 3506294;</code>
2911      *
2912      * @return The bytes for role.
2913      */
getRoleBytes()2914     public com.google.protobuf.ByteString getRoleBytes() {
2915       java.lang.Object ref = role_;
2916       if (ref instanceof String) {
2917         com.google.protobuf.ByteString b =
2918             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2919         role_ = b;
2920         return b;
2921       } else {
2922         return (com.google.protobuf.ByteString) ref;
2923       }
2924     }
2925     /**
2926      *
2927      *
2928      * <pre>
2929      * The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.
2930      * Check the Role enum for the list of possible values.
2931      * </pre>
2932      *
2933      * <code>optional string role = 3506294;</code>
2934      *
2935      * @param value The role to set.
2936      * @return This builder for chaining.
2937      */
setRole(java.lang.String value)2938     public Builder setRole(java.lang.String value) {
2939       if (value == null) {
2940         throw new NullPointerException();
2941       }
2942       role_ = value;
2943       bitField0_ |= 0x00000040;
2944       onChanged();
2945       return this;
2946     }
2947     /**
2948      *
2949      *
2950      * <pre>
2951      * The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.
2952      * Check the Role enum for the list of possible values.
2953      * </pre>
2954      *
2955      * <code>optional string role = 3506294;</code>
2956      *
2957      * @return This builder for chaining.
2958      */
clearRole()2959     public Builder clearRole() {
2960       role_ = getDefaultInstance().getRole();
2961       bitField0_ = (bitField0_ & ~0x00000040);
2962       onChanged();
2963       return this;
2964     }
2965     /**
2966      *
2967      *
2968      * <pre>
2969      * The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.
2970      * Check the Role enum for the list of possible values.
2971      * </pre>
2972      *
2973      * <code>optional string role = 3506294;</code>
2974      *
2975      * @param value The bytes for role to set.
2976      * @return This builder for chaining.
2977      */
setRoleBytes(com.google.protobuf.ByteString value)2978     public Builder setRoleBytes(com.google.protobuf.ByteString value) {
2979       if (value == null) {
2980         throw new NullPointerException();
2981       }
2982       checkByteStringIsUtf8(value);
2983       role_ = value;
2984       bitField0_ |= 0x00000040;
2985       onChanged();
2986       return this;
2987     }
2988 
2989     private java.util.List<com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange>
2990         secondaryIpRanges_ = java.util.Collections.emptyList();
2991 
ensureSecondaryIpRangesIsMutable()2992     private void ensureSecondaryIpRangesIsMutable() {
2993       if (!((bitField0_ & 0x00000080) != 0)) {
2994         secondaryIpRanges_ =
2995             new java.util.ArrayList<com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange>(
2996                 secondaryIpRanges_);
2997         bitField0_ |= 0x00000080;
2998       }
2999     }
3000 
3001     private com.google.protobuf.RepeatedFieldBuilderV3<
3002             com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange,
3003             com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange.Builder,
3004             com.google.cloud.compute.v1.UsableSubnetworkSecondaryRangeOrBuilder>
3005         secondaryIpRangesBuilder_;
3006 
3007     /**
3008      *
3009      *
3010      * <pre>
3011      * Secondary IP ranges.
3012      * </pre>
3013      *
3014      * <code>
3015      * repeated .google.cloud.compute.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 136658915;
3016      * </code>
3017      */
3018     public java.util.List<com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange>
getSecondaryIpRangesList()3019         getSecondaryIpRangesList() {
3020       if (secondaryIpRangesBuilder_ == null) {
3021         return java.util.Collections.unmodifiableList(secondaryIpRanges_);
3022       } else {
3023         return secondaryIpRangesBuilder_.getMessageList();
3024       }
3025     }
3026     /**
3027      *
3028      *
3029      * <pre>
3030      * Secondary IP ranges.
3031      * </pre>
3032      *
3033      * <code>
3034      * repeated .google.cloud.compute.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 136658915;
3035      * </code>
3036      */
getSecondaryIpRangesCount()3037     public int getSecondaryIpRangesCount() {
3038       if (secondaryIpRangesBuilder_ == null) {
3039         return secondaryIpRanges_.size();
3040       } else {
3041         return secondaryIpRangesBuilder_.getCount();
3042       }
3043     }
3044     /**
3045      *
3046      *
3047      * <pre>
3048      * Secondary IP ranges.
3049      * </pre>
3050      *
3051      * <code>
3052      * repeated .google.cloud.compute.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 136658915;
3053      * </code>
3054      */
getSecondaryIpRanges( int index)3055     public com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange getSecondaryIpRanges(
3056         int index) {
3057       if (secondaryIpRangesBuilder_ == null) {
3058         return secondaryIpRanges_.get(index);
3059       } else {
3060         return secondaryIpRangesBuilder_.getMessage(index);
3061       }
3062     }
3063     /**
3064      *
3065      *
3066      * <pre>
3067      * Secondary IP ranges.
3068      * </pre>
3069      *
3070      * <code>
3071      * repeated .google.cloud.compute.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 136658915;
3072      * </code>
3073      */
setSecondaryIpRanges( int index, com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange value)3074     public Builder setSecondaryIpRanges(
3075         int index, com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange value) {
3076       if (secondaryIpRangesBuilder_ == null) {
3077         if (value == null) {
3078           throw new NullPointerException();
3079         }
3080         ensureSecondaryIpRangesIsMutable();
3081         secondaryIpRanges_.set(index, value);
3082         onChanged();
3083       } else {
3084         secondaryIpRangesBuilder_.setMessage(index, value);
3085       }
3086       return this;
3087     }
3088     /**
3089      *
3090      *
3091      * <pre>
3092      * Secondary IP ranges.
3093      * </pre>
3094      *
3095      * <code>
3096      * repeated .google.cloud.compute.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 136658915;
3097      * </code>
3098      */
setSecondaryIpRanges( int index, com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange.Builder builderForValue)3099     public Builder setSecondaryIpRanges(
3100         int index,
3101         com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange.Builder builderForValue) {
3102       if (secondaryIpRangesBuilder_ == null) {
3103         ensureSecondaryIpRangesIsMutable();
3104         secondaryIpRanges_.set(index, builderForValue.build());
3105         onChanged();
3106       } else {
3107         secondaryIpRangesBuilder_.setMessage(index, builderForValue.build());
3108       }
3109       return this;
3110     }
3111     /**
3112      *
3113      *
3114      * <pre>
3115      * Secondary IP ranges.
3116      * </pre>
3117      *
3118      * <code>
3119      * repeated .google.cloud.compute.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 136658915;
3120      * </code>
3121      */
addSecondaryIpRanges( com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange value)3122     public Builder addSecondaryIpRanges(
3123         com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange value) {
3124       if (secondaryIpRangesBuilder_ == null) {
3125         if (value == null) {
3126           throw new NullPointerException();
3127         }
3128         ensureSecondaryIpRangesIsMutable();
3129         secondaryIpRanges_.add(value);
3130         onChanged();
3131       } else {
3132         secondaryIpRangesBuilder_.addMessage(value);
3133       }
3134       return this;
3135     }
3136     /**
3137      *
3138      *
3139      * <pre>
3140      * Secondary IP ranges.
3141      * </pre>
3142      *
3143      * <code>
3144      * repeated .google.cloud.compute.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 136658915;
3145      * </code>
3146      */
addSecondaryIpRanges( int index, com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange value)3147     public Builder addSecondaryIpRanges(
3148         int index, com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange value) {
3149       if (secondaryIpRangesBuilder_ == null) {
3150         if (value == null) {
3151           throw new NullPointerException();
3152         }
3153         ensureSecondaryIpRangesIsMutable();
3154         secondaryIpRanges_.add(index, value);
3155         onChanged();
3156       } else {
3157         secondaryIpRangesBuilder_.addMessage(index, value);
3158       }
3159       return this;
3160     }
3161     /**
3162      *
3163      *
3164      * <pre>
3165      * Secondary IP ranges.
3166      * </pre>
3167      *
3168      * <code>
3169      * repeated .google.cloud.compute.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 136658915;
3170      * </code>
3171      */
addSecondaryIpRanges( com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange.Builder builderForValue)3172     public Builder addSecondaryIpRanges(
3173         com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange.Builder builderForValue) {
3174       if (secondaryIpRangesBuilder_ == null) {
3175         ensureSecondaryIpRangesIsMutable();
3176         secondaryIpRanges_.add(builderForValue.build());
3177         onChanged();
3178       } else {
3179         secondaryIpRangesBuilder_.addMessage(builderForValue.build());
3180       }
3181       return this;
3182     }
3183     /**
3184      *
3185      *
3186      * <pre>
3187      * Secondary IP ranges.
3188      * </pre>
3189      *
3190      * <code>
3191      * repeated .google.cloud.compute.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 136658915;
3192      * </code>
3193      */
addSecondaryIpRanges( int index, com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange.Builder builderForValue)3194     public Builder addSecondaryIpRanges(
3195         int index,
3196         com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange.Builder builderForValue) {
3197       if (secondaryIpRangesBuilder_ == null) {
3198         ensureSecondaryIpRangesIsMutable();
3199         secondaryIpRanges_.add(index, builderForValue.build());
3200         onChanged();
3201       } else {
3202         secondaryIpRangesBuilder_.addMessage(index, builderForValue.build());
3203       }
3204       return this;
3205     }
3206     /**
3207      *
3208      *
3209      * <pre>
3210      * Secondary IP ranges.
3211      * </pre>
3212      *
3213      * <code>
3214      * repeated .google.cloud.compute.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 136658915;
3215      * </code>
3216      */
addAllSecondaryIpRanges( java.lang.Iterable<? extends com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange> values)3217     public Builder addAllSecondaryIpRanges(
3218         java.lang.Iterable<? extends com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange>
3219             values) {
3220       if (secondaryIpRangesBuilder_ == null) {
3221         ensureSecondaryIpRangesIsMutable();
3222         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, secondaryIpRanges_);
3223         onChanged();
3224       } else {
3225         secondaryIpRangesBuilder_.addAllMessages(values);
3226       }
3227       return this;
3228     }
3229     /**
3230      *
3231      *
3232      * <pre>
3233      * Secondary IP ranges.
3234      * </pre>
3235      *
3236      * <code>
3237      * repeated .google.cloud.compute.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 136658915;
3238      * </code>
3239      */
clearSecondaryIpRanges()3240     public Builder clearSecondaryIpRanges() {
3241       if (secondaryIpRangesBuilder_ == null) {
3242         secondaryIpRanges_ = java.util.Collections.emptyList();
3243         bitField0_ = (bitField0_ & ~0x00000080);
3244         onChanged();
3245       } else {
3246         secondaryIpRangesBuilder_.clear();
3247       }
3248       return this;
3249     }
3250     /**
3251      *
3252      *
3253      * <pre>
3254      * Secondary IP ranges.
3255      * </pre>
3256      *
3257      * <code>
3258      * repeated .google.cloud.compute.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 136658915;
3259      * </code>
3260      */
removeSecondaryIpRanges(int index)3261     public Builder removeSecondaryIpRanges(int index) {
3262       if (secondaryIpRangesBuilder_ == null) {
3263         ensureSecondaryIpRangesIsMutable();
3264         secondaryIpRanges_.remove(index);
3265         onChanged();
3266       } else {
3267         secondaryIpRangesBuilder_.remove(index);
3268       }
3269       return this;
3270     }
3271     /**
3272      *
3273      *
3274      * <pre>
3275      * Secondary IP ranges.
3276      * </pre>
3277      *
3278      * <code>
3279      * repeated .google.cloud.compute.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 136658915;
3280      * </code>
3281      */
3282     public com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange.Builder
getSecondaryIpRangesBuilder(int index)3283         getSecondaryIpRangesBuilder(int index) {
3284       return getSecondaryIpRangesFieldBuilder().getBuilder(index);
3285     }
3286     /**
3287      *
3288      *
3289      * <pre>
3290      * Secondary IP ranges.
3291      * </pre>
3292      *
3293      * <code>
3294      * repeated .google.cloud.compute.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 136658915;
3295      * </code>
3296      */
3297     public com.google.cloud.compute.v1.UsableSubnetworkSecondaryRangeOrBuilder
getSecondaryIpRangesOrBuilder(int index)3298         getSecondaryIpRangesOrBuilder(int index) {
3299       if (secondaryIpRangesBuilder_ == null) {
3300         return secondaryIpRanges_.get(index);
3301       } else {
3302         return secondaryIpRangesBuilder_.getMessageOrBuilder(index);
3303       }
3304     }
3305     /**
3306      *
3307      *
3308      * <pre>
3309      * Secondary IP ranges.
3310      * </pre>
3311      *
3312      * <code>
3313      * repeated .google.cloud.compute.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 136658915;
3314      * </code>
3315      */
3316     public java.util.List<
3317             ? extends com.google.cloud.compute.v1.UsableSubnetworkSecondaryRangeOrBuilder>
getSecondaryIpRangesOrBuilderList()3318         getSecondaryIpRangesOrBuilderList() {
3319       if (secondaryIpRangesBuilder_ != null) {
3320         return secondaryIpRangesBuilder_.getMessageOrBuilderList();
3321       } else {
3322         return java.util.Collections.unmodifiableList(secondaryIpRanges_);
3323       }
3324     }
3325     /**
3326      *
3327      *
3328      * <pre>
3329      * Secondary IP ranges.
3330      * </pre>
3331      *
3332      * <code>
3333      * repeated .google.cloud.compute.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 136658915;
3334      * </code>
3335      */
3336     public com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange.Builder
addSecondaryIpRangesBuilder()3337         addSecondaryIpRangesBuilder() {
3338       return getSecondaryIpRangesFieldBuilder()
3339           .addBuilder(
3340               com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange.getDefaultInstance());
3341     }
3342     /**
3343      *
3344      *
3345      * <pre>
3346      * Secondary IP ranges.
3347      * </pre>
3348      *
3349      * <code>
3350      * repeated .google.cloud.compute.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 136658915;
3351      * </code>
3352      */
3353     public com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange.Builder
addSecondaryIpRangesBuilder(int index)3354         addSecondaryIpRangesBuilder(int index) {
3355       return getSecondaryIpRangesFieldBuilder()
3356           .addBuilder(
3357               index,
3358               com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange.getDefaultInstance());
3359     }
3360     /**
3361      *
3362      *
3363      * <pre>
3364      * Secondary IP ranges.
3365      * </pre>
3366      *
3367      * <code>
3368      * repeated .google.cloud.compute.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 136658915;
3369      * </code>
3370      */
3371     public java.util.List<com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange.Builder>
getSecondaryIpRangesBuilderList()3372         getSecondaryIpRangesBuilderList() {
3373       return getSecondaryIpRangesFieldBuilder().getBuilderList();
3374     }
3375 
3376     private com.google.protobuf.RepeatedFieldBuilderV3<
3377             com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange,
3378             com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange.Builder,
3379             com.google.cloud.compute.v1.UsableSubnetworkSecondaryRangeOrBuilder>
getSecondaryIpRangesFieldBuilder()3380         getSecondaryIpRangesFieldBuilder() {
3381       if (secondaryIpRangesBuilder_ == null) {
3382         secondaryIpRangesBuilder_ =
3383             new com.google.protobuf.RepeatedFieldBuilderV3<
3384                 com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange,
3385                 com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange.Builder,
3386                 com.google.cloud.compute.v1.UsableSubnetworkSecondaryRangeOrBuilder>(
3387                 secondaryIpRanges_,
3388                 ((bitField0_ & 0x00000080) != 0),
3389                 getParentForChildren(),
3390                 isClean());
3391         secondaryIpRanges_ = null;
3392       }
3393       return secondaryIpRangesBuilder_;
3394     }
3395 
3396     private java.lang.Object stackType_ = "";
3397     /**
3398      *
3399      *
3400      * <pre>
3401      * The stack type for the subnet. If set to IPV4_ONLY, new VMs in the subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4_ONLY is used. This field can be both set at resource creation time and updated using patch.
3402      * Check the StackType enum for the list of possible values.
3403      * </pre>
3404      *
3405      * <code>optional string stack_type = 425908881;</code>
3406      *
3407      * @return Whether the stackType field is set.
3408      */
hasStackType()3409     public boolean hasStackType() {
3410       return ((bitField0_ & 0x00000100) != 0);
3411     }
3412     /**
3413      *
3414      *
3415      * <pre>
3416      * The stack type for the subnet. If set to IPV4_ONLY, new VMs in the subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4_ONLY is used. This field can be both set at resource creation time and updated using patch.
3417      * Check the StackType enum for the list of possible values.
3418      * </pre>
3419      *
3420      * <code>optional string stack_type = 425908881;</code>
3421      *
3422      * @return The stackType.
3423      */
getStackType()3424     public java.lang.String getStackType() {
3425       java.lang.Object ref = stackType_;
3426       if (!(ref instanceof java.lang.String)) {
3427         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3428         java.lang.String s = bs.toStringUtf8();
3429         stackType_ = s;
3430         return s;
3431       } else {
3432         return (java.lang.String) ref;
3433       }
3434     }
3435     /**
3436      *
3437      *
3438      * <pre>
3439      * The stack type for the subnet. If set to IPV4_ONLY, new VMs in the subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4_ONLY is used. This field can be both set at resource creation time and updated using patch.
3440      * Check the StackType enum for the list of possible values.
3441      * </pre>
3442      *
3443      * <code>optional string stack_type = 425908881;</code>
3444      *
3445      * @return The bytes for stackType.
3446      */
getStackTypeBytes()3447     public com.google.protobuf.ByteString getStackTypeBytes() {
3448       java.lang.Object ref = stackType_;
3449       if (ref instanceof String) {
3450         com.google.protobuf.ByteString b =
3451             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3452         stackType_ = b;
3453         return b;
3454       } else {
3455         return (com.google.protobuf.ByteString) ref;
3456       }
3457     }
3458     /**
3459      *
3460      *
3461      * <pre>
3462      * The stack type for the subnet. If set to IPV4_ONLY, new VMs in the subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4_ONLY is used. This field can be both set at resource creation time and updated using patch.
3463      * Check the StackType enum for the list of possible values.
3464      * </pre>
3465      *
3466      * <code>optional string stack_type = 425908881;</code>
3467      *
3468      * @param value The stackType to set.
3469      * @return This builder for chaining.
3470      */
setStackType(java.lang.String value)3471     public Builder setStackType(java.lang.String value) {
3472       if (value == null) {
3473         throw new NullPointerException();
3474       }
3475       stackType_ = value;
3476       bitField0_ |= 0x00000100;
3477       onChanged();
3478       return this;
3479     }
3480     /**
3481      *
3482      *
3483      * <pre>
3484      * The stack type for the subnet. If set to IPV4_ONLY, new VMs in the subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4_ONLY is used. This field can be both set at resource creation time and updated using patch.
3485      * Check the StackType enum for the list of possible values.
3486      * </pre>
3487      *
3488      * <code>optional string stack_type = 425908881;</code>
3489      *
3490      * @return This builder for chaining.
3491      */
clearStackType()3492     public Builder clearStackType() {
3493       stackType_ = getDefaultInstance().getStackType();
3494       bitField0_ = (bitField0_ & ~0x00000100);
3495       onChanged();
3496       return this;
3497     }
3498     /**
3499      *
3500      *
3501      * <pre>
3502      * The stack type for the subnet. If set to IPV4_ONLY, new VMs in the subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4_ONLY is used. This field can be both set at resource creation time and updated using patch.
3503      * Check the StackType enum for the list of possible values.
3504      * </pre>
3505      *
3506      * <code>optional string stack_type = 425908881;</code>
3507      *
3508      * @param value The bytes for stackType to set.
3509      * @return This builder for chaining.
3510      */
setStackTypeBytes(com.google.protobuf.ByteString value)3511     public Builder setStackTypeBytes(com.google.protobuf.ByteString value) {
3512       if (value == null) {
3513         throw new NullPointerException();
3514       }
3515       checkByteStringIsUtf8(value);
3516       stackType_ = value;
3517       bitField0_ |= 0x00000100;
3518       onChanged();
3519       return this;
3520     }
3521 
3522     private java.lang.Object subnetwork_ = "";
3523     /**
3524      *
3525      *
3526      * <pre>
3527      * Subnetwork URL.
3528      * </pre>
3529      *
3530      * <code>optional string subnetwork = 307827694;</code>
3531      *
3532      * @return Whether the subnetwork field is set.
3533      */
hasSubnetwork()3534     public boolean hasSubnetwork() {
3535       return ((bitField0_ & 0x00000200) != 0);
3536     }
3537     /**
3538      *
3539      *
3540      * <pre>
3541      * Subnetwork URL.
3542      * </pre>
3543      *
3544      * <code>optional string subnetwork = 307827694;</code>
3545      *
3546      * @return The subnetwork.
3547      */
getSubnetwork()3548     public java.lang.String getSubnetwork() {
3549       java.lang.Object ref = subnetwork_;
3550       if (!(ref instanceof java.lang.String)) {
3551         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3552         java.lang.String s = bs.toStringUtf8();
3553         subnetwork_ = s;
3554         return s;
3555       } else {
3556         return (java.lang.String) ref;
3557       }
3558     }
3559     /**
3560      *
3561      *
3562      * <pre>
3563      * Subnetwork URL.
3564      * </pre>
3565      *
3566      * <code>optional string subnetwork = 307827694;</code>
3567      *
3568      * @return The bytes for subnetwork.
3569      */
getSubnetworkBytes()3570     public com.google.protobuf.ByteString getSubnetworkBytes() {
3571       java.lang.Object ref = subnetwork_;
3572       if (ref instanceof String) {
3573         com.google.protobuf.ByteString b =
3574             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3575         subnetwork_ = b;
3576         return b;
3577       } else {
3578         return (com.google.protobuf.ByteString) ref;
3579       }
3580     }
3581     /**
3582      *
3583      *
3584      * <pre>
3585      * Subnetwork URL.
3586      * </pre>
3587      *
3588      * <code>optional string subnetwork = 307827694;</code>
3589      *
3590      * @param value The subnetwork to set.
3591      * @return This builder for chaining.
3592      */
setSubnetwork(java.lang.String value)3593     public Builder setSubnetwork(java.lang.String value) {
3594       if (value == null) {
3595         throw new NullPointerException();
3596       }
3597       subnetwork_ = value;
3598       bitField0_ |= 0x00000200;
3599       onChanged();
3600       return this;
3601     }
3602     /**
3603      *
3604      *
3605      * <pre>
3606      * Subnetwork URL.
3607      * </pre>
3608      *
3609      * <code>optional string subnetwork = 307827694;</code>
3610      *
3611      * @return This builder for chaining.
3612      */
clearSubnetwork()3613     public Builder clearSubnetwork() {
3614       subnetwork_ = getDefaultInstance().getSubnetwork();
3615       bitField0_ = (bitField0_ & ~0x00000200);
3616       onChanged();
3617       return this;
3618     }
3619     /**
3620      *
3621      *
3622      * <pre>
3623      * Subnetwork URL.
3624      * </pre>
3625      *
3626      * <code>optional string subnetwork = 307827694;</code>
3627      *
3628      * @param value The bytes for subnetwork to set.
3629      * @return This builder for chaining.
3630      */
setSubnetworkBytes(com.google.protobuf.ByteString value)3631     public Builder setSubnetworkBytes(com.google.protobuf.ByteString value) {
3632       if (value == null) {
3633         throw new NullPointerException();
3634       }
3635       checkByteStringIsUtf8(value);
3636       subnetwork_ = value;
3637       bitField0_ |= 0x00000200;
3638       onChanged();
3639       return this;
3640     }
3641 
3642     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)3643     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
3644       return super.setUnknownFields(unknownFields);
3645     }
3646 
3647     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3648     public final Builder mergeUnknownFields(
3649         final com.google.protobuf.UnknownFieldSet unknownFields) {
3650       return super.mergeUnknownFields(unknownFields);
3651     }
3652 
3653     // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.UsableSubnetwork)
3654   }
3655 
3656   // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.UsableSubnetwork)
3657   private static final com.google.cloud.compute.v1.UsableSubnetwork DEFAULT_INSTANCE;
3658 
3659   static {
3660     DEFAULT_INSTANCE = new com.google.cloud.compute.v1.UsableSubnetwork();
3661   }
3662 
getDefaultInstance()3663   public static com.google.cloud.compute.v1.UsableSubnetwork getDefaultInstance() {
3664     return DEFAULT_INSTANCE;
3665   }
3666 
3667   private static final com.google.protobuf.Parser<UsableSubnetwork> PARSER =
3668       new com.google.protobuf.AbstractParser<UsableSubnetwork>() {
3669         @java.lang.Override
3670         public UsableSubnetwork parsePartialFrom(
3671             com.google.protobuf.CodedInputStream input,
3672             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3673             throws com.google.protobuf.InvalidProtocolBufferException {
3674           Builder builder = newBuilder();
3675           try {
3676             builder.mergeFrom(input, extensionRegistry);
3677           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3678             throw e.setUnfinishedMessage(builder.buildPartial());
3679           } catch (com.google.protobuf.UninitializedMessageException e) {
3680             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
3681           } catch (java.io.IOException e) {
3682             throw new com.google.protobuf.InvalidProtocolBufferException(e)
3683                 .setUnfinishedMessage(builder.buildPartial());
3684           }
3685           return builder.buildPartial();
3686         }
3687       };
3688 
parser()3689   public static com.google.protobuf.Parser<UsableSubnetwork> parser() {
3690     return PARSER;
3691   }
3692 
3693   @java.lang.Override
getParserForType()3694   public com.google.protobuf.Parser<UsableSubnetwork> getParserForType() {
3695     return PARSER;
3696   }
3697 
3698   @java.lang.Override
getDefaultInstanceForType()3699   public com.google.cloud.compute.v1.UsableSubnetwork getDefaultInstanceForType() {
3700     return DEFAULT_INSTANCE;
3701   }
3702 }
3703