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