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