• 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 Cloud VPN Tunnel resource. For more information about VPN, read the the Cloud VPN Overview.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.compute.v1.VpnTunnel}
29  */
30 public final class VpnTunnel extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.VpnTunnel)
33     VpnTunnelOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use VpnTunnel.newBuilder() to construct.
VpnTunnel(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private VpnTunnel(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
VpnTunnel()40   private VpnTunnel() {
41     creationTimestamp_ = "";
42     description_ = "";
43     detailedStatus_ = "";
44     kind_ = "";
45     localTrafficSelector_ = com.google.protobuf.LazyStringArrayList.EMPTY;
46     name_ = "";
47     peerExternalGateway_ = "";
48     peerGcpGateway_ = "";
49     peerIp_ = "";
50     region_ = "";
51     remoteTrafficSelector_ = com.google.protobuf.LazyStringArrayList.EMPTY;
52     router_ = "";
53     selfLink_ = "";
54     sharedSecret_ = "";
55     sharedSecretHash_ = "";
56     status_ = "";
57     targetVpnGateway_ = "";
58     vpnGateway_ = "";
59   }
60 
61   @java.lang.Override
62   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)63   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
64     return new VpnTunnel();
65   }
66 
67   @java.lang.Override
getUnknownFields()68   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
69     return this.unknownFields;
70   }
71 
getDescriptor()72   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
73     return com.google.cloud.compute.v1.Compute
74         .internal_static_google_cloud_compute_v1_VpnTunnel_descriptor;
75   }
76 
77   @java.lang.Override
78   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()79       internalGetFieldAccessorTable() {
80     return com.google.cloud.compute.v1.Compute
81         .internal_static_google_cloud_compute_v1_VpnTunnel_fieldAccessorTable
82         .ensureFieldAccessorsInitialized(
83             com.google.cloud.compute.v1.VpnTunnel.class,
84             com.google.cloud.compute.v1.VpnTunnel.Builder.class);
85   }
86 
87   /**
88    *
89    *
90    * <pre>
91    * [Output Only] The status of the VPN tunnel, which can be one of the following: - PROVISIONING: Resource is being allocated for the VPN tunnel. - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel. - FIRST_HANDSHAKE: Successful first handshake with the peer VPN. - ESTABLISHED: Secure session is successfully established with the peer VPN. - NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS - AUTHORIZATION_ERROR: Auth error (for example, bad shared secret). - NEGOTIATION_FAILURE: Handshake failed. - DEPROVISIONING: Resources are being deallocated for the VPN tunnel. - FAILED: Tunnel creation has failed and the tunnel is not ready to be used. - NO_INCOMING_PACKETS: No incoming packets from peer. - REJECTED: Tunnel configuration was rejected, can be result of being denied access. - ALLOCATING_RESOURCES: Cloud VPN is in the process of allocating all required resources. - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted for Classic VPN tunnels or the project is in frozen state. - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, probably behind NAT. - TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed for an HA-VPN tunnel.
92    * </pre>
93    *
94    * Protobuf enum {@code google.cloud.compute.v1.VpnTunnel.Status}
95    */
96   public enum Status implements com.google.protobuf.ProtocolMessageEnum {
97     /**
98      *
99      *
100      * <pre>
101      * A value indicating that the enum field is not set.
102      * </pre>
103      *
104      * <code>UNDEFINED_STATUS = 0;</code>
105      */
106     UNDEFINED_STATUS(0),
107     /**
108      *
109      *
110      * <pre>
111      * Cloud VPN is in the process of allocating all required resources (specifically, a borg task).
112      * </pre>
113      *
114      * <code>ALLOCATING_RESOURCES = 320922816;</code>
115      */
116     ALLOCATING_RESOURCES(320922816),
117     /**
118      *
119      *
120      * <pre>
121      * Auth error (e.g. bad shared secret).
122      * </pre>
123      *
124      * <code>AUTHORIZATION_ERROR = 23580290;</code>
125      */
126     AUTHORIZATION_ERROR(23580290),
127     /**
128      *
129      *
130      * <pre>
131      * Resources is being deallocated for the VPN tunnel.
132      * </pre>
133      *
134      * <code>DEPROVISIONING = 428935662;</code>
135      */
136     DEPROVISIONING(428935662),
137     /**
138      *
139      *
140      * <pre>
141      * Secure session is successfully established with peer VPN.
142      * </pre>
143      *
144      * <code>ESTABLISHED = 88852344;</code>
145      */
146     ESTABLISHED(88852344),
147     /**
148      *
149      *
150      * <pre>
151      * Tunnel creation has failed and the tunnel is not ready to be used.
152      * </pre>
153      *
154      * <code>FAILED = 455706685;</code>
155      */
156     FAILED(455706685),
157     /**
158      *
159      *
160      * <pre>
161      * Successful first handshake with peer VPN.
162      * </pre>
163      *
164      * <code>FIRST_HANDSHAKE = 191393000;</code>
165      */
166     FIRST_HANDSHAKE(191393000),
167     /**
168      *
169      *
170      * <pre>
171      * Handshake failed.
172      * </pre>
173      *
174      * <code>NEGOTIATION_FAILURE = 360325868;</code>
175      */
176     NEGOTIATION_FAILURE(360325868),
177     /**
178      *
179      *
180      * <pre>
181      * Deprecated, replaced by NO_INCOMING_PACKETS
182      * </pre>
183      *
184      * <code>NETWORK_ERROR = 193912951;</code>
185      */
186     NETWORK_ERROR(193912951),
187     /**
188      *
189      *
190      * <pre>
191      * No incoming packets from peer
192      * </pre>
193      *
194      * <code>NO_INCOMING_PACKETS = 119983216;</code>
195      */
196     NO_INCOMING_PACKETS(119983216),
197     /**
198      *
199      *
200      * <pre>
201      * Resource is being allocated for the VPN tunnel.
202      * </pre>
203      *
204      * <code>PROVISIONING = 290896621;</code>
205      */
206     PROVISIONING(290896621),
207     /**
208      *
209      *
210      * <pre>
211      * Tunnel configuration was rejected, can be result of being denylisted.
212      * </pre>
213      *
214      * <code>REJECTED = 174130302;</code>
215      */
216     REJECTED(174130302),
217     /**
218      *
219      *
220      * <pre>
221      * Tunnel is stopped due to its Forwarding Rules being deleted.
222      * </pre>
223      *
224      * <code>STOPPED = 444276141;</code>
225      */
226     STOPPED(444276141),
227     /**
228      *
229      *
230      * <pre>
231      * Waiting to receive all VPN-related configs from user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule and Route resources are needed to setup VPN tunnel.
232      * </pre>
233      *
234      * <code>WAITING_FOR_FULL_CONFIG = 41640522;</code>
235      */
236     WAITING_FOR_FULL_CONFIG(41640522),
237     UNRECOGNIZED(-1),
238     ;
239 
240     /**
241      *
242      *
243      * <pre>
244      * A value indicating that the enum field is not set.
245      * </pre>
246      *
247      * <code>UNDEFINED_STATUS = 0;</code>
248      */
249     public static final int UNDEFINED_STATUS_VALUE = 0;
250     /**
251      *
252      *
253      * <pre>
254      * Cloud VPN is in the process of allocating all required resources (specifically, a borg task).
255      * </pre>
256      *
257      * <code>ALLOCATING_RESOURCES = 320922816;</code>
258      */
259     public static final int ALLOCATING_RESOURCES_VALUE = 320922816;
260     /**
261      *
262      *
263      * <pre>
264      * Auth error (e.g. bad shared secret).
265      * </pre>
266      *
267      * <code>AUTHORIZATION_ERROR = 23580290;</code>
268      */
269     public static final int AUTHORIZATION_ERROR_VALUE = 23580290;
270     /**
271      *
272      *
273      * <pre>
274      * Resources is being deallocated for the VPN tunnel.
275      * </pre>
276      *
277      * <code>DEPROVISIONING = 428935662;</code>
278      */
279     public static final int DEPROVISIONING_VALUE = 428935662;
280     /**
281      *
282      *
283      * <pre>
284      * Secure session is successfully established with peer VPN.
285      * </pre>
286      *
287      * <code>ESTABLISHED = 88852344;</code>
288      */
289     public static final int ESTABLISHED_VALUE = 88852344;
290     /**
291      *
292      *
293      * <pre>
294      * Tunnel creation has failed and the tunnel is not ready to be used.
295      * </pre>
296      *
297      * <code>FAILED = 455706685;</code>
298      */
299     public static final int FAILED_VALUE = 455706685;
300     /**
301      *
302      *
303      * <pre>
304      * Successful first handshake with peer VPN.
305      * </pre>
306      *
307      * <code>FIRST_HANDSHAKE = 191393000;</code>
308      */
309     public static final int FIRST_HANDSHAKE_VALUE = 191393000;
310     /**
311      *
312      *
313      * <pre>
314      * Handshake failed.
315      * </pre>
316      *
317      * <code>NEGOTIATION_FAILURE = 360325868;</code>
318      */
319     public static final int NEGOTIATION_FAILURE_VALUE = 360325868;
320     /**
321      *
322      *
323      * <pre>
324      * Deprecated, replaced by NO_INCOMING_PACKETS
325      * </pre>
326      *
327      * <code>NETWORK_ERROR = 193912951;</code>
328      */
329     public static final int NETWORK_ERROR_VALUE = 193912951;
330     /**
331      *
332      *
333      * <pre>
334      * No incoming packets from peer
335      * </pre>
336      *
337      * <code>NO_INCOMING_PACKETS = 119983216;</code>
338      */
339     public static final int NO_INCOMING_PACKETS_VALUE = 119983216;
340     /**
341      *
342      *
343      * <pre>
344      * Resource is being allocated for the VPN tunnel.
345      * </pre>
346      *
347      * <code>PROVISIONING = 290896621;</code>
348      */
349     public static final int PROVISIONING_VALUE = 290896621;
350     /**
351      *
352      *
353      * <pre>
354      * Tunnel configuration was rejected, can be result of being denylisted.
355      * </pre>
356      *
357      * <code>REJECTED = 174130302;</code>
358      */
359     public static final int REJECTED_VALUE = 174130302;
360     /**
361      *
362      *
363      * <pre>
364      * Tunnel is stopped due to its Forwarding Rules being deleted.
365      * </pre>
366      *
367      * <code>STOPPED = 444276141;</code>
368      */
369     public static final int STOPPED_VALUE = 444276141;
370     /**
371      *
372      *
373      * <pre>
374      * Waiting to receive all VPN-related configs from user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule and Route resources are needed to setup VPN tunnel.
375      * </pre>
376      *
377      * <code>WAITING_FOR_FULL_CONFIG = 41640522;</code>
378      */
379     public static final int WAITING_FOR_FULL_CONFIG_VALUE = 41640522;
380 
getNumber()381     public final int getNumber() {
382       if (this == UNRECOGNIZED) {
383         throw new java.lang.IllegalArgumentException(
384             "Can't get the number of an unknown enum value.");
385       }
386       return value;
387     }
388 
389     /**
390      * @param value The numeric wire value of the corresponding enum entry.
391      * @return The enum associated with the given numeric wire value.
392      * @deprecated Use {@link #forNumber(int)} instead.
393      */
394     @java.lang.Deprecated
valueOf(int value)395     public static Status valueOf(int value) {
396       return forNumber(value);
397     }
398 
399     /**
400      * @param value The numeric wire value of the corresponding enum entry.
401      * @return The enum associated with the given numeric wire value.
402      */
forNumber(int value)403     public static Status forNumber(int value) {
404       switch (value) {
405         case 0:
406           return UNDEFINED_STATUS;
407         case 320922816:
408           return ALLOCATING_RESOURCES;
409         case 23580290:
410           return AUTHORIZATION_ERROR;
411         case 428935662:
412           return DEPROVISIONING;
413         case 88852344:
414           return ESTABLISHED;
415         case 455706685:
416           return FAILED;
417         case 191393000:
418           return FIRST_HANDSHAKE;
419         case 360325868:
420           return NEGOTIATION_FAILURE;
421         case 193912951:
422           return NETWORK_ERROR;
423         case 119983216:
424           return NO_INCOMING_PACKETS;
425         case 290896621:
426           return PROVISIONING;
427         case 174130302:
428           return REJECTED;
429         case 444276141:
430           return STOPPED;
431         case 41640522:
432           return WAITING_FOR_FULL_CONFIG;
433         default:
434           return null;
435       }
436     }
437 
internalGetValueMap()438     public static com.google.protobuf.Internal.EnumLiteMap<Status> internalGetValueMap() {
439       return internalValueMap;
440     }
441 
442     private static final com.google.protobuf.Internal.EnumLiteMap<Status> internalValueMap =
443         new com.google.protobuf.Internal.EnumLiteMap<Status>() {
444           public Status findValueByNumber(int number) {
445             return Status.forNumber(number);
446           }
447         };
448 
getValueDescriptor()449     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
450       if (this == UNRECOGNIZED) {
451         throw new java.lang.IllegalStateException(
452             "Can't get the descriptor of an unrecognized enum value.");
453       }
454       return getDescriptor().getValues().get(ordinal());
455     }
456 
getDescriptorForType()457     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
458       return getDescriptor();
459     }
460 
getDescriptor()461     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
462       return com.google.cloud.compute.v1.VpnTunnel.getDescriptor().getEnumTypes().get(0);
463     }
464 
465     private static final Status[] VALUES = values();
466 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)467     public static Status valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
468       if (desc.getType() != getDescriptor()) {
469         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
470       }
471       if (desc.getIndex() == -1) {
472         return UNRECOGNIZED;
473       }
474       return VALUES[desc.getIndex()];
475     }
476 
477     private final int value;
478 
Status(int value)479     private Status(int value) {
480       this.value = value;
481     }
482 
483     // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.VpnTunnel.Status)
484   }
485 
486   private int bitField0_;
487   public static final int CREATION_TIMESTAMP_FIELD_NUMBER = 30525366;
488 
489   @SuppressWarnings("serial")
490   private volatile java.lang.Object creationTimestamp_ = "";
491   /**
492    *
493    *
494    * <pre>
495    * [Output Only] Creation timestamp in RFC3339 text format.
496    * </pre>
497    *
498    * <code>optional string creation_timestamp = 30525366;</code>
499    *
500    * @return Whether the creationTimestamp field is set.
501    */
502   @java.lang.Override
hasCreationTimestamp()503   public boolean hasCreationTimestamp() {
504     return ((bitField0_ & 0x00000001) != 0);
505   }
506   /**
507    *
508    *
509    * <pre>
510    * [Output Only] Creation timestamp in RFC3339 text format.
511    * </pre>
512    *
513    * <code>optional string creation_timestamp = 30525366;</code>
514    *
515    * @return The creationTimestamp.
516    */
517   @java.lang.Override
getCreationTimestamp()518   public java.lang.String getCreationTimestamp() {
519     java.lang.Object ref = creationTimestamp_;
520     if (ref instanceof java.lang.String) {
521       return (java.lang.String) ref;
522     } else {
523       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
524       java.lang.String s = bs.toStringUtf8();
525       creationTimestamp_ = s;
526       return s;
527     }
528   }
529   /**
530    *
531    *
532    * <pre>
533    * [Output Only] Creation timestamp in RFC3339 text format.
534    * </pre>
535    *
536    * <code>optional string creation_timestamp = 30525366;</code>
537    *
538    * @return The bytes for creationTimestamp.
539    */
540   @java.lang.Override
getCreationTimestampBytes()541   public com.google.protobuf.ByteString getCreationTimestampBytes() {
542     java.lang.Object ref = creationTimestamp_;
543     if (ref instanceof java.lang.String) {
544       com.google.protobuf.ByteString b =
545           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
546       creationTimestamp_ = b;
547       return b;
548     } else {
549       return (com.google.protobuf.ByteString) ref;
550     }
551   }
552 
553   public static final int DESCRIPTION_FIELD_NUMBER = 422937596;
554 
555   @SuppressWarnings("serial")
556   private volatile java.lang.Object description_ = "";
557   /**
558    *
559    *
560    * <pre>
561    * An optional description of this resource. Provide this property when you create the resource.
562    * </pre>
563    *
564    * <code>optional string description = 422937596;</code>
565    *
566    * @return Whether the description field is set.
567    */
568   @java.lang.Override
hasDescription()569   public boolean hasDescription() {
570     return ((bitField0_ & 0x00000002) != 0);
571   }
572   /**
573    *
574    *
575    * <pre>
576    * An optional description of this resource. Provide this property when you create the resource.
577    * </pre>
578    *
579    * <code>optional string description = 422937596;</code>
580    *
581    * @return The description.
582    */
583   @java.lang.Override
getDescription()584   public java.lang.String getDescription() {
585     java.lang.Object ref = description_;
586     if (ref instanceof java.lang.String) {
587       return (java.lang.String) ref;
588     } else {
589       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
590       java.lang.String s = bs.toStringUtf8();
591       description_ = s;
592       return s;
593     }
594   }
595   /**
596    *
597    *
598    * <pre>
599    * An optional description of this resource. Provide this property when you create the resource.
600    * </pre>
601    *
602    * <code>optional string description = 422937596;</code>
603    *
604    * @return The bytes for description.
605    */
606   @java.lang.Override
getDescriptionBytes()607   public com.google.protobuf.ByteString getDescriptionBytes() {
608     java.lang.Object ref = description_;
609     if (ref instanceof java.lang.String) {
610       com.google.protobuf.ByteString b =
611           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
612       description_ = b;
613       return b;
614     } else {
615       return (com.google.protobuf.ByteString) ref;
616     }
617   }
618 
619   public static final int DETAILED_STATUS_FIELD_NUMBER = 333501025;
620 
621   @SuppressWarnings("serial")
622   private volatile java.lang.Object detailedStatus_ = "";
623   /**
624    *
625    *
626    * <pre>
627    * [Output Only] Detailed status message for the VPN tunnel.
628    * </pre>
629    *
630    * <code>optional string detailed_status = 333501025;</code>
631    *
632    * @return Whether the detailedStatus field is set.
633    */
634   @java.lang.Override
hasDetailedStatus()635   public boolean hasDetailedStatus() {
636     return ((bitField0_ & 0x00000004) != 0);
637   }
638   /**
639    *
640    *
641    * <pre>
642    * [Output Only] Detailed status message for the VPN tunnel.
643    * </pre>
644    *
645    * <code>optional string detailed_status = 333501025;</code>
646    *
647    * @return The detailedStatus.
648    */
649   @java.lang.Override
getDetailedStatus()650   public java.lang.String getDetailedStatus() {
651     java.lang.Object ref = detailedStatus_;
652     if (ref instanceof java.lang.String) {
653       return (java.lang.String) ref;
654     } else {
655       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
656       java.lang.String s = bs.toStringUtf8();
657       detailedStatus_ = s;
658       return s;
659     }
660   }
661   /**
662    *
663    *
664    * <pre>
665    * [Output Only] Detailed status message for the VPN tunnel.
666    * </pre>
667    *
668    * <code>optional string detailed_status = 333501025;</code>
669    *
670    * @return The bytes for detailedStatus.
671    */
672   @java.lang.Override
getDetailedStatusBytes()673   public com.google.protobuf.ByteString getDetailedStatusBytes() {
674     java.lang.Object ref = detailedStatus_;
675     if (ref instanceof java.lang.String) {
676       com.google.protobuf.ByteString b =
677           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
678       detailedStatus_ = b;
679       return b;
680     } else {
681       return (com.google.protobuf.ByteString) ref;
682     }
683   }
684 
685   public static final int ID_FIELD_NUMBER = 3355;
686   private long id_ = 0L;
687   /**
688    *
689    *
690    * <pre>
691    * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
692    * </pre>
693    *
694    * <code>optional uint64 id = 3355;</code>
695    *
696    * @return Whether the id field is set.
697    */
698   @java.lang.Override
hasId()699   public boolean hasId() {
700     return ((bitField0_ & 0x00000008) != 0);
701   }
702   /**
703    *
704    *
705    * <pre>
706    * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
707    * </pre>
708    *
709    * <code>optional uint64 id = 3355;</code>
710    *
711    * @return The id.
712    */
713   @java.lang.Override
getId()714   public long getId() {
715     return id_;
716   }
717 
718   public static final int IKE_VERSION_FIELD_NUMBER = 218376220;
719   private int ikeVersion_ = 0;
720   /**
721    *
722    *
723    * <pre>
724    * IKE protocol version to use when establishing the VPN tunnel with the peer VPN gateway. Acceptable IKE versions are 1 or 2. The default version is 2.
725    * </pre>
726    *
727    * <code>optional int32 ike_version = 218376220;</code>
728    *
729    * @return Whether the ikeVersion field is set.
730    */
731   @java.lang.Override
hasIkeVersion()732   public boolean hasIkeVersion() {
733     return ((bitField0_ & 0x00000010) != 0);
734   }
735   /**
736    *
737    *
738    * <pre>
739    * IKE protocol version to use when establishing the VPN tunnel with the peer VPN gateway. Acceptable IKE versions are 1 or 2. The default version is 2.
740    * </pre>
741    *
742    * <code>optional int32 ike_version = 218376220;</code>
743    *
744    * @return The ikeVersion.
745    */
746   @java.lang.Override
getIkeVersion()747   public int getIkeVersion() {
748     return ikeVersion_;
749   }
750 
751   public static final int KIND_FIELD_NUMBER = 3292052;
752 
753   @SuppressWarnings("serial")
754   private volatile java.lang.Object kind_ = "";
755   /**
756    *
757    *
758    * <pre>
759    * [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.
760    * </pre>
761    *
762    * <code>optional string kind = 3292052;</code>
763    *
764    * @return Whether the kind field is set.
765    */
766   @java.lang.Override
hasKind()767   public boolean hasKind() {
768     return ((bitField0_ & 0x00000020) != 0);
769   }
770   /**
771    *
772    *
773    * <pre>
774    * [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.
775    * </pre>
776    *
777    * <code>optional string kind = 3292052;</code>
778    *
779    * @return The kind.
780    */
781   @java.lang.Override
getKind()782   public java.lang.String getKind() {
783     java.lang.Object ref = kind_;
784     if (ref instanceof java.lang.String) {
785       return (java.lang.String) ref;
786     } else {
787       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
788       java.lang.String s = bs.toStringUtf8();
789       kind_ = s;
790       return s;
791     }
792   }
793   /**
794    *
795    *
796    * <pre>
797    * [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.
798    * </pre>
799    *
800    * <code>optional string kind = 3292052;</code>
801    *
802    * @return The bytes for kind.
803    */
804   @java.lang.Override
getKindBytes()805   public com.google.protobuf.ByteString getKindBytes() {
806     java.lang.Object ref = kind_;
807     if (ref instanceof java.lang.String) {
808       com.google.protobuf.ByteString b =
809           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
810       kind_ = b;
811       return b;
812     } else {
813       return (com.google.protobuf.ByteString) ref;
814     }
815   }
816 
817   public static final int LOCAL_TRAFFIC_SELECTOR_FIELD_NUMBER = 317314613;
818 
819   @SuppressWarnings("serial")
820   private com.google.protobuf.LazyStringList localTrafficSelector_;
821   /**
822    *
823    *
824    * <pre>
825    * Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported.
826    * </pre>
827    *
828    * <code>repeated string local_traffic_selector = 317314613;</code>
829    *
830    * @return A list containing the localTrafficSelector.
831    */
getLocalTrafficSelectorList()832   public com.google.protobuf.ProtocolStringList getLocalTrafficSelectorList() {
833     return localTrafficSelector_;
834   }
835   /**
836    *
837    *
838    * <pre>
839    * Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported.
840    * </pre>
841    *
842    * <code>repeated string local_traffic_selector = 317314613;</code>
843    *
844    * @return The count of localTrafficSelector.
845    */
getLocalTrafficSelectorCount()846   public int getLocalTrafficSelectorCount() {
847     return localTrafficSelector_.size();
848   }
849   /**
850    *
851    *
852    * <pre>
853    * Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported.
854    * </pre>
855    *
856    * <code>repeated string local_traffic_selector = 317314613;</code>
857    *
858    * @param index The index of the element to return.
859    * @return The localTrafficSelector at the given index.
860    */
getLocalTrafficSelector(int index)861   public java.lang.String getLocalTrafficSelector(int index) {
862     return localTrafficSelector_.get(index);
863   }
864   /**
865    *
866    *
867    * <pre>
868    * Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported.
869    * </pre>
870    *
871    * <code>repeated string local_traffic_selector = 317314613;</code>
872    *
873    * @param index The index of the value to return.
874    * @return The bytes of the localTrafficSelector at the given index.
875    */
getLocalTrafficSelectorBytes(int index)876   public com.google.protobuf.ByteString getLocalTrafficSelectorBytes(int index) {
877     return localTrafficSelector_.getByteString(index);
878   }
879 
880   public static final int NAME_FIELD_NUMBER = 3373707;
881 
882   @SuppressWarnings("serial")
883   private volatile java.lang.Object name_ = "";
884   /**
885    *
886    *
887    * <pre>
888    * 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.
889    * </pre>
890    *
891    * <code>optional string name = 3373707;</code>
892    *
893    * @return Whether the name field is set.
894    */
895   @java.lang.Override
hasName()896   public boolean hasName() {
897     return ((bitField0_ & 0x00000040) != 0);
898   }
899   /**
900    *
901    *
902    * <pre>
903    * 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.
904    * </pre>
905    *
906    * <code>optional string name = 3373707;</code>
907    *
908    * @return The name.
909    */
910   @java.lang.Override
getName()911   public java.lang.String getName() {
912     java.lang.Object ref = name_;
913     if (ref instanceof java.lang.String) {
914       return (java.lang.String) ref;
915     } else {
916       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
917       java.lang.String s = bs.toStringUtf8();
918       name_ = s;
919       return s;
920     }
921   }
922   /**
923    *
924    *
925    * <pre>
926    * 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.
927    * </pre>
928    *
929    * <code>optional string name = 3373707;</code>
930    *
931    * @return The bytes for name.
932    */
933   @java.lang.Override
getNameBytes()934   public com.google.protobuf.ByteString getNameBytes() {
935     java.lang.Object ref = name_;
936     if (ref instanceof java.lang.String) {
937       com.google.protobuf.ByteString b =
938           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
939       name_ = b;
940       return b;
941     } else {
942       return (com.google.protobuf.ByteString) ref;
943     }
944   }
945 
946   public static final int PEER_EXTERNAL_GATEWAY_FIELD_NUMBER = 384956173;
947 
948   @SuppressWarnings("serial")
949   private volatile java.lang.Object peerExternalGateway_ = "";
950   /**
951    *
952    *
953    * <pre>
954    * URL of the peer side external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field is exclusive with the field peerGcpGateway.
955    * </pre>
956    *
957    * <code>optional string peer_external_gateway = 384956173;</code>
958    *
959    * @return Whether the peerExternalGateway field is set.
960    */
961   @java.lang.Override
hasPeerExternalGateway()962   public boolean hasPeerExternalGateway() {
963     return ((bitField0_ & 0x00000080) != 0);
964   }
965   /**
966    *
967    *
968    * <pre>
969    * URL of the peer side external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field is exclusive with the field peerGcpGateway.
970    * </pre>
971    *
972    * <code>optional string peer_external_gateway = 384956173;</code>
973    *
974    * @return The peerExternalGateway.
975    */
976   @java.lang.Override
getPeerExternalGateway()977   public java.lang.String getPeerExternalGateway() {
978     java.lang.Object ref = peerExternalGateway_;
979     if (ref instanceof java.lang.String) {
980       return (java.lang.String) ref;
981     } else {
982       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
983       java.lang.String s = bs.toStringUtf8();
984       peerExternalGateway_ = s;
985       return s;
986     }
987   }
988   /**
989    *
990    *
991    * <pre>
992    * URL of the peer side external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field is exclusive with the field peerGcpGateway.
993    * </pre>
994    *
995    * <code>optional string peer_external_gateway = 384956173;</code>
996    *
997    * @return The bytes for peerExternalGateway.
998    */
999   @java.lang.Override
getPeerExternalGatewayBytes()1000   public com.google.protobuf.ByteString getPeerExternalGatewayBytes() {
1001     java.lang.Object ref = peerExternalGateway_;
1002     if (ref instanceof java.lang.String) {
1003       com.google.protobuf.ByteString b =
1004           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1005       peerExternalGateway_ = b;
1006       return b;
1007     } else {
1008       return (com.google.protobuf.ByteString) ref;
1009     }
1010   }
1011 
1012   public static final int PEER_EXTERNAL_GATEWAY_INTERFACE_FIELD_NUMBER = 452768391;
1013   private int peerExternalGatewayInterface_ = 0;
1014   /**
1015    *
1016    *
1017    * <pre>
1018    * The interface ID of the external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. Possible values are: `0`, `1`, `2`, `3`. The number of IDs in use depends on the external VPN gateway redundancy type.
1019    * </pre>
1020    *
1021    * <code>optional int32 peer_external_gateway_interface = 452768391;</code>
1022    *
1023    * @return Whether the peerExternalGatewayInterface field is set.
1024    */
1025   @java.lang.Override
hasPeerExternalGatewayInterface()1026   public boolean hasPeerExternalGatewayInterface() {
1027     return ((bitField0_ & 0x00000100) != 0);
1028   }
1029   /**
1030    *
1031    *
1032    * <pre>
1033    * The interface ID of the external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. Possible values are: `0`, `1`, `2`, `3`. The number of IDs in use depends on the external VPN gateway redundancy type.
1034    * </pre>
1035    *
1036    * <code>optional int32 peer_external_gateway_interface = 452768391;</code>
1037    *
1038    * @return The peerExternalGatewayInterface.
1039    */
1040   @java.lang.Override
getPeerExternalGatewayInterface()1041   public int getPeerExternalGatewayInterface() {
1042     return peerExternalGatewayInterface_;
1043   }
1044 
1045   public static final int PEER_GCP_GATEWAY_FIELD_NUMBER = 281867452;
1046 
1047   @SuppressWarnings("serial")
1048   private volatile java.lang.Object peerGcpGateway_ = "";
1049   /**
1050    *
1051    *
1052    * <pre>
1053    * URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer GCP VPN gateway.
1054    * </pre>
1055    *
1056    * <code>optional string peer_gcp_gateway = 281867452;</code>
1057    *
1058    * @return Whether the peerGcpGateway field is set.
1059    */
1060   @java.lang.Override
hasPeerGcpGateway()1061   public boolean hasPeerGcpGateway() {
1062     return ((bitField0_ & 0x00000200) != 0);
1063   }
1064   /**
1065    *
1066    *
1067    * <pre>
1068    * URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer GCP VPN gateway.
1069    * </pre>
1070    *
1071    * <code>optional string peer_gcp_gateway = 281867452;</code>
1072    *
1073    * @return The peerGcpGateway.
1074    */
1075   @java.lang.Override
getPeerGcpGateway()1076   public java.lang.String getPeerGcpGateway() {
1077     java.lang.Object ref = peerGcpGateway_;
1078     if (ref instanceof java.lang.String) {
1079       return (java.lang.String) ref;
1080     } else {
1081       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1082       java.lang.String s = bs.toStringUtf8();
1083       peerGcpGateway_ = s;
1084       return s;
1085     }
1086   }
1087   /**
1088    *
1089    *
1090    * <pre>
1091    * URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer GCP VPN gateway.
1092    * </pre>
1093    *
1094    * <code>optional string peer_gcp_gateway = 281867452;</code>
1095    *
1096    * @return The bytes for peerGcpGateway.
1097    */
1098   @java.lang.Override
getPeerGcpGatewayBytes()1099   public com.google.protobuf.ByteString getPeerGcpGatewayBytes() {
1100     java.lang.Object ref = peerGcpGateway_;
1101     if (ref instanceof java.lang.String) {
1102       com.google.protobuf.ByteString b =
1103           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1104       peerGcpGateway_ = b;
1105       return b;
1106     } else {
1107       return (com.google.protobuf.ByteString) ref;
1108     }
1109   }
1110 
1111   public static final int PEER_IP_FIELD_NUMBER = 383249700;
1112 
1113   @SuppressWarnings("serial")
1114   private volatile java.lang.Object peerIp_ = "";
1115   /**
1116    *
1117    *
1118    * <pre>
1119    * IP address of the peer VPN gateway. Only IPv4 is supported.
1120    * </pre>
1121    *
1122    * <code>optional string peer_ip = 383249700;</code>
1123    *
1124    * @return Whether the peerIp field is set.
1125    */
1126   @java.lang.Override
hasPeerIp()1127   public boolean hasPeerIp() {
1128     return ((bitField0_ & 0x00000400) != 0);
1129   }
1130   /**
1131    *
1132    *
1133    * <pre>
1134    * IP address of the peer VPN gateway. Only IPv4 is supported.
1135    * </pre>
1136    *
1137    * <code>optional string peer_ip = 383249700;</code>
1138    *
1139    * @return The peerIp.
1140    */
1141   @java.lang.Override
getPeerIp()1142   public java.lang.String getPeerIp() {
1143     java.lang.Object ref = peerIp_;
1144     if (ref instanceof java.lang.String) {
1145       return (java.lang.String) ref;
1146     } else {
1147       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1148       java.lang.String s = bs.toStringUtf8();
1149       peerIp_ = s;
1150       return s;
1151     }
1152   }
1153   /**
1154    *
1155    *
1156    * <pre>
1157    * IP address of the peer VPN gateway. Only IPv4 is supported.
1158    * </pre>
1159    *
1160    * <code>optional string peer_ip = 383249700;</code>
1161    *
1162    * @return The bytes for peerIp.
1163    */
1164   @java.lang.Override
getPeerIpBytes()1165   public com.google.protobuf.ByteString getPeerIpBytes() {
1166     java.lang.Object ref = peerIp_;
1167     if (ref instanceof java.lang.String) {
1168       com.google.protobuf.ByteString b =
1169           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1170       peerIp_ = b;
1171       return b;
1172     } else {
1173       return (com.google.protobuf.ByteString) ref;
1174     }
1175   }
1176 
1177   public static final int REGION_FIELD_NUMBER = 138946292;
1178 
1179   @SuppressWarnings("serial")
1180   private volatile java.lang.Object region_ = "";
1181   /**
1182    *
1183    *
1184    * <pre>
1185    * [Output Only] URL of the region where the VPN tunnel resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
1186    * </pre>
1187    *
1188    * <code>optional string region = 138946292;</code>
1189    *
1190    * @return Whether the region field is set.
1191    */
1192   @java.lang.Override
hasRegion()1193   public boolean hasRegion() {
1194     return ((bitField0_ & 0x00000800) != 0);
1195   }
1196   /**
1197    *
1198    *
1199    * <pre>
1200    * [Output Only] URL of the region where the VPN tunnel resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
1201    * </pre>
1202    *
1203    * <code>optional string region = 138946292;</code>
1204    *
1205    * @return The region.
1206    */
1207   @java.lang.Override
getRegion()1208   public java.lang.String getRegion() {
1209     java.lang.Object ref = region_;
1210     if (ref instanceof java.lang.String) {
1211       return (java.lang.String) ref;
1212     } else {
1213       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1214       java.lang.String s = bs.toStringUtf8();
1215       region_ = s;
1216       return s;
1217     }
1218   }
1219   /**
1220    *
1221    *
1222    * <pre>
1223    * [Output Only] URL of the region where the VPN tunnel resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
1224    * </pre>
1225    *
1226    * <code>optional string region = 138946292;</code>
1227    *
1228    * @return The bytes for region.
1229    */
1230   @java.lang.Override
getRegionBytes()1231   public com.google.protobuf.ByteString getRegionBytes() {
1232     java.lang.Object ref = region_;
1233     if (ref instanceof java.lang.String) {
1234       com.google.protobuf.ByteString b =
1235           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1236       region_ = b;
1237       return b;
1238     } else {
1239       return (com.google.protobuf.ByteString) ref;
1240     }
1241   }
1242 
1243   public static final int REMOTE_TRAFFIC_SELECTOR_FIELD_NUMBER = 358887098;
1244 
1245   @SuppressWarnings("serial")
1246   private com.google.protobuf.LazyStringList remoteTrafficSelector_;
1247   /**
1248    *
1249    *
1250    * <pre>
1251    * Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.
1252    * </pre>
1253    *
1254    * <code>repeated string remote_traffic_selector = 358887098;</code>
1255    *
1256    * @return A list containing the remoteTrafficSelector.
1257    */
getRemoteTrafficSelectorList()1258   public com.google.protobuf.ProtocolStringList getRemoteTrafficSelectorList() {
1259     return remoteTrafficSelector_;
1260   }
1261   /**
1262    *
1263    *
1264    * <pre>
1265    * Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.
1266    * </pre>
1267    *
1268    * <code>repeated string remote_traffic_selector = 358887098;</code>
1269    *
1270    * @return The count of remoteTrafficSelector.
1271    */
getRemoteTrafficSelectorCount()1272   public int getRemoteTrafficSelectorCount() {
1273     return remoteTrafficSelector_.size();
1274   }
1275   /**
1276    *
1277    *
1278    * <pre>
1279    * Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.
1280    * </pre>
1281    *
1282    * <code>repeated string remote_traffic_selector = 358887098;</code>
1283    *
1284    * @param index The index of the element to return.
1285    * @return The remoteTrafficSelector at the given index.
1286    */
getRemoteTrafficSelector(int index)1287   public java.lang.String getRemoteTrafficSelector(int index) {
1288     return remoteTrafficSelector_.get(index);
1289   }
1290   /**
1291    *
1292    *
1293    * <pre>
1294    * Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.
1295    * </pre>
1296    *
1297    * <code>repeated string remote_traffic_selector = 358887098;</code>
1298    *
1299    * @param index The index of the value to return.
1300    * @return The bytes of the remoteTrafficSelector at the given index.
1301    */
getRemoteTrafficSelectorBytes(int index)1302   public com.google.protobuf.ByteString getRemoteTrafficSelectorBytes(int index) {
1303     return remoteTrafficSelector_.getByteString(index);
1304   }
1305 
1306   public static final int ROUTER_FIELD_NUMBER = 148608841;
1307 
1308   @SuppressWarnings("serial")
1309   private volatile java.lang.Object router_ = "";
1310   /**
1311    *
1312    *
1313    * <pre>
1314    * URL of the router resource to be used for dynamic routing.
1315    * </pre>
1316    *
1317    * <code>optional string router = 148608841;</code>
1318    *
1319    * @return Whether the router field is set.
1320    */
1321   @java.lang.Override
hasRouter()1322   public boolean hasRouter() {
1323     return ((bitField0_ & 0x00001000) != 0);
1324   }
1325   /**
1326    *
1327    *
1328    * <pre>
1329    * URL of the router resource to be used for dynamic routing.
1330    * </pre>
1331    *
1332    * <code>optional string router = 148608841;</code>
1333    *
1334    * @return The router.
1335    */
1336   @java.lang.Override
getRouter()1337   public java.lang.String getRouter() {
1338     java.lang.Object ref = router_;
1339     if (ref instanceof java.lang.String) {
1340       return (java.lang.String) ref;
1341     } else {
1342       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1343       java.lang.String s = bs.toStringUtf8();
1344       router_ = s;
1345       return s;
1346     }
1347   }
1348   /**
1349    *
1350    *
1351    * <pre>
1352    * URL of the router resource to be used for dynamic routing.
1353    * </pre>
1354    *
1355    * <code>optional string router = 148608841;</code>
1356    *
1357    * @return The bytes for router.
1358    */
1359   @java.lang.Override
getRouterBytes()1360   public com.google.protobuf.ByteString getRouterBytes() {
1361     java.lang.Object ref = router_;
1362     if (ref instanceof java.lang.String) {
1363       com.google.protobuf.ByteString b =
1364           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1365       router_ = b;
1366       return b;
1367     } else {
1368       return (com.google.protobuf.ByteString) ref;
1369     }
1370   }
1371 
1372   public static final int SELF_LINK_FIELD_NUMBER = 456214797;
1373 
1374   @SuppressWarnings("serial")
1375   private volatile java.lang.Object selfLink_ = "";
1376   /**
1377    *
1378    *
1379    * <pre>
1380    * [Output Only] Server-defined URL for the resource.
1381    * </pre>
1382    *
1383    * <code>optional string self_link = 456214797;</code>
1384    *
1385    * @return Whether the selfLink field is set.
1386    */
1387   @java.lang.Override
hasSelfLink()1388   public boolean hasSelfLink() {
1389     return ((bitField0_ & 0x00002000) != 0);
1390   }
1391   /**
1392    *
1393    *
1394    * <pre>
1395    * [Output Only] Server-defined URL for the resource.
1396    * </pre>
1397    *
1398    * <code>optional string self_link = 456214797;</code>
1399    *
1400    * @return The selfLink.
1401    */
1402   @java.lang.Override
getSelfLink()1403   public java.lang.String getSelfLink() {
1404     java.lang.Object ref = selfLink_;
1405     if (ref instanceof java.lang.String) {
1406       return (java.lang.String) ref;
1407     } else {
1408       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1409       java.lang.String s = bs.toStringUtf8();
1410       selfLink_ = s;
1411       return s;
1412     }
1413   }
1414   /**
1415    *
1416    *
1417    * <pre>
1418    * [Output Only] Server-defined URL for the resource.
1419    * </pre>
1420    *
1421    * <code>optional string self_link = 456214797;</code>
1422    *
1423    * @return The bytes for selfLink.
1424    */
1425   @java.lang.Override
getSelfLinkBytes()1426   public com.google.protobuf.ByteString getSelfLinkBytes() {
1427     java.lang.Object ref = selfLink_;
1428     if (ref instanceof java.lang.String) {
1429       com.google.protobuf.ByteString b =
1430           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1431       selfLink_ = b;
1432       return b;
1433     } else {
1434       return (com.google.protobuf.ByteString) ref;
1435     }
1436   }
1437 
1438   public static final int SHARED_SECRET_FIELD_NUMBER = 381932490;
1439 
1440   @SuppressWarnings("serial")
1441   private volatile java.lang.Object sharedSecret_ = "";
1442   /**
1443    *
1444    *
1445    * <pre>
1446    * Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway.
1447    * </pre>
1448    *
1449    * <code>optional string shared_secret = 381932490;</code>
1450    *
1451    * @return Whether the sharedSecret field is set.
1452    */
1453   @java.lang.Override
hasSharedSecret()1454   public boolean hasSharedSecret() {
1455     return ((bitField0_ & 0x00004000) != 0);
1456   }
1457   /**
1458    *
1459    *
1460    * <pre>
1461    * Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway.
1462    * </pre>
1463    *
1464    * <code>optional string shared_secret = 381932490;</code>
1465    *
1466    * @return The sharedSecret.
1467    */
1468   @java.lang.Override
getSharedSecret()1469   public java.lang.String getSharedSecret() {
1470     java.lang.Object ref = sharedSecret_;
1471     if (ref instanceof java.lang.String) {
1472       return (java.lang.String) ref;
1473     } else {
1474       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1475       java.lang.String s = bs.toStringUtf8();
1476       sharedSecret_ = s;
1477       return s;
1478     }
1479   }
1480   /**
1481    *
1482    *
1483    * <pre>
1484    * Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway.
1485    * </pre>
1486    *
1487    * <code>optional string shared_secret = 381932490;</code>
1488    *
1489    * @return The bytes for sharedSecret.
1490    */
1491   @java.lang.Override
getSharedSecretBytes()1492   public com.google.protobuf.ByteString getSharedSecretBytes() {
1493     java.lang.Object ref = sharedSecret_;
1494     if (ref instanceof java.lang.String) {
1495       com.google.protobuf.ByteString b =
1496           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1497       sharedSecret_ = b;
1498       return b;
1499     } else {
1500       return (com.google.protobuf.ByteString) ref;
1501     }
1502   }
1503 
1504   public static final int SHARED_SECRET_HASH_FIELD_NUMBER = 398881891;
1505 
1506   @SuppressWarnings("serial")
1507   private volatile java.lang.Object sharedSecretHash_ = "";
1508   /**
1509    *
1510    *
1511    * <pre>
1512    * Hash of the shared secret.
1513    * </pre>
1514    *
1515    * <code>optional string shared_secret_hash = 398881891;</code>
1516    *
1517    * @return Whether the sharedSecretHash field is set.
1518    */
1519   @java.lang.Override
hasSharedSecretHash()1520   public boolean hasSharedSecretHash() {
1521     return ((bitField0_ & 0x00008000) != 0);
1522   }
1523   /**
1524    *
1525    *
1526    * <pre>
1527    * Hash of the shared secret.
1528    * </pre>
1529    *
1530    * <code>optional string shared_secret_hash = 398881891;</code>
1531    *
1532    * @return The sharedSecretHash.
1533    */
1534   @java.lang.Override
getSharedSecretHash()1535   public java.lang.String getSharedSecretHash() {
1536     java.lang.Object ref = sharedSecretHash_;
1537     if (ref instanceof java.lang.String) {
1538       return (java.lang.String) ref;
1539     } else {
1540       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1541       java.lang.String s = bs.toStringUtf8();
1542       sharedSecretHash_ = s;
1543       return s;
1544     }
1545   }
1546   /**
1547    *
1548    *
1549    * <pre>
1550    * Hash of the shared secret.
1551    * </pre>
1552    *
1553    * <code>optional string shared_secret_hash = 398881891;</code>
1554    *
1555    * @return The bytes for sharedSecretHash.
1556    */
1557   @java.lang.Override
getSharedSecretHashBytes()1558   public com.google.protobuf.ByteString getSharedSecretHashBytes() {
1559     java.lang.Object ref = sharedSecretHash_;
1560     if (ref instanceof java.lang.String) {
1561       com.google.protobuf.ByteString b =
1562           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1563       sharedSecretHash_ = b;
1564       return b;
1565     } else {
1566       return (com.google.protobuf.ByteString) ref;
1567     }
1568   }
1569 
1570   public static final int STATUS_FIELD_NUMBER = 181260274;
1571 
1572   @SuppressWarnings("serial")
1573   private volatile java.lang.Object status_ = "";
1574   /**
1575    *
1576    *
1577    * <pre>
1578    * [Output Only] The status of the VPN tunnel, which can be one of the following: - PROVISIONING: Resource is being allocated for the VPN tunnel. - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel. - FIRST_HANDSHAKE: Successful first handshake with the peer VPN. - ESTABLISHED: Secure session is successfully established with the peer VPN. - NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS - AUTHORIZATION_ERROR: Auth error (for example, bad shared secret). - NEGOTIATION_FAILURE: Handshake failed. - DEPROVISIONING: Resources are being deallocated for the VPN tunnel. - FAILED: Tunnel creation has failed and the tunnel is not ready to be used. - NO_INCOMING_PACKETS: No incoming packets from peer. - REJECTED: Tunnel configuration was rejected, can be result of being denied access. - ALLOCATING_RESOURCES: Cloud VPN is in the process of allocating all required resources. - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted for Classic VPN tunnels or the project is in frozen state. - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, probably behind NAT. - TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed for an HA-VPN tunnel.
1579    * Check the Status enum for the list of possible values.
1580    * </pre>
1581    *
1582    * <code>optional string status = 181260274;</code>
1583    *
1584    * @return Whether the status field is set.
1585    */
1586   @java.lang.Override
hasStatus()1587   public boolean hasStatus() {
1588     return ((bitField0_ & 0x00010000) != 0);
1589   }
1590   /**
1591    *
1592    *
1593    * <pre>
1594    * [Output Only] The status of the VPN tunnel, which can be one of the following: - PROVISIONING: Resource is being allocated for the VPN tunnel. - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel. - FIRST_HANDSHAKE: Successful first handshake with the peer VPN. - ESTABLISHED: Secure session is successfully established with the peer VPN. - NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS - AUTHORIZATION_ERROR: Auth error (for example, bad shared secret). - NEGOTIATION_FAILURE: Handshake failed. - DEPROVISIONING: Resources are being deallocated for the VPN tunnel. - FAILED: Tunnel creation has failed and the tunnel is not ready to be used. - NO_INCOMING_PACKETS: No incoming packets from peer. - REJECTED: Tunnel configuration was rejected, can be result of being denied access. - ALLOCATING_RESOURCES: Cloud VPN is in the process of allocating all required resources. - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted for Classic VPN tunnels or the project is in frozen state. - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, probably behind NAT. - TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed for an HA-VPN tunnel.
1595    * Check the Status enum for the list of possible values.
1596    * </pre>
1597    *
1598    * <code>optional string status = 181260274;</code>
1599    *
1600    * @return The status.
1601    */
1602   @java.lang.Override
getStatus()1603   public java.lang.String getStatus() {
1604     java.lang.Object ref = status_;
1605     if (ref instanceof java.lang.String) {
1606       return (java.lang.String) ref;
1607     } else {
1608       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1609       java.lang.String s = bs.toStringUtf8();
1610       status_ = s;
1611       return s;
1612     }
1613   }
1614   /**
1615    *
1616    *
1617    * <pre>
1618    * [Output Only] The status of the VPN tunnel, which can be one of the following: - PROVISIONING: Resource is being allocated for the VPN tunnel. - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel. - FIRST_HANDSHAKE: Successful first handshake with the peer VPN. - ESTABLISHED: Secure session is successfully established with the peer VPN. - NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS - AUTHORIZATION_ERROR: Auth error (for example, bad shared secret). - NEGOTIATION_FAILURE: Handshake failed. - DEPROVISIONING: Resources are being deallocated for the VPN tunnel. - FAILED: Tunnel creation has failed and the tunnel is not ready to be used. - NO_INCOMING_PACKETS: No incoming packets from peer. - REJECTED: Tunnel configuration was rejected, can be result of being denied access. - ALLOCATING_RESOURCES: Cloud VPN is in the process of allocating all required resources. - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted for Classic VPN tunnels or the project is in frozen state. - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, probably behind NAT. - TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed for an HA-VPN tunnel.
1619    * Check the Status enum for the list of possible values.
1620    * </pre>
1621    *
1622    * <code>optional string status = 181260274;</code>
1623    *
1624    * @return The bytes for status.
1625    */
1626   @java.lang.Override
getStatusBytes()1627   public com.google.protobuf.ByteString getStatusBytes() {
1628     java.lang.Object ref = status_;
1629     if (ref instanceof java.lang.String) {
1630       com.google.protobuf.ByteString b =
1631           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1632       status_ = b;
1633       return b;
1634     } else {
1635       return (com.google.protobuf.ByteString) ref;
1636     }
1637   }
1638 
1639   public static final int TARGET_VPN_GATEWAY_FIELD_NUMBER = 532512843;
1640 
1641   @SuppressWarnings("serial")
1642   private volatile java.lang.Object targetVpnGateway_ = "";
1643   /**
1644    *
1645    *
1646    * <pre>
1647    * URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.
1648    * </pre>
1649    *
1650    * <code>optional string target_vpn_gateway = 532512843;</code>
1651    *
1652    * @return Whether the targetVpnGateway field is set.
1653    */
1654   @java.lang.Override
hasTargetVpnGateway()1655   public boolean hasTargetVpnGateway() {
1656     return ((bitField0_ & 0x00020000) != 0);
1657   }
1658   /**
1659    *
1660    *
1661    * <pre>
1662    * URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.
1663    * </pre>
1664    *
1665    * <code>optional string target_vpn_gateway = 532512843;</code>
1666    *
1667    * @return The targetVpnGateway.
1668    */
1669   @java.lang.Override
getTargetVpnGateway()1670   public java.lang.String getTargetVpnGateway() {
1671     java.lang.Object ref = targetVpnGateway_;
1672     if (ref instanceof java.lang.String) {
1673       return (java.lang.String) ref;
1674     } else {
1675       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1676       java.lang.String s = bs.toStringUtf8();
1677       targetVpnGateway_ = s;
1678       return s;
1679     }
1680   }
1681   /**
1682    *
1683    *
1684    * <pre>
1685    * URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.
1686    * </pre>
1687    *
1688    * <code>optional string target_vpn_gateway = 532512843;</code>
1689    *
1690    * @return The bytes for targetVpnGateway.
1691    */
1692   @java.lang.Override
getTargetVpnGatewayBytes()1693   public com.google.protobuf.ByteString getTargetVpnGatewayBytes() {
1694     java.lang.Object ref = targetVpnGateway_;
1695     if (ref instanceof java.lang.String) {
1696       com.google.protobuf.ByteString b =
1697           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1698       targetVpnGateway_ = b;
1699       return b;
1700     } else {
1701       return (com.google.protobuf.ByteString) ref;
1702     }
1703   }
1704 
1705   public static final int VPN_GATEWAY_FIELD_NUMBER = 406684153;
1706 
1707   @SuppressWarnings("serial")
1708   private volatile java.lang.Object vpnGateway_ = "";
1709   /**
1710    *
1711    *
1712    * <pre>
1713    * URL of the VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This must be used (instead of target_vpn_gateway) if a High Availability VPN gateway resource is created.
1714    * </pre>
1715    *
1716    * <code>optional string vpn_gateway = 406684153;</code>
1717    *
1718    * @return Whether the vpnGateway field is set.
1719    */
1720   @java.lang.Override
hasVpnGateway()1721   public boolean hasVpnGateway() {
1722     return ((bitField0_ & 0x00040000) != 0);
1723   }
1724   /**
1725    *
1726    *
1727    * <pre>
1728    * URL of the VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This must be used (instead of target_vpn_gateway) if a High Availability VPN gateway resource is created.
1729    * </pre>
1730    *
1731    * <code>optional string vpn_gateway = 406684153;</code>
1732    *
1733    * @return The vpnGateway.
1734    */
1735   @java.lang.Override
getVpnGateway()1736   public java.lang.String getVpnGateway() {
1737     java.lang.Object ref = vpnGateway_;
1738     if (ref instanceof java.lang.String) {
1739       return (java.lang.String) ref;
1740     } else {
1741       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1742       java.lang.String s = bs.toStringUtf8();
1743       vpnGateway_ = s;
1744       return s;
1745     }
1746   }
1747   /**
1748    *
1749    *
1750    * <pre>
1751    * URL of the VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This must be used (instead of target_vpn_gateway) if a High Availability VPN gateway resource is created.
1752    * </pre>
1753    *
1754    * <code>optional string vpn_gateway = 406684153;</code>
1755    *
1756    * @return The bytes for vpnGateway.
1757    */
1758   @java.lang.Override
getVpnGatewayBytes()1759   public com.google.protobuf.ByteString getVpnGatewayBytes() {
1760     java.lang.Object ref = vpnGateway_;
1761     if (ref instanceof java.lang.String) {
1762       com.google.protobuf.ByteString b =
1763           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1764       vpnGateway_ = b;
1765       return b;
1766     } else {
1767       return (com.google.protobuf.ByteString) ref;
1768     }
1769   }
1770 
1771   public static final int VPN_GATEWAY_INTERFACE_FIELD_NUMBER = 95979123;
1772   private int vpnGatewayInterface_ = 0;
1773   /**
1774    *
1775    *
1776    * <pre>
1777    * The interface ID of the VPN gateway with which this VPN tunnel is associated. Possible values are: `0`, `1`.
1778    * </pre>
1779    *
1780    * <code>optional int32 vpn_gateway_interface = 95979123;</code>
1781    *
1782    * @return Whether the vpnGatewayInterface field is set.
1783    */
1784   @java.lang.Override
hasVpnGatewayInterface()1785   public boolean hasVpnGatewayInterface() {
1786     return ((bitField0_ & 0x00080000) != 0);
1787   }
1788   /**
1789    *
1790    *
1791    * <pre>
1792    * The interface ID of the VPN gateway with which this VPN tunnel is associated. Possible values are: `0`, `1`.
1793    * </pre>
1794    *
1795    * <code>optional int32 vpn_gateway_interface = 95979123;</code>
1796    *
1797    * @return The vpnGatewayInterface.
1798    */
1799   @java.lang.Override
getVpnGatewayInterface()1800   public int getVpnGatewayInterface() {
1801     return vpnGatewayInterface_;
1802   }
1803 
1804   private byte memoizedIsInitialized = -1;
1805 
1806   @java.lang.Override
isInitialized()1807   public final boolean isInitialized() {
1808     byte isInitialized = memoizedIsInitialized;
1809     if (isInitialized == 1) return true;
1810     if (isInitialized == 0) return false;
1811 
1812     memoizedIsInitialized = 1;
1813     return true;
1814   }
1815 
1816   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)1817   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
1818     if (((bitField0_ & 0x00000008) != 0)) {
1819       output.writeUInt64(3355, id_);
1820     }
1821     if (((bitField0_ & 0x00000020) != 0)) {
1822       com.google.protobuf.GeneratedMessageV3.writeString(output, 3292052, kind_);
1823     }
1824     if (((bitField0_ & 0x00000040) != 0)) {
1825       com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_);
1826     }
1827     if (((bitField0_ & 0x00000001) != 0)) {
1828       com.google.protobuf.GeneratedMessageV3.writeString(output, 30525366, creationTimestamp_);
1829     }
1830     if (((bitField0_ & 0x00080000) != 0)) {
1831       output.writeInt32(95979123, vpnGatewayInterface_);
1832     }
1833     if (((bitField0_ & 0x00000800) != 0)) {
1834       com.google.protobuf.GeneratedMessageV3.writeString(output, 138946292, region_);
1835     }
1836     if (((bitField0_ & 0x00001000) != 0)) {
1837       com.google.protobuf.GeneratedMessageV3.writeString(output, 148608841, router_);
1838     }
1839     if (((bitField0_ & 0x00010000) != 0)) {
1840       com.google.protobuf.GeneratedMessageV3.writeString(output, 181260274, status_);
1841     }
1842     if (((bitField0_ & 0x00000010) != 0)) {
1843       output.writeInt32(218376220, ikeVersion_);
1844     }
1845     if (((bitField0_ & 0x00000200) != 0)) {
1846       com.google.protobuf.GeneratedMessageV3.writeString(output, 281867452, peerGcpGateway_);
1847     }
1848     for (int i = 0; i < localTrafficSelector_.size(); i++) {
1849       com.google.protobuf.GeneratedMessageV3.writeString(
1850           output, 317314613, localTrafficSelector_.getRaw(i));
1851     }
1852     if (((bitField0_ & 0x00000004) != 0)) {
1853       com.google.protobuf.GeneratedMessageV3.writeString(output, 333501025, detailedStatus_);
1854     }
1855     for (int i = 0; i < remoteTrafficSelector_.size(); i++) {
1856       com.google.protobuf.GeneratedMessageV3.writeString(
1857           output, 358887098, remoteTrafficSelector_.getRaw(i));
1858     }
1859     if (((bitField0_ & 0x00004000) != 0)) {
1860       com.google.protobuf.GeneratedMessageV3.writeString(output, 381932490, sharedSecret_);
1861     }
1862     if (((bitField0_ & 0x00000400) != 0)) {
1863       com.google.protobuf.GeneratedMessageV3.writeString(output, 383249700, peerIp_);
1864     }
1865     if (((bitField0_ & 0x00000080) != 0)) {
1866       com.google.protobuf.GeneratedMessageV3.writeString(output, 384956173, peerExternalGateway_);
1867     }
1868     if (((bitField0_ & 0x00008000) != 0)) {
1869       com.google.protobuf.GeneratedMessageV3.writeString(output, 398881891, sharedSecretHash_);
1870     }
1871     if (((bitField0_ & 0x00040000) != 0)) {
1872       com.google.protobuf.GeneratedMessageV3.writeString(output, 406684153, vpnGateway_);
1873     }
1874     if (((bitField0_ & 0x00000002) != 0)) {
1875       com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_);
1876     }
1877     if (((bitField0_ & 0x00000100) != 0)) {
1878       output.writeInt32(452768391, peerExternalGatewayInterface_);
1879     }
1880     if (((bitField0_ & 0x00002000) != 0)) {
1881       com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_);
1882     }
1883     if (((bitField0_ & 0x00020000) != 0)) {
1884       com.google.protobuf.GeneratedMessageV3.writeString(output, 532512843, targetVpnGateway_);
1885     }
1886     getUnknownFields().writeTo(output);
1887   }
1888 
1889   @java.lang.Override
getSerializedSize()1890   public int getSerializedSize() {
1891     int size = memoizedSize;
1892     if (size != -1) return size;
1893 
1894     size = 0;
1895     if (((bitField0_ & 0x00000008) != 0)) {
1896       size += com.google.protobuf.CodedOutputStream.computeUInt64Size(3355, id_);
1897     }
1898     if (((bitField0_ & 0x00000020) != 0)) {
1899       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3292052, kind_);
1900     }
1901     if (((bitField0_ & 0x00000040) != 0)) {
1902       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_);
1903     }
1904     if (((bitField0_ & 0x00000001) != 0)) {
1905       size +=
1906           com.google.protobuf.GeneratedMessageV3.computeStringSize(30525366, creationTimestamp_);
1907     }
1908     if (((bitField0_ & 0x00080000) != 0)) {
1909       size +=
1910           com.google.protobuf.CodedOutputStream.computeInt32Size(95979123, vpnGatewayInterface_);
1911     }
1912     if (((bitField0_ & 0x00000800) != 0)) {
1913       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(138946292, region_);
1914     }
1915     if (((bitField0_ & 0x00001000) != 0)) {
1916       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(148608841, router_);
1917     }
1918     if (((bitField0_ & 0x00010000) != 0)) {
1919       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(181260274, status_);
1920     }
1921     if (((bitField0_ & 0x00000010) != 0)) {
1922       size += com.google.protobuf.CodedOutputStream.computeInt32Size(218376220, ikeVersion_);
1923     }
1924     if (((bitField0_ & 0x00000200) != 0)) {
1925       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(281867452, peerGcpGateway_);
1926     }
1927     {
1928       int dataSize = 0;
1929       for (int i = 0; i < localTrafficSelector_.size(); i++) {
1930         dataSize += computeStringSizeNoTag(localTrafficSelector_.getRaw(i));
1931       }
1932       size += dataSize;
1933       size += 5 * getLocalTrafficSelectorList().size();
1934     }
1935     if (((bitField0_ & 0x00000004) != 0)) {
1936       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(333501025, detailedStatus_);
1937     }
1938     {
1939       int dataSize = 0;
1940       for (int i = 0; i < remoteTrafficSelector_.size(); i++) {
1941         dataSize += computeStringSizeNoTag(remoteTrafficSelector_.getRaw(i));
1942       }
1943       size += dataSize;
1944       size += 5 * getRemoteTrafficSelectorList().size();
1945     }
1946     if (((bitField0_ & 0x00004000) != 0)) {
1947       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(381932490, sharedSecret_);
1948     }
1949     if (((bitField0_ & 0x00000400) != 0)) {
1950       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(383249700, peerIp_);
1951     }
1952     if (((bitField0_ & 0x00000080) != 0)) {
1953       size +=
1954           com.google.protobuf.GeneratedMessageV3.computeStringSize(384956173, peerExternalGateway_);
1955     }
1956     if (((bitField0_ & 0x00008000) != 0)) {
1957       size +=
1958           com.google.protobuf.GeneratedMessageV3.computeStringSize(398881891, sharedSecretHash_);
1959     }
1960     if (((bitField0_ & 0x00040000) != 0)) {
1961       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(406684153, vpnGateway_);
1962     }
1963     if (((bitField0_ & 0x00000002) != 0)) {
1964       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_);
1965     }
1966     if (((bitField0_ & 0x00000100) != 0)) {
1967       size +=
1968           com.google.protobuf.CodedOutputStream.computeInt32Size(
1969               452768391, peerExternalGatewayInterface_);
1970     }
1971     if (((bitField0_ & 0x00002000) != 0)) {
1972       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_);
1973     }
1974     if (((bitField0_ & 0x00020000) != 0)) {
1975       size +=
1976           com.google.protobuf.GeneratedMessageV3.computeStringSize(532512843, targetVpnGateway_);
1977     }
1978     size += getUnknownFields().getSerializedSize();
1979     memoizedSize = size;
1980     return size;
1981   }
1982 
1983   @java.lang.Override
equals(final java.lang.Object obj)1984   public boolean equals(final java.lang.Object obj) {
1985     if (obj == this) {
1986       return true;
1987     }
1988     if (!(obj instanceof com.google.cloud.compute.v1.VpnTunnel)) {
1989       return super.equals(obj);
1990     }
1991     com.google.cloud.compute.v1.VpnTunnel other = (com.google.cloud.compute.v1.VpnTunnel) obj;
1992 
1993     if (hasCreationTimestamp() != other.hasCreationTimestamp()) return false;
1994     if (hasCreationTimestamp()) {
1995       if (!getCreationTimestamp().equals(other.getCreationTimestamp())) return false;
1996     }
1997     if (hasDescription() != other.hasDescription()) return false;
1998     if (hasDescription()) {
1999       if (!getDescription().equals(other.getDescription())) return false;
2000     }
2001     if (hasDetailedStatus() != other.hasDetailedStatus()) return false;
2002     if (hasDetailedStatus()) {
2003       if (!getDetailedStatus().equals(other.getDetailedStatus())) return false;
2004     }
2005     if (hasId() != other.hasId()) return false;
2006     if (hasId()) {
2007       if (getId() != other.getId()) return false;
2008     }
2009     if (hasIkeVersion() != other.hasIkeVersion()) return false;
2010     if (hasIkeVersion()) {
2011       if (getIkeVersion() != other.getIkeVersion()) return false;
2012     }
2013     if (hasKind() != other.hasKind()) return false;
2014     if (hasKind()) {
2015       if (!getKind().equals(other.getKind())) return false;
2016     }
2017     if (!getLocalTrafficSelectorList().equals(other.getLocalTrafficSelectorList())) return false;
2018     if (hasName() != other.hasName()) return false;
2019     if (hasName()) {
2020       if (!getName().equals(other.getName())) return false;
2021     }
2022     if (hasPeerExternalGateway() != other.hasPeerExternalGateway()) return false;
2023     if (hasPeerExternalGateway()) {
2024       if (!getPeerExternalGateway().equals(other.getPeerExternalGateway())) return false;
2025     }
2026     if (hasPeerExternalGatewayInterface() != other.hasPeerExternalGatewayInterface()) return false;
2027     if (hasPeerExternalGatewayInterface()) {
2028       if (getPeerExternalGatewayInterface() != other.getPeerExternalGatewayInterface())
2029         return false;
2030     }
2031     if (hasPeerGcpGateway() != other.hasPeerGcpGateway()) return false;
2032     if (hasPeerGcpGateway()) {
2033       if (!getPeerGcpGateway().equals(other.getPeerGcpGateway())) return false;
2034     }
2035     if (hasPeerIp() != other.hasPeerIp()) return false;
2036     if (hasPeerIp()) {
2037       if (!getPeerIp().equals(other.getPeerIp())) return false;
2038     }
2039     if (hasRegion() != other.hasRegion()) return false;
2040     if (hasRegion()) {
2041       if (!getRegion().equals(other.getRegion())) return false;
2042     }
2043     if (!getRemoteTrafficSelectorList().equals(other.getRemoteTrafficSelectorList())) return false;
2044     if (hasRouter() != other.hasRouter()) return false;
2045     if (hasRouter()) {
2046       if (!getRouter().equals(other.getRouter())) return false;
2047     }
2048     if (hasSelfLink() != other.hasSelfLink()) return false;
2049     if (hasSelfLink()) {
2050       if (!getSelfLink().equals(other.getSelfLink())) return false;
2051     }
2052     if (hasSharedSecret() != other.hasSharedSecret()) return false;
2053     if (hasSharedSecret()) {
2054       if (!getSharedSecret().equals(other.getSharedSecret())) return false;
2055     }
2056     if (hasSharedSecretHash() != other.hasSharedSecretHash()) return false;
2057     if (hasSharedSecretHash()) {
2058       if (!getSharedSecretHash().equals(other.getSharedSecretHash())) return false;
2059     }
2060     if (hasStatus() != other.hasStatus()) return false;
2061     if (hasStatus()) {
2062       if (!getStatus().equals(other.getStatus())) return false;
2063     }
2064     if (hasTargetVpnGateway() != other.hasTargetVpnGateway()) return false;
2065     if (hasTargetVpnGateway()) {
2066       if (!getTargetVpnGateway().equals(other.getTargetVpnGateway())) return false;
2067     }
2068     if (hasVpnGateway() != other.hasVpnGateway()) return false;
2069     if (hasVpnGateway()) {
2070       if (!getVpnGateway().equals(other.getVpnGateway())) return false;
2071     }
2072     if (hasVpnGatewayInterface() != other.hasVpnGatewayInterface()) return false;
2073     if (hasVpnGatewayInterface()) {
2074       if (getVpnGatewayInterface() != other.getVpnGatewayInterface()) return false;
2075     }
2076     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
2077     return true;
2078   }
2079 
2080   @java.lang.Override
hashCode()2081   public int hashCode() {
2082     if (memoizedHashCode != 0) {
2083       return memoizedHashCode;
2084     }
2085     int hash = 41;
2086     hash = (19 * hash) + getDescriptor().hashCode();
2087     if (hasCreationTimestamp()) {
2088       hash = (37 * hash) + CREATION_TIMESTAMP_FIELD_NUMBER;
2089       hash = (53 * hash) + getCreationTimestamp().hashCode();
2090     }
2091     if (hasDescription()) {
2092       hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
2093       hash = (53 * hash) + getDescription().hashCode();
2094     }
2095     if (hasDetailedStatus()) {
2096       hash = (37 * hash) + DETAILED_STATUS_FIELD_NUMBER;
2097       hash = (53 * hash) + getDetailedStatus().hashCode();
2098     }
2099     if (hasId()) {
2100       hash = (37 * hash) + ID_FIELD_NUMBER;
2101       hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getId());
2102     }
2103     if (hasIkeVersion()) {
2104       hash = (37 * hash) + IKE_VERSION_FIELD_NUMBER;
2105       hash = (53 * hash) + getIkeVersion();
2106     }
2107     if (hasKind()) {
2108       hash = (37 * hash) + KIND_FIELD_NUMBER;
2109       hash = (53 * hash) + getKind().hashCode();
2110     }
2111     if (getLocalTrafficSelectorCount() > 0) {
2112       hash = (37 * hash) + LOCAL_TRAFFIC_SELECTOR_FIELD_NUMBER;
2113       hash = (53 * hash) + getLocalTrafficSelectorList().hashCode();
2114     }
2115     if (hasName()) {
2116       hash = (37 * hash) + NAME_FIELD_NUMBER;
2117       hash = (53 * hash) + getName().hashCode();
2118     }
2119     if (hasPeerExternalGateway()) {
2120       hash = (37 * hash) + PEER_EXTERNAL_GATEWAY_FIELD_NUMBER;
2121       hash = (53 * hash) + getPeerExternalGateway().hashCode();
2122     }
2123     if (hasPeerExternalGatewayInterface()) {
2124       hash = (37 * hash) + PEER_EXTERNAL_GATEWAY_INTERFACE_FIELD_NUMBER;
2125       hash = (53 * hash) + getPeerExternalGatewayInterface();
2126     }
2127     if (hasPeerGcpGateway()) {
2128       hash = (37 * hash) + PEER_GCP_GATEWAY_FIELD_NUMBER;
2129       hash = (53 * hash) + getPeerGcpGateway().hashCode();
2130     }
2131     if (hasPeerIp()) {
2132       hash = (37 * hash) + PEER_IP_FIELD_NUMBER;
2133       hash = (53 * hash) + getPeerIp().hashCode();
2134     }
2135     if (hasRegion()) {
2136       hash = (37 * hash) + REGION_FIELD_NUMBER;
2137       hash = (53 * hash) + getRegion().hashCode();
2138     }
2139     if (getRemoteTrafficSelectorCount() > 0) {
2140       hash = (37 * hash) + REMOTE_TRAFFIC_SELECTOR_FIELD_NUMBER;
2141       hash = (53 * hash) + getRemoteTrafficSelectorList().hashCode();
2142     }
2143     if (hasRouter()) {
2144       hash = (37 * hash) + ROUTER_FIELD_NUMBER;
2145       hash = (53 * hash) + getRouter().hashCode();
2146     }
2147     if (hasSelfLink()) {
2148       hash = (37 * hash) + SELF_LINK_FIELD_NUMBER;
2149       hash = (53 * hash) + getSelfLink().hashCode();
2150     }
2151     if (hasSharedSecret()) {
2152       hash = (37 * hash) + SHARED_SECRET_FIELD_NUMBER;
2153       hash = (53 * hash) + getSharedSecret().hashCode();
2154     }
2155     if (hasSharedSecretHash()) {
2156       hash = (37 * hash) + SHARED_SECRET_HASH_FIELD_NUMBER;
2157       hash = (53 * hash) + getSharedSecretHash().hashCode();
2158     }
2159     if (hasStatus()) {
2160       hash = (37 * hash) + STATUS_FIELD_NUMBER;
2161       hash = (53 * hash) + getStatus().hashCode();
2162     }
2163     if (hasTargetVpnGateway()) {
2164       hash = (37 * hash) + TARGET_VPN_GATEWAY_FIELD_NUMBER;
2165       hash = (53 * hash) + getTargetVpnGateway().hashCode();
2166     }
2167     if (hasVpnGateway()) {
2168       hash = (37 * hash) + VPN_GATEWAY_FIELD_NUMBER;
2169       hash = (53 * hash) + getVpnGateway().hashCode();
2170     }
2171     if (hasVpnGatewayInterface()) {
2172       hash = (37 * hash) + VPN_GATEWAY_INTERFACE_FIELD_NUMBER;
2173       hash = (53 * hash) + getVpnGatewayInterface();
2174     }
2175     hash = (29 * hash) + getUnknownFields().hashCode();
2176     memoizedHashCode = hash;
2177     return hash;
2178   }
2179 
parseFrom(java.nio.ByteBuffer data)2180   public static com.google.cloud.compute.v1.VpnTunnel parseFrom(java.nio.ByteBuffer data)
2181       throws com.google.protobuf.InvalidProtocolBufferException {
2182     return PARSER.parseFrom(data);
2183   }
2184 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2185   public static com.google.cloud.compute.v1.VpnTunnel parseFrom(
2186       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2187       throws com.google.protobuf.InvalidProtocolBufferException {
2188     return PARSER.parseFrom(data, extensionRegistry);
2189   }
2190 
parseFrom(com.google.protobuf.ByteString data)2191   public static com.google.cloud.compute.v1.VpnTunnel parseFrom(com.google.protobuf.ByteString data)
2192       throws com.google.protobuf.InvalidProtocolBufferException {
2193     return PARSER.parseFrom(data);
2194   }
2195 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2196   public static com.google.cloud.compute.v1.VpnTunnel parseFrom(
2197       com.google.protobuf.ByteString data,
2198       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2199       throws com.google.protobuf.InvalidProtocolBufferException {
2200     return PARSER.parseFrom(data, extensionRegistry);
2201   }
2202 
parseFrom(byte[] data)2203   public static com.google.cloud.compute.v1.VpnTunnel parseFrom(byte[] data)
2204       throws com.google.protobuf.InvalidProtocolBufferException {
2205     return PARSER.parseFrom(data);
2206   }
2207 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2208   public static com.google.cloud.compute.v1.VpnTunnel parseFrom(
2209       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2210       throws com.google.protobuf.InvalidProtocolBufferException {
2211     return PARSER.parseFrom(data, extensionRegistry);
2212   }
2213 
parseFrom(java.io.InputStream input)2214   public static com.google.cloud.compute.v1.VpnTunnel parseFrom(java.io.InputStream input)
2215       throws java.io.IOException {
2216     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
2217   }
2218 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2219   public static com.google.cloud.compute.v1.VpnTunnel parseFrom(
2220       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2221       throws java.io.IOException {
2222     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
2223         PARSER, input, extensionRegistry);
2224   }
2225 
parseDelimitedFrom(java.io.InputStream input)2226   public static com.google.cloud.compute.v1.VpnTunnel parseDelimitedFrom(java.io.InputStream input)
2227       throws java.io.IOException {
2228     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
2229   }
2230 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2231   public static com.google.cloud.compute.v1.VpnTunnel parseDelimitedFrom(
2232       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2233       throws java.io.IOException {
2234     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
2235         PARSER, input, extensionRegistry);
2236   }
2237 
parseFrom( com.google.protobuf.CodedInputStream input)2238   public static com.google.cloud.compute.v1.VpnTunnel parseFrom(
2239       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
2240     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
2241   }
2242 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2243   public static com.google.cloud.compute.v1.VpnTunnel parseFrom(
2244       com.google.protobuf.CodedInputStream input,
2245       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2246       throws java.io.IOException {
2247     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
2248         PARSER, input, extensionRegistry);
2249   }
2250 
2251   @java.lang.Override
newBuilderForType()2252   public Builder newBuilderForType() {
2253     return newBuilder();
2254   }
2255 
newBuilder()2256   public static Builder newBuilder() {
2257     return DEFAULT_INSTANCE.toBuilder();
2258   }
2259 
newBuilder(com.google.cloud.compute.v1.VpnTunnel prototype)2260   public static Builder newBuilder(com.google.cloud.compute.v1.VpnTunnel prototype) {
2261     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
2262   }
2263 
2264   @java.lang.Override
toBuilder()2265   public Builder toBuilder() {
2266     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
2267   }
2268 
2269   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)2270   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
2271     Builder builder = new Builder(parent);
2272     return builder;
2273   }
2274   /**
2275    *
2276    *
2277    * <pre>
2278    * Represents a Cloud VPN Tunnel resource. For more information about VPN, read the the Cloud VPN Overview.
2279    * </pre>
2280    *
2281    * Protobuf type {@code google.cloud.compute.v1.VpnTunnel}
2282    */
2283   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
2284       implements
2285       // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.VpnTunnel)
2286       com.google.cloud.compute.v1.VpnTunnelOrBuilder {
getDescriptor()2287     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
2288       return com.google.cloud.compute.v1.Compute
2289           .internal_static_google_cloud_compute_v1_VpnTunnel_descriptor;
2290     }
2291 
2292     @java.lang.Override
2293     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()2294         internalGetFieldAccessorTable() {
2295       return com.google.cloud.compute.v1.Compute
2296           .internal_static_google_cloud_compute_v1_VpnTunnel_fieldAccessorTable
2297           .ensureFieldAccessorsInitialized(
2298               com.google.cloud.compute.v1.VpnTunnel.class,
2299               com.google.cloud.compute.v1.VpnTunnel.Builder.class);
2300     }
2301 
2302     // Construct using com.google.cloud.compute.v1.VpnTunnel.newBuilder()
Builder()2303     private Builder() {}
2304 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)2305     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
2306       super(parent);
2307     }
2308 
2309     @java.lang.Override
clear()2310     public Builder clear() {
2311       super.clear();
2312       bitField0_ = 0;
2313       creationTimestamp_ = "";
2314       description_ = "";
2315       detailedStatus_ = "";
2316       id_ = 0L;
2317       ikeVersion_ = 0;
2318       kind_ = "";
2319       localTrafficSelector_ = com.google.protobuf.LazyStringArrayList.EMPTY;
2320       bitField0_ = (bitField0_ & ~0x00000040);
2321       name_ = "";
2322       peerExternalGateway_ = "";
2323       peerExternalGatewayInterface_ = 0;
2324       peerGcpGateway_ = "";
2325       peerIp_ = "";
2326       region_ = "";
2327       remoteTrafficSelector_ = com.google.protobuf.LazyStringArrayList.EMPTY;
2328       bitField0_ = (bitField0_ & ~0x00002000);
2329       router_ = "";
2330       selfLink_ = "";
2331       sharedSecret_ = "";
2332       sharedSecretHash_ = "";
2333       status_ = "";
2334       targetVpnGateway_ = "";
2335       vpnGateway_ = "";
2336       vpnGatewayInterface_ = 0;
2337       return this;
2338     }
2339 
2340     @java.lang.Override
getDescriptorForType()2341     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
2342       return com.google.cloud.compute.v1.Compute
2343           .internal_static_google_cloud_compute_v1_VpnTunnel_descriptor;
2344     }
2345 
2346     @java.lang.Override
getDefaultInstanceForType()2347     public com.google.cloud.compute.v1.VpnTunnel getDefaultInstanceForType() {
2348       return com.google.cloud.compute.v1.VpnTunnel.getDefaultInstance();
2349     }
2350 
2351     @java.lang.Override
build()2352     public com.google.cloud.compute.v1.VpnTunnel build() {
2353       com.google.cloud.compute.v1.VpnTunnel result = buildPartial();
2354       if (!result.isInitialized()) {
2355         throw newUninitializedMessageException(result);
2356       }
2357       return result;
2358     }
2359 
2360     @java.lang.Override
buildPartial()2361     public com.google.cloud.compute.v1.VpnTunnel buildPartial() {
2362       com.google.cloud.compute.v1.VpnTunnel result =
2363           new com.google.cloud.compute.v1.VpnTunnel(this);
2364       buildPartialRepeatedFields(result);
2365       if (bitField0_ != 0) {
2366         buildPartial0(result);
2367       }
2368       onBuilt();
2369       return result;
2370     }
2371 
buildPartialRepeatedFields(com.google.cloud.compute.v1.VpnTunnel result)2372     private void buildPartialRepeatedFields(com.google.cloud.compute.v1.VpnTunnel result) {
2373       if (((bitField0_ & 0x00000040) != 0)) {
2374         localTrafficSelector_ = localTrafficSelector_.getUnmodifiableView();
2375         bitField0_ = (bitField0_ & ~0x00000040);
2376       }
2377       result.localTrafficSelector_ = localTrafficSelector_;
2378       if (((bitField0_ & 0x00002000) != 0)) {
2379         remoteTrafficSelector_ = remoteTrafficSelector_.getUnmodifiableView();
2380         bitField0_ = (bitField0_ & ~0x00002000);
2381       }
2382       result.remoteTrafficSelector_ = remoteTrafficSelector_;
2383     }
2384 
buildPartial0(com.google.cloud.compute.v1.VpnTunnel result)2385     private void buildPartial0(com.google.cloud.compute.v1.VpnTunnel result) {
2386       int from_bitField0_ = bitField0_;
2387       int to_bitField0_ = 0;
2388       if (((from_bitField0_ & 0x00000001) != 0)) {
2389         result.creationTimestamp_ = creationTimestamp_;
2390         to_bitField0_ |= 0x00000001;
2391       }
2392       if (((from_bitField0_ & 0x00000002) != 0)) {
2393         result.description_ = description_;
2394         to_bitField0_ |= 0x00000002;
2395       }
2396       if (((from_bitField0_ & 0x00000004) != 0)) {
2397         result.detailedStatus_ = detailedStatus_;
2398         to_bitField0_ |= 0x00000004;
2399       }
2400       if (((from_bitField0_ & 0x00000008) != 0)) {
2401         result.id_ = id_;
2402         to_bitField0_ |= 0x00000008;
2403       }
2404       if (((from_bitField0_ & 0x00000010) != 0)) {
2405         result.ikeVersion_ = ikeVersion_;
2406         to_bitField0_ |= 0x00000010;
2407       }
2408       if (((from_bitField0_ & 0x00000020) != 0)) {
2409         result.kind_ = kind_;
2410         to_bitField0_ |= 0x00000020;
2411       }
2412       if (((from_bitField0_ & 0x00000080) != 0)) {
2413         result.name_ = name_;
2414         to_bitField0_ |= 0x00000040;
2415       }
2416       if (((from_bitField0_ & 0x00000100) != 0)) {
2417         result.peerExternalGateway_ = peerExternalGateway_;
2418         to_bitField0_ |= 0x00000080;
2419       }
2420       if (((from_bitField0_ & 0x00000200) != 0)) {
2421         result.peerExternalGatewayInterface_ = peerExternalGatewayInterface_;
2422         to_bitField0_ |= 0x00000100;
2423       }
2424       if (((from_bitField0_ & 0x00000400) != 0)) {
2425         result.peerGcpGateway_ = peerGcpGateway_;
2426         to_bitField0_ |= 0x00000200;
2427       }
2428       if (((from_bitField0_ & 0x00000800) != 0)) {
2429         result.peerIp_ = peerIp_;
2430         to_bitField0_ |= 0x00000400;
2431       }
2432       if (((from_bitField0_ & 0x00001000) != 0)) {
2433         result.region_ = region_;
2434         to_bitField0_ |= 0x00000800;
2435       }
2436       if (((from_bitField0_ & 0x00004000) != 0)) {
2437         result.router_ = router_;
2438         to_bitField0_ |= 0x00001000;
2439       }
2440       if (((from_bitField0_ & 0x00008000) != 0)) {
2441         result.selfLink_ = selfLink_;
2442         to_bitField0_ |= 0x00002000;
2443       }
2444       if (((from_bitField0_ & 0x00010000) != 0)) {
2445         result.sharedSecret_ = sharedSecret_;
2446         to_bitField0_ |= 0x00004000;
2447       }
2448       if (((from_bitField0_ & 0x00020000) != 0)) {
2449         result.sharedSecretHash_ = sharedSecretHash_;
2450         to_bitField0_ |= 0x00008000;
2451       }
2452       if (((from_bitField0_ & 0x00040000) != 0)) {
2453         result.status_ = status_;
2454         to_bitField0_ |= 0x00010000;
2455       }
2456       if (((from_bitField0_ & 0x00080000) != 0)) {
2457         result.targetVpnGateway_ = targetVpnGateway_;
2458         to_bitField0_ |= 0x00020000;
2459       }
2460       if (((from_bitField0_ & 0x00100000) != 0)) {
2461         result.vpnGateway_ = vpnGateway_;
2462         to_bitField0_ |= 0x00040000;
2463       }
2464       if (((from_bitField0_ & 0x00200000) != 0)) {
2465         result.vpnGatewayInterface_ = vpnGatewayInterface_;
2466         to_bitField0_ |= 0x00080000;
2467       }
2468       result.bitField0_ |= to_bitField0_;
2469     }
2470 
2471     @java.lang.Override
clone()2472     public Builder clone() {
2473       return super.clone();
2474     }
2475 
2476     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2477     public Builder setField(
2478         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
2479       return super.setField(field, value);
2480     }
2481 
2482     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)2483     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
2484       return super.clearField(field);
2485     }
2486 
2487     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)2488     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
2489       return super.clearOneof(oneof);
2490     }
2491 
2492     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)2493     public Builder setRepeatedField(
2494         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
2495       return super.setRepeatedField(field, index, value);
2496     }
2497 
2498     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2499     public Builder addRepeatedField(
2500         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
2501       return super.addRepeatedField(field, value);
2502     }
2503 
2504     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)2505     public Builder mergeFrom(com.google.protobuf.Message other) {
2506       if (other instanceof com.google.cloud.compute.v1.VpnTunnel) {
2507         return mergeFrom((com.google.cloud.compute.v1.VpnTunnel) other);
2508       } else {
2509         super.mergeFrom(other);
2510         return this;
2511       }
2512     }
2513 
mergeFrom(com.google.cloud.compute.v1.VpnTunnel other)2514     public Builder mergeFrom(com.google.cloud.compute.v1.VpnTunnel other) {
2515       if (other == com.google.cloud.compute.v1.VpnTunnel.getDefaultInstance()) return this;
2516       if (other.hasCreationTimestamp()) {
2517         creationTimestamp_ = other.creationTimestamp_;
2518         bitField0_ |= 0x00000001;
2519         onChanged();
2520       }
2521       if (other.hasDescription()) {
2522         description_ = other.description_;
2523         bitField0_ |= 0x00000002;
2524         onChanged();
2525       }
2526       if (other.hasDetailedStatus()) {
2527         detailedStatus_ = other.detailedStatus_;
2528         bitField0_ |= 0x00000004;
2529         onChanged();
2530       }
2531       if (other.hasId()) {
2532         setId(other.getId());
2533       }
2534       if (other.hasIkeVersion()) {
2535         setIkeVersion(other.getIkeVersion());
2536       }
2537       if (other.hasKind()) {
2538         kind_ = other.kind_;
2539         bitField0_ |= 0x00000020;
2540         onChanged();
2541       }
2542       if (!other.localTrafficSelector_.isEmpty()) {
2543         if (localTrafficSelector_.isEmpty()) {
2544           localTrafficSelector_ = other.localTrafficSelector_;
2545           bitField0_ = (bitField0_ & ~0x00000040);
2546         } else {
2547           ensureLocalTrafficSelectorIsMutable();
2548           localTrafficSelector_.addAll(other.localTrafficSelector_);
2549         }
2550         onChanged();
2551       }
2552       if (other.hasName()) {
2553         name_ = other.name_;
2554         bitField0_ |= 0x00000080;
2555         onChanged();
2556       }
2557       if (other.hasPeerExternalGateway()) {
2558         peerExternalGateway_ = other.peerExternalGateway_;
2559         bitField0_ |= 0x00000100;
2560         onChanged();
2561       }
2562       if (other.hasPeerExternalGatewayInterface()) {
2563         setPeerExternalGatewayInterface(other.getPeerExternalGatewayInterface());
2564       }
2565       if (other.hasPeerGcpGateway()) {
2566         peerGcpGateway_ = other.peerGcpGateway_;
2567         bitField0_ |= 0x00000400;
2568         onChanged();
2569       }
2570       if (other.hasPeerIp()) {
2571         peerIp_ = other.peerIp_;
2572         bitField0_ |= 0x00000800;
2573         onChanged();
2574       }
2575       if (other.hasRegion()) {
2576         region_ = other.region_;
2577         bitField0_ |= 0x00001000;
2578         onChanged();
2579       }
2580       if (!other.remoteTrafficSelector_.isEmpty()) {
2581         if (remoteTrafficSelector_.isEmpty()) {
2582           remoteTrafficSelector_ = other.remoteTrafficSelector_;
2583           bitField0_ = (bitField0_ & ~0x00002000);
2584         } else {
2585           ensureRemoteTrafficSelectorIsMutable();
2586           remoteTrafficSelector_.addAll(other.remoteTrafficSelector_);
2587         }
2588         onChanged();
2589       }
2590       if (other.hasRouter()) {
2591         router_ = other.router_;
2592         bitField0_ |= 0x00004000;
2593         onChanged();
2594       }
2595       if (other.hasSelfLink()) {
2596         selfLink_ = other.selfLink_;
2597         bitField0_ |= 0x00008000;
2598         onChanged();
2599       }
2600       if (other.hasSharedSecret()) {
2601         sharedSecret_ = other.sharedSecret_;
2602         bitField0_ |= 0x00010000;
2603         onChanged();
2604       }
2605       if (other.hasSharedSecretHash()) {
2606         sharedSecretHash_ = other.sharedSecretHash_;
2607         bitField0_ |= 0x00020000;
2608         onChanged();
2609       }
2610       if (other.hasStatus()) {
2611         status_ = other.status_;
2612         bitField0_ |= 0x00040000;
2613         onChanged();
2614       }
2615       if (other.hasTargetVpnGateway()) {
2616         targetVpnGateway_ = other.targetVpnGateway_;
2617         bitField0_ |= 0x00080000;
2618         onChanged();
2619       }
2620       if (other.hasVpnGateway()) {
2621         vpnGateway_ = other.vpnGateway_;
2622         bitField0_ |= 0x00100000;
2623         onChanged();
2624       }
2625       if (other.hasVpnGatewayInterface()) {
2626         setVpnGatewayInterface(other.getVpnGatewayInterface());
2627       }
2628       this.mergeUnknownFields(other.getUnknownFields());
2629       onChanged();
2630       return this;
2631     }
2632 
2633     @java.lang.Override
isInitialized()2634     public final boolean isInitialized() {
2635       return true;
2636     }
2637 
2638     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2639     public Builder mergeFrom(
2640         com.google.protobuf.CodedInputStream input,
2641         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2642         throws java.io.IOException {
2643       if (extensionRegistry == null) {
2644         throw new java.lang.NullPointerException();
2645       }
2646       try {
2647         boolean done = false;
2648         while (!done) {
2649           int tag = input.readTag();
2650           switch (tag) {
2651             case 0:
2652               done = true;
2653               break;
2654             case 26840:
2655               {
2656                 id_ = input.readUInt64();
2657                 bitField0_ |= 0x00000008;
2658                 break;
2659               } // case 26840
2660             case 26336418:
2661               {
2662                 kind_ = input.readStringRequireUtf8();
2663                 bitField0_ |= 0x00000020;
2664                 break;
2665               } // case 26336418
2666             case 26989658:
2667               {
2668                 name_ = input.readStringRequireUtf8();
2669                 bitField0_ |= 0x00000080;
2670                 break;
2671               } // case 26989658
2672             case 244202930:
2673               {
2674                 creationTimestamp_ = input.readStringRequireUtf8();
2675                 bitField0_ |= 0x00000001;
2676                 break;
2677               } // case 244202930
2678             case 767832984:
2679               {
2680                 vpnGatewayInterface_ = input.readInt32();
2681                 bitField0_ |= 0x00200000;
2682                 break;
2683               } // case 767832984
2684             case 1111570338:
2685               {
2686                 region_ = input.readStringRequireUtf8();
2687                 bitField0_ |= 0x00001000;
2688                 break;
2689               } // case 1111570338
2690             case 1188870730:
2691               {
2692                 router_ = input.readStringRequireUtf8();
2693                 bitField0_ |= 0x00004000;
2694                 break;
2695               } // case 1188870730
2696             case 1450082194:
2697               {
2698                 status_ = input.readStringRequireUtf8();
2699                 bitField0_ |= 0x00040000;
2700                 break;
2701               } // case 1450082194
2702             case 1747009760:
2703               {
2704                 ikeVersion_ = input.readInt32();
2705                 bitField0_ |= 0x00000010;
2706                 break;
2707               } // case 1747009760
2708             case -2040027678:
2709               {
2710                 peerGcpGateway_ = input.readStringRequireUtf8();
2711                 bitField0_ |= 0x00000400;
2712                 break;
2713               } // case -2040027678
2714             case -1756450390:
2715               {
2716                 java.lang.String s = input.readStringRequireUtf8();
2717                 ensureLocalTrafficSelectorIsMutable();
2718                 localTrafficSelector_.add(s);
2719                 break;
2720               } // case -1756450390
2721             case -1626959094:
2722               {
2723                 detailedStatus_ = input.readStringRequireUtf8();
2724                 bitField0_ |= 0x00000004;
2725                 break;
2726               } // case -1626959094
2727             case -1423870510:
2728               {
2729                 java.lang.String s = input.readStringRequireUtf8();
2730                 ensureRemoteTrafficSelectorIsMutable();
2731                 remoteTrafficSelector_.add(s);
2732                 break;
2733               } // case -1423870510
2734             case -1239507374:
2735               {
2736                 sharedSecret_ = input.readStringRequireUtf8();
2737                 bitField0_ |= 0x00010000;
2738                 break;
2739               } // case -1239507374
2740             case -1228969694:
2741               {
2742                 peerIp_ = input.readStringRequireUtf8();
2743                 bitField0_ |= 0x00000800;
2744                 break;
2745               } // case -1228969694
2746             case -1215317910:
2747               {
2748                 peerExternalGateway_ = input.readStringRequireUtf8();
2749                 bitField0_ |= 0x00000100;
2750                 break;
2751               } // case -1215317910
2752             case -1103912166:
2753               {
2754                 sharedSecretHash_ = input.readStringRequireUtf8();
2755                 bitField0_ |= 0x00020000;
2756                 break;
2757               } // case -1103912166
2758             case -1041494070:
2759               {
2760                 vpnGateway_ = input.readStringRequireUtf8();
2761                 bitField0_ |= 0x00100000;
2762                 break;
2763               } // case -1041494070
2764             case -911466526:
2765               {
2766                 description_ = input.readStringRequireUtf8();
2767                 bitField0_ |= 0x00000002;
2768                 break;
2769               } // case -911466526
2770             case -672820168:
2771               {
2772                 peerExternalGatewayInterface_ = input.readInt32();
2773                 bitField0_ |= 0x00000200;
2774                 break;
2775               } // case -672820168
2776             case -645248918:
2777               {
2778                 selfLink_ = input.readStringRequireUtf8();
2779                 bitField0_ |= 0x00008000;
2780                 break;
2781               } // case -645248918
2782             case -34864550:
2783               {
2784                 targetVpnGateway_ = input.readStringRequireUtf8();
2785                 bitField0_ |= 0x00080000;
2786                 break;
2787               } // case -34864550
2788             default:
2789               {
2790                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
2791                   done = true; // was an endgroup tag
2792                 }
2793                 break;
2794               } // default:
2795           } // switch (tag)
2796         } // while (!done)
2797       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2798         throw e.unwrapIOException();
2799       } finally {
2800         onChanged();
2801       } // finally
2802       return this;
2803     }
2804 
2805     private int bitField0_;
2806 
2807     private java.lang.Object creationTimestamp_ = "";
2808     /**
2809      *
2810      *
2811      * <pre>
2812      * [Output Only] Creation timestamp in RFC3339 text format.
2813      * </pre>
2814      *
2815      * <code>optional string creation_timestamp = 30525366;</code>
2816      *
2817      * @return Whether the creationTimestamp field is set.
2818      */
hasCreationTimestamp()2819     public boolean hasCreationTimestamp() {
2820       return ((bitField0_ & 0x00000001) != 0);
2821     }
2822     /**
2823      *
2824      *
2825      * <pre>
2826      * [Output Only] Creation timestamp in RFC3339 text format.
2827      * </pre>
2828      *
2829      * <code>optional string creation_timestamp = 30525366;</code>
2830      *
2831      * @return The creationTimestamp.
2832      */
getCreationTimestamp()2833     public java.lang.String getCreationTimestamp() {
2834       java.lang.Object ref = creationTimestamp_;
2835       if (!(ref instanceof java.lang.String)) {
2836         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2837         java.lang.String s = bs.toStringUtf8();
2838         creationTimestamp_ = s;
2839         return s;
2840       } else {
2841         return (java.lang.String) ref;
2842       }
2843     }
2844     /**
2845      *
2846      *
2847      * <pre>
2848      * [Output Only] Creation timestamp in RFC3339 text format.
2849      * </pre>
2850      *
2851      * <code>optional string creation_timestamp = 30525366;</code>
2852      *
2853      * @return The bytes for creationTimestamp.
2854      */
getCreationTimestampBytes()2855     public com.google.protobuf.ByteString getCreationTimestampBytes() {
2856       java.lang.Object ref = creationTimestamp_;
2857       if (ref instanceof String) {
2858         com.google.protobuf.ByteString b =
2859             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2860         creationTimestamp_ = b;
2861         return b;
2862       } else {
2863         return (com.google.protobuf.ByteString) ref;
2864       }
2865     }
2866     /**
2867      *
2868      *
2869      * <pre>
2870      * [Output Only] Creation timestamp in RFC3339 text format.
2871      * </pre>
2872      *
2873      * <code>optional string creation_timestamp = 30525366;</code>
2874      *
2875      * @param value The creationTimestamp to set.
2876      * @return This builder for chaining.
2877      */
setCreationTimestamp(java.lang.String value)2878     public Builder setCreationTimestamp(java.lang.String value) {
2879       if (value == null) {
2880         throw new NullPointerException();
2881       }
2882       creationTimestamp_ = value;
2883       bitField0_ |= 0x00000001;
2884       onChanged();
2885       return this;
2886     }
2887     /**
2888      *
2889      *
2890      * <pre>
2891      * [Output Only] Creation timestamp in RFC3339 text format.
2892      * </pre>
2893      *
2894      * <code>optional string creation_timestamp = 30525366;</code>
2895      *
2896      * @return This builder for chaining.
2897      */
clearCreationTimestamp()2898     public Builder clearCreationTimestamp() {
2899       creationTimestamp_ = getDefaultInstance().getCreationTimestamp();
2900       bitField0_ = (bitField0_ & ~0x00000001);
2901       onChanged();
2902       return this;
2903     }
2904     /**
2905      *
2906      *
2907      * <pre>
2908      * [Output Only] Creation timestamp in RFC3339 text format.
2909      * </pre>
2910      *
2911      * <code>optional string creation_timestamp = 30525366;</code>
2912      *
2913      * @param value The bytes for creationTimestamp to set.
2914      * @return This builder for chaining.
2915      */
setCreationTimestampBytes(com.google.protobuf.ByteString value)2916     public Builder setCreationTimestampBytes(com.google.protobuf.ByteString value) {
2917       if (value == null) {
2918         throw new NullPointerException();
2919       }
2920       checkByteStringIsUtf8(value);
2921       creationTimestamp_ = value;
2922       bitField0_ |= 0x00000001;
2923       onChanged();
2924       return this;
2925     }
2926 
2927     private java.lang.Object description_ = "";
2928     /**
2929      *
2930      *
2931      * <pre>
2932      * An optional description of this resource. Provide this property when you create the resource.
2933      * </pre>
2934      *
2935      * <code>optional string description = 422937596;</code>
2936      *
2937      * @return Whether the description field is set.
2938      */
hasDescription()2939     public boolean hasDescription() {
2940       return ((bitField0_ & 0x00000002) != 0);
2941     }
2942     /**
2943      *
2944      *
2945      * <pre>
2946      * An optional description of this resource. Provide this property when you create the resource.
2947      * </pre>
2948      *
2949      * <code>optional string description = 422937596;</code>
2950      *
2951      * @return The description.
2952      */
getDescription()2953     public java.lang.String getDescription() {
2954       java.lang.Object ref = description_;
2955       if (!(ref instanceof java.lang.String)) {
2956         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2957         java.lang.String s = bs.toStringUtf8();
2958         description_ = s;
2959         return s;
2960       } else {
2961         return (java.lang.String) ref;
2962       }
2963     }
2964     /**
2965      *
2966      *
2967      * <pre>
2968      * An optional description of this resource. Provide this property when you create the resource.
2969      * </pre>
2970      *
2971      * <code>optional string description = 422937596;</code>
2972      *
2973      * @return The bytes for description.
2974      */
getDescriptionBytes()2975     public com.google.protobuf.ByteString getDescriptionBytes() {
2976       java.lang.Object ref = description_;
2977       if (ref instanceof String) {
2978         com.google.protobuf.ByteString b =
2979             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2980         description_ = b;
2981         return b;
2982       } else {
2983         return (com.google.protobuf.ByteString) ref;
2984       }
2985     }
2986     /**
2987      *
2988      *
2989      * <pre>
2990      * An optional description of this resource. Provide this property when you create the resource.
2991      * </pre>
2992      *
2993      * <code>optional string description = 422937596;</code>
2994      *
2995      * @param value The description to set.
2996      * @return This builder for chaining.
2997      */
setDescription(java.lang.String value)2998     public Builder setDescription(java.lang.String value) {
2999       if (value == null) {
3000         throw new NullPointerException();
3001       }
3002       description_ = value;
3003       bitField0_ |= 0x00000002;
3004       onChanged();
3005       return this;
3006     }
3007     /**
3008      *
3009      *
3010      * <pre>
3011      * An optional description of this resource. Provide this property when you create the resource.
3012      * </pre>
3013      *
3014      * <code>optional string description = 422937596;</code>
3015      *
3016      * @return This builder for chaining.
3017      */
clearDescription()3018     public Builder clearDescription() {
3019       description_ = getDefaultInstance().getDescription();
3020       bitField0_ = (bitField0_ & ~0x00000002);
3021       onChanged();
3022       return this;
3023     }
3024     /**
3025      *
3026      *
3027      * <pre>
3028      * An optional description of this resource. Provide this property when you create the resource.
3029      * </pre>
3030      *
3031      * <code>optional string description = 422937596;</code>
3032      *
3033      * @param value The bytes for description to set.
3034      * @return This builder for chaining.
3035      */
setDescriptionBytes(com.google.protobuf.ByteString value)3036     public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
3037       if (value == null) {
3038         throw new NullPointerException();
3039       }
3040       checkByteStringIsUtf8(value);
3041       description_ = value;
3042       bitField0_ |= 0x00000002;
3043       onChanged();
3044       return this;
3045     }
3046 
3047     private java.lang.Object detailedStatus_ = "";
3048     /**
3049      *
3050      *
3051      * <pre>
3052      * [Output Only] Detailed status message for the VPN tunnel.
3053      * </pre>
3054      *
3055      * <code>optional string detailed_status = 333501025;</code>
3056      *
3057      * @return Whether the detailedStatus field is set.
3058      */
hasDetailedStatus()3059     public boolean hasDetailedStatus() {
3060       return ((bitField0_ & 0x00000004) != 0);
3061     }
3062     /**
3063      *
3064      *
3065      * <pre>
3066      * [Output Only] Detailed status message for the VPN tunnel.
3067      * </pre>
3068      *
3069      * <code>optional string detailed_status = 333501025;</code>
3070      *
3071      * @return The detailedStatus.
3072      */
getDetailedStatus()3073     public java.lang.String getDetailedStatus() {
3074       java.lang.Object ref = detailedStatus_;
3075       if (!(ref instanceof java.lang.String)) {
3076         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3077         java.lang.String s = bs.toStringUtf8();
3078         detailedStatus_ = s;
3079         return s;
3080       } else {
3081         return (java.lang.String) ref;
3082       }
3083     }
3084     /**
3085      *
3086      *
3087      * <pre>
3088      * [Output Only] Detailed status message for the VPN tunnel.
3089      * </pre>
3090      *
3091      * <code>optional string detailed_status = 333501025;</code>
3092      *
3093      * @return The bytes for detailedStatus.
3094      */
getDetailedStatusBytes()3095     public com.google.protobuf.ByteString getDetailedStatusBytes() {
3096       java.lang.Object ref = detailedStatus_;
3097       if (ref instanceof String) {
3098         com.google.protobuf.ByteString b =
3099             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3100         detailedStatus_ = b;
3101         return b;
3102       } else {
3103         return (com.google.protobuf.ByteString) ref;
3104       }
3105     }
3106     /**
3107      *
3108      *
3109      * <pre>
3110      * [Output Only] Detailed status message for the VPN tunnel.
3111      * </pre>
3112      *
3113      * <code>optional string detailed_status = 333501025;</code>
3114      *
3115      * @param value The detailedStatus to set.
3116      * @return This builder for chaining.
3117      */
setDetailedStatus(java.lang.String value)3118     public Builder setDetailedStatus(java.lang.String value) {
3119       if (value == null) {
3120         throw new NullPointerException();
3121       }
3122       detailedStatus_ = value;
3123       bitField0_ |= 0x00000004;
3124       onChanged();
3125       return this;
3126     }
3127     /**
3128      *
3129      *
3130      * <pre>
3131      * [Output Only] Detailed status message for the VPN tunnel.
3132      * </pre>
3133      *
3134      * <code>optional string detailed_status = 333501025;</code>
3135      *
3136      * @return This builder for chaining.
3137      */
clearDetailedStatus()3138     public Builder clearDetailedStatus() {
3139       detailedStatus_ = getDefaultInstance().getDetailedStatus();
3140       bitField0_ = (bitField0_ & ~0x00000004);
3141       onChanged();
3142       return this;
3143     }
3144     /**
3145      *
3146      *
3147      * <pre>
3148      * [Output Only] Detailed status message for the VPN tunnel.
3149      * </pre>
3150      *
3151      * <code>optional string detailed_status = 333501025;</code>
3152      *
3153      * @param value The bytes for detailedStatus to set.
3154      * @return This builder for chaining.
3155      */
setDetailedStatusBytes(com.google.protobuf.ByteString value)3156     public Builder setDetailedStatusBytes(com.google.protobuf.ByteString value) {
3157       if (value == null) {
3158         throw new NullPointerException();
3159       }
3160       checkByteStringIsUtf8(value);
3161       detailedStatus_ = value;
3162       bitField0_ |= 0x00000004;
3163       onChanged();
3164       return this;
3165     }
3166 
3167     private long id_;
3168     /**
3169      *
3170      *
3171      * <pre>
3172      * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3173      * </pre>
3174      *
3175      * <code>optional uint64 id = 3355;</code>
3176      *
3177      * @return Whether the id field is set.
3178      */
3179     @java.lang.Override
hasId()3180     public boolean hasId() {
3181       return ((bitField0_ & 0x00000008) != 0);
3182     }
3183     /**
3184      *
3185      *
3186      * <pre>
3187      * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3188      * </pre>
3189      *
3190      * <code>optional uint64 id = 3355;</code>
3191      *
3192      * @return The id.
3193      */
3194     @java.lang.Override
getId()3195     public long getId() {
3196       return id_;
3197     }
3198     /**
3199      *
3200      *
3201      * <pre>
3202      * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3203      * </pre>
3204      *
3205      * <code>optional uint64 id = 3355;</code>
3206      *
3207      * @param value The id to set.
3208      * @return This builder for chaining.
3209      */
setId(long value)3210     public Builder setId(long value) {
3211 
3212       id_ = value;
3213       bitField0_ |= 0x00000008;
3214       onChanged();
3215       return this;
3216     }
3217     /**
3218      *
3219      *
3220      * <pre>
3221      * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3222      * </pre>
3223      *
3224      * <code>optional uint64 id = 3355;</code>
3225      *
3226      * @return This builder for chaining.
3227      */
clearId()3228     public Builder clearId() {
3229       bitField0_ = (bitField0_ & ~0x00000008);
3230       id_ = 0L;
3231       onChanged();
3232       return this;
3233     }
3234 
3235     private int ikeVersion_;
3236     /**
3237      *
3238      *
3239      * <pre>
3240      * IKE protocol version to use when establishing the VPN tunnel with the peer VPN gateway. Acceptable IKE versions are 1 or 2. The default version is 2.
3241      * </pre>
3242      *
3243      * <code>optional int32 ike_version = 218376220;</code>
3244      *
3245      * @return Whether the ikeVersion field is set.
3246      */
3247     @java.lang.Override
hasIkeVersion()3248     public boolean hasIkeVersion() {
3249       return ((bitField0_ & 0x00000010) != 0);
3250     }
3251     /**
3252      *
3253      *
3254      * <pre>
3255      * IKE protocol version to use when establishing the VPN tunnel with the peer VPN gateway. Acceptable IKE versions are 1 or 2. The default version is 2.
3256      * </pre>
3257      *
3258      * <code>optional int32 ike_version = 218376220;</code>
3259      *
3260      * @return The ikeVersion.
3261      */
3262     @java.lang.Override
getIkeVersion()3263     public int getIkeVersion() {
3264       return ikeVersion_;
3265     }
3266     /**
3267      *
3268      *
3269      * <pre>
3270      * IKE protocol version to use when establishing the VPN tunnel with the peer VPN gateway. Acceptable IKE versions are 1 or 2. The default version is 2.
3271      * </pre>
3272      *
3273      * <code>optional int32 ike_version = 218376220;</code>
3274      *
3275      * @param value The ikeVersion to set.
3276      * @return This builder for chaining.
3277      */
setIkeVersion(int value)3278     public Builder setIkeVersion(int value) {
3279 
3280       ikeVersion_ = value;
3281       bitField0_ |= 0x00000010;
3282       onChanged();
3283       return this;
3284     }
3285     /**
3286      *
3287      *
3288      * <pre>
3289      * IKE protocol version to use when establishing the VPN tunnel with the peer VPN gateway. Acceptable IKE versions are 1 or 2. The default version is 2.
3290      * </pre>
3291      *
3292      * <code>optional int32 ike_version = 218376220;</code>
3293      *
3294      * @return This builder for chaining.
3295      */
clearIkeVersion()3296     public Builder clearIkeVersion() {
3297       bitField0_ = (bitField0_ & ~0x00000010);
3298       ikeVersion_ = 0;
3299       onChanged();
3300       return this;
3301     }
3302 
3303     private java.lang.Object kind_ = "";
3304     /**
3305      *
3306      *
3307      * <pre>
3308      * [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.
3309      * </pre>
3310      *
3311      * <code>optional string kind = 3292052;</code>
3312      *
3313      * @return Whether the kind field is set.
3314      */
hasKind()3315     public boolean hasKind() {
3316       return ((bitField0_ & 0x00000020) != 0);
3317     }
3318     /**
3319      *
3320      *
3321      * <pre>
3322      * [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.
3323      * </pre>
3324      *
3325      * <code>optional string kind = 3292052;</code>
3326      *
3327      * @return The kind.
3328      */
getKind()3329     public java.lang.String getKind() {
3330       java.lang.Object ref = kind_;
3331       if (!(ref instanceof java.lang.String)) {
3332         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3333         java.lang.String s = bs.toStringUtf8();
3334         kind_ = s;
3335         return s;
3336       } else {
3337         return (java.lang.String) ref;
3338       }
3339     }
3340     /**
3341      *
3342      *
3343      * <pre>
3344      * [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.
3345      * </pre>
3346      *
3347      * <code>optional string kind = 3292052;</code>
3348      *
3349      * @return The bytes for kind.
3350      */
getKindBytes()3351     public com.google.protobuf.ByteString getKindBytes() {
3352       java.lang.Object ref = kind_;
3353       if (ref instanceof String) {
3354         com.google.protobuf.ByteString b =
3355             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3356         kind_ = b;
3357         return b;
3358       } else {
3359         return (com.google.protobuf.ByteString) ref;
3360       }
3361     }
3362     /**
3363      *
3364      *
3365      * <pre>
3366      * [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.
3367      * </pre>
3368      *
3369      * <code>optional string kind = 3292052;</code>
3370      *
3371      * @param value The kind to set.
3372      * @return This builder for chaining.
3373      */
setKind(java.lang.String value)3374     public Builder setKind(java.lang.String value) {
3375       if (value == null) {
3376         throw new NullPointerException();
3377       }
3378       kind_ = value;
3379       bitField0_ |= 0x00000020;
3380       onChanged();
3381       return this;
3382     }
3383     /**
3384      *
3385      *
3386      * <pre>
3387      * [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.
3388      * </pre>
3389      *
3390      * <code>optional string kind = 3292052;</code>
3391      *
3392      * @return This builder for chaining.
3393      */
clearKind()3394     public Builder clearKind() {
3395       kind_ = getDefaultInstance().getKind();
3396       bitField0_ = (bitField0_ & ~0x00000020);
3397       onChanged();
3398       return this;
3399     }
3400     /**
3401      *
3402      *
3403      * <pre>
3404      * [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.
3405      * </pre>
3406      *
3407      * <code>optional string kind = 3292052;</code>
3408      *
3409      * @param value The bytes for kind to set.
3410      * @return This builder for chaining.
3411      */
setKindBytes(com.google.protobuf.ByteString value)3412     public Builder setKindBytes(com.google.protobuf.ByteString value) {
3413       if (value == null) {
3414         throw new NullPointerException();
3415       }
3416       checkByteStringIsUtf8(value);
3417       kind_ = value;
3418       bitField0_ |= 0x00000020;
3419       onChanged();
3420       return this;
3421     }
3422 
3423     private com.google.protobuf.LazyStringList localTrafficSelector_ =
3424         com.google.protobuf.LazyStringArrayList.EMPTY;
3425 
ensureLocalTrafficSelectorIsMutable()3426     private void ensureLocalTrafficSelectorIsMutable() {
3427       if (!((bitField0_ & 0x00000040) != 0)) {
3428         localTrafficSelector_ = new com.google.protobuf.LazyStringArrayList(localTrafficSelector_);
3429         bitField0_ |= 0x00000040;
3430       }
3431     }
3432     /**
3433      *
3434      *
3435      * <pre>
3436      * Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported.
3437      * </pre>
3438      *
3439      * <code>repeated string local_traffic_selector = 317314613;</code>
3440      *
3441      * @return A list containing the localTrafficSelector.
3442      */
getLocalTrafficSelectorList()3443     public com.google.protobuf.ProtocolStringList getLocalTrafficSelectorList() {
3444       return localTrafficSelector_.getUnmodifiableView();
3445     }
3446     /**
3447      *
3448      *
3449      * <pre>
3450      * Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported.
3451      * </pre>
3452      *
3453      * <code>repeated string local_traffic_selector = 317314613;</code>
3454      *
3455      * @return The count of localTrafficSelector.
3456      */
getLocalTrafficSelectorCount()3457     public int getLocalTrafficSelectorCount() {
3458       return localTrafficSelector_.size();
3459     }
3460     /**
3461      *
3462      *
3463      * <pre>
3464      * Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported.
3465      * </pre>
3466      *
3467      * <code>repeated string local_traffic_selector = 317314613;</code>
3468      *
3469      * @param index The index of the element to return.
3470      * @return The localTrafficSelector at the given index.
3471      */
getLocalTrafficSelector(int index)3472     public java.lang.String getLocalTrafficSelector(int index) {
3473       return localTrafficSelector_.get(index);
3474     }
3475     /**
3476      *
3477      *
3478      * <pre>
3479      * Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported.
3480      * </pre>
3481      *
3482      * <code>repeated string local_traffic_selector = 317314613;</code>
3483      *
3484      * @param index The index of the value to return.
3485      * @return The bytes of the localTrafficSelector at the given index.
3486      */
getLocalTrafficSelectorBytes(int index)3487     public com.google.protobuf.ByteString getLocalTrafficSelectorBytes(int index) {
3488       return localTrafficSelector_.getByteString(index);
3489     }
3490     /**
3491      *
3492      *
3493      * <pre>
3494      * Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported.
3495      * </pre>
3496      *
3497      * <code>repeated string local_traffic_selector = 317314613;</code>
3498      *
3499      * @param index The index to set the value at.
3500      * @param value The localTrafficSelector to set.
3501      * @return This builder for chaining.
3502      */
setLocalTrafficSelector(int index, java.lang.String value)3503     public Builder setLocalTrafficSelector(int index, java.lang.String value) {
3504       if (value == null) {
3505         throw new NullPointerException();
3506       }
3507       ensureLocalTrafficSelectorIsMutable();
3508       localTrafficSelector_.set(index, value);
3509       onChanged();
3510       return this;
3511     }
3512     /**
3513      *
3514      *
3515      * <pre>
3516      * Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported.
3517      * </pre>
3518      *
3519      * <code>repeated string local_traffic_selector = 317314613;</code>
3520      *
3521      * @param value The localTrafficSelector to add.
3522      * @return This builder for chaining.
3523      */
addLocalTrafficSelector(java.lang.String value)3524     public Builder addLocalTrafficSelector(java.lang.String value) {
3525       if (value == null) {
3526         throw new NullPointerException();
3527       }
3528       ensureLocalTrafficSelectorIsMutable();
3529       localTrafficSelector_.add(value);
3530       onChanged();
3531       return this;
3532     }
3533     /**
3534      *
3535      *
3536      * <pre>
3537      * Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported.
3538      * </pre>
3539      *
3540      * <code>repeated string local_traffic_selector = 317314613;</code>
3541      *
3542      * @param values The localTrafficSelector to add.
3543      * @return This builder for chaining.
3544      */
addAllLocalTrafficSelector(java.lang.Iterable<java.lang.String> values)3545     public Builder addAllLocalTrafficSelector(java.lang.Iterable<java.lang.String> values) {
3546       ensureLocalTrafficSelectorIsMutable();
3547       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, localTrafficSelector_);
3548       onChanged();
3549       return this;
3550     }
3551     /**
3552      *
3553      *
3554      * <pre>
3555      * Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported.
3556      * </pre>
3557      *
3558      * <code>repeated string local_traffic_selector = 317314613;</code>
3559      *
3560      * @return This builder for chaining.
3561      */
clearLocalTrafficSelector()3562     public Builder clearLocalTrafficSelector() {
3563       localTrafficSelector_ = com.google.protobuf.LazyStringArrayList.EMPTY;
3564       bitField0_ = (bitField0_ & ~0x00000040);
3565       onChanged();
3566       return this;
3567     }
3568     /**
3569      *
3570      *
3571      * <pre>
3572      * Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported.
3573      * </pre>
3574      *
3575      * <code>repeated string local_traffic_selector = 317314613;</code>
3576      *
3577      * @param value The bytes of the localTrafficSelector to add.
3578      * @return This builder for chaining.
3579      */
addLocalTrafficSelectorBytes(com.google.protobuf.ByteString value)3580     public Builder addLocalTrafficSelectorBytes(com.google.protobuf.ByteString value) {
3581       if (value == null) {
3582         throw new NullPointerException();
3583       }
3584       checkByteStringIsUtf8(value);
3585       ensureLocalTrafficSelectorIsMutable();
3586       localTrafficSelector_.add(value);
3587       onChanged();
3588       return this;
3589     }
3590 
3591     private java.lang.Object name_ = "";
3592     /**
3593      *
3594      *
3595      * <pre>
3596      * 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.
3597      * </pre>
3598      *
3599      * <code>optional string name = 3373707;</code>
3600      *
3601      * @return Whether the name field is set.
3602      */
hasName()3603     public boolean hasName() {
3604       return ((bitField0_ & 0x00000080) != 0);
3605     }
3606     /**
3607      *
3608      *
3609      * <pre>
3610      * 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.
3611      * </pre>
3612      *
3613      * <code>optional string name = 3373707;</code>
3614      *
3615      * @return The name.
3616      */
getName()3617     public java.lang.String getName() {
3618       java.lang.Object ref = name_;
3619       if (!(ref instanceof java.lang.String)) {
3620         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3621         java.lang.String s = bs.toStringUtf8();
3622         name_ = s;
3623         return s;
3624       } else {
3625         return (java.lang.String) ref;
3626       }
3627     }
3628     /**
3629      *
3630      *
3631      * <pre>
3632      * 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.
3633      * </pre>
3634      *
3635      * <code>optional string name = 3373707;</code>
3636      *
3637      * @return The bytes for name.
3638      */
getNameBytes()3639     public com.google.protobuf.ByteString getNameBytes() {
3640       java.lang.Object ref = name_;
3641       if (ref instanceof String) {
3642         com.google.protobuf.ByteString b =
3643             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3644         name_ = b;
3645         return b;
3646       } else {
3647         return (com.google.protobuf.ByteString) ref;
3648       }
3649     }
3650     /**
3651      *
3652      *
3653      * <pre>
3654      * 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.
3655      * </pre>
3656      *
3657      * <code>optional string name = 3373707;</code>
3658      *
3659      * @param value The name to set.
3660      * @return This builder for chaining.
3661      */
setName(java.lang.String value)3662     public Builder setName(java.lang.String value) {
3663       if (value == null) {
3664         throw new NullPointerException();
3665       }
3666       name_ = value;
3667       bitField0_ |= 0x00000080;
3668       onChanged();
3669       return this;
3670     }
3671     /**
3672      *
3673      *
3674      * <pre>
3675      * 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.
3676      * </pre>
3677      *
3678      * <code>optional string name = 3373707;</code>
3679      *
3680      * @return This builder for chaining.
3681      */
clearName()3682     public Builder clearName() {
3683       name_ = getDefaultInstance().getName();
3684       bitField0_ = (bitField0_ & ~0x00000080);
3685       onChanged();
3686       return this;
3687     }
3688     /**
3689      *
3690      *
3691      * <pre>
3692      * 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.
3693      * </pre>
3694      *
3695      * <code>optional string name = 3373707;</code>
3696      *
3697      * @param value The bytes for name to set.
3698      * @return This builder for chaining.
3699      */
setNameBytes(com.google.protobuf.ByteString value)3700     public Builder setNameBytes(com.google.protobuf.ByteString value) {
3701       if (value == null) {
3702         throw new NullPointerException();
3703       }
3704       checkByteStringIsUtf8(value);
3705       name_ = value;
3706       bitField0_ |= 0x00000080;
3707       onChanged();
3708       return this;
3709     }
3710 
3711     private java.lang.Object peerExternalGateway_ = "";
3712     /**
3713      *
3714      *
3715      * <pre>
3716      * URL of the peer side external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field is exclusive with the field peerGcpGateway.
3717      * </pre>
3718      *
3719      * <code>optional string peer_external_gateway = 384956173;</code>
3720      *
3721      * @return Whether the peerExternalGateway field is set.
3722      */
hasPeerExternalGateway()3723     public boolean hasPeerExternalGateway() {
3724       return ((bitField0_ & 0x00000100) != 0);
3725     }
3726     /**
3727      *
3728      *
3729      * <pre>
3730      * URL of the peer side external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field is exclusive with the field peerGcpGateway.
3731      * </pre>
3732      *
3733      * <code>optional string peer_external_gateway = 384956173;</code>
3734      *
3735      * @return The peerExternalGateway.
3736      */
getPeerExternalGateway()3737     public java.lang.String getPeerExternalGateway() {
3738       java.lang.Object ref = peerExternalGateway_;
3739       if (!(ref instanceof java.lang.String)) {
3740         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3741         java.lang.String s = bs.toStringUtf8();
3742         peerExternalGateway_ = s;
3743         return s;
3744       } else {
3745         return (java.lang.String) ref;
3746       }
3747     }
3748     /**
3749      *
3750      *
3751      * <pre>
3752      * URL of the peer side external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field is exclusive with the field peerGcpGateway.
3753      * </pre>
3754      *
3755      * <code>optional string peer_external_gateway = 384956173;</code>
3756      *
3757      * @return The bytes for peerExternalGateway.
3758      */
getPeerExternalGatewayBytes()3759     public com.google.protobuf.ByteString getPeerExternalGatewayBytes() {
3760       java.lang.Object ref = peerExternalGateway_;
3761       if (ref instanceof String) {
3762         com.google.protobuf.ByteString b =
3763             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3764         peerExternalGateway_ = b;
3765         return b;
3766       } else {
3767         return (com.google.protobuf.ByteString) ref;
3768       }
3769     }
3770     /**
3771      *
3772      *
3773      * <pre>
3774      * URL of the peer side external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field is exclusive with the field peerGcpGateway.
3775      * </pre>
3776      *
3777      * <code>optional string peer_external_gateway = 384956173;</code>
3778      *
3779      * @param value The peerExternalGateway to set.
3780      * @return This builder for chaining.
3781      */
setPeerExternalGateway(java.lang.String value)3782     public Builder setPeerExternalGateway(java.lang.String value) {
3783       if (value == null) {
3784         throw new NullPointerException();
3785       }
3786       peerExternalGateway_ = value;
3787       bitField0_ |= 0x00000100;
3788       onChanged();
3789       return this;
3790     }
3791     /**
3792      *
3793      *
3794      * <pre>
3795      * URL of the peer side external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field is exclusive with the field peerGcpGateway.
3796      * </pre>
3797      *
3798      * <code>optional string peer_external_gateway = 384956173;</code>
3799      *
3800      * @return This builder for chaining.
3801      */
clearPeerExternalGateway()3802     public Builder clearPeerExternalGateway() {
3803       peerExternalGateway_ = getDefaultInstance().getPeerExternalGateway();
3804       bitField0_ = (bitField0_ & ~0x00000100);
3805       onChanged();
3806       return this;
3807     }
3808     /**
3809      *
3810      *
3811      * <pre>
3812      * URL of the peer side external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field is exclusive with the field peerGcpGateway.
3813      * </pre>
3814      *
3815      * <code>optional string peer_external_gateway = 384956173;</code>
3816      *
3817      * @param value The bytes for peerExternalGateway to set.
3818      * @return This builder for chaining.
3819      */
setPeerExternalGatewayBytes(com.google.protobuf.ByteString value)3820     public Builder setPeerExternalGatewayBytes(com.google.protobuf.ByteString value) {
3821       if (value == null) {
3822         throw new NullPointerException();
3823       }
3824       checkByteStringIsUtf8(value);
3825       peerExternalGateway_ = value;
3826       bitField0_ |= 0x00000100;
3827       onChanged();
3828       return this;
3829     }
3830 
3831     private int peerExternalGatewayInterface_;
3832     /**
3833      *
3834      *
3835      * <pre>
3836      * The interface ID of the external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. Possible values are: `0`, `1`, `2`, `3`. The number of IDs in use depends on the external VPN gateway redundancy type.
3837      * </pre>
3838      *
3839      * <code>optional int32 peer_external_gateway_interface = 452768391;</code>
3840      *
3841      * @return Whether the peerExternalGatewayInterface field is set.
3842      */
3843     @java.lang.Override
hasPeerExternalGatewayInterface()3844     public boolean hasPeerExternalGatewayInterface() {
3845       return ((bitField0_ & 0x00000200) != 0);
3846     }
3847     /**
3848      *
3849      *
3850      * <pre>
3851      * The interface ID of the external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. Possible values are: `0`, `1`, `2`, `3`. The number of IDs in use depends on the external VPN gateway redundancy type.
3852      * </pre>
3853      *
3854      * <code>optional int32 peer_external_gateway_interface = 452768391;</code>
3855      *
3856      * @return The peerExternalGatewayInterface.
3857      */
3858     @java.lang.Override
getPeerExternalGatewayInterface()3859     public int getPeerExternalGatewayInterface() {
3860       return peerExternalGatewayInterface_;
3861     }
3862     /**
3863      *
3864      *
3865      * <pre>
3866      * The interface ID of the external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. Possible values are: `0`, `1`, `2`, `3`. The number of IDs in use depends on the external VPN gateway redundancy type.
3867      * </pre>
3868      *
3869      * <code>optional int32 peer_external_gateway_interface = 452768391;</code>
3870      *
3871      * @param value The peerExternalGatewayInterface to set.
3872      * @return This builder for chaining.
3873      */
setPeerExternalGatewayInterface(int value)3874     public Builder setPeerExternalGatewayInterface(int value) {
3875 
3876       peerExternalGatewayInterface_ = value;
3877       bitField0_ |= 0x00000200;
3878       onChanged();
3879       return this;
3880     }
3881     /**
3882      *
3883      *
3884      * <pre>
3885      * The interface ID of the external VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. Possible values are: `0`, `1`, `2`, `3`. The number of IDs in use depends on the external VPN gateway redundancy type.
3886      * </pre>
3887      *
3888      * <code>optional int32 peer_external_gateway_interface = 452768391;</code>
3889      *
3890      * @return This builder for chaining.
3891      */
clearPeerExternalGatewayInterface()3892     public Builder clearPeerExternalGatewayInterface() {
3893       bitField0_ = (bitField0_ & ~0x00000200);
3894       peerExternalGatewayInterface_ = 0;
3895       onChanged();
3896       return this;
3897     }
3898 
3899     private java.lang.Object peerGcpGateway_ = "";
3900     /**
3901      *
3902      *
3903      * <pre>
3904      * URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer GCP VPN gateway.
3905      * </pre>
3906      *
3907      * <code>optional string peer_gcp_gateway = 281867452;</code>
3908      *
3909      * @return Whether the peerGcpGateway field is set.
3910      */
hasPeerGcpGateway()3911     public boolean hasPeerGcpGateway() {
3912       return ((bitField0_ & 0x00000400) != 0);
3913     }
3914     /**
3915      *
3916      *
3917      * <pre>
3918      * URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer GCP VPN gateway.
3919      * </pre>
3920      *
3921      * <code>optional string peer_gcp_gateway = 281867452;</code>
3922      *
3923      * @return The peerGcpGateway.
3924      */
getPeerGcpGateway()3925     public java.lang.String getPeerGcpGateway() {
3926       java.lang.Object ref = peerGcpGateway_;
3927       if (!(ref instanceof java.lang.String)) {
3928         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3929         java.lang.String s = bs.toStringUtf8();
3930         peerGcpGateway_ = s;
3931         return s;
3932       } else {
3933         return (java.lang.String) ref;
3934       }
3935     }
3936     /**
3937      *
3938      *
3939      * <pre>
3940      * URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer GCP VPN gateway.
3941      * </pre>
3942      *
3943      * <code>optional string peer_gcp_gateway = 281867452;</code>
3944      *
3945      * @return The bytes for peerGcpGateway.
3946      */
getPeerGcpGatewayBytes()3947     public com.google.protobuf.ByteString getPeerGcpGatewayBytes() {
3948       java.lang.Object ref = peerGcpGateway_;
3949       if (ref instanceof String) {
3950         com.google.protobuf.ByteString b =
3951             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3952         peerGcpGateway_ = b;
3953         return b;
3954       } else {
3955         return (com.google.protobuf.ByteString) ref;
3956       }
3957     }
3958     /**
3959      *
3960      *
3961      * <pre>
3962      * URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer GCP VPN gateway.
3963      * </pre>
3964      *
3965      * <code>optional string peer_gcp_gateway = 281867452;</code>
3966      *
3967      * @param value The peerGcpGateway to set.
3968      * @return This builder for chaining.
3969      */
setPeerGcpGateway(java.lang.String value)3970     public Builder setPeerGcpGateway(java.lang.String value) {
3971       if (value == null) {
3972         throw new NullPointerException();
3973       }
3974       peerGcpGateway_ = value;
3975       bitField0_ |= 0x00000400;
3976       onChanged();
3977       return this;
3978     }
3979     /**
3980      *
3981      *
3982      * <pre>
3983      * URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer GCP VPN gateway.
3984      * </pre>
3985      *
3986      * <code>optional string peer_gcp_gateway = 281867452;</code>
3987      *
3988      * @return This builder for chaining.
3989      */
clearPeerGcpGateway()3990     public Builder clearPeerGcpGateway() {
3991       peerGcpGateway_ = getDefaultInstance().getPeerGcpGateway();
3992       bitField0_ = (bitField0_ & ~0x00000400);
3993       onChanged();
3994       return this;
3995     }
3996     /**
3997      *
3998      *
3999      * <pre>
4000      * URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer GCP VPN gateway.
4001      * </pre>
4002      *
4003      * <code>optional string peer_gcp_gateway = 281867452;</code>
4004      *
4005      * @param value The bytes for peerGcpGateway to set.
4006      * @return This builder for chaining.
4007      */
setPeerGcpGatewayBytes(com.google.protobuf.ByteString value)4008     public Builder setPeerGcpGatewayBytes(com.google.protobuf.ByteString value) {
4009       if (value == null) {
4010         throw new NullPointerException();
4011       }
4012       checkByteStringIsUtf8(value);
4013       peerGcpGateway_ = value;
4014       bitField0_ |= 0x00000400;
4015       onChanged();
4016       return this;
4017     }
4018 
4019     private java.lang.Object peerIp_ = "";
4020     /**
4021      *
4022      *
4023      * <pre>
4024      * IP address of the peer VPN gateway. Only IPv4 is supported.
4025      * </pre>
4026      *
4027      * <code>optional string peer_ip = 383249700;</code>
4028      *
4029      * @return Whether the peerIp field is set.
4030      */
hasPeerIp()4031     public boolean hasPeerIp() {
4032       return ((bitField0_ & 0x00000800) != 0);
4033     }
4034     /**
4035      *
4036      *
4037      * <pre>
4038      * IP address of the peer VPN gateway. Only IPv4 is supported.
4039      * </pre>
4040      *
4041      * <code>optional string peer_ip = 383249700;</code>
4042      *
4043      * @return The peerIp.
4044      */
getPeerIp()4045     public java.lang.String getPeerIp() {
4046       java.lang.Object ref = peerIp_;
4047       if (!(ref instanceof java.lang.String)) {
4048         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
4049         java.lang.String s = bs.toStringUtf8();
4050         peerIp_ = s;
4051         return s;
4052       } else {
4053         return (java.lang.String) ref;
4054       }
4055     }
4056     /**
4057      *
4058      *
4059      * <pre>
4060      * IP address of the peer VPN gateway. Only IPv4 is supported.
4061      * </pre>
4062      *
4063      * <code>optional string peer_ip = 383249700;</code>
4064      *
4065      * @return The bytes for peerIp.
4066      */
getPeerIpBytes()4067     public com.google.protobuf.ByteString getPeerIpBytes() {
4068       java.lang.Object ref = peerIp_;
4069       if (ref instanceof String) {
4070         com.google.protobuf.ByteString b =
4071             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
4072         peerIp_ = b;
4073         return b;
4074       } else {
4075         return (com.google.protobuf.ByteString) ref;
4076       }
4077     }
4078     /**
4079      *
4080      *
4081      * <pre>
4082      * IP address of the peer VPN gateway. Only IPv4 is supported.
4083      * </pre>
4084      *
4085      * <code>optional string peer_ip = 383249700;</code>
4086      *
4087      * @param value The peerIp to set.
4088      * @return This builder for chaining.
4089      */
setPeerIp(java.lang.String value)4090     public Builder setPeerIp(java.lang.String value) {
4091       if (value == null) {
4092         throw new NullPointerException();
4093       }
4094       peerIp_ = value;
4095       bitField0_ |= 0x00000800;
4096       onChanged();
4097       return this;
4098     }
4099     /**
4100      *
4101      *
4102      * <pre>
4103      * IP address of the peer VPN gateway. Only IPv4 is supported.
4104      * </pre>
4105      *
4106      * <code>optional string peer_ip = 383249700;</code>
4107      *
4108      * @return This builder for chaining.
4109      */
clearPeerIp()4110     public Builder clearPeerIp() {
4111       peerIp_ = getDefaultInstance().getPeerIp();
4112       bitField0_ = (bitField0_ & ~0x00000800);
4113       onChanged();
4114       return this;
4115     }
4116     /**
4117      *
4118      *
4119      * <pre>
4120      * IP address of the peer VPN gateway. Only IPv4 is supported.
4121      * </pre>
4122      *
4123      * <code>optional string peer_ip = 383249700;</code>
4124      *
4125      * @param value The bytes for peerIp to set.
4126      * @return This builder for chaining.
4127      */
setPeerIpBytes(com.google.protobuf.ByteString value)4128     public Builder setPeerIpBytes(com.google.protobuf.ByteString value) {
4129       if (value == null) {
4130         throw new NullPointerException();
4131       }
4132       checkByteStringIsUtf8(value);
4133       peerIp_ = value;
4134       bitField0_ |= 0x00000800;
4135       onChanged();
4136       return this;
4137     }
4138 
4139     private java.lang.Object region_ = "";
4140     /**
4141      *
4142      *
4143      * <pre>
4144      * [Output Only] URL of the region where the VPN tunnel resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
4145      * </pre>
4146      *
4147      * <code>optional string region = 138946292;</code>
4148      *
4149      * @return Whether the region field is set.
4150      */
hasRegion()4151     public boolean hasRegion() {
4152       return ((bitField0_ & 0x00001000) != 0);
4153     }
4154     /**
4155      *
4156      *
4157      * <pre>
4158      * [Output Only] URL of the region where the VPN tunnel resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
4159      * </pre>
4160      *
4161      * <code>optional string region = 138946292;</code>
4162      *
4163      * @return The region.
4164      */
getRegion()4165     public java.lang.String getRegion() {
4166       java.lang.Object ref = region_;
4167       if (!(ref instanceof java.lang.String)) {
4168         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
4169         java.lang.String s = bs.toStringUtf8();
4170         region_ = s;
4171         return s;
4172       } else {
4173         return (java.lang.String) ref;
4174       }
4175     }
4176     /**
4177      *
4178      *
4179      * <pre>
4180      * [Output Only] URL of the region where the VPN tunnel resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
4181      * </pre>
4182      *
4183      * <code>optional string region = 138946292;</code>
4184      *
4185      * @return The bytes for region.
4186      */
getRegionBytes()4187     public com.google.protobuf.ByteString getRegionBytes() {
4188       java.lang.Object ref = region_;
4189       if (ref instanceof String) {
4190         com.google.protobuf.ByteString b =
4191             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
4192         region_ = b;
4193         return b;
4194       } else {
4195         return (com.google.protobuf.ByteString) ref;
4196       }
4197     }
4198     /**
4199      *
4200      *
4201      * <pre>
4202      * [Output Only] URL of the region where the VPN tunnel resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
4203      * </pre>
4204      *
4205      * <code>optional string region = 138946292;</code>
4206      *
4207      * @param value The region to set.
4208      * @return This builder for chaining.
4209      */
setRegion(java.lang.String value)4210     public Builder setRegion(java.lang.String value) {
4211       if (value == null) {
4212         throw new NullPointerException();
4213       }
4214       region_ = value;
4215       bitField0_ |= 0x00001000;
4216       onChanged();
4217       return this;
4218     }
4219     /**
4220      *
4221      *
4222      * <pre>
4223      * [Output Only] URL of the region where the VPN tunnel resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
4224      * </pre>
4225      *
4226      * <code>optional string region = 138946292;</code>
4227      *
4228      * @return This builder for chaining.
4229      */
clearRegion()4230     public Builder clearRegion() {
4231       region_ = getDefaultInstance().getRegion();
4232       bitField0_ = (bitField0_ & ~0x00001000);
4233       onChanged();
4234       return this;
4235     }
4236     /**
4237      *
4238      *
4239      * <pre>
4240      * [Output Only] URL of the region where the VPN tunnel resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
4241      * </pre>
4242      *
4243      * <code>optional string region = 138946292;</code>
4244      *
4245      * @param value The bytes for region to set.
4246      * @return This builder for chaining.
4247      */
setRegionBytes(com.google.protobuf.ByteString value)4248     public Builder setRegionBytes(com.google.protobuf.ByteString value) {
4249       if (value == null) {
4250         throw new NullPointerException();
4251       }
4252       checkByteStringIsUtf8(value);
4253       region_ = value;
4254       bitField0_ |= 0x00001000;
4255       onChanged();
4256       return this;
4257     }
4258 
4259     private com.google.protobuf.LazyStringList remoteTrafficSelector_ =
4260         com.google.protobuf.LazyStringArrayList.EMPTY;
4261 
ensureRemoteTrafficSelectorIsMutable()4262     private void ensureRemoteTrafficSelectorIsMutable() {
4263       if (!((bitField0_ & 0x00002000) != 0)) {
4264         remoteTrafficSelector_ =
4265             new com.google.protobuf.LazyStringArrayList(remoteTrafficSelector_);
4266         bitField0_ |= 0x00002000;
4267       }
4268     }
4269     /**
4270      *
4271      *
4272      * <pre>
4273      * Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.
4274      * </pre>
4275      *
4276      * <code>repeated string remote_traffic_selector = 358887098;</code>
4277      *
4278      * @return A list containing the remoteTrafficSelector.
4279      */
getRemoteTrafficSelectorList()4280     public com.google.protobuf.ProtocolStringList getRemoteTrafficSelectorList() {
4281       return remoteTrafficSelector_.getUnmodifiableView();
4282     }
4283     /**
4284      *
4285      *
4286      * <pre>
4287      * Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.
4288      * </pre>
4289      *
4290      * <code>repeated string remote_traffic_selector = 358887098;</code>
4291      *
4292      * @return The count of remoteTrafficSelector.
4293      */
getRemoteTrafficSelectorCount()4294     public int getRemoteTrafficSelectorCount() {
4295       return remoteTrafficSelector_.size();
4296     }
4297     /**
4298      *
4299      *
4300      * <pre>
4301      * Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.
4302      * </pre>
4303      *
4304      * <code>repeated string remote_traffic_selector = 358887098;</code>
4305      *
4306      * @param index The index of the element to return.
4307      * @return The remoteTrafficSelector at the given index.
4308      */
getRemoteTrafficSelector(int index)4309     public java.lang.String getRemoteTrafficSelector(int index) {
4310       return remoteTrafficSelector_.get(index);
4311     }
4312     /**
4313      *
4314      *
4315      * <pre>
4316      * Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.
4317      * </pre>
4318      *
4319      * <code>repeated string remote_traffic_selector = 358887098;</code>
4320      *
4321      * @param index The index of the value to return.
4322      * @return The bytes of the remoteTrafficSelector at the given index.
4323      */
getRemoteTrafficSelectorBytes(int index)4324     public com.google.protobuf.ByteString getRemoteTrafficSelectorBytes(int index) {
4325       return remoteTrafficSelector_.getByteString(index);
4326     }
4327     /**
4328      *
4329      *
4330      * <pre>
4331      * Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.
4332      * </pre>
4333      *
4334      * <code>repeated string remote_traffic_selector = 358887098;</code>
4335      *
4336      * @param index The index to set the value at.
4337      * @param value The remoteTrafficSelector to set.
4338      * @return This builder for chaining.
4339      */
setRemoteTrafficSelector(int index, java.lang.String value)4340     public Builder setRemoteTrafficSelector(int index, java.lang.String value) {
4341       if (value == null) {
4342         throw new NullPointerException();
4343       }
4344       ensureRemoteTrafficSelectorIsMutable();
4345       remoteTrafficSelector_.set(index, value);
4346       onChanged();
4347       return this;
4348     }
4349     /**
4350      *
4351      *
4352      * <pre>
4353      * Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.
4354      * </pre>
4355      *
4356      * <code>repeated string remote_traffic_selector = 358887098;</code>
4357      *
4358      * @param value The remoteTrafficSelector to add.
4359      * @return This builder for chaining.
4360      */
addRemoteTrafficSelector(java.lang.String value)4361     public Builder addRemoteTrafficSelector(java.lang.String value) {
4362       if (value == null) {
4363         throw new NullPointerException();
4364       }
4365       ensureRemoteTrafficSelectorIsMutable();
4366       remoteTrafficSelector_.add(value);
4367       onChanged();
4368       return this;
4369     }
4370     /**
4371      *
4372      *
4373      * <pre>
4374      * Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.
4375      * </pre>
4376      *
4377      * <code>repeated string remote_traffic_selector = 358887098;</code>
4378      *
4379      * @param values The remoteTrafficSelector to add.
4380      * @return This builder for chaining.
4381      */
addAllRemoteTrafficSelector(java.lang.Iterable<java.lang.String> values)4382     public Builder addAllRemoteTrafficSelector(java.lang.Iterable<java.lang.String> values) {
4383       ensureRemoteTrafficSelectorIsMutable();
4384       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, remoteTrafficSelector_);
4385       onChanged();
4386       return this;
4387     }
4388     /**
4389      *
4390      *
4391      * <pre>
4392      * Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.
4393      * </pre>
4394      *
4395      * <code>repeated string remote_traffic_selector = 358887098;</code>
4396      *
4397      * @return This builder for chaining.
4398      */
clearRemoteTrafficSelector()4399     public Builder clearRemoteTrafficSelector() {
4400       remoteTrafficSelector_ = com.google.protobuf.LazyStringArrayList.EMPTY;
4401       bitField0_ = (bitField0_ & ~0x00002000);
4402       onChanged();
4403       return this;
4404     }
4405     /**
4406      *
4407      *
4408      * <pre>
4409      * Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.
4410      * </pre>
4411      *
4412      * <code>repeated string remote_traffic_selector = 358887098;</code>
4413      *
4414      * @param value The bytes of the remoteTrafficSelector to add.
4415      * @return This builder for chaining.
4416      */
addRemoteTrafficSelectorBytes(com.google.protobuf.ByteString value)4417     public Builder addRemoteTrafficSelectorBytes(com.google.protobuf.ByteString value) {
4418       if (value == null) {
4419         throw new NullPointerException();
4420       }
4421       checkByteStringIsUtf8(value);
4422       ensureRemoteTrafficSelectorIsMutable();
4423       remoteTrafficSelector_.add(value);
4424       onChanged();
4425       return this;
4426     }
4427 
4428     private java.lang.Object router_ = "";
4429     /**
4430      *
4431      *
4432      * <pre>
4433      * URL of the router resource to be used for dynamic routing.
4434      * </pre>
4435      *
4436      * <code>optional string router = 148608841;</code>
4437      *
4438      * @return Whether the router field is set.
4439      */
hasRouter()4440     public boolean hasRouter() {
4441       return ((bitField0_ & 0x00004000) != 0);
4442     }
4443     /**
4444      *
4445      *
4446      * <pre>
4447      * URL of the router resource to be used for dynamic routing.
4448      * </pre>
4449      *
4450      * <code>optional string router = 148608841;</code>
4451      *
4452      * @return The router.
4453      */
getRouter()4454     public java.lang.String getRouter() {
4455       java.lang.Object ref = router_;
4456       if (!(ref instanceof java.lang.String)) {
4457         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
4458         java.lang.String s = bs.toStringUtf8();
4459         router_ = s;
4460         return s;
4461       } else {
4462         return (java.lang.String) ref;
4463       }
4464     }
4465     /**
4466      *
4467      *
4468      * <pre>
4469      * URL of the router resource to be used for dynamic routing.
4470      * </pre>
4471      *
4472      * <code>optional string router = 148608841;</code>
4473      *
4474      * @return The bytes for router.
4475      */
getRouterBytes()4476     public com.google.protobuf.ByteString getRouterBytes() {
4477       java.lang.Object ref = router_;
4478       if (ref instanceof String) {
4479         com.google.protobuf.ByteString b =
4480             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
4481         router_ = b;
4482         return b;
4483       } else {
4484         return (com.google.protobuf.ByteString) ref;
4485       }
4486     }
4487     /**
4488      *
4489      *
4490      * <pre>
4491      * URL of the router resource to be used for dynamic routing.
4492      * </pre>
4493      *
4494      * <code>optional string router = 148608841;</code>
4495      *
4496      * @param value The router to set.
4497      * @return This builder for chaining.
4498      */
setRouter(java.lang.String value)4499     public Builder setRouter(java.lang.String value) {
4500       if (value == null) {
4501         throw new NullPointerException();
4502       }
4503       router_ = value;
4504       bitField0_ |= 0x00004000;
4505       onChanged();
4506       return this;
4507     }
4508     /**
4509      *
4510      *
4511      * <pre>
4512      * URL of the router resource to be used for dynamic routing.
4513      * </pre>
4514      *
4515      * <code>optional string router = 148608841;</code>
4516      *
4517      * @return This builder for chaining.
4518      */
clearRouter()4519     public Builder clearRouter() {
4520       router_ = getDefaultInstance().getRouter();
4521       bitField0_ = (bitField0_ & ~0x00004000);
4522       onChanged();
4523       return this;
4524     }
4525     /**
4526      *
4527      *
4528      * <pre>
4529      * URL of the router resource to be used for dynamic routing.
4530      * </pre>
4531      *
4532      * <code>optional string router = 148608841;</code>
4533      *
4534      * @param value The bytes for router to set.
4535      * @return This builder for chaining.
4536      */
setRouterBytes(com.google.protobuf.ByteString value)4537     public Builder setRouterBytes(com.google.protobuf.ByteString value) {
4538       if (value == null) {
4539         throw new NullPointerException();
4540       }
4541       checkByteStringIsUtf8(value);
4542       router_ = value;
4543       bitField0_ |= 0x00004000;
4544       onChanged();
4545       return this;
4546     }
4547 
4548     private java.lang.Object selfLink_ = "";
4549     /**
4550      *
4551      *
4552      * <pre>
4553      * [Output Only] Server-defined URL for the resource.
4554      * </pre>
4555      *
4556      * <code>optional string self_link = 456214797;</code>
4557      *
4558      * @return Whether the selfLink field is set.
4559      */
hasSelfLink()4560     public boolean hasSelfLink() {
4561       return ((bitField0_ & 0x00008000) != 0);
4562     }
4563     /**
4564      *
4565      *
4566      * <pre>
4567      * [Output Only] Server-defined URL for the resource.
4568      * </pre>
4569      *
4570      * <code>optional string self_link = 456214797;</code>
4571      *
4572      * @return The selfLink.
4573      */
getSelfLink()4574     public java.lang.String getSelfLink() {
4575       java.lang.Object ref = selfLink_;
4576       if (!(ref instanceof java.lang.String)) {
4577         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
4578         java.lang.String s = bs.toStringUtf8();
4579         selfLink_ = s;
4580         return s;
4581       } else {
4582         return (java.lang.String) ref;
4583       }
4584     }
4585     /**
4586      *
4587      *
4588      * <pre>
4589      * [Output Only] Server-defined URL for the resource.
4590      * </pre>
4591      *
4592      * <code>optional string self_link = 456214797;</code>
4593      *
4594      * @return The bytes for selfLink.
4595      */
getSelfLinkBytes()4596     public com.google.protobuf.ByteString getSelfLinkBytes() {
4597       java.lang.Object ref = selfLink_;
4598       if (ref instanceof String) {
4599         com.google.protobuf.ByteString b =
4600             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
4601         selfLink_ = b;
4602         return b;
4603       } else {
4604         return (com.google.protobuf.ByteString) ref;
4605       }
4606     }
4607     /**
4608      *
4609      *
4610      * <pre>
4611      * [Output Only] Server-defined URL for the resource.
4612      * </pre>
4613      *
4614      * <code>optional string self_link = 456214797;</code>
4615      *
4616      * @param value The selfLink to set.
4617      * @return This builder for chaining.
4618      */
setSelfLink(java.lang.String value)4619     public Builder setSelfLink(java.lang.String value) {
4620       if (value == null) {
4621         throw new NullPointerException();
4622       }
4623       selfLink_ = value;
4624       bitField0_ |= 0x00008000;
4625       onChanged();
4626       return this;
4627     }
4628     /**
4629      *
4630      *
4631      * <pre>
4632      * [Output Only] Server-defined URL for the resource.
4633      * </pre>
4634      *
4635      * <code>optional string self_link = 456214797;</code>
4636      *
4637      * @return This builder for chaining.
4638      */
clearSelfLink()4639     public Builder clearSelfLink() {
4640       selfLink_ = getDefaultInstance().getSelfLink();
4641       bitField0_ = (bitField0_ & ~0x00008000);
4642       onChanged();
4643       return this;
4644     }
4645     /**
4646      *
4647      *
4648      * <pre>
4649      * [Output Only] Server-defined URL for the resource.
4650      * </pre>
4651      *
4652      * <code>optional string self_link = 456214797;</code>
4653      *
4654      * @param value The bytes for selfLink to set.
4655      * @return This builder for chaining.
4656      */
setSelfLinkBytes(com.google.protobuf.ByteString value)4657     public Builder setSelfLinkBytes(com.google.protobuf.ByteString value) {
4658       if (value == null) {
4659         throw new NullPointerException();
4660       }
4661       checkByteStringIsUtf8(value);
4662       selfLink_ = value;
4663       bitField0_ |= 0x00008000;
4664       onChanged();
4665       return this;
4666     }
4667 
4668     private java.lang.Object sharedSecret_ = "";
4669     /**
4670      *
4671      *
4672      * <pre>
4673      * Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway.
4674      * </pre>
4675      *
4676      * <code>optional string shared_secret = 381932490;</code>
4677      *
4678      * @return Whether the sharedSecret field is set.
4679      */
hasSharedSecret()4680     public boolean hasSharedSecret() {
4681       return ((bitField0_ & 0x00010000) != 0);
4682     }
4683     /**
4684      *
4685      *
4686      * <pre>
4687      * Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway.
4688      * </pre>
4689      *
4690      * <code>optional string shared_secret = 381932490;</code>
4691      *
4692      * @return The sharedSecret.
4693      */
getSharedSecret()4694     public java.lang.String getSharedSecret() {
4695       java.lang.Object ref = sharedSecret_;
4696       if (!(ref instanceof java.lang.String)) {
4697         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
4698         java.lang.String s = bs.toStringUtf8();
4699         sharedSecret_ = s;
4700         return s;
4701       } else {
4702         return (java.lang.String) ref;
4703       }
4704     }
4705     /**
4706      *
4707      *
4708      * <pre>
4709      * Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway.
4710      * </pre>
4711      *
4712      * <code>optional string shared_secret = 381932490;</code>
4713      *
4714      * @return The bytes for sharedSecret.
4715      */
getSharedSecretBytes()4716     public com.google.protobuf.ByteString getSharedSecretBytes() {
4717       java.lang.Object ref = sharedSecret_;
4718       if (ref instanceof String) {
4719         com.google.protobuf.ByteString b =
4720             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
4721         sharedSecret_ = b;
4722         return b;
4723       } else {
4724         return (com.google.protobuf.ByteString) ref;
4725       }
4726     }
4727     /**
4728      *
4729      *
4730      * <pre>
4731      * Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway.
4732      * </pre>
4733      *
4734      * <code>optional string shared_secret = 381932490;</code>
4735      *
4736      * @param value The sharedSecret to set.
4737      * @return This builder for chaining.
4738      */
setSharedSecret(java.lang.String value)4739     public Builder setSharedSecret(java.lang.String value) {
4740       if (value == null) {
4741         throw new NullPointerException();
4742       }
4743       sharedSecret_ = value;
4744       bitField0_ |= 0x00010000;
4745       onChanged();
4746       return this;
4747     }
4748     /**
4749      *
4750      *
4751      * <pre>
4752      * Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway.
4753      * </pre>
4754      *
4755      * <code>optional string shared_secret = 381932490;</code>
4756      *
4757      * @return This builder for chaining.
4758      */
clearSharedSecret()4759     public Builder clearSharedSecret() {
4760       sharedSecret_ = getDefaultInstance().getSharedSecret();
4761       bitField0_ = (bitField0_ & ~0x00010000);
4762       onChanged();
4763       return this;
4764     }
4765     /**
4766      *
4767      *
4768      * <pre>
4769      * Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway.
4770      * </pre>
4771      *
4772      * <code>optional string shared_secret = 381932490;</code>
4773      *
4774      * @param value The bytes for sharedSecret to set.
4775      * @return This builder for chaining.
4776      */
setSharedSecretBytes(com.google.protobuf.ByteString value)4777     public Builder setSharedSecretBytes(com.google.protobuf.ByteString value) {
4778       if (value == null) {
4779         throw new NullPointerException();
4780       }
4781       checkByteStringIsUtf8(value);
4782       sharedSecret_ = value;
4783       bitField0_ |= 0x00010000;
4784       onChanged();
4785       return this;
4786     }
4787 
4788     private java.lang.Object sharedSecretHash_ = "";
4789     /**
4790      *
4791      *
4792      * <pre>
4793      * Hash of the shared secret.
4794      * </pre>
4795      *
4796      * <code>optional string shared_secret_hash = 398881891;</code>
4797      *
4798      * @return Whether the sharedSecretHash field is set.
4799      */
hasSharedSecretHash()4800     public boolean hasSharedSecretHash() {
4801       return ((bitField0_ & 0x00020000) != 0);
4802     }
4803     /**
4804      *
4805      *
4806      * <pre>
4807      * Hash of the shared secret.
4808      * </pre>
4809      *
4810      * <code>optional string shared_secret_hash = 398881891;</code>
4811      *
4812      * @return The sharedSecretHash.
4813      */
getSharedSecretHash()4814     public java.lang.String getSharedSecretHash() {
4815       java.lang.Object ref = sharedSecretHash_;
4816       if (!(ref instanceof java.lang.String)) {
4817         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
4818         java.lang.String s = bs.toStringUtf8();
4819         sharedSecretHash_ = s;
4820         return s;
4821       } else {
4822         return (java.lang.String) ref;
4823       }
4824     }
4825     /**
4826      *
4827      *
4828      * <pre>
4829      * Hash of the shared secret.
4830      * </pre>
4831      *
4832      * <code>optional string shared_secret_hash = 398881891;</code>
4833      *
4834      * @return The bytes for sharedSecretHash.
4835      */
getSharedSecretHashBytes()4836     public com.google.protobuf.ByteString getSharedSecretHashBytes() {
4837       java.lang.Object ref = sharedSecretHash_;
4838       if (ref instanceof String) {
4839         com.google.protobuf.ByteString b =
4840             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
4841         sharedSecretHash_ = b;
4842         return b;
4843       } else {
4844         return (com.google.protobuf.ByteString) ref;
4845       }
4846     }
4847     /**
4848      *
4849      *
4850      * <pre>
4851      * Hash of the shared secret.
4852      * </pre>
4853      *
4854      * <code>optional string shared_secret_hash = 398881891;</code>
4855      *
4856      * @param value The sharedSecretHash to set.
4857      * @return This builder for chaining.
4858      */
setSharedSecretHash(java.lang.String value)4859     public Builder setSharedSecretHash(java.lang.String value) {
4860       if (value == null) {
4861         throw new NullPointerException();
4862       }
4863       sharedSecretHash_ = value;
4864       bitField0_ |= 0x00020000;
4865       onChanged();
4866       return this;
4867     }
4868     /**
4869      *
4870      *
4871      * <pre>
4872      * Hash of the shared secret.
4873      * </pre>
4874      *
4875      * <code>optional string shared_secret_hash = 398881891;</code>
4876      *
4877      * @return This builder for chaining.
4878      */
clearSharedSecretHash()4879     public Builder clearSharedSecretHash() {
4880       sharedSecretHash_ = getDefaultInstance().getSharedSecretHash();
4881       bitField0_ = (bitField0_ & ~0x00020000);
4882       onChanged();
4883       return this;
4884     }
4885     /**
4886      *
4887      *
4888      * <pre>
4889      * Hash of the shared secret.
4890      * </pre>
4891      *
4892      * <code>optional string shared_secret_hash = 398881891;</code>
4893      *
4894      * @param value The bytes for sharedSecretHash to set.
4895      * @return This builder for chaining.
4896      */
setSharedSecretHashBytes(com.google.protobuf.ByteString value)4897     public Builder setSharedSecretHashBytes(com.google.protobuf.ByteString value) {
4898       if (value == null) {
4899         throw new NullPointerException();
4900       }
4901       checkByteStringIsUtf8(value);
4902       sharedSecretHash_ = value;
4903       bitField0_ |= 0x00020000;
4904       onChanged();
4905       return this;
4906     }
4907 
4908     private java.lang.Object status_ = "";
4909     /**
4910      *
4911      *
4912      * <pre>
4913      * [Output Only] The status of the VPN tunnel, which can be one of the following: - PROVISIONING: Resource is being allocated for the VPN tunnel. - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel. - FIRST_HANDSHAKE: Successful first handshake with the peer VPN. - ESTABLISHED: Secure session is successfully established with the peer VPN. - NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS - AUTHORIZATION_ERROR: Auth error (for example, bad shared secret). - NEGOTIATION_FAILURE: Handshake failed. - DEPROVISIONING: Resources are being deallocated for the VPN tunnel. - FAILED: Tunnel creation has failed and the tunnel is not ready to be used. - NO_INCOMING_PACKETS: No incoming packets from peer. - REJECTED: Tunnel configuration was rejected, can be result of being denied access. - ALLOCATING_RESOURCES: Cloud VPN is in the process of allocating all required resources. - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted for Classic VPN tunnels or the project is in frozen state. - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, probably behind NAT. - TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed for an HA-VPN tunnel.
4914      * Check the Status enum for the list of possible values.
4915      * </pre>
4916      *
4917      * <code>optional string status = 181260274;</code>
4918      *
4919      * @return Whether the status field is set.
4920      */
hasStatus()4921     public boolean hasStatus() {
4922       return ((bitField0_ & 0x00040000) != 0);
4923     }
4924     /**
4925      *
4926      *
4927      * <pre>
4928      * [Output Only] The status of the VPN tunnel, which can be one of the following: - PROVISIONING: Resource is being allocated for the VPN tunnel. - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel. - FIRST_HANDSHAKE: Successful first handshake with the peer VPN. - ESTABLISHED: Secure session is successfully established with the peer VPN. - NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS - AUTHORIZATION_ERROR: Auth error (for example, bad shared secret). - NEGOTIATION_FAILURE: Handshake failed. - DEPROVISIONING: Resources are being deallocated for the VPN tunnel. - FAILED: Tunnel creation has failed and the tunnel is not ready to be used. - NO_INCOMING_PACKETS: No incoming packets from peer. - REJECTED: Tunnel configuration was rejected, can be result of being denied access. - ALLOCATING_RESOURCES: Cloud VPN is in the process of allocating all required resources. - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted for Classic VPN tunnels or the project is in frozen state. - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, probably behind NAT. - TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed for an HA-VPN tunnel.
4929      * Check the Status enum for the list of possible values.
4930      * </pre>
4931      *
4932      * <code>optional string status = 181260274;</code>
4933      *
4934      * @return The status.
4935      */
getStatus()4936     public java.lang.String getStatus() {
4937       java.lang.Object ref = status_;
4938       if (!(ref instanceof java.lang.String)) {
4939         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
4940         java.lang.String s = bs.toStringUtf8();
4941         status_ = s;
4942         return s;
4943       } else {
4944         return (java.lang.String) ref;
4945       }
4946     }
4947     /**
4948      *
4949      *
4950      * <pre>
4951      * [Output Only] The status of the VPN tunnel, which can be one of the following: - PROVISIONING: Resource is being allocated for the VPN tunnel. - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel. - FIRST_HANDSHAKE: Successful first handshake with the peer VPN. - ESTABLISHED: Secure session is successfully established with the peer VPN. - NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS - AUTHORIZATION_ERROR: Auth error (for example, bad shared secret). - NEGOTIATION_FAILURE: Handshake failed. - DEPROVISIONING: Resources are being deallocated for the VPN tunnel. - FAILED: Tunnel creation has failed and the tunnel is not ready to be used. - NO_INCOMING_PACKETS: No incoming packets from peer. - REJECTED: Tunnel configuration was rejected, can be result of being denied access. - ALLOCATING_RESOURCES: Cloud VPN is in the process of allocating all required resources. - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted for Classic VPN tunnels or the project is in frozen state. - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, probably behind NAT. - TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed for an HA-VPN tunnel.
4952      * Check the Status enum for the list of possible values.
4953      * </pre>
4954      *
4955      * <code>optional string status = 181260274;</code>
4956      *
4957      * @return The bytes for status.
4958      */
getStatusBytes()4959     public com.google.protobuf.ByteString getStatusBytes() {
4960       java.lang.Object ref = status_;
4961       if (ref instanceof String) {
4962         com.google.protobuf.ByteString b =
4963             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
4964         status_ = b;
4965         return b;
4966       } else {
4967         return (com.google.protobuf.ByteString) ref;
4968       }
4969     }
4970     /**
4971      *
4972      *
4973      * <pre>
4974      * [Output Only] The status of the VPN tunnel, which can be one of the following: - PROVISIONING: Resource is being allocated for the VPN tunnel. - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel. - FIRST_HANDSHAKE: Successful first handshake with the peer VPN. - ESTABLISHED: Secure session is successfully established with the peer VPN. - NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS - AUTHORIZATION_ERROR: Auth error (for example, bad shared secret). - NEGOTIATION_FAILURE: Handshake failed. - DEPROVISIONING: Resources are being deallocated for the VPN tunnel. - FAILED: Tunnel creation has failed and the tunnel is not ready to be used. - NO_INCOMING_PACKETS: No incoming packets from peer. - REJECTED: Tunnel configuration was rejected, can be result of being denied access. - ALLOCATING_RESOURCES: Cloud VPN is in the process of allocating all required resources. - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted for Classic VPN tunnels or the project is in frozen state. - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, probably behind NAT. - TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed for an HA-VPN tunnel.
4975      * Check the Status enum for the list of possible values.
4976      * </pre>
4977      *
4978      * <code>optional string status = 181260274;</code>
4979      *
4980      * @param value The status to set.
4981      * @return This builder for chaining.
4982      */
setStatus(java.lang.String value)4983     public Builder setStatus(java.lang.String value) {
4984       if (value == null) {
4985         throw new NullPointerException();
4986       }
4987       status_ = value;
4988       bitField0_ |= 0x00040000;
4989       onChanged();
4990       return this;
4991     }
4992     /**
4993      *
4994      *
4995      * <pre>
4996      * [Output Only] The status of the VPN tunnel, which can be one of the following: - PROVISIONING: Resource is being allocated for the VPN tunnel. - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel. - FIRST_HANDSHAKE: Successful first handshake with the peer VPN. - ESTABLISHED: Secure session is successfully established with the peer VPN. - NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS - AUTHORIZATION_ERROR: Auth error (for example, bad shared secret). - NEGOTIATION_FAILURE: Handshake failed. - DEPROVISIONING: Resources are being deallocated for the VPN tunnel. - FAILED: Tunnel creation has failed and the tunnel is not ready to be used. - NO_INCOMING_PACKETS: No incoming packets from peer. - REJECTED: Tunnel configuration was rejected, can be result of being denied access. - ALLOCATING_RESOURCES: Cloud VPN is in the process of allocating all required resources. - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted for Classic VPN tunnels or the project is in frozen state. - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, probably behind NAT. - TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed for an HA-VPN tunnel.
4997      * Check the Status enum for the list of possible values.
4998      * </pre>
4999      *
5000      * <code>optional string status = 181260274;</code>
5001      *
5002      * @return This builder for chaining.
5003      */
clearStatus()5004     public Builder clearStatus() {
5005       status_ = getDefaultInstance().getStatus();
5006       bitField0_ = (bitField0_ & ~0x00040000);
5007       onChanged();
5008       return this;
5009     }
5010     /**
5011      *
5012      *
5013      * <pre>
5014      * [Output Only] The status of the VPN tunnel, which can be one of the following: - PROVISIONING: Resource is being allocated for the VPN tunnel. - WAITING_FOR_FULL_CONFIG: Waiting to receive all VPN-related configs from the user. Network, TargetVpnGateway, VpnTunnel, ForwardingRule, and Route resources are needed to setup the VPN tunnel. - FIRST_HANDSHAKE: Successful first handshake with the peer VPN. - ESTABLISHED: Secure session is successfully established with the peer VPN. - NETWORK_ERROR: Deprecated, replaced by NO_INCOMING_PACKETS - AUTHORIZATION_ERROR: Auth error (for example, bad shared secret). - NEGOTIATION_FAILURE: Handshake failed. - DEPROVISIONING: Resources are being deallocated for the VPN tunnel. - FAILED: Tunnel creation has failed and the tunnel is not ready to be used. - NO_INCOMING_PACKETS: No incoming packets from peer. - REJECTED: Tunnel configuration was rejected, can be result of being denied access. - ALLOCATING_RESOURCES: Cloud VPN is in the process of allocating all required resources. - STOPPED: Tunnel is stopped due to its Forwarding Rules being deleted for Classic VPN tunnels or the project is in frozen state. - PEER_IDENTITY_MISMATCH: Peer identity does not match peer IP, probably behind NAT. - TS_NARROWING_NOT_ALLOWED: Traffic selector narrowing not allowed for an HA-VPN tunnel.
5015      * Check the Status enum for the list of possible values.
5016      * </pre>
5017      *
5018      * <code>optional string status = 181260274;</code>
5019      *
5020      * @param value The bytes for status to set.
5021      * @return This builder for chaining.
5022      */
setStatusBytes(com.google.protobuf.ByteString value)5023     public Builder setStatusBytes(com.google.protobuf.ByteString value) {
5024       if (value == null) {
5025         throw new NullPointerException();
5026       }
5027       checkByteStringIsUtf8(value);
5028       status_ = value;
5029       bitField0_ |= 0x00040000;
5030       onChanged();
5031       return this;
5032     }
5033 
5034     private java.lang.Object targetVpnGateway_ = "";
5035     /**
5036      *
5037      *
5038      * <pre>
5039      * URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.
5040      * </pre>
5041      *
5042      * <code>optional string target_vpn_gateway = 532512843;</code>
5043      *
5044      * @return Whether the targetVpnGateway field is set.
5045      */
hasTargetVpnGateway()5046     public boolean hasTargetVpnGateway() {
5047       return ((bitField0_ & 0x00080000) != 0);
5048     }
5049     /**
5050      *
5051      *
5052      * <pre>
5053      * URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.
5054      * </pre>
5055      *
5056      * <code>optional string target_vpn_gateway = 532512843;</code>
5057      *
5058      * @return The targetVpnGateway.
5059      */
getTargetVpnGateway()5060     public java.lang.String getTargetVpnGateway() {
5061       java.lang.Object ref = targetVpnGateway_;
5062       if (!(ref instanceof java.lang.String)) {
5063         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
5064         java.lang.String s = bs.toStringUtf8();
5065         targetVpnGateway_ = s;
5066         return s;
5067       } else {
5068         return (java.lang.String) ref;
5069       }
5070     }
5071     /**
5072      *
5073      *
5074      * <pre>
5075      * URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.
5076      * </pre>
5077      *
5078      * <code>optional string target_vpn_gateway = 532512843;</code>
5079      *
5080      * @return The bytes for targetVpnGateway.
5081      */
getTargetVpnGatewayBytes()5082     public com.google.protobuf.ByteString getTargetVpnGatewayBytes() {
5083       java.lang.Object ref = targetVpnGateway_;
5084       if (ref instanceof String) {
5085         com.google.protobuf.ByteString b =
5086             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
5087         targetVpnGateway_ = b;
5088         return b;
5089       } else {
5090         return (com.google.protobuf.ByteString) ref;
5091       }
5092     }
5093     /**
5094      *
5095      *
5096      * <pre>
5097      * URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.
5098      * </pre>
5099      *
5100      * <code>optional string target_vpn_gateway = 532512843;</code>
5101      *
5102      * @param value The targetVpnGateway to set.
5103      * @return This builder for chaining.
5104      */
setTargetVpnGateway(java.lang.String value)5105     public Builder setTargetVpnGateway(java.lang.String value) {
5106       if (value == null) {
5107         throw new NullPointerException();
5108       }
5109       targetVpnGateway_ = value;
5110       bitField0_ |= 0x00080000;
5111       onChanged();
5112       return this;
5113     }
5114     /**
5115      *
5116      *
5117      * <pre>
5118      * URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.
5119      * </pre>
5120      *
5121      * <code>optional string target_vpn_gateway = 532512843;</code>
5122      *
5123      * @return This builder for chaining.
5124      */
clearTargetVpnGateway()5125     public Builder clearTargetVpnGateway() {
5126       targetVpnGateway_ = getDefaultInstance().getTargetVpnGateway();
5127       bitField0_ = (bitField0_ & ~0x00080000);
5128       onChanged();
5129       return this;
5130     }
5131     /**
5132      *
5133      *
5134      * <pre>
5135      * URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.
5136      * </pre>
5137      *
5138      * <code>optional string target_vpn_gateway = 532512843;</code>
5139      *
5140      * @param value The bytes for targetVpnGateway to set.
5141      * @return This builder for chaining.
5142      */
setTargetVpnGatewayBytes(com.google.protobuf.ByteString value)5143     public Builder setTargetVpnGatewayBytes(com.google.protobuf.ByteString value) {
5144       if (value == null) {
5145         throw new NullPointerException();
5146       }
5147       checkByteStringIsUtf8(value);
5148       targetVpnGateway_ = value;
5149       bitField0_ |= 0x00080000;
5150       onChanged();
5151       return this;
5152     }
5153 
5154     private java.lang.Object vpnGateway_ = "";
5155     /**
5156      *
5157      *
5158      * <pre>
5159      * URL of the VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This must be used (instead of target_vpn_gateway) if a High Availability VPN gateway resource is created.
5160      * </pre>
5161      *
5162      * <code>optional string vpn_gateway = 406684153;</code>
5163      *
5164      * @return Whether the vpnGateway field is set.
5165      */
hasVpnGateway()5166     public boolean hasVpnGateway() {
5167       return ((bitField0_ & 0x00100000) != 0);
5168     }
5169     /**
5170      *
5171      *
5172      * <pre>
5173      * URL of the VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This must be used (instead of target_vpn_gateway) if a High Availability VPN gateway resource is created.
5174      * </pre>
5175      *
5176      * <code>optional string vpn_gateway = 406684153;</code>
5177      *
5178      * @return The vpnGateway.
5179      */
getVpnGateway()5180     public java.lang.String getVpnGateway() {
5181       java.lang.Object ref = vpnGateway_;
5182       if (!(ref instanceof java.lang.String)) {
5183         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
5184         java.lang.String s = bs.toStringUtf8();
5185         vpnGateway_ = s;
5186         return s;
5187       } else {
5188         return (java.lang.String) ref;
5189       }
5190     }
5191     /**
5192      *
5193      *
5194      * <pre>
5195      * URL of the VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This must be used (instead of target_vpn_gateway) if a High Availability VPN gateway resource is created.
5196      * </pre>
5197      *
5198      * <code>optional string vpn_gateway = 406684153;</code>
5199      *
5200      * @return The bytes for vpnGateway.
5201      */
getVpnGatewayBytes()5202     public com.google.protobuf.ByteString getVpnGatewayBytes() {
5203       java.lang.Object ref = vpnGateway_;
5204       if (ref instanceof String) {
5205         com.google.protobuf.ByteString b =
5206             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
5207         vpnGateway_ = b;
5208         return b;
5209       } else {
5210         return (com.google.protobuf.ByteString) ref;
5211       }
5212     }
5213     /**
5214      *
5215      *
5216      * <pre>
5217      * URL of the VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This must be used (instead of target_vpn_gateway) if a High Availability VPN gateway resource is created.
5218      * </pre>
5219      *
5220      * <code>optional string vpn_gateway = 406684153;</code>
5221      *
5222      * @param value The vpnGateway to set.
5223      * @return This builder for chaining.
5224      */
setVpnGateway(java.lang.String value)5225     public Builder setVpnGateway(java.lang.String value) {
5226       if (value == null) {
5227         throw new NullPointerException();
5228       }
5229       vpnGateway_ = value;
5230       bitField0_ |= 0x00100000;
5231       onChanged();
5232       return this;
5233     }
5234     /**
5235      *
5236      *
5237      * <pre>
5238      * URL of the VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This must be used (instead of target_vpn_gateway) if a High Availability VPN gateway resource is created.
5239      * </pre>
5240      *
5241      * <code>optional string vpn_gateway = 406684153;</code>
5242      *
5243      * @return This builder for chaining.
5244      */
clearVpnGateway()5245     public Builder clearVpnGateway() {
5246       vpnGateway_ = getDefaultInstance().getVpnGateway();
5247       bitField0_ = (bitField0_ & ~0x00100000);
5248       onChanged();
5249       return this;
5250     }
5251     /**
5252      *
5253      *
5254      * <pre>
5255      * URL of the VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This must be used (instead of target_vpn_gateway) if a High Availability VPN gateway resource is created.
5256      * </pre>
5257      *
5258      * <code>optional string vpn_gateway = 406684153;</code>
5259      *
5260      * @param value The bytes for vpnGateway to set.
5261      * @return This builder for chaining.
5262      */
setVpnGatewayBytes(com.google.protobuf.ByteString value)5263     public Builder setVpnGatewayBytes(com.google.protobuf.ByteString value) {
5264       if (value == null) {
5265         throw new NullPointerException();
5266       }
5267       checkByteStringIsUtf8(value);
5268       vpnGateway_ = value;
5269       bitField0_ |= 0x00100000;
5270       onChanged();
5271       return this;
5272     }
5273 
5274     private int vpnGatewayInterface_;
5275     /**
5276      *
5277      *
5278      * <pre>
5279      * The interface ID of the VPN gateway with which this VPN tunnel is associated. Possible values are: `0`, `1`.
5280      * </pre>
5281      *
5282      * <code>optional int32 vpn_gateway_interface = 95979123;</code>
5283      *
5284      * @return Whether the vpnGatewayInterface field is set.
5285      */
5286     @java.lang.Override
hasVpnGatewayInterface()5287     public boolean hasVpnGatewayInterface() {
5288       return ((bitField0_ & 0x00200000) != 0);
5289     }
5290     /**
5291      *
5292      *
5293      * <pre>
5294      * The interface ID of the VPN gateway with which this VPN tunnel is associated. Possible values are: `0`, `1`.
5295      * </pre>
5296      *
5297      * <code>optional int32 vpn_gateway_interface = 95979123;</code>
5298      *
5299      * @return The vpnGatewayInterface.
5300      */
5301     @java.lang.Override
getVpnGatewayInterface()5302     public int getVpnGatewayInterface() {
5303       return vpnGatewayInterface_;
5304     }
5305     /**
5306      *
5307      *
5308      * <pre>
5309      * The interface ID of the VPN gateway with which this VPN tunnel is associated. Possible values are: `0`, `1`.
5310      * </pre>
5311      *
5312      * <code>optional int32 vpn_gateway_interface = 95979123;</code>
5313      *
5314      * @param value The vpnGatewayInterface to set.
5315      * @return This builder for chaining.
5316      */
setVpnGatewayInterface(int value)5317     public Builder setVpnGatewayInterface(int value) {
5318 
5319       vpnGatewayInterface_ = value;
5320       bitField0_ |= 0x00200000;
5321       onChanged();
5322       return this;
5323     }
5324     /**
5325      *
5326      *
5327      * <pre>
5328      * The interface ID of the VPN gateway with which this VPN tunnel is associated. Possible values are: `0`, `1`.
5329      * </pre>
5330      *
5331      * <code>optional int32 vpn_gateway_interface = 95979123;</code>
5332      *
5333      * @return This builder for chaining.
5334      */
clearVpnGatewayInterface()5335     public Builder clearVpnGatewayInterface() {
5336       bitField0_ = (bitField0_ & ~0x00200000);
5337       vpnGatewayInterface_ = 0;
5338       onChanged();
5339       return this;
5340     }
5341 
5342     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)5343     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
5344       return super.setUnknownFields(unknownFields);
5345     }
5346 
5347     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)5348     public final Builder mergeUnknownFields(
5349         final com.google.protobuf.UnknownFieldSet unknownFields) {
5350       return super.mergeUnknownFields(unknownFields);
5351     }
5352 
5353     // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.VpnTunnel)
5354   }
5355 
5356   // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.VpnTunnel)
5357   private static final com.google.cloud.compute.v1.VpnTunnel DEFAULT_INSTANCE;
5358 
5359   static {
5360     DEFAULT_INSTANCE = new com.google.cloud.compute.v1.VpnTunnel();
5361   }
5362 
getDefaultInstance()5363   public static com.google.cloud.compute.v1.VpnTunnel getDefaultInstance() {
5364     return DEFAULT_INSTANCE;
5365   }
5366 
5367   private static final com.google.protobuf.Parser<VpnTunnel> PARSER =
5368       new com.google.protobuf.AbstractParser<VpnTunnel>() {
5369         @java.lang.Override
5370         public VpnTunnel parsePartialFrom(
5371             com.google.protobuf.CodedInputStream input,
5372             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5373             throws com.google.protobuf.InvalidProtocolBufferException {
5374           Builder builder = newBuilder();
5375           try {
5376             builder.mergeFrom(input, extensionRegistry);
5377           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
5378             throw e.setUnfinishedMessage(builder.buildPartial());
5379           } catch (com.google.protobuf.UninitializedMessageException e) {
5380             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
5381           } catch (java.io.IOException e) {
5382             throw new com.google.protobuf.InvalidProtocolBufferException(e)
5383                 .setUnfinishedMessage(builder.buildPartial());
5384           }
5385           return builder.buildPartial();
5386         }
5387       };
5388 
parser()5389   public static com.google.protobuf.Parser<VpnTunnel> parser() {
5390     return PARSER;
5391   }
5392 
5393   @java.lang.Override
getParserForType()5394   public com.google.protobuf.Parser<VpnTunnel> getParserForType() {
5395     return PARSER;
5396   }
5397 
5398   @java.lang.Override
getDefaultInstanceForType()5399   public com.google.cloud.compute.v1.VpnTunnel getDefaultInstanceForType() {
5400     return DEFAULT_INSTANCE;
5401   }
5402 }
5403