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