• 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/container/v1/cluster_service.proto
18 
19 package com.google.container.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * UsableSubnetwork resource returns the subnetwork name, its associated network
26  * and the primary CIDR range.
27  * </pre>
28  *
29  * Protobuf type {@code google.container.v1.UsableSubnetwork}
30  */
31 public final class UsableSubnetwork extends com.google.protobuf.GeneratedMessageV3
32     implements
33     // @@protoc_insertion_point(message_implements:google.container.v1.UsableSubnetwork)
34     UsableSubnetworkOrBuilder {
35   private static final long serialVersionUID = 0L;
36   // Use UsableSubnetwork.newBuilder() to construct.
UsableSubnetwork(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37   private UsableSubnetwork(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
38     super(builder);
39   }
40 
UsableSubnetwork()41   private UsableSubnetwork() {
42     subnetwork_ = "";
43     network_ = "";
44     ipCidrRange_ = "";
45     secondaryIpRanges_ = java.util.Collections.emptyList();
46     statusMessage_ = "";
47   }
48 
49   @java.lang.Override
50   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)51   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
52     return new UsableSubnetwork();
53   }
54 
55   @java.lang.Override
getUnknownFields()56   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
57     return this.unknownFields;
58   }
59 
getDescriptor()60   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
61     return com.google.container.v1.ClusterServiceProto
62         .internal_static_google_container_v1_UsableSubnetwork_descriptor;
63   }
64 
65   @java.lang.Override
66   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()67       internalGetFieldAccessorTable() {
68     return com.google.container.v1.ClusterServiceProto
69         .internal_static_google_container_v1_UsableSubnetwork_fieldAccessorTable
70         .ensureFieldAccessorsInitialized(
71             com.google.container.v1.UsableSubnetwork.class,
72             com.google.container.v1.UsableSubnetwork.Builder.class);
73   }
74 
75   public static final int SUBNETWORK_FIELD_NUMBER = 1;
76 
77   @SuppressWarnings("serial")
78   private volatile java.lang.Object subnetwork_ = "";
79   /**
80    *
81    *
82    * <pre>
83    * Subnetwork Name.
84    * Example: projects/my-project/regions/us-central1/subnetworks/my-subnet
85    * </pre>
86    *
87    * <code>string subnetwork = 1;</code>
88    *
89    * @return The subnetwork.
90    */
91   @java.lang.Override
getSubnetwork()92   public java.lang.String getSubnetwork() {
93     java.lang.Object ref = subnetwork_;
94     if (ref instanceof java.lang.String) {
95       return (java.lang.String) ref;
96     } else {
97       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
98       java.lang.String s = bs.toStringUtf8();
99       subnetwork_ = s;
100       return s;
101     }
102   }
103   /**
104    *
105    *
106    * <pre>
107    * Subnetwork Name.
108    * Example: projects/my-project/regions/us-central1/subnetworks/my-subnet
109    * </pre>
110    *
111    * <code>string subnetwork = 1;</code>
112    *
113    * @return The bytes for subnetwork.
114    */
115   @java.lang.Override
getSubnetworkBytes()116   public com.google.protobuf.ByteString getSubnetworkBytes() {
117     java.lang.Object ref = subnetwork_;
118     if (ref instanceof java.lang.String) {
119       com.google.protobuf.ByteString b =
120           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
121       subnetwork_ = b;
122       return b;
123     } else {
124       return (com.google.protobuf.ByteString) ref;
125     }
126   }
127 
128   public static final int NETWORK_FIELD_NUMBER = 2;
129 
130   @SuppressWarnings("serial")
131   private volatile java.lang.Object network_ = "";
132   /**
133    *
134    *
135    * <pre>
136    * Network Name.
137    * Example: projects/my-project/global/networks/my-network
138    * </pre>
139    *
140    * <code>string network = 2;</code>
141    *
142    * @return The network.
143    */
144   @java.lang.Override
getNetwork()145   public java.lang.String getNetwork() {
146     java.lang.Object ref = network_;
147     if (ref instanceof java.lang.String) {
148       return (java.lang.String) ref;
149     } else {
150       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
151       java.lang.String s = bs.toStringUtf8();
152       network_ = s;
153       return s;
154     }
155   }
156   /**
157    *
158    *
159    * <pre>
160    * Network Name.
161    * Example: projects/my-project/global/networks/my-network
162    * </pre>
163    *
164    * <code>string network = 2;</code>
165    *
166    * @return The bytes for network.
167    */
168   @java.lang.Override
getNetworkBytes()169   public com.google.protobuf.ByteString getNetworkBytes() {
170     java.lang.Object ref = network_;
171     if (ref instanceof java.lang.String) {
172       com.google.protobuf.ByteString b =
173           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
174       network_ = b;
175       return b;
176     } else {
177       return (com.google.protobuf.ByteString) ref;
178     }
179   }
180 
181   public static final int IP_CIDR_RANGE_FIELD_NUMBER = 3;
182 
183   @SuppressWarnings("serial")
184   private volatile java.lang.Object ipCidrRange_ = "";
185   /**
186    *
187    *
188    * <pre>
189    * The range of internal addresses that are owned by this subnetwork.
190    * </pre>
191    *
192    * <code>string ip_cidr_range = 3;</code>
193    *
194    * @return The ipCidrRange.
195    */
196   @java.lang.Override
getIpCidrRange()197   public java.lang.String getIpCidrRange() {
198     java.lang.Object ref = ipCidrRange_;
199     if (ref instanceof java.lang.String) {
200       return (java.lang.String) ref;
201     } else {
202       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
203       java.lang.String s = bs.toStringUtf8();
204       ipCidrRange_ = s;
205       return s;
206     }
207   }
208   /**
209    *
210    *
211    * <pre>
212    * The range of internal addresses that are owned by this subnetwork.
213    * </pre>
214    *
215    * <code>string ip_cidr_range = 3;</code>
216    *
217    * @return The bytes for ipCidrRange.
218    */
219   @java.lang.Override
getIpCidrRangeBytes()220   public com.google.protobuf.ByteString getIpCidrRangeBytes() {
221     java.lang.Object ref = ipCidrRange_;
222     if (ref instanceof java.lang.String) {
223       com.google.protobuf.ByteString b =
224           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
225       ipCidrRange_ = b;
226       return b;
227     } else {
228       return (com.google.protobuf.ByteString) ref;
229     }
230   }
231 
232   public static final int SECONDARY_IP_RANGES_FIELD_NUMBER = 4;
233 
234   @SuppressWarnings("serial")
235   private java.util.List<com.google.container.v1.UsableSubnetworkSecondaryRange> secondaryIpRanges_;
236   /**
237    *
238    *
239    * <pre>
240    * Secondary IP ranges.
241    * </pre>
242    *
243    * <code>repeated .google.container.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
244    * </code>
245    */
246   @java.lang.Override
247   public java.util.List<com.google.container.v1.UsableSubnetworkSecondaryRange>
getSecondaryIpRangesList()248       getSecondaryIpRangesList() {
249     return secondaryIpRanges_;
250   }
251   /**
252    *
253    *
254    * <pre>
255    * Secondary IP ranges.
256    * </pre>
257    *
258    * <code>repeated .google.container.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
259    * </code>
260    */
261   @java.lang.Override
262   public java.util.List<? extends com.google.container.v1.UsableSubnetworkSecondaryRangeOrBuilder>
getSecondaryIpRangesOrBuilderList()263       getSecondaryIpRangesOrBuilderList() {
264     return secondaryIpRanges_;
265   }
266   /**
267    *
268    *
269    * <pre>
270    * Secondary IP ranges.
271    * </pre>
272    *
273    * <code>repeated .google.container.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
274    * </code>
275    */
276   @java.lang.Override
getSecondaryIpRangesCount()277   public int getSecondaryIpRangesCount() {
278     return secondaryIpRanges_.size();
279   }
280   /**
281    *
282    *
283    * <pre>
284    * Secondary IP ranges.
285    * </pre>
286    *
287    * <code>repeated .google.container.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
288    * </code>
289    */
290   @java.lang.Override
getSecondaryIpRanges(int index)291   public com.google.container.v1.UsableSubnetworkSecondaryRange getSecondaryIpRanges(int index) {
292     return secondaryIpRanges_.get(index);
293   }
294   /**
295    *
296    *
297    * <pre>
298    * Secondary IP ranges.
299    * </pre>
300    *
301    * <code>repeated .google.container.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
302    * </code>
303    */
304   @java.lang.Override
305   public com.google.container.v1.UsableSubnetworkSecondaryRangeOrBuilder
getSecondaryIpRangesOrBuilder(int index)306       getSecondaryIpRangesOrBuilder(int index) {
307     return secondaryIpRanges_.get(index);
308   }
309 
310   public static final int STATUS_MESSAGE_FIELD_NUMBER = 5;
311 
312   @SuppressWarnings("serial")
313   private volatile java.lang.Object statusMessage_ = "";
314   /**
315    *
316    *
317    * <pre>
318    * A human readable status message representing the reasons for cases where
319    * the caller cannot use the secondary ranges under the subnet. For example if
320    * the secondary_ip_ranges is empty due to a permission issue, an insufficient
321    * permission message will be given by status_message.
322    * </pre>
323    *
324    * <code>string status_message = 5;</code>
325    *
326    * @return The statusMessage.
327    */
328   @java.lang.Override
getStatusMessage()329   public java.lang.String getStatusMessage() {
330     java.lang.Object ref = statusMessage_;
331     if (ref instanceof java.lang.String) {
332       return (java.lang.String) ref;
333     } else {
334       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
335       java.lang.String s = bs.toStringUtf8();
336       statusMessage_ = s;
337       return s;
338     }
339   }
340   /**
341    *
342    *
343    * <pre>
344    * A human readable status message representing the reasons for cases where
345    * the caller cannot use the secondary ranges under the subnet. For example if
346    * the secondary_ip_ranges is empty due to a permission issue, an insufficient
347    * permission message will be given by status_message.
348    * </pre>
349    *
350    * <code>string status_message = 5;</code>
351    *
352    * @return The bytes for statusMessage.
353    */
354   @java.lang.Override
getStatusMessageBytes()355   public com.google.protobuf.ByteString getStatusMessageBytes() {
356     java.lang.Object ref = statusMessage_;
357     if (ref instanceof java.lang.String) {
358       com.google.protobuf.ByteString b =
359           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
360       statusMessage_ = b;
361       return b;
362     } else {
363       return (com.google.protobuf.ByteString) ref;
364     }
365   }
366 
367   private byte memoizedIsInitialized = -1;
368 
369   @java.lang.Override
isInitialized()370   public final boolean isInitialized() {
371     byte isInitialized = memoizedIsInitialized;
372     if (isInitialized == 1) return true;
373     if (isInitialized == 0) return false;
374 
375     memoizedIsInitialized = 1;
376     return true;
377   }
378 
379   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)380   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
381     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetwork_)) {
382       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subnetwork_);
383     }
384     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) {
385       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, network_);
386     }
387     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipCidrRange_)) {
388       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ipCidrRange_);
389     }
390     for (int i = 0; i < secondaryIpRanges_.size(); i++) {
391       output.writeMessage(4, secondaryIpRanges_.get(i));
392     }
393     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) {
394       com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusMessage_);
395     }
396     getUnknownFields().writeTo(output);
397   }
398 
399   @java.lang.Override
getSerializedSize()400   public int getSerializedSize() {
401     int size = memoizedSize;
402     if (size != -1) return size;
403 
404     size = 0;
405     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetwork_)) {
406       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subnetwork_);
407     }
408     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) {
409       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, network_);
410     }
411     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipCidrRange_)) {
412       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, ipCidrRange_);
413     }
414     for (int i = 0; i < secondaryIpRanges_.size(); i++) {
415       size +=
416           com.google.protobuf.CodedOutputStream.computeMessageSize(4, secondaryIpRanges_.get(i));
417     }
418     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) {
419       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusMessage_);
420     }
421     size += getUnknownFields().getSerializedSize();
422     memoizedSize = size;
423     return size;
424   }
425 
426   @java.lang.Override
equals(final java.lang.Object obj)427   public boolean equals(final java.lang.Object obj) {
428     if (obj == this) {
429       return true;
430     }
431     if (!(obj instanceof com.google.container.v1.UsableSubnetwork)) {
432       return super.equals(obj);
433     }
434     com.google.container.v1.UsableSubnetwork other = (com.google.container.v1.UsableSubnetwork) obj;
435 
436     if (!getSubnetwork().equals(other.getSubnetwork())) return false;
437     if (!getNetwork().equals(other.getNetwork())) return false;
438     if (!getIpCidrRange().equals(other.getIpCidrRange())) return false;
439     if (!getSecondaryIpRangesList().equals(other.getSecondaryIpRangesList())) return false;
440     if (!getStatusMessage().equals(other.getStatusMessage())) return false;
441     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
442     return true;
443   }
444 
445   @java.lang.Override
hashCode()446   public int hashCode() {
447     if (memoizedHashCode != 0) {
448       return memoizedHashCode;
449     }
450     int hash = 41;
451     hash = (19 * hash) + getDescriptor().hashCode();
452     hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER;
453     hash = (53 * hash) + getSubnetwork().hashCode();
454     hash = (37 * hash) + NETWORK_FIELD_NUMBER;
455     hash = (53 * hash) + getNetwork().hashCode();
456     hash = (37 * hash) + IP_CIDR_RANGE_FIELD_NUMBER;
457     hash = (53 * hash) + getIpCidrRange().hashCode();
458     if (getSecondaryIpRangesCount() > 0) {
459       hash = (37 * hash) + SECONDARY_IP_RANGES_FIELD_NUMBER;
460       hash = (53 * hash) + getSecondaryIpRangesList().hashCode();
461     }
462     hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER;
463     hash = (53 * hash) + getStatusMessage().hashCode();
464     hash = (29 * hash) + getUnknownFields().hashCode();
465     memoizedHashCode = hash;
466     return hash;
467   }
468 
parseFrom(java.nio.ByteBuffer data)469   public static com.google.container.v1.UsableSubnetwork parseFrom(java.nio.ByteBuffer data)
470       throws com.google.protobuf.InvalidProtocolBufferException {
471     return PARSER.parseFrom(data);
472   }
473 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)474   public static com.google.container.v1.UsableSubnetwork parseFrom(
475       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
476       throws com.google.protobuf.InvalidProtocolBufferException {
477     return PARSER.parseFrom(data, extensionRegistry);
478   }
479 
parseFrom( com.google.protobuf.ByteString data)480   public static com.google.container.v1.UsableSubnetwork parseFrom(
481       com.google.protobuf.ByteString data)
482       throws com.google.protobuf.InvalidProtocolBufferException {
483     return PARSER.parseFrom(data);
484   }
485 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)486   public static com.google.container.v1.UsableSubnetwork parseFrom(
487       com.google.protobuf.ByteString data,
488       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
489       throws com.google.protobuf.InvalidProtocolBufferException {
490     return PARSER.parseFrom(data, extensionRegistry);
491   }
492 
parseFrom(byte[] data)493   public static com.google.container.v1.UsableSubnetwork parseFrom(byte[] data)
494       throws com.google.protobuf.InvalidProtocolBufferException {
495     return PARSER.parseFrom(data);
496   }
497 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)498   public static com.google.container.v1.UsableSubnetwork parseFrom(
499       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
500       throws com.google.protobuf.InvalidProtocolBufferException {
501     return PARSER.parseFrom(data, extensionRegistry);
502   }
503 
parseFrom(java.io.InputStream input)504   public static com.google.container.v1.UsableSubnetwork parseFrom(java.io.InputStream input)
505       throws java.io.IOException {
506     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
507   }
508 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)509   public static com.google.container.v1.UsableSubnetwork parseFrom(
510       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
511       throws java.io.IOException {
512     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
513         PARSER, input, extensionRegistry);
514   }
515 
parseDelimitedFrom( java.io.InputStream input)516   public static com.google.container.v1.UsableSubnetwork parseDelimitedFrom(
517       java.io.InputStream input) throws java.io.IOException {
518     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
519   }
520 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)521   public static com.google.container.v1.UsableSubnetwork parseDelimitedFrom(
522       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
523       throws java.io.IOException {
524     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
525         PARSER, input, extensionRegistry);
526   }
527 
parseFrom( com.google.protobuf.CodedInputStream input)528   public static com.google.container.v1.UsableSubnetwork parseFrom(
529       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
530     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
531   }
532 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)533   public static com.google.container.v1.UsableSubnetwork parseFrom(
534       com.google.protobuf.CodedInputStream input,
535       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
536       throws java.io.IOException {
537     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
538         PARSER, input, extensionRegistry);
539   }
540 
541   @java.lang.Override
newBuilderForType()542   public Builder newBuilderForType() {
543     return newBuilder();
544   }
545 
newBuilder()546   public static Builder newBuilder() {
547     return DEFAULT_INSTANCE.toBuilder();
548   }
549 
newBuilder(com.google.container.v1.UsableSubnetwork prototype)550   public static Builder newBuilder(com.google.container.v1.UsableSubnetwork prototype) {
551     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
552   }
553 
554   @java.lang.Override
toBuilder()555   public Builder toBuilder() {
556     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
557   }
558 
559   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)560   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
561     Builder builder = new Builder(parent);
562     return builder;
563   }
564   /**
565    *
566    *
567    * <pre>
568    * UsableSubnetwork resource returns the subnetwork name, its associated network
569    * and the primary CIDR range.
570    * </pre>
571    *
572    * Protobuf type {@code google.container.v1.UsableSubnetwork}
573    */
574   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
575       implements
576       // @@protoc_insertion_point(builder_implements:google.container.v1.UsableSubnetwork)
577       com.google.container.v1.UsableSubnetworkOrBuilder {
getDescriptor()578     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
579       return com.google.container.v1.ClusterServiceProto
580           .internal_static_google_container_v1_UsableSubnetwork_descriptor;
581     }
582 
583     @java.lang.Override
584     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()585         internalGetFieldAccessorTable() {
586       return com.google.container.v1.ClusterServiceProto
587           .internal_static_google_container_v1_UsableSubnetwork_fieldAccessorTable
588           .ensureFieldAccessorsInitialized(
589               com.google.container.v1.UsableSubnetwork.class,
590               com.google.container.v1.UsableSubnetwork.Builder.class);
591     }
592 
593     // Construct using com.google.container.v1.UsableSubnetwork.newBuilder()
Builder()594     private Builder() {}
595 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)596     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
597       super(parent);
598     }
599 
600     @java.lang.Override
clear()601     public Builder clear() {
602       super.clear();
603       bitField0_ = 0;
604       subnetwork_ = "";
605       network_ = "";
606       ipCidrRange_ = "";
607       if (secondaryIpRangesBuilder_ == null) {
608         secondaryIpRanges_ = java.util.Collections.emptyList();
609       } else {
610         secondaryIpRanges_ = null;
611         secondaryIpRangesBuilder_.clear();
612       }
613       bitField0_ = (bitField0_ & ~0x00000008);
614       statusMessage_ = "";
615       return this;
616     }
617 
618     @java.lang.Override
getDescriptorForType()619     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
620       return com.google.container.v1.ClusterServiceProto
621           .internal_static_google_container_v1_UsableSubnetwork_descriptor;
622     }
623 
624     @java.lang.Override
getDefaultInstanceForType()625     public com.google.container.v1.UsableSubnetwork getDefaultInstanceForType() {
626       return com.google.container.v1.UsableSubnetwork.getDefaultInstance();
627     }
628 
629     @java.lang.Override
build()630     public com.google.container.v1.UsableSubnetwork build() {
631       com.google.container.v1.UsableSubnetwork result = buildPartial();
632       if (!result.isInitialized()) {
633         throw newUninitializedMessageException(result);
634       }
635       return result;
636     }
637 
638     @java.lang.Override
buildPartial()639     public com.google.container.v1.UsableSubnetwork buildPartial() {
640       com.google.container.v1.UsableSubnetwork result =
641           new com.google.container.v1.UsableSubnetwork(this);
642       buildPartialRepeatedFields(result);
643       if (bitField0_ != 0) {
644         buildPartial0(result);
645       }
646       onBuilt();
647       return result;
648     }
649 
buildPartialRepeatedFields(com.google.container.v1.UsableSubnetwork result)650     private void buildPartialRepeatedFields(com.google.container.v1.UsableSubnetwork result) {
651       if (secondaryIpRangesBuilder_ == null) {
652         if (((bitField0_ & 0x00000008) != 0)) {
653           secondaryIpRanges_ = java.util.Collections.unmodifiableList(secondaryIpRanges_);
654           bitField0_ = (bitField0_ & ~0x00000008);
655         }
656         result.secondaryIpRanges_ = secondaryIpRanges_;
657       } else {
658         result.secondaryIpRanges_ = secondaryIpRangesBuilder_.build();
659       }
660     }
661 
buildPartial0(com.google.container.v1.UsableSubnetwork result)662     private void buildPartial0(com.google.container.v1.UsableSubnetwork result) {
663       int from_bitField0_ = bitField0_;
664       if (((from_bitField0_ & 0x00000001) != 0)) {
665         result.subnetwork_ = subnetwork_;
666       }
667       if (((from_bitField0_ & 0x00000002) != 0)) {
668         result.network_ = network_;
669       }
670       if (((from_bitField0_ & 0x00000004) != 0)) {
671         result.ipCidrRange_ = ipCidrRange_;
672       }
673       if (((from_bitField0_ & 0x00000010) != 0)) {
674         result.statusMessage_ = statusMessage_;
675       }
676     }
677 
678     @java.lang.Override
clone()679     public Builder clone() {
680       return super.clone();
681     }
682 
683     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)684     public Builder setField(
685         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
686       return super.setField(field, value);
687     }
688 
689     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)690     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
691       return super.clearField(field);
692     }
693 
694     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)695     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
696       return super.clearOneof(oneof);
697     }
698 
699     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)700     public Builder setRepeatedField(
701         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
702       return super.setRepeatedField(field, index, value);
703     }
704 
705     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)706     public Builder addRepeatedField(
707         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
708       return super.addRepeatedField(field, value);
709     }
710 
711     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)712     public Builder mergeFrom(com.google.protobuf.Message other) {
713       if (other instanceof com.google.container.v1.UsableSubnetwork) {
714         return mergeFrom((com.google.container.v1.UsableSubnetwork) other);
715       } else {
716         super.mergeFrom(other);
717         return this;
718       }
719     }
720 
mergeFrom(com.google.container.v1.UsableSubnetwork other)721     public Builder mergeFrom(com.google.container.v1.UsableSubnetwork other) {
722       if (other == com.google.container.v1.UsableSubnetwork.getDefaultInstance()) return this;
723       if (!other.getSubnetwork().isEmpty()) {
724         subnetwork_ = other.subnetwork_;
725         bitField0_ |= 0x00000001;
726         onChanged();
727       }
728       if (!other.getNetwork().isEmpty()) {
729         network_ = other.network_;
730         bitField0_ |= 0x00000002;
731         onChanged();
732       }
733       if (!other.getIpCidrRange().isEmpty()) {
734         ipCidrRange_ = other.ipCidrRange_;
735         bitField0_ |= 0x00000004;
736         onChanged();
737       }
738       if (secondaryIpRangesBuilder_ == null) {
739         if (!other.secondaryIpRanges_.isEmpty()) {
740           if (secondaryIpRanges_.isEmpty()) {
741             secondaryIpRanges_ = other.secondaryIpRanges_;
742             bitField0_ = (bitField0_ & ~0x00000008);
743           } else {
744             ensureSecondaryIpRangesIsMutable();
745             secondaryIpRanges_.addAll(other.secondaryIpRanges_);
746           }
747           onChanged();
748         }
749       } else {
750         if (!other.secondaryIpRanges_.isEmpty()) {
751           if (secondaryIpRangesBuilder_.isEmpty()) {
752             secondaryIpRangesBuilder_.dispose();
753             secondaryIpRangesBuilder_ = null;
754             secondaryIpRanges_ = other.secondaryIpRanges_;
755             bitField0_ = (bitField0_ & ~0x00000008);
756             secondaryIpRangesBuilder_ =
757                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
758                     ? getSecondaryIpRangesFieldBuilder()
759                     : null;
760           } else {
761             secondaryIpRangesBuilder_.addAllMessages(other.secondaryIpRanges_);
762           }
763         }
764       }
765       if (!other.getStatusMessage().isEmpty()) {
766         statusMessage_ = other.statusMessage_;
767         bitField0_ |= 0x00000010;
768         onChanged();
769       }
770       this.mergeUnknownFields(other.getUnknownFields());
771       onChanged();
772       return this;
773     }
774 
775     @java.lang.Override
isInitialized()776     public final boolean isInitialized() {
777       return true;
778     }
779 
780     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)781     public Builder mergeFrom(
782         com.google.protobuf.CodedInputStream input,
783         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
784         throws java.io.IOException {
785       if (extensionRegistry == null) {
786         throw new java.lang.NullPointerException();
787       }
788       try {
789         boolean done = false;
790         while (!done) {
791           int tag = input.readTag();
792           switch (tag) {
793             case 0:
794               done = true;
795               break;
796             case 10:
797               {
798                 subnetwork_ = input.readStringRequireUtf8();
799                 bitField0_ |= 0x00000001;
800                 break;
801               } // case 10
802             case 18:
803               {
804                 network_ = input.readStringRequireUtf8();
805                 bitField0_ |= 0x00000002;
806                 break;
807               } // case 18
808             case 26:
809               {
810                 ipCidrRange_ = input.readStringRequireUtf8();
811                 bitField0_ |= 0x00000004;
812                 break;
813               } // case 26
814             case 34:
815               {
816                 com.google.container.v1.UsableSubnetworkSecondaryRange m =
817                     input.readMessage(
818                         com.google.container.v1.UsableSubnetworkSecondaryRange.parser(),
819                         extensionRegistry);
820                 if (secondaryIpRangesBuilder_ == null) {
821                   ensureSecondaryIpRangesIsMutable();
822                   secondaryIpRanges_.add(m);
823                 } else {
824                   secondaryIpRangesBuilder_.addMessage(m);
825                 }
826                 break;
827               } // case 34
828             case 42:
829               {
830                 statusMessage_ = input.readStringRequireUtf8();
831                 bitField0_ |= 0x00000010;
832                 break;
833               } // case 42
834             default:
835               {
836                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
837                   done = true; // was an endgroup tag
838                 }
839                 break;
840               } // default:
841           } // switch (tag)
842         } // while (!done)
843       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
844         throw e.unwrapIOException();
845       } finally {
846         onChanged();
847       } // finally
848       return this;
849     }
850 
851     private int bitField0_;
852 
853     private java.lang.Object subnetwork_ = "";
854     /**
855      *
856      *
857      * <pre>
858      * Subnetwork Name.
859      * Example: projects/my-project/regions/us-central1/subnetworks/my-subnet
860      * </pre>
861      *
862      * <code>string subnetwork = 1;</code>
863      *
864      * @return The subnetwork.
865      */
getSubnetwork()866     public java.lang.String getSubnetwork() {
867       java.lang.Object ref = subnetwork_;
868       if (!(ref instanceof java.lang.String)) {
869         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
870         java.lang.String s = bs.toStringUtf8();
871         subnetwork_ = s;
872         return s;
873       } else {
874         return (java.lang.String) ref;
875       }
876     }
877     /**
878      *
879      *
880      * <pre>
881      * Subnetwork Name.
882      * Example: projects/my-project/regions/us-central1/subnetworks/my-subnet
883      * </pre>
884      *
885      * <code>string subnetwork = 1;</code>
886      *
887      * @return The bytes for subnetwork.
888      */
getSubnetworkBytes()889     public com.google.protobuf.ByteString getSubnetworkBytes() {
890       java.lang.Object ref = subnetwork_;
891       if (ref instanceof String) {
892         com.google.protobuf.ByteString b =
893             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
894         subnetwork_ = b;
895         return b;
896       } else {
897         return (com.google.protobuf.ByteString) ref;
898       }
899     }
900     /**
901      *
902      *
903      * <pre>
904      * Subnetwork Name.
905      * Example: projects/my-project/regions/us-central1/subnetworks/my-subnet
906      * </pre>
907      *
908      * <code>string subnetwork = 1;</code>
909      *
910      * @param value The subnetwork to set.
911      * @return This builder for chaining.
912      */
setSubnetwork(java.lang.String value)913     public Builder setSubnetwork(java.lang.String value) {
914       if (value == null) {
915         throw new NullPointerException();
916       }
917       subnetwork_ = value;
918       bitField0_ |= 0x00000001;
919       onChanged();
920       return this;
921     }
922     /**
923      *
924      *
925      * <pre>
926      * Subnetwork Name.
927      * Example: projects/my-project/regions/us-central1/subnetworks/my-subnet
928      * </pre>
929      *
930      * <code>string subnetwork = 1;</code>
931      *
932      * @return This builder for chaining.
933      */
clearSubnetwork()934     public Builder clearSubnetwork() {
935       subnetwork_ = getDefaultInstance().getSubnetwork();
936       bitField0_ = (bitField0_ & ~0x00000001);
937       onChanged();
938       return this;
939     }
940     /**
941      *
942      *
943      * <pre>
944      * Subnetwork Name.
945      * Example: projects/my-project/regions/us-central1/subnetworks/my-subnet
946      * </pre>
947      *
948      * <code>string subnetwork = 1;</code>
949      *
950      * @param value The bytes for subnetwork to set.
951      * @return This builder for chaining.
952      */
setSubnetworkBytes(com.google.protobuf.ByteString value)953     public Builder setSubnetworkBytes(com.google.protobuf.ByteString value) {
954       if (value == null) {
955         throw new NullPointerException();
956       }
957       checkByteStringIsUtf8(value);
958       subnetwork_ = value;
959       bitField0_ |= 0x00000001;
960       onChanged();
961       return this;
962     }
963 
964     private java.lang.Object network_ = "";
965     /**
966      *
967      *
968      * <pre>
969      * Network Name.
970      * Example: projects/my-project/global/networks/my-network
971      * </pre>
972      *
973      * <code>string network = 2;</code>
974      *
975      * @return The network.
976      */
getNetwork()977     public java.lang.String getNetwork() {
978       java.lang.Object ref = network_;
979       if (!(ref instanceof java.lang.String)) {
980         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
981         java.lang.String s = bs.toStringUtf8();
982         network_ = s;
983         return s;
984       } else {
985         return (java.lang.String) ref;
986       }
987     }
988     /**
989      *
990      *
991      * <pre>
992      * Network Name.
993      * Example: projects/my-project/global/networks/my-network
994      * </pre>
995      *
996      * <code>string network = 2;</code>
997      *
998      * @return The bytes for network.
999      */
getNetworkBytes()1000     public com.google.protobuf.ByteString getNetworkBytes() {
1001       java.lang.Object ref = network_;
1002       if (ref instanceof String) {
1003         com.google.protobuf.ByteString b =
1004             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1005         network_ = b;
1006         return b;
1007       } else {
1008         return (com.google.protobuf.ByteString) ref;
1009       }
1010     }
1011     /**
1012      *
1013      *
1014      * <pre>
1015      * Network Name.
1016      * Example: projects/my-project/global/networks/my-network
1017      * </pre>
1018      *
1019      * <code>string network = 2;</code>
1020      *
1021      * @param value The network to set.
1022      * @return This builder for chaining.
1023      */
setNetwork(java.lang.String value)1024     public Builder setNetwork(java.lang.String value) {
1025       if (value == null) {
1026         throw new NullPointerException();
1027       }
1028       network_ = value;
1029       bitField0_ |= 0x00000002;
1030       onChanged();
1031       return this;
1032     }
1033     /**
1034      *
1035      *
1036      * <pre>
1037      * Network Name.
1038      * Example: projects/my-project/global/networks/my-network
1039      * </pre>
1040      *
1041      * <code>string network = 2;</code>
1042      *
1043      * @return This builder for chaining.
1044      */
clearNetwork()1045     public Builder clearNetwork() {
1046       network_ = getDefaultInstance().getNetwork();
1047       bitField0_ = (bitField0_ & ~0x00000002);
1048       onChanged();
1049       return this;
1050     }
1051     /**
1052      *
1053      *
1054      * <pre>
1055      * Network Name.
1056      * Example: projects/my-project/global/networks/my-network
1057      * </pre>
1058      *
1059      * <code>string network = 2;</code>
1060      *
1061      * @param value The bytes for network to set.
1062      * @return This builder for chaining.
1063      */
setNetworkBytes(com.google.protobuf.ByteString value)1064     public Builder setNetworkBytes(com.google.protobuf.ByteString value) {
1065       if (value == null) {
1066         throw new NullPointerException();
1067       }
1068       checkByteStringIsUtf8(value);
1069       network_ = value;
1070       bitField0_ |= 0x00000002;
1071       onChanged();
1072       return this;
1073     }
1074 
1075     private java.lang.Object ipCidrRange_ = "";
1076     /**
1077      *
1078      *
1079      * <pre>
1080      * The range of internal addresses that are owned by this subnetwork.
1081      * </pre>
1082      *
1083      * <code>string ip_cidr_range = 3;</code>
1084      *
1085      * @return The ipCidrRange.
1086      */
getIpCidrRange()1087     public java.lang.String getIpCidrRange() {
1088       java.lang.Object ref = ipCidrRange_;
1089       if (!(ref instanceof java.lang.String)) {
1090         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1091         java.lang.String s = bs.toStringUtf8();
1092         ipCidrRange_ = s;
1093         return s;
1094       } else {
1095         return (java.lang.String) ref;
1096       }
1097     }
1098     /**
1099      *
1100      *
1101      * <pre>
1102      * The range of internal addresses that are owned by this subnetwork.
1103      * </pre>
1104      *
1105      * <code>string ip_cidr_range = 3;</code>
1106      *
1107      * @return The bytes for ipCidrRange.
1108      */
getIpCidrRangeBytes()1109     public com.google.protobuf.ByteString getIpCidrRangeBytes() {
1110       java.lang.Object ref = ipCidrRange_;
1111       if (ref instanceof String) {
1112         com.google.protobuf.ByteString b =
1113             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1114         ipCidrRange_ = b;
1115         return b;
1116       } else {
1117         return (com.google.protobuf.ByteString) ref;
1118       }
1119     }
1120     /**
1121      *
1122      *
1123      * <pre>
1124      * The range of internal addresses that are owned by this subnetwork.
1125      * </pre>
1126      *
1127      * <code>string ip_cidr_range = 3;</code>
1128      *
1129      * @param value The ipCidrRange to set.
1130      * @return This builder for chaining.
1131      */
setIpCidrRange(java.lang.String value)1132     public Builder setIpCidrRange(java.lang.String value) {
1133       if (value == null) {
1134         throw new NullPointerException();
1135       }
1136       ipCidrRange_ = value;
1137       bitField0_ |= 0x00000004;
1138       onChanged();
1139       return this;
1140     }
1141     /**
1142      *
1143      *
1144      * <pre>
1145      * The range of internal addresses that are owned by this subnetwork.
1146      * </pre>
1147      *
1148      * <code>string ip_cidr_range = 3;</code>
1149      *
1150      * @return This builder for chaining.
1151      */
clearIpCidrRange()1152     public Builder clearIpCidrRange() {
1153       ipCidrRange_ = getDefaultInstance().getIpCidrRange();
1154       bitField0_ = (bitField0_ & ~0x00000004);
1155       onChanged();
1156       return this;
1157     }
1158     /**
1159      *
1160      *
1161      * <pre>
1162      * The range of internal addresses that are owned by this subnetwork.
1163      * </pre>
1164      *
1165      * <code>string ip_cidr_range = 3;</code>
1166      *
1167      * @param value The bytes for ipCidrRange to set.
1168      * @return This builder for chaining.
1169      */
setIpCidrRangeBytes(com.google.protobuf.ByteString value)1170     public Builder setIpCidrRangeBytes(com.google.protobuf.ByteString value) {
1171       if (value == null) {
1172         throw new NullPointerException();
1173       }
1174       checkByteStringIsUtf8(value);
1175       ipCidrRange_ = value;
1176       bitField0_ |= 0x00000004;
1177       onChanged();
1178       return this;
1179     }
1180 
1181     private java.util.List<com.google.container.v1.UsableSubnetworkSecondaryRange>
1182         secondaryIpRanges_ = java.util.Collections.emptyList();
1183 
ensureSecondaryIpRangesIsMutable()1184     private void ensureSecondaryIpRangesIsMutable() {
1185       if (!((bitField0_ & 0x00000008) != 0)) {
1186         secondaryIpRanges_ =
1187             new java.util.ArrayList<com.google.container.v1.UsableSubnetworkSecondaryRange>(
1188                 secondaryIpRanges_);
1189         bitField0_ |= 0x00000008;
1190       }
1191     }
1192 
1193     private com.google.protobuf.RepeatedFieldBuilderV3<
1194             com.google.container.v1.UsableSubnetworkSecondaryRange,
1195             com.google.container.v1.UsableSubnetworkSecondaryRange.Builder,
1196             com.google.container.v1.UsableSubnetworkSecondaryRangeOrBuilder>
1197         secondaryIpRangesBuilder_;
1198 
1199     /**
1200      *
1201      *
1202      * <pre>
1203      * Secondary IP ranges.
1204      * </pre>
1205      *
1206      * <code>repeated .google.container.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
1207      * </code>
1208      */
1209     public java.util.List<com.google.container.v1.UsableSubnetworkSecondaryRange>
getSecondaryIpRangesList()1210         getSecondaryIpRangesList() {
1211       if (secondaryIpRangesBuilder_ == null) {
1212         return java.util.Collections.unmodifiableList(secondaryIpRanges_);
1213       } else {
1214         return secondaryIpRangesBuilder_.getMessageList();
1215       }
1216     }
1217     /**
1218      *
1219      *
1220      * <pre>
1221      * Secondary IP ranges.
1222      * </pre>
1223      *
1224      * <code>repeated .google.container.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
1225      * </code>
1226      */
getSecondaryIpRangesCount()1227     public int getSecondaryIpRangesCount() {
1228       if (secondaryIpRangesBuilder_ == null) {
1229         return secondaryIpRanges_.size();
1230       } else {
1231         return secondaryIpRangesBuilder_.getCount();
1232       }
1233     }
1234     /**
1235      *
1236      *
1237      * <pre>
1238      * Secondary IP ranges.
1239      * </pre>
1240      *
1241      * <code>repeated .google.container.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
1242      * </code>
1243      */
getSecondaryIpRanges(int index)1244     public com.google.container.v1.UsableSubnetworkSecondaryRange getSecondaryIpRanges(int index) {
1245       if (secondaryIpRangesBuilder_ == null) {
1246         return secondaryIpRanges_.get(index);
1247       } else {
1248         return secondaryIpRangesBuilder_.getMessage(index);
1249       }
1250     }
1251     /**
1252      *
1253      *
1254      * <pre>
1255      * Secondary IP ranges.
1256      * </pre>
1257      *
1258      * <code>repeated .google.container.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
1259      * </code>
1260      */
setSecondaryIpRanges( int index, com.google.container.v1.UsableSubnetworkSecondaryRange value)1261     public Builder setSecondaryIpRanges(
1262         int index, com.google.container.v1.UsableSubnetworkSecondaryRange value) {
1263       if (secondaryIpRangesBuilder_ == null) {
1264         if (value == null) {
1265           throw new NullPointerException();
1266         }
1267         ensureSecondaryIpRangesIsMutable();
1268         secondaryIpRanges_.set(index, value);
1269         onChanged();
1270       } else {
1271         secondaryIpRangesBuilder_.setMessage(index, value);
1272       }
1273       return this;
1274     }
1275     /**
1276      *
1277      *
1278      * <pre>
1279      * Secondary IP ranges.
1280      * </pre>
1281      *
1282      * <code>repeated .google.container.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
1283      * </code>
1284      */
setSecondaryIpRanges( int index, com.google.container.v1.UsableSubnetworkSecondaryRange.Builder builderForValue)1285     public Builder setSecondaryIpRanges(
1286         int index, com.google.container.v1.UsableSubnetworkSecondaryRange.Builder builderForValue) {
1287       if (secondaryIpRangesBuilder_ == null) {
1288         ensureSecondaryIpRangesIsMutable();
1289         secondaryIpRanges_.set(index, builderForValue.build());
1290         onChanged();
1291       } else {
1292         secondaryIpRangesBuilder_.setMessage(index, builderForValue.build());
1293       }
1294       return this;
1295     }
1296     /**
1297      *
1298      *
1299      * <pre>
1300      * Secondary IP ranges.
1301      * </pre>
1302      *
1303      * <code>repeated .google.container.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
1304      * </code>
1305      */
addSecondaryIpRanges( com.google.container.v1.UsableSubnetworkSecondaryRange value)1306     public Builder addSecondaryIpRanges(
1307         com.google.container.v1.UsableSubnetworkSecondaryRange value) {
1308       if (secondaryIpRangesBuilder_ == null) {
1309         if (value == null) {
1310           throw new NullPointerException();
1311         }
1312         ensureSecondaryIpRangesIsMutable();
1313         secondaryIpRanges_.add(value);
1314         onChanged();
1315       } else {
1316         secondaryIpRangesBuilder_.addMessage(value);
1317       }
1318       return this;
1319     }
1320     /**
1321      *
1322      *
1323      * <pre>
1324      * Secondary IP ranges.
1325      * </pre>
1326      *
1327      * <code>repeated .google.container.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
1328      * </code>
1329      */
addSecondaryIpRanges( int index, com.google.container.v1.UsableSubnetworkSecondaryRange value)1330     public Builder addSecondaryIpRanges(
1331         int index, com.google.container.v1.UsableSubnetworkSecondaryRange value) {
1332       if (secondaryIpRangesBuilder_ == null) {
1333         if (value == null) {
1334           throw new NullPointerException();
1335         }
1336         ensureSecondaryIpRangesIsMutable();
1337         secondaryIpRanges_.add(index, value);
1338         onChanged();
1339       } else {
1340         secondaryIpRangesBuilder_.addMessage(index, value);
1341       }
1342       return this;
1343     }
1344     /**
1345      *
1346      *
1347      * <pre>
1348      * Secondary IP ranges.
1349      * </pre>
1350      *
1351      * <code>repeated .google.container.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
1352      * </code>
1353      */
addSecondaryIpRanges( com.google.container.v1.UsableSubnetworkSecondaryRange.Builder builderForValue)1354     public Builder addSecondaryIpRanges(
1355         com.google.container.v1.UsableSubnetworkSecondaryRange.Builder builderForValue) {
1356       if (secondaryIpRangesBuilder_ == null) {
1357         ensureSecondaryIpRangesIsMutable();
1358         secondaryIpRanges_.add(builderForValue.build());
1359         onChanged();
1360       } else {
1361         secondaryIpRangesBuilder_.addMessage(builderForValue.build());
1362       }
1363       return this;
1364     }
1365     /**
1366      *
1367      *
1368      * <pre>
1369      * Secondary IP ranges.
1370      * </pre>
1371      *
1372      * <code>repeated .google.container.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
1373      * </code>
1374      */
addSecondaryIpRanges( int index, com.google.container.v1.UsableSubnetworkSecondaryRange.Builder builderForValue)1375     public Builder addSecondaryIpRanges(
1376         int index, com.google.container.v1.UsableSubnetworkSecondaryRange.Builder builderForValue) {
1377       if (secondaryIpRangesBuilder_ == null) {
1378         ensureSecondaryIpRangesIsMutable();
1379         secondaryIpRanges_.add(index, builderForValue.build());
1380         onChanged();
1381       } else {
1382         secondaryIpRangesBuilder_.addMessage(index, builderForValue.build());
1383       }
1384       return this;
1385     }
1386     /**
1387      *
1388      *
1389      * <pre>
1390      * Secondary IP ranges.
1391      * </pre>
1392      *
1393      * <code>repeated .google.container.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
1394      * </code>
1395      */
addAllSecondaryIpRanges( java.lang.Iterable<? extends com.google.container.v1.UsableSubnetworkSecondaryRange> values)1396     public Builder addAllSecondaryIpRanges(
1397         java.lang.Iterable<? extends com.google.container.v1.UsableSubnetworkSecondaryRange>
1398             values) {
1399       if (secondaryIpRangesBuilder_ == null) {
1400         ensureSecondaryIpRangesIsMutable();
1401         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, secondaryIpRanges_);
1402         onChanged();
1403       } else {
1404         secondaryIpRangesBuilder_.addAllMessages(values);
1405       }
1406       return this;
1407     }
1408     /**
1409      *
1410      *
1411      * <pre>
1412      * Secondary IP ranges.
1413      * </pre>
1414      *
1415      * <code>repeated .google.container.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
1416      * </code>
1417      */
clearSecondaryIpRanges()1418     public Builder clearSecondaryIpRanges() {
1419       if (secondaryIpRangesBuilder_ == null) {
1420         secondaryIpRanges_ = java.util.Collections.emptyList();
1421         bitField0_ = (bitField0_ & ~0x00000008);
1422         onChanged();
1423       } else {
1424         secondaryIpRangesBuilder_.clear();
1425       }
1426       return this;
1427     }
1428     /**
1429      *
1430      *
1431      * <pre>
1432      * Secondary IP ranges.
1433      * </pre>
1434      *
1435      * <code>repeated .google.container.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
1436      * </code>
1437      */
removeSecondaryIpRanges(int index)1438     public Builder removeSecondaryIpRanges(int index) {
1439       if (secondaryIpRangesBuilder_ == null) {
1440         ensureSecondaryIpRangesIsMutable();
1441         secondaryIpRanges_.remove(index);
1442         onChanged();
1443       } else {
1444         secondaryIpRangesBuilder_.remove(index);
1445       }
1446       return this;
1447     }
1448     /**
1449      *
1450      *
1451      * <pre>
1452      * Secondary IP ranges.
1453      * </pre>
1454      *
1455      * <code>repeated .google.container.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
1456      * </code>
1457      */
1458     public com.google.container.v1.UsableSubnetworkSecondaryRange.Builder
getSecondaryIpRangesBuilder(int index)1459         getSecondaryIpRangesBuilder(int index) {
1460       return getSecondaryIpRangesFieldBuilder().getBuilder(index);
1461     }
1462     /**
1463      *
1464      *
1465      * <pre>
1466      * Secondary IP ranges.
1467      * </pre>
1468      *
1469      * <code>repeated .google.container.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
1470      * </code>
1471      */
1472     public com.google.container.v1.UsableSubnetworkSecondaryRangeOrBuilder
getSecondaryIpRangesOrBuilder(int index)1473         getSecondaryIpRangesOrBuilder(int index) {
1474       if (secondaryIpRangesBuilder_ == null) {
1475         return secondaryIpRanges_.get(index);
1476       } else {
1477         return secondaryIpRangesBuilder_.getMessageOrBuilder(index);
1478       }
1479     }
1480     /**
1481      *
1482      *
1483      * <pre>
1484      * Secondary IP ranges.
1485      * </pre>
1486      *
1487      * <code>repeated .google.container.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
1488      * </code>
1489      */
1490     public java.util.List<? extends com.google.container.v1.UsableSubnetworkSecondaryRangeOrBuilder>
getSecondaryIpRangesOrBuilderList()1491         getSecondaryIpRangesOrBuilderList() {
1492       if (secondaryIpRangesBuilder_ != null) {
1493         return secondaryIpRangesBuilder_.getMessageOrBuilderList();
1494       } else {
1495         return java.util.Collections.unmodifiableList(secondaryIpRanges_);
1496       }
1497     }
1498     /**
1499      *
1500      *
1501      * <pre>
1502      * Secondary IP ranges.
1503      * </pre>
1504      *
1505      * <code>repeated .google.container.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
1506      * </code>
1507      */
1508     public com.google.container.v1.UsableSubnetworkSecondaryRange.Builder
addSecondaryIpRangesBuilder()1509         addSecondaryIpRangesBuilder() {
1510       return getSecondaryIpRangesFieldBuilder()
1511           .addBuilder(com.google.container.v1.UsableSubnetworkSecondaryRange.getDefaultInstance());
1512     }
1513     /**
1514      *
1515      *
1516      * <pre>
1517      * Secondary IP ranges.
1518      * </pre>
1519      *
1520      * <code>repeated .google.container.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
1521      * </code>
1522      */
1523     public com.google.container.v1.UsableSubnetworkSecondaryRange.Builder
addSecondaryIpRangesBuilder(int index)1524         addSecondaryIpRangesBuilder(int index) {
1525       return getSecondaryIpRangesFieldBuilder()
1526           .addBuilder(
1527               index, com.google.container.v1.UsableSubnetworkSecondaryRange.getDefaultInstance());
1528     }
1529     /**
1530      *
1531      *
1532      * <pre>
1533      * Secondary IP ranges.
1534      * </pre>
1535      *
1536      * <code>repeated .google.container.v1.UsableSubnetworkSecondaryRange secondary_ip_ranges = 4;
1537      * </code>
1538      */
1539     public java.util.List<com.google.container.v1.UsableSubnetworkSecondaryRange.Builder>
getSecondaryIpRangesBuilderList()1540         getSecondaryIpRangesBuilderList() {
1541       return getSecondaryIpRangesFieldBuilder().getBuilderList();
1542     }
1543 
1544     private com.google.protobuf.RepeatedFieldBuilderV3<
1545             com.google.container.v1.UsableSubnetworkSecondaryRange,
1546             com.google.container.v1.UsableSubnetworkSecondaryRange.Builder,
1547             com.google.container.v1.UsableSubnetworkSecondaryRangeOrBuilder>
getSecondaryIpRangesFieldBuilder()1548         getSecondaryIpRangesFieldBuilder() {
1549       if (secondaryIpRangesBuilder_ == null) {
1550         secondaryIpRangesBuilder_ =
1551             new com.google.protobuf.RepeatedFieldBuilderV3<
1552                 com.google.container.v1.UsableSubnetworkSecondaryRange,
1553                 com.google.container.v1.UsableSubnetworkSecondaryRange.Builder,
1554                 com.google.container.v1.UsableSubnetworkSecondaryRangeOrBuilder>(
1555                 secondaryIpRanges_,
1556                 ((bitField0_ & 0x00000008) != 0),
1557                 getParentForChildren(),
1558                 isClean());
1559         secondaryIpRanges_ = null;
1560       }
1561       return secondaryIpRangesBuilder_;
1562     }
1563 
1564     private java.lang.Object statusMessage_ = "";
1565     /**
1566      *
1567      *
1568      * <pre>
1569      * A human readable status message representing the reasons for cases where
1570      * the caller cannot use the secondary ranges under the subnet. For example if
1571      * the secondary_ip_ranges is empty due to a permission issue, an insufficient
1572      * permission message will be given by status_message.
1573      * </pre>
1574      *
1575      * <code>string status_message = 5;</code>
1576      *
1577      * @return The statusMessage.
1578      */
getStatusMessage()1579     public java.lang.String getStatusMessage() {
1580       java.lang.Object ref = statusMessage_;
1581       if (!(ref instanceof java.lang.String)) {
1582         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1583         java.lang.String s = bs.toStringUtf8();
1584         statusMessage_ = s;
1585         return s;
1586       } else {
1587         return (java.lang.String) ref;
1588       }
1589     }
1590     /**
1591      *
1592      *
1593      * <pre>
1594      * A human readable status message representing the reasons for cases where
1595      * the caller cannot use the secondary ranges under the subnet. For example if
1596      * the secondary_ip_ranges is empty due to a permission issue, an insufficient
1597      * permission message will be given by status_message.
1598      * </pre>
1599      *
1600      * <code>string status_message = 5;</code>
1601      *
1602      * @return The bytes for statusMessage.
1603      */
getStatusMessageBytes()1604     public com.google.protobuf.ByteString getStatusMessageBytes() {
1605       java.lang.Object ref = statusMessage_;
1606       if (ref instanceof String) {
1607         com.google.protobuf.ByteString b =
1608             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1609         statusMessage_ = b;
1610         return b;
1611       } else {
1612         return (com.google.protobuf.ByteString) ref;
1613       }
1614     }
1615     /**
1616      *
1617      *
1618      * <pre>
1619      * A human readable status message representing the reasons for cases where
1620      * the caller cannot use the secondary ranges under the subnet. For example if
1621      * the secondary_ip_ranges is empty due to a permission issue, an insufficient
1622      * permission message will be given by status_message.
1623      * </pre>
1624      *
1625      * <code>string status_message = 5;</code>
1626      *
1627      * @param value The statusMessage to set.
1628      * @return This builder for chaining.
1629      */
setStatusMessage(java.lang.String value)1630     public Builder setStatusMessage(java.lang.String value) {
1631       if (value == null) {
1632         throw new NullPointerException();
1633       }
1634       statusMessage_ = value;
1635       bitField0_ |= 0x00000010;
1636       onChanged();
1637       return this;
1638     }
1639     /**
1640      *
1641      *
1642      * <pre>
1643      * A human readable status message representing the reasons for cases where
1644      * the caller cannot use the secondary ranges under the subnet. For example if
1645      * the secondary_ip_ranges is empty due to a permission issue, an insufficient
1646      * permission message will be given by status_message.
1647      * </pre>
1648      *
1649      * <code>string status_message = 5;</code>
1650      *
1651      * @return This builder for chaining.
1652      */
clearStatusMessage()1653     public Builder clearStatusMessage() {
1654       statusMessage_ = getDefaultInstance().getStatusMessage();
1655       bitField0_ = (bitField0_ & ~0x00000010);
1656       onChanged();
1657       return this;
1658     }
1659     /**
1660      *
1661      *
1662      * <pre>
1663      * A human readable status message representing the reasons for cases where
1664      * the caller cannot use the secondary ranges under the subnet. For example if
1665      * the secondary_ip_ranges is empty due to a permission issue, an insufficient
1666      * permission message will be given by status_message.
1667      * </pre>
1668      *
1669      * <code>string status_message = 5;</code>
1670      *
1671      * @param value The bytes for statusMessage to set.
1672      * @return This builder for chaining.
1673      */
setStatusMessageBytes(com.google.protobuf.ByteString value)1674     public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) {
1675       if (value == null) {
1676         throw new NullPointerException();
1677       }
1678       checkByteStringIsUtf8(value);
1679       statusMessage_ = value;
1680       bitField0_ |= 0x00000010;
1681       onChanged();
1682       return this;
1683     }
1684 
1685     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1686     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1687       return super.setUnknownFields(unknownFields);
1688     }
1689 
1690     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1691     public final Builder mergeUnknownFields(
1692         final com.google.protobuf.UnknownFieldSet unknownFields) {
1693       return super.mergeUnknownFields(unknownFields);
1694     }
1695 
1696     // @@protoc_insertion_point(builder_scope:google.container.v1.UsableSubnetwork)
1697   }
1698 
1699   // @@protoc_insertion_point(class_scope:google.container.v1.UsableSubnetwork)
1700   private static final com.google.container.v1.UsableSubnetwork DEFAULT_INSTANCE;
1701 
1702   static {
1703     DEFAULT_INSTANCE = new com.google.container.v1.UsableSubnetwork();
1704   }
1705 
getDefaultInstance()1706   public static com.google.container.v1.UsableSubnetwork getDefaultInstance() {
1707     return DEFAULT_INSTANCE;
1708   }
1709 
1710   private static final com.google.protobuf.Parser<UsableSubnetwork> PARSER =
1711       new com.google.protobuf.AbstractParser<UsableSubnetwork>() {
1712         @java.lang.Override
1713         public UsableSubnetwork parsePartialFrom(
1714             com.google.protobuf.CodedInputStream input,
1715             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1716             throws com.google.protobuf.InvalidProtocolBufferException {
1717           Builder builder = newBuilder();
1718           try {
1719             builder.mergeFrom(input, extensionRegistry);
1720           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1721             throw e.setUnfinishedMessage(builder.buildPartial());
1722           } catch (com.google.protobuf.UninitializedMessageException e) {
1723             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1724           } catch (java.io.IOException e) {
1725             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1726                 .setUnfinishedMessage(builder.buildPartial());
1727           }
1728           return builder.buildPartial();
1729         }
1730       };
1731 
parser()1732   public static com.google.protobuf.Parser<UsableSubnetwork> parser() {
1733     return PARSER;
1734   }
1735 
1736   @java.lang.Override
getParserForType()1737   public com.google.protobuf.Parser<UsableSubnetwork> getParserForType() {
1738     return PARSER;
1739   }
1740 
1741   @java.lang.Override
getDefaultInstanceForType()1742   public com.google.container.v1.UsableSubnetwork getDefaultInstanceForType() {
1743     return DEFAULT_INSTANCE;
1744   }
1745 }
1746