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