• 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  * </pre>
26  *
27  * Protobuf type {@code google.cloud.compute.v1.InstanceWithNamedPorts}
28  */
29 public final class InstanceWithNamedPorts extends com.google.protobuf.GeneratedMessageV3
30     implements
31     // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.InstanceWithNamedPorts)
32     InstanceWithNamedPortsOrBuilder {
33   private static final long serialVersionUID = 0L;
34   // Use InstanceWithNamedPorts.newBuilder() to construct.
InstanceWithNamedPorts(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)35   private InstanceWithNamedPorts(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
36     super(builder);
37   }
38 
InstanceWithNamedPorts()39   private InstanceWithNamedPorts() {
40     instance_ = "";
41     namedPorts_ = java.util.Collections.emptyList();
42     status_ = "";
43   }
44 
45   @java.lang.Override
46   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)47   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
48     return new InstanceWithNamedPorts();
49   }
50 
51   @java.lang.Override
getUnknownFields()52   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
53     return this.unknownFields;
54   }
55 
getDescriptor()56   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
57     return com.google.cloud.compute.v1.Compute
58         .internal_static_google_cloud_compute_v1_InstanceWithNamedPorts_descriptor;
59   }
60 
61   @java.lang.Override
62   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()63       internalGetFieldAccessorTable() {
64     return com.google.cloud.compute.v1.Compute
65         .internal_static_google_cloud_compute_v1_InstanceWithNamedPorts_fieldAccessorTable
66         .ensureFieldAccessorsInitialized(
67             com.google.cloud.compute.v1.InstanceWithNamedPorts.class,
68             com.google.cloud.compute.v1.InstanceWithNamedPorts.Builder.class);
69   }
70 
71   /**
72    *
73    *
74    * <pre>
75    * [Output Only] The status of the instance.
76    * </pre>
77    *
78    * Protobuf enum {@code google.cloud.compute.v1.InstanceWithNamedPorts.Status}
79    */
80   public enum Status implements com.google.protobuf.ProtocolMessageEnum {
81     /**
82      *
83      *
84      * <pre>
85      * A value indicating that the enum field is not set.
86      * </pre>
87      *
88      * <code>UNDEFINED_STATUS = 0;</code>
89      */
90     UNDEFINED_STATUS(0),
91     /**
92      *
93      *
94      * <pre>
95      * The Nanny is halted and we are performing tear down tasks like network deprogramming, releasing quota, IP, tearing down disks etc.
96      * </pre>
97      *
98      * <code>DEPROVISIONING = 428935662;</code>
99      */
100     DEPROVISIONING(428935662),
101     /**
102      *
103      *
104      * <pre>
105      * Resources are being allocated for the instance.
106      * </pre>
107      *
108      * <code>PROVISIONING = 290896621;</code>
109      */
110     PROVISIONING(290896621),
111     /**
112      *
113      *
114      * <pre>
115      * The instance is in repair.
116      * </pre>
117      *
118      * <code>REPAIRING = 413483285;</code>
119      */
120     REPAIRING(413483285),
121     /**
122      *
123      *
124      * <pre>
125      * The instance is running.
126      * </pre>
127      *
128      * <code>RUNNING = 121282975;</code>
129      */
130     RUNNING(121282975),
131     /**
132      *
133      *
134      * <pre>
135      * All required resources have been allocated and the instance is being started.
136      * </pre>
137      *
138      * <code>STAGING = 431072283;</code>
139      */
140     STAGING(431072283),
141     /**
142      *
143      *
144      * <pre>
145      * The instance has stopped successfully.
146      * </pre>
147      *
148      * <code>STOPPED = 444276141;</code>
149      */
150     STOPPED(444276141),
151     /**
152      *
153      *
154      * <pre>
155      * The instance is currently stopping (either being deleted or killed).
156      * </pre>
157      *
158      * <code>STOPPING = 350791796;</code>
159      */
160     STOPPING(350791796),
161     /**
162      *
163      *
164      * <pre>
165      * The instance has suspended.
166      * </pre>
167      *
168      * <code>SUSPENDED = 51223995;</code>
169      */
170     SUSPENDED(51223995),
171     /**
172      *
173      *
174      * <pre>
175      * The instance is suspending.
176      * </pre>
177      *
178      * <code>SUSPENDING = 514206246;</code>
179      */
180     SUSPENDING(514206246),
181     /**
182      *
183      *
184      * <pre>
185      * The instance has stopped (either by explicit action or underlying failure).
186      * </pre>
187      *
188      * <code>TERMINATED = 250018339;</code>
189      */
190     TERMINATED(250018339),
191     UNRECOGNIZED(-1),
192     ;
193 
194     /**
195      *
196      *
197      * <pre>
198      * A value indicating that the enum field is not set.
199      * </pre>
200      *
201      * <code>UNDEFINED_STATUS = 0;</code>
202      */
203     public static final int UNDEFINED_STATUS_VALUE = 0;
204     /**
205      *
206      *
207      * <pre>
208      * The Nanny is halted and we are performing tear down tasks like network deprogramming, releasing quota, IP, tearing down disks etc.
209      * </pre>
210      *
211      * <code>DEPROVISIONING = 428935662;</code>
212      */
213     public static final int DEPROVISIONING_VALUE = 428935662;
214     /**
215      *
216      *
217      * <pre>
218      * Resources are being allocated for the instance.
219      * </pre>
220      *
221      * <code>PROVISIONING = 290896621;</code>
222      */
223     public static final int PROVISIONING_VALUE = 290896621;
224     /**
225      *
226      *
227      * <pre>
228      * The instance is in repair.
229      * </pre>
230      *
231      * <code>REPAIRING = 413483285;</code>
232      */
233     public static final int REPAIRING_VALUE = 413483285;
234     /**
235      *
236      *
237      * <pre>
238      * The instance is running.
239      * </pre>
240      *
241      * <code>RUNNING = 121282975;</code>
242      */
243     public static final int RUNNING_VALUE = 121282975;
244     /**
245      *
246      *
247      * <pre>
248      * All required resources have been allocated and the instance is being started.
249      * </pre>
250      *
251      * <code>STAGING = 431072283;</code>
252      */
253     public static final int STAGING_VALUE = 431072283;
254     /**
255      *
256      *
257      * <pre>
258      * The instance has stopped successfully.
259      * </pre>
260      *
261      * <code>STOPPED = 444276141;</code>
262      */
263     public static final int STOPPED_VALUE = 444276141;
264     /**
265      *
266      *
267      * <pre>
268      * The instance is currently stopping (either being deleted or killed).
269      * </pre>
270      *
271      * <code>STOPPING = 350791796;</code>
272      */
273     public static final int STOPPING_VALUE = 350791796;
274     /**
275      *
276      *
277      * <pre>
278      * The instance has suspended.
279      * </pre>
280      *
281      * <code>SUSPENDED = 51223995;</code>
282      */
283     public static final int SUSPENDED_VALUE = 51223995;
284     /**
285      *
286      *
287      * <pre>
288      * The instance is suspending.
289      * </pre>
290      *
291      * <code>SUSPENDING = 514206246;</code>
292      */
293     public static final int SUSPENDING_VALUE = 514206246;
294     /**
295      *
296      *
297      * <pre>
298      * The instance has stopped (either by explicit action or underlying failure).
299      * </pre>
300      *
301      * <code>TERMINATED = 250018339;</code>
302      */
303     public static final int TERMINATED_VALUE = 250018339;
304 
getNumber()305     public final int getNumber() {
306       if (this == UNRECOGNIZED) {
307         throw new java.lang.IllegalArgumentException(
308             "Can't get the number of an unknown enum value.");
309       }
310       return value;
311     }
312 
313     /**
314      * @param value The numeric wire value of the corresponding enum entry.
315      * @return The enum associated with the given numeric wire value.
316      * @deprecated Use {@link #forNumber(int)} instead.
317      */
318     @java.lang.Deprecated
valueOf(int value)319     public static Status valueOf(int value) {
320       return forNumber(value);
321     }
322 
323     /**
324      * @param value The numeric wire value of the corresponding enum entry.
325      * @return The enum associated with the given numeric wire value.
326      */
forNumber(int value)327     public static Status forNumber(int value) {
328       switch (value) {
329         case 0:
330           return UNDEFINED_STATUS;
331         case 428935662:
332           return DEPROVISIONING;
333         case 290896621:
334           return PROVISIONING;
335         case 413483285:
336           return REPAIRING;
337         case 121282975:
338           return RUNNING;
339         case 431072283:
340           return STAGING;
341         case 444276141:
342           return STOPPED;
343         case 350791796:
344           return STOPPING;
345         case 51223995:
346           return SUSPENDED;
347         case 514206246:
348           return SUSPENDING;
349         case 250018339:
350           return TERMINATED;
351         default:
352           return null;
353       }
354     }
355 
internalGetValueMap()356     public static com.google.protobuf.Internal.EnumLiteMap<Status> internalGetValueMap() {
357       return internalValueMap;
358     }
359 
360     private static final com.google.protobuf.Internal.EnumLiteMap<Status> internalValueMap =
361         new com.google.protobuf.Internal.EnumLiteMap<Status>() {
362           public Status findValueByNumber(int number) {
363             return Status.forNumber(number);
364           }
365         };
366 
getValueDescriptor()367     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
368       if (this == UNRECOGNIZED) {
369         throw new java.lang.IllegalStateException(
370             "Can't get the descriptor of an unrecognized enum value.");
371       }
372       return getDescriptor().getValues().get(ordinal());
373     }
374 
getDescriptorForType()375     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
376       return getDescriptor();
377     }
378 
getDescriptor()379     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
380       return com.google.cloud.compute.v1.InstanceWithNamedPorts.getDescriptor()
381           .getEnumTypes()
382           .get(0);
383     }
384 
385     private static final Status[] VALUES = values();
386 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)387     public static Status valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
388       if (desc.getType() != getDescriptor()) {
389         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
390       }
391       if (desc.getIndex() == -1) {
392         return UNRECOGNIZED;
393       }
394       return VALUES[desc.getIndex()];
395     }
396 
397     private final int value;
398 
Status(int value)399     private Status(int value) {
400       this.value = value;
401     }
402 
403     // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.InstanceWithNamedPorts.Status)
404   }
405 
406   private int bitField0_;
407   public static final int INSTANCE_FIELD_NUMBER = 18257045;
408 
409   @SuppressWarnings("serial")
410   private volatile java.lang.Object instance_ = "";
411   /**
412    *
413    *
414    * <pre>
415    * [Output Only] The URL of the instance.
416    * </pre>
417    *
418    * <code>optional string instance = 18257045;</code>
419    *
420    * @return Whether the instance field is set.
421    */
422   @java.lang.Override
hasInstance()423   public boolean hasInstance() {
424     return ((bitField0_ & 0x00000001) != 0);
425   }
426   /**
427    *
428    *
429    * <pre>
430    * [Output Only] The URL of the instance.
431    * </pre>
432    *
433    * <code>optional string instance = 18257045;</code>
434    *
435    * @return The instance.
436    */
437   @java.lang.Override
getInstance()438   public java.lang.String getInstance() {
439     java.lang.Object ref = instance_;
440     if (ref instanceof java.lang.String) {
441       return (java.lang.String) ref;
442     } else {
443       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
444       java.lang.String s = bs.toStringUtf8();
445       instance_ = s;
446       return s;
447     }
448   }
449   /**
450    *
451    *
452    * <pre>
453    * [Output Only] The URL of the instance.
454    * </pre>
455    *
456    * <code>optional string instance = 18257045;</code>
457    *
458    * @return The bytes for instance.
459    */
460   @java.lang.Override
getInstanceBytes()461   public com.google.protobuf.ByteString getInstanceBytes() {
462     java.lang.Object ref = instance_;
463     if (ref instanceof java.lang.String) {
464       com.google.protobuf.ByteString b =
465           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
466       instance_ = b;
467       return b;
468     } else {
469       return (com.google.protobuf.ByteString) ref;
470     }
471   }
472 
473   public static final int NAMED_PORTS_FIELD_NUMBER = 427598732;
474 
475   @SuppressWarnings("serial")
476   private java.util.List<com.google.cloud.compute.v1.NamedPort> namedPorts_;
477   /**
478    *
479    *
480    * <pre>
481    * [Output Only] The named ports that belong to this instance group.
482    * </pre>
483    *
484    * <code>repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;</code>
485    */
486   @java.lang.Override
getNamedPortsList()487   public java.util.List<com.google.cloud.compute.v1.NamedPort> getNamedPortsList() {
488     return namedPorts_;
489   }
490   /**
491    *
492    *
493    * <pre>
494    * [Output Only] The named ports that belong to this instance group.
495    * </pre>
496    *
497    * <code>repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;</code>
498    */
499   @java.lang.Override
500   public java.util.List<? extends com.google.cloud.compute.v1.NamedPortOrBuilder>
getNamedPortsOrBuilderList()501       getNamedPortsOrBuilderList() {
502     return namedPorts_;
503   }
504   /**
505    *
506    *
507    * <pre>
508    * [Output Only] The named ports that belong to this instance group.
509    * </pre>
510    *
511    * <code>repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;</code>
512    */
513   @java.lang.Override
getNamedPortsCount()514   public int getNamedPortsCount() {
515     return namedPorts_.size();
516   }
517   /**
518    *
519    *
520    * <pre>
521    * [Output Only] The named ports that belong to this instance group.
522    * </pre>
523    *
524    * <code>repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;</code>
525    */
526   @java.lang.Override
getNamedPorts(int index)527   public com.google.cloud.compute.v1.NamedPort getNamedPorts(int index) {
528     return namedPorts_.get(index);
529   }
530   /**
531    *
532    *
533    * <pre>
534    * [Output Only] The named ports that belong to this instance group.
535    * </pre>
536    *
537    * <code>repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;</code>
538    */
539   @java.lang.Override
getNamedPortsOrBuilder(int index)540   public com.google.cloud.compute.v1.NamedPortOrBuilder getNamedPortsOrBuilder(int index) {
541     return namedPorts_.get(index);
542   }
543 
544   public static final int STATUS_FIELD_NUMBER = 181260274;
545 
546   @SuppressWarnings("serial")
547   private volatile java.lang.Object status_ = "";
548   /**
549    *
550    *
551    * <pre>
552    * [Output Only] The status of the instance.
553    * Check the Status enum for the list of possible values.
554    * </pre>
555    *
556    * <code>optional string status = 181260274;</code>
557    *
558    * @return Whether the status field is set.
559    */
560   @java.lang.Override
hasStatus()561   public boolean hasStatus() {
562     return ((bitField0_ & 0x00000002) != 0);
563   }
564   /**
565    *
566    *
567    * <pre>
568    * [Output Only] The status of the instance.
569    * Check the Status enum for the list of possible values.
570    * </pre>
571    *
572    * <code>optional string status = 181260274;</code>
573    *
574    * @return The status.
575    */
576   @java.lang.Override
getStatus()577   public java.lang.String getStatus() {
578     java.lang.Object ref = status_;
579     if (ref instanceof java.lang.String) {
580       return (java.lang.String) ref;
581     } else {
582       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
583       java.lang.String s = bs.toStringUtf8();
584       status_ = s;
585       return s;
586     }
587   }
588   /**
589    *
590    *
591    * <pre>
592    * [Output Only] The status of the instance.
593    * Check the Status enum for the list of possible values.
594    * </pre>
595    *
596    * <code>optional string status = 181260274;</code>
597    *
598    * @return The bytes for status.
599    */
600   @java.lang.Override
getStatusBytes()601   public com.google.protobuf.ByteString getStatusBytes() {
602     java.lang.Object ref = status_;
603     if (ref instanceof java.lang.String) {
604       com.google.protobuf.ByteString b =
605           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
606       status_ = b;
607       return b;
608     } else {
609       return (com.google.protobuf.ByteString) ref;
610     }
611   }
612 
613   private byte memoizedIsInitialized = -1;
614 
615   @java.lang.Override
isInitialized()616   public final boolean isInitialized() {
617     byte isInitialized = memoizedIsInitialized;
618     if (isInitialized == 1) return true;
619     if (isInitialized == 0) return false;
620 
621     memoizedIsInitialized = 1;
622     return true;
623   }
624 
625   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)626   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
627     if (((bitField0_ & 0x00000001) != 0)) {
628       com.google.protobuf.GeneratedMessageV3.writeString(output, 18257045, instance_);
629     }
630     if (((bitField0_ & 0x00000002) != 0)) {
631       com.google.protobuf.GeneratedMessageV3.writeString(output, 181260274, status_);
632     }
633     for (int i = 0; i < namedPorts_.size(); i++) {
634       output.writeMessage(427598732, namedPorts_.get(i));
635     }
636     getUnknownFields().writeTo(output);
637   }
638 
639   @java.lang.Override
getSerializedSize()640   public int getSerializedSize() {
641     int size = memoizedSize;
642     if (size != -1) return size;
643 
644     size = 0;
645     if (((bitField0_ & 0x00000001) != 0)) {
646       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18257045, instance_);
647     }
648     if (((bitField0_ & 0x00000002) != 0)) {
649       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(181260274, status_);
650     }
651     for (int i = 0; i < namedPorts_.size(); i++) {
652       size +=
653           com.google.protobuf.CodedOutputStream.computeMessageSize(427598732, namedPorts_.get(i));
654     }
655     size += getUnknownFields().getSerializedSize();
656     memoizedSize = size;
657     return size;
658   }
659 
660   @java.lang.Override
equals(final java.lang.Object obj)661   public boolean equals(final java.lang.Object obj) {
662     if (obj == this) {
663       return true;
664     }
665     if (!(obj instanceof com.google.cloud.compute.v1.InstanceWithNamedPorts)) {
666       return super.equals(obj);
667     }
668     com.google.cloud.compute.v1.InstanceWithNamedPorts other =
669         (com.google.cloud.compute.v1.InstanceWithNamedPorts) obj;
670 
671     if (hasInstance() != other.hasInstance()) return false;
672     if (hasInstance()) {
673       if (!getInstance().equals(other.getInstance())) return false;
674     }
675     if (!getNamedPortsList().equals(other.getNamedPortsList())) return false;
676     if (hasStatus() != other.hasStatus()) return false;
677     if (hasStatus()) {
678       if (!getStatus().equals(other.getStatus())) return false;
679     }
680     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
681     return true;
682   }
683 
684   @java.lang.Override
hashCode()685   public int hashCode() {
686     if (memoizedHashCode != 0) {
687       return memoizedHashCode;
688     }
689     int hash = 41;
690     hash = (19 * hash) + getDescriptor().hashCode();
691     if (hasInstance()) {
692       hash = (37 * hash) + INSTANCE_FIELD_NUMBER;
693       hash = (53 * hash) + getInstance().hashCode();
694     }
695     if (getNamedPortsCount() > 0) {
696       hash = (37 * hash) + NAMED_PORTS_FIELD_NUMBER;
697       hash = (53 * hash) + getNamedPortsList().hashCode();
698     }
699     if (hasStatus()) {
700       hash = (37 * hash) + STATUS_FIELD_NUMBER;
701       hash = (53 * hash) + getStatus().hashCode();
702     }
703     hash = (29 * hash) + getUnknownFields().hashCode();
704     memoizedHashCode = hash;
705     return hash;
706   }
707 
parseFrom( java.nio.ByteBuffer data)708   public static com.google.cloud.compute.v1.InstanceWithNamedPorts parseFrom(
709       java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
710     return PARSER.parseFrom(data);
711   }
712 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)713   public static com.google.cloud.compute.v1.InstanceWithNamedPorts parseFrom(
714       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
715       throws com.google.protobuf.InvalidProtocolBufferException {
716     return PARSER.parseFrom(data, extensionRegistry);
717   }
718 
parseFrom( com.google.protobuf.ByteString data)719   public static com.google.cloud.compute.v1.InstanceWithNamedPorts parseFrom(
720       com.google.protobuf.ByteString data)
721       throws com.google.protobuf.InvalidProtocolBufferException {
722     return PARSER.parseFrom(data);
723   }
724 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)725   public static com.google.cloud.compute.v1.InstanceWithNamedPorts parseFrom(
726       com.google.protobuf.ByteString data,
727       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
728       throws com.google.protobuf.InvalidProtocolBufferException {
729     return PARSER.parseFrom(data, extensionRegistry);
730   }
731 
parseFrom(byte[] data)732   public static com.google.cloud.compute.v1.InstanceWithNamedPorts parseFrom(byte[] data)
733       throws com.google.protobuf.InvalidProtocolBufferException {
734     return PARSER.parseFrom(data);
735   }
736 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)737   public static com.google.cloud.compute.v1.InstanceWithNamedPorts parseFrom(
738       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
739       throws com.google.protobuf.InvalidProtocolBufferException {
740     return PARSER.parseFrom(data, extensionRegistry);
741   }
742 
parseFrom( java.io.InputStream input)743   public static com.google.cloud.compute.v1.InstanceWithNamedPorts parseFrom(
744       java.io.InputStream input) throws java.io.IOException {
745     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
746   }
747 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)748   public static com.google.cloud.compute.v1.InstanceWithNamedPorts parseFrom(
749       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
750       throws java.io.IOException {
751     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
752         PARSER, input, extensionRegistry);
753   }
754 
parseDelimitedFrom( java.io.InputStream input)755   public static com.google.cloud.compute.v1.InstanceWithNamedPorts parseDelimitedFrom(
756       java.io.InputStream input) throws java.io.IOException {
757     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
758   }
759 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)760   public static com.google.cloud.compute.v1.InstanceWithNamedPorts parseDelimitedFrom(
761       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
762       throws java.io.IOException {
763     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
764         PARSER, input, extensionRegistry);
765   }
766 
parseFrom( com.google.protobuf.CodedInputStream input)767   public static com.google.cloud.compute.v1.InstanceWithNamedPorts parseFrom(
768       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
769     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
770   }
771 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)772   public static com.google.cloud.compute.v1.InstanceWithNamedPorts parseFrom(
773       com.google.protobuf.CodedInputStream input,
774       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
775       throws java.io.IOException {
776     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
777         PARSER, input, extensionRegistry);
778   }
779 
780   @java.lang.Override
newBuilderForType()781   public Builder newBuilderForType() {
782     return newBuilder();
783   }
784 
newBuilder()785   public static Builder newBuilder() {
786     return DEFAULT_INSTANCE.toBuilder();
787   }
788 
newBuilder(com.google.cloud.compute.v1.InstanceWithNamedPorts prototype)789   public static Builder newBuilder(com.google.cloud.compute.v1.InstanceWithNamedPorts prototype) {
790     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
791   }
792 
793   @java.lang.Override
toBuilder()794   public Builder toBuilder() {
795     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
796   }
797 
798   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)799   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
800     Builder builder = new Builder(parent);
801     return builder;
802   }
803   /**
804    *
805    *
806    * <pre>
807    * </pre>
808    *
809    * Protobuf type {@code google.cloud.compute.v1.InstanceWithNamedPorts}
810    */
811   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
812       implements
813       // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.InstanceWithNamedPorts)
814       com.google.cloud.compute.v1.InstanceWithNamedPortsOrBuilder {
getDescriptor()815     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
816       return com.google.cloud.compute.v1.Compute
817           .internal_static_google_cloud_compute_v1_InstanceWithNamedPorts_descriptor;
818     }
819 
820     @java.lang.Override
821     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()822         internalGetFieldAccessorTable() {
823       return com.google.cloud.compute.v1.Compute
824           .internal_static_google_cloud_compute_v1_InstanceWithNamedPorts_fieldAccessorTable
825           .ensureFieldAccessorsInitialized(
826               com.google.cloud.compute.v1.InstanceWithNamedPorts.class,
827               com.google.cloud.compute.v1.InstanceWithNamedPorts.Builder.class);
828     }
829 
830     // Construct using com.google.cloud.compute.v1.InstanceWithNamedPorts.newBuilder()
Builder()831     private Builder() {}
832 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)833     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
834       super(parent);
835     }
836 
837     @java.lang.Override
clear()838     public Builder clear() {
839       super.clear();
840       bitField0_ = 0;
841       instance_ = "";
842       if (namedPortsBuilder_ == null) {
843         namedPorts_ = java.util.Collections.emptyList();
844       } else {
845         namedPorts_ = null;
846         namedPortsBuilder_.clear();
847       }
848       bitField0_ = (bitField0_ & ~0x00000002);
849       status_ = "";
850       return this;
851     }
852 
853     @java.lang.Override
getDescriptorForType()854     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
855       return com.google.cloud.compute.v1.Compute
856           .internal_static_google_cloud_compute_v1_InstanceWithNamedPorts_descriptor;
857     }
858 
859     @java.lang.Override
getDefaultInstanceForType()860     public com.google.cloud.compute.v1.InstanceWithNamedPorts getDefaultInstanceForType() {
861       return com.google.cloud.compute.v1.InstanceWithNamedPorts.getDefaultInstance();
862     }
863 
864     @java.lang.Override
build()865     public com.google.cloud.compute.v1.InstanceWithNamedPorts build() {
866       com.google.cloud.compute.v1.InstanceWithNamedPorts result = buildPartial();
867       if (!result.isInitialized()) {
868         throw newUninitializedMessageException(result);
869       }
870       return result;
871     }
872 
873     @java.lang.Override
buildPartial()874     public com.google.cloud.compute.v1.InstanceWithNamedPorts buildPartial() {
875       com.google.cloud.compute.v1.InstanceWithNamedPorts result =
876           new com.google.cloud.compute.v1.InstanceWithNamedPorts(this);
877       buildPartialRepeatedFields(result);
878       if (bitField0_ != 0) {
879         buildPartial0(result);
880       }
881       onBuilt();
882       return result;
883     }
884 
buildPartialRepeatedFields( com.google.cloud.compute.v1.InstanceWithNamedPorts result)885     private void buildPartialRepeatedFields(
886         com.google.cloud.compute.v1.InstanceWithNamedPorts result) {
887       if (namedPortsBuilder_ == null) {
888         if (((bitField0_ & 0x00000002) != 0)) {
889           namedPorts_ = java.util.Collections.unmodifiableList(namedPorts_);
890           bitField0_ = (bitField0_ & ~0x00000002);
891         }
892         result.namedPorts_ = namedPorts_;
893       } else {
894         result.namedPorts_ = namedPortsBuilder_.build();
895       }
896     }
897 
buildPartial0(com.google.cloud.compute.v1.InstanceWithNamedPorts result)898     private void buildPartial0(com.google.cloud.compute.v1.InstanceWithNamedPorts result) {
899       int from_bitField0_ = bitField0_;
900       int to_bitField0_ = 0;
901       if (((from_bitField0_ & 0x00000001) != 0)) {
902         result.instance_ = instance_;
903         to_bitField0_ |= 0x00000001;
904       }
905       if (((from_bitField0_ & 0x00000004) != 0)) {
906         result.status_ = status_;
907         to_bitField0_ |= 0x00000002;
908       }
909       result.bitField0_ |= to_bitField0_;
910     }
911 
912     @java.lang.Override
clone()913     public Builder clone() {
914       return super.clone();
915     }
916 
917     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)918     public Builder setField(
919         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
920       return super.setField(field, value);
921     }
922 
923     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)924     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
925       return super.clearField(field);
926     }
927 
928     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)929     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
930       return super.clearOneof(oneof);
931     }
932 
933     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)934     public Builder setRepeatedField(
935         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
936       return super.setRepeatedField(field, index, value);
937     }
938 
939     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)940     public Builder addRepeatedField(
941         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
942       return super.addRepeatedField(field, value);
943     }
944 
945     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)946     public Builder mergeFrom(com.google.protobuf.Message other) {
947       if (other instanceof com.google.cloud.compute.v1.InstanceWithNamedPorts) {
948         return mergeFrom((com.google.cloud.compute.v1.InstanceWithNamedPorts) other);
949       } else {
950         super.mergeFrom(other);
951         return this;
952       }
953     }
954 
mergeFrom(com.google.cloud.compute.v1.InstanceWithNamedPorts other)955     public Builder mergeFrom(com.google.cloud.compute.v1.InstanceWithNamedPorts other) {
956       if (other == com.google.cloud.compute.v1.InstanceWithNamedPorts.getDefaultInstance())
957         return this;
958       if (other.hasInstance()) {
959         instance_ = other.instance_;
960         bitField0_ |= 0x00000001;
961         onChanged();
962       }
963       if (namedPortsBuilder_ == null) {
964         if (!other.namedPorts_.isEmpty()) {
965           if (namedPorts_.isEmpty()) {
966             namedPorts_ = other.namedPorts_;
967             bitField0_ = (bitField0_ & ~0x00000002);
968           } else {
969             ensureNamedPortsIsMutable();
970             namedPorts_.addAll(other.namedPorts_);
971           }
972           onChanged();
973         }
974       } else {
975         if (!other.namedPorts_.isEmpty()) {
976           if (namedPortsBuilder_.isEmpty()) {
977             namedPortsBuilder_.dispose();
978             namedPortsBuilder_ = null;
979             namedPorts_ = other.namedPorts_;
980             bitField0_ = (bitField0_ & ~0x00000002);
981             namedPortsBuilder_ =
982                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
983                     ? getNamedPortsFieldBuilder()
984                     : null;
985           } else {
986             namedPortsBuilder_.addAllMessages(other.namedPorts_);
987           }
988         }
989       }
990       if (other.hasStatus()) {
991         status_ = other.status_;
992         bitField0_ |= 0x00000004;
993         onChanged();
994       }
995       this.mergeUnknownFields(other.getUnknownFields());
996       onChanged();
997       return this;
998     }
999 
1000     @java.lang.Override
isInitialized()1001     public final boolean isInitialized() {
1002       return true;
1003     }
1004 
1005     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1006     public Builder mergeFrom(
1007         com.google.protobuf.CodedInputStream input,
1008         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1009         throws java.io.IOException {
1010       if (extensionRegistry == null) {
1011         throw new java.lang.NullPointerException();
1012       }
1013       try {
1014         boolean done = false;
1015         while (!done) {
1016           int tag = input.readTag();
1017           switch (tag) {
1018             case 0:
1019               done = true;
1020               break;
1021             case 146056362:
1022               {
1023                 instance_ = input.readStringRequireUtf8();
1024                 bitField0_ |= 0x00000001;
1025                 break;
1026               } // case 146056362
1027             case 1450082194:
1028               {
1029                 status_ = input.readStringRequireUtf8();
1030                 bitField0_ |= 0x00000004;
1031                 break;
1032               } // case 1450082194
1033             case -874177438:
1034               {
1035                 com.google.cloud.compute.v1.NamedPort m =
1036                     input.readMessage(
1037                         com.google.cloud.compute.v1.NamedPort.parser(), extensionRegistry);
1038                 if (namedPortsBuilder_ == null) {
1039                   ensureNamedPortsIsMutable();
1040                   namedPorts_.add(m);
1041                 } else {
1042                   namedPortsBuilder_.addMessage(m);
1043                 }
1044                 break;
1045               } // case -874177438
1046             default:
1047               {
1048                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1049                   done = true; // was an endgroup tag
1050                 }
1051                 break;
1052               } // default:
1053           } // switch (tag)
1054         } // while (!done)
1055       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1056         throw e.unwrapIOException();
1057       } finally {
1058         onChanged();
1059       } // finally
1060       return this;
1061     }
1062 
1063     private int bitField0_;
1064 
1065     private java.lang.Object instance_ = "";
1066     /**
1067      *
1068      *
1069      * <pre>
1070      * [Output Only] The URL of the instance.
1071      * </pre>
1072      *
1073      * <code>optional string instance = 18257045;</code>
1074      *
1075      * @return Whether the instance field is set.
1076      */
hasInstance()1077     public boolean hasInstance() {
1078       return ((bitField0_ & 0x00000001) != 0);
1079     }
1080     /**
1081      *
1082      *
1083      * <pre>
1084      * [Output Only] The URL of the instance.
1085      * </pre>
1086      *
1087      * <code>optional string instance = 18257045;</code>
1088      *
1089      * @return The instance.
1090      */
getInstance()1091     public java.lang.String getInstance() {
1092       java.lang.Object ref = instance_;
1093       if (!(ref instanceof java.lang.String)) {
1094         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1095         java.lang.String s = bs.toStringUtf8();
1096         instance_ = s;
1097         return s;
1098       } else {
1099         return (java.lang.String) ref;
1100       }
1101     }
1102     /**
1103      *
1104      *
1105      * <pre>
1106      * [Output Only] The URL of the instance.
1107      * </pre>
1108      *
1109      * <code>optional string instance = 18257045;</code>
1110      *
1111      * @return The bytes for instance.
1112      */
getInstanceBytes()1113     public com.google.protobuf.ByteString getInstanceBytes() {
1114       java.lang.Object ref = instance_;
1115       if (ref instanceof String) {
1116         com.google.protobuf.ByteString b =
1117             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1118         instance_ = b;
1119         return b;
1120       } else {
1121         return (com.google.protobuf.ByteString) ref;
1122       }
1123     }
1124     /**
1125      *
1126      *
1127      * <pre>
1128      * [Output Only] The URL of the instance.
1129      * </pre>
1130      *
1131      * <code>optional string instance = 18257045;</code>
1132      *
1133      * @param value The instance to set.
1134      * @return This builder for chaining.
1135      */
setInstance(java.lang.String value)1136     public Builder setInstance(java.lang.String value) {
1137       if (value == null) {
1138         throw new NullPointerException();
1139       }
1140       instance_ = value;
1141       bitField0_ |= 0x00000001;
1142       onChanged();
1143       return this;
1144     }
1145     /**
1146      *
1147      *
1148      * <pre>
1149      * [Output Only] The URL of the instance.
1150      * </pre>
1151      *
1152      * <code>optional string instance = 18257045;</code>
1153      *
1154      * @return This builder for chaining.
1155      */
clearInstance()1156     public Builder clearInstance() {
1157       instance_ = getDefaultInstance().getInstance();
1158       bitField0_ = (bitField0_ & ~0x00000001);
1159       onChanged();
1160       return this;
1161     }
1162     /**
1163      *
1164      *
1165      * <pre>
1166      * [Output Only] The URL of the instance.
1167      * </pre>
1168      *
1169      * <code>optional string instance = 18257045;</code>
1170      *
1171      * @param value The bytes for instance to set.
1172      * @return This builder for chaining.
1173      */
setInstanceBytes(com.google.protobuf.ByteString value)1174     public Builder setInstanceBytes(com.google.protobuf.ByteString value) {
1175       if (value == null) {
1176         throw new NullPointerException();
1177       }
1178       checkByteStringIsUtf8(value);
1179       instance_ = value;
1180       bitField0_ |= 0x00000001;
1181       onChanged();
1182       return this;
1183     }
1184 
1185     private java.util.List<com.google.cloud.compute.v1.NamedPort> namedPorts_ =
1186         java.util.Collections.emptyList();
1187 
ensureNamedPortsIsMutable()1188     private void ensureNamedPortsIsMutable() {
1189       if (!((bitField0_ & 0x00000002) != 0)) {
1190         namedPorts_ = new java.util.ArrayList<com.google.cloud.compute.v1.NamedPort>(namedPorts_);
1191         bitField0_ |= 0x00000002;
1192       }
1193     }
1194 
1195     private com.google.protobuf.RepeatedFieldBuilderV3<
1196             com.google.cloud.compute.v1.NamedPort,
1197             com.google.cloud.compute.v1.NamedPort.Builder,
1198             com.google.cloud.compute.v1.NamedPortOrBuilder>
1199         namedPortsBuilder_;
1200 
1201     /**
1202      *
1203      *
1204      * <pre>
1205      * [Output Only] The named ports that belong to this instance group.
1206      * </pre>
1207      *
1208      * <code>repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;</code>
1209      */
getNamedPortsList()1210     public java.util.List<com.google.cloud.compute.v1.NamedPort> getNamedPortsList() {
1211       if (namedPortsBuilder_ == null) {
1212         return java.util.Collections.unmodifiableList(namedPorts_);
1213       } else {
1214         return namedPortsBuilder_.getMessageList();
1215       }
1216     }
1217     /**
1218      *
1219      *
1220      * <pre>
1221      * [Output Only] The named ports that belong to this instance group.
1222      * </pre>
1223      *
1224      * <code>repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;</code>
1225      */
getNamedPortsCount()1226     public int getNamedPortsCount() {
1227       if (namedPortsBuilder_ == null) {
1228         return namedPorts_.size();
1229       } else {
1230         return namedPortsBuilder_.getCount();
1231       }
1232     }
1233     /**
1234      *
1235      *
1236      * <pre>
1237      * [Output Only] The named ports that belong to this instance group.
1238      * </pre>
1239      *
1240      * <code>repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;</code>
1241      */
getNamedPorts(int index)1242     public com.google.cloud.compute.v1.NamedPort getNamedPorts(int index) {
1243       if (namedPortsBuilder_ == null) {
1244         return namedPorts_.get(index);
1245       } else {
1246         return namedPortsBuilder_.getMessage(index);
1247       }
1248     }
1249     /**
1250      *
1251      *
1252      * <pre>
1253      * [Output Only] The named ports that belong to this instance group.
1254      * </pre>
1255      *
1256      * <code>repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;</code>
1257      */
setNamedPorts(int index, com.google.cloud.compute.v1.NamedPort value)1258     public Builder setNamedPorts(int index, com.google.cloud.compute.v1.NamedPort value) {
1259       if (namedPortsBuilder_ == null) {
1260         if (value == null) {
1261           throw new NullPointerException();
1262         }
1263         ensureNamedPortsIsMutable();
1264         namedPorts_.set(index, value);
1265         onChanged();
1266       } else {
1267         namedPortsBuilder_.setMessage(index, value);
1268       }
1269       return this;
1270     }
1271     /**
1272      *
1273      *
1274      * <pre>
1275      * [Output Only] The named ports that belong to this instance group.
1276      * </pre>
1277      *
1278      * <code>repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;</code>
1279      */
setNamedPorts( int index, com.google.cloud.compute.v1.NamedPort.Builder builderForValue)1280     public Builder setNamedPorts(
1281         int index, com.google.cloud.compute.v1.NamedPort.Builder builderForValue) {
1282       if (namedPortsBuilder_ == null) {
1283         ensureNamedPortsIsMutable();
1284         namedPorts_.set(index, builderForValue.build());
1285         onChanged();
1286       } else {
1287         namedPortsBuilder_.setMessage(index, builderForValue.build());
1288       }
1289       return this;
1290     }
1291     /**
1292      *
1293      *
1294      * <pre>
1295      * [Output Only] The named ports that belong to this instance group.
1296      * </pre>
1297      *
1298      * <code>repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;</code>
1299      */
addNamedPorts(com.google.cloud.compute.v1.NamedPort value)1300     public Builder addNamedPorts(com.google.cloud.compute.v1.NamedPort value) {
1301       if (namedPortsBuilder_ == null) {
1302         if (value == null) {
1303           throw new NullPointerException();
1304         }
1305         ensureNamedPortsIsMutable();
1306         namedPorts_.add(value);
1307         onChanged();
1308       } else {
1309         namedPortsBuilder_.addMessage(value);
1310       }
1311       return this;
1312     }
1313     /**
1314      *
1315      *
1316      * <pre>
1317      * [Output Only] The named ports that belong to this instance group.
1318      * </pre>
1319      *
1320      * <code>repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;</code>
1321      */
addNamedPorts(int index, com.google.cloud.compute.v1.NamedPort value)1322     public Builder addNamedPorts(int index, com.google.cloud.compute.v1.NamedPort value) {
1323       if (namedPortsBuilder_ == null) {
1324         if (value == null) {
1325           throw new NullPointerException();
1326         }
1327         ensureNamedPortsIsMutable();
1328         namedPorts_.add(index, value);
1329         onChanged();
1330       } else {
1331         namedPortsBuilder_.addMessage(index, value);
1332       }
1333       return this;
1334     }
1335     /**
1336      *
1337      *
1338      * <pre>
1339      * [Output Only] The named ports that belong to this instance group.
1340      * </pre>
1341      *
1342      * <code>repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;</code>
1343      */
addNamedPorts(com.google.cloud.compute.v1.NamedPort.Builder builderForValue)1344     public Builder addNamedPorts(com.google.cloud.compute.v1.NamedPort.Builder builderForValue) {
1345       if (namedPortsBuilder_ == null) {
1346         ensureNamedPortsIsMutable();
1347         namedPorts_.add(builderForValue.build());
1348         onChanged();
1349       } else {
1350         namedPortsBuilder_.addMessage(builderForValue.build());
1351       }
1352       return this;
1353     }
1354     /**
1355      *
1356      *
1357      * <pre>
1358      * [Output Only] The named ports that belong to this instance group.
1359      * </pre>
1360      *
1361      * <code>repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;</code>
1362      */
addNamedPorts( int index, com.google.cloud.compute.v1.NamedPort.Builder builderForValue)1363     public Builder addNamedPorts(
1364         int index, com.google.cloud.compute.v1.NamedPort.Builder builderForValue) {
1365       if (namedPortsBuilder_ == null) {
1366         ensureNamedPortsIsMutable();
1367         namedPorts_.add(index, builderForValue.build());
1368         onChanged();
1369       } else {
1370         namedPortsBuilder_.addMessage(index, builderForValue.build());
1371       }
1372       return this;
1373     }
1374     /**
1375      *
1376      *
1377      * <pre>
1378      * [Output Only] The named ports that belong to this instance group.
1379      * </pre>
1380      *
1381      * <code>repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;</code>
1382      */
addAllNamedPorts( java.lang.Iterable<? extends com.google.cloud.compute.v1.NamedPort> values)1383     public Builder addAllNamedPorts(
1384         java.lang.Iterable<? extends com.google.cloud.compute.v1.NamedPort> values) {
1385       if (namedPortsBuilder_ == null) {
1386         ensureNamedPortsIsMutable();
1387         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, namedPorts_);
1388         onChanged();
1389       } else {
1390         namedPortsBuilder_.addAllMessages(values);
1391       }
1392       return this;
1393     }
1394     /**
1395      *
1396      *
1397      * <pre>
1398      * [Output Only] The named ports that belong to this instance group.
1399      * </pre>
1400      *
1401      * <code>repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;</code>
1402      */
clearNamedPorts()1403     public Builder clearNamedPorts() {
1404       if (namedPortsBuilder_ == null) {
1405         namedPorts_ = java.util.Collections.emptyList();
1406         bitField0_ = (bitField0_ & ~0x00000002);
1407         onChanged();
1408       } else {
1409         namedPortsBuilder_.clear();
1410       }
1411       return this;
1412     }
1413     /**
1414      *
1415      *
1416      * <pre>
1417      * [Output Only] The named ports that belong to this instance group.
1418      * </pre>
1419      *
1420      * <code>repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;</code>
1421      */
removeNamedPorts(int index)1422     public Builder removeNamedPorts(int index) {
1423       if (namedPortsBuilder_ == null) {
1424         ensureNamedPortsIsMutable();
1425         namedPorts_.remove(index);
1426         onChanged();
1427       } else {
1428         namedPortsBuilder_.remove(index);
1429       }
1430       return this;
1431     }
1432     /**
1433      *
1434      *
1435      * <pre>
1436      * [Output Only] The named ports that belong to this instance group.
1437      * </pre>
1438      *
1439      * <code>repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;</code>
1440      */
getNamedPortsBuilder(int index)1441     public com.google.cloud.compute.v1.NamedPort.Builder getNamedPortsBuilder(int index) {
1442       return getNamedPortsFieldBuilder().getBuilder(index);
1443     }
1444     /**
1445      *
1446      *
1447      * <pre>
1448      * [Output Only] The named ports that belong to this instance group.
1449      * </pre>
1450      *
1451      * <code>repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;</code>
1452      */
getNamedPortsOrBuilder(int index)1453     public com.google.cloud.compute.v1.NamedPortOrBuilder getNamedPortsOrBuilder(int index) {
1454       if (namedPortsBuilder_ == null) {
1455         return namedPorts_.get(index);
1456       } else {
1457         return namedPortsBuilder_.getMessageOrBuilder(index);
1458       }
1459     }
1460     /**
1461      *
1462      *
1463      * <pre>
1464      * [Output Only] The named ports that belong to this instance group.
1465      * </pre>
1466      *
1467      * <code>repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;</code>
1468      */
1469     public java.util.List<? extends com.google.cloud.compute.v1.NamedPortOrBuilder>
getNamedPortsOrBuilderList()1470         getNamedPortsOrBuilderList() {
1471       if (namedPortsBuilder_ != null) {
1472         return namedPortsBuilder_.getMessageOrBuilderList();
1473       } else {
1474         return java.util.Collections.unmodifiableList(namedPorts_);
1475       }
1476     }
1477     /**
1478      *
1479      *
1480      * <pre>
1481      * [Output Only] The named ports that belong to this instance group.
1482      * </pre>
1483      *
1484      * <code>repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;</code>
1485      */
addNamedPortsBuilder()1486     public com.google.cloud.compute.v1.NamedPort.Builder addNamedPortsBuilder() {
1487       return getNamedPortsFieldBuilder()
1488           .addBuilder(com.google.cloud.compute.v1.NamedPort.getDefaultInstance());
1489     }
1490     /**
1491      *
1492      *
1493      * <pre>
1494      * [Output Only] The named ports that belong to this instance group.
1495      * </pre>
1496      *
1497      * <code>repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;</code>
1498      */
addNamedPortsBuilder(int index)1499     public com.google.cloud.compute.v1.NamedPort.Builder addNamedPortsBuilder(int index) {
1500       return getNamedPortsFieldBuilder()
1501           .addBuilder(index, com.google.cloud.compute.v1.NamedPort.getDefaultInstance());
1502     }
1503     /**
1504      *
1505      *
1506      * <pre>
1507      * [Output Only] The named ports that belong to this instance group.
1508      * </pre>
1509      *
1510      * <code>repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;</code>
1511      */
1512     public java.util.List<com.google.cloud.compute.v1.NamedPort.Builder>
getNamedPortsBuilderList()1513         getNamedPortsBuilderList() {
1514       return getNamedPortsFieldBuilder().getBuilderList();
1515     }
1516 
1517     private com.google.protobuf.RepeatedFieldBuilderV3<
1518             com.google.cloud.compute.v1.NamedPort,
1519             com.google.cloud.compute.v1.NamedPort.Builder,
1520             com.google.cloud.compute.v1.NamedPortOrBuilder>
getNamedPortsFieldBuilder()1521         getNamedPortsFieldBuilder() {
1522       if (namedPortsBuilder_ == null) {
1523         namedPortsBuilder_ =
1524             new com.google.protobuf.RepeatedFieldBuilderV3<
1525                 com.google.cloud.compute.v1.NamedPort,
1526                 com.google.cloud.compute.v1.NamedPort.Builder,
1527                 com.google.cloud.compute.v1.NamedPortOrBuilder>(
1528                 namedPorts_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
1529         namedPorts_ = null;
1530       }
1531       return namedPortsBuilder_;
1532     }
1533 
1534     private java.lang.Object status_ = "";
1535     /**
1536      *
1537      *
1538      * <pre>
1539      * [Output Only] The status of the instance.
1540      * Check the Status enum for the list of possible values.
1541      * </pre>
1542      *
1543      * <code>optional string status = 181260274;</code>
1544      *
1545      * @return Whether the status field is set.
1546      */
hasStatus()1547     public boolean hasStatus() {
1548       return ((bitField0_ & 0x00000004) != 0);
1549     }
1550     /**
1551      *
1552      *
1553      * <pre>
1554      * [Output Only] The status of the instance.
1555      * Check the Status enum for the list of possible values.
1556      * </pre>
1557      *
1558      * <code>optional string status = 181260274;</code>
1559      *
1560      * @return The status.
1561      */
getStatus()1562     public java.lang.String getStatus() {
1563       java.lang.Object ref = status_;
1564       if (!(ref instanceof java.lang.String)) {
1565         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1566         java.lang.String s = bs.toStringUtf8();
1567         status_ = s;
1568         return s;
1569       } else {
1570         return (java.lang.String) ref;
1571       }
1572     }
1573     /**
1574      *
1575      *
1576      * <pre>
1577      * [Output Only] The status of the instance.
1578      * Check the Status enum for the list of possible values.
1579      * </pre>
1580      *
1581      * <code>optional string status = 181260274;</code>
1582      *
1583      * @return The bytes for status.
1584      */
getStatusBytes()1585     public com.google.protobuf.ByteString getStatusBytes() {
1586       java.lang.Object ref = status_;
1587       if (ref instanceof String) {
1588         com.google.protobuf.ByteString b =
1589             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1590         status_ = b;
1591         return b;
1592       } else {
1593         return (com.google.protobuf.ByteString) ref;
1594       }
1595     }
1596     /**
1597      *
1598      *
1599      * <pre>
1600      * [Output Only] The status of the instance.
1601      * Check the Status enum for the list of possible values.
1602      * </pre>
1603      *
1604      * <code>optional string status = 181260274;</code>
1605      *
1606      * @param value The status to set.
1607      * @return This builder for chaining.
1608      */
setStatus(java.lang.String value)1609     public Builder setStatus(java.lang.String value) {
1610       if (value == null) {
1611         throw new NullPointerException();
1612       }
1613       status_ = value;
1614       bitField0_ |= 0x00000004;
1615       onChanged();
1616       return this;
1617     }
1618     /**
1619      *
1620      *
1621      * <pre>
1622      * [Output Only] The status of the instance.
1623      * Check the Status enum for the list of possible values.
1624      * </pre>
1625      *
1626      * <code>optional string status = 181260274;</code>
1627      *
1628      * @return This builder for chaining.
1629      */
clearStatus()1630     public Builder clearStatus() {
1631       status_ = getDefaultInstance().getStatus();
1632       bitField0_ = (bitField0_ & ~0x00000004);
1633       onChanged();
1634       return this;
1635     }
1636     /**
1637      *
1638      *
1639      * <pre>
1640      * [Output Only] The status of the instance.
1641      * Check the Status enum for the list of possible values.
1642      * </pre>
1643      *
1644      * <code>optional string status = 181260274;</code>
1645      *
1646      * @param value The bytes for status to set.
1647      * @return This builder for chaining.
1648      */
setStatusBytes(com.google.protobuf.ByteString value)1649     public Builder setStatusBytes(com.google.protobuf.ByteString value) {
1650       if (value == null) {
1651         throw new NullPointerException();
1652       }
1653       checkByteStringIsUtf8(value);
1654       status_ = value;
1655       bitField0_ |= 0x00000004;
1656       onChanged();
1657       return this;
1658     }
1659 
1660     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1661     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1662       return super.setUnknownFields(unknownFields);
1663     }
1664 
1665     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1666     public final Builder mergeUnknownFields(
1667         final com.google.protobuf.UnknownFieldSet unknownFields) {
1668       return super.mergeUnknownFields(unknownFields);
1669     }
1670 
1671     // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.InstanceWithNamedPorts)
1672   }
1673 
1674   // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.InstanceWithNamedPorts)
1675   private static final com.google.cloud.compute.v1.InstanceWithNamedPorts DEFAULT_INSTANCE;
1676 
1677   static {
1678     DEFAULT_INSTANCE = new com.google.cloud.compute.v1.InstanceWithNamedPorts();
1679   }
1680 
getDefaultInstance()1681   public static com.google.cloud.compute.v1.InstanceWithNamedPorts getDefaultInstance() {
1682     return DEFAULT_INSTANCE;
1683   }
1684 
1685   private static final com.google.protobuf.Parser<InstanceWithNamedPorts> PARSER =
1686       new com.google.protobuf.AbstractParser<InstanceWithNamedPorts>() {
1687         @java.lang.Override
1688         public InstanceWithNamedPorts parsePartialFrom(
1689             com.google.protobuf.CodedInputStream input,
1690             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1691             throws com.google.protobuf.InvalidProtocolBufferException {
1692           Builder builder = newBuilder();
1693           try {
1694             builder.mergeFrom(input, extensionRegistry);
1695           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1696             throw e.setUnfinishedMessage(builder.buildPartial());
1697           } catch (com.google.protobuf.UninitializedMessageException e) {
1698             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1699           } catch (java.io.IOException e) {
1700             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1701                 .setUnfinishedMessage(builder.buildPartial());
1702           }
1703           return builder.buildPartial();
1704         }
1705       };
1706 
parser()1707   public static com.google.protobuf.Parser<InstanceWithNamedPorts> parser() {
1708     return PARSER;
1709   }
1710 
1711   @java.lang.Override
getParserForType()1712   public com.google.protobuf.Parser<InstanceWithNamedPorts> getParserForType() {
1713     return PARSER;
1714   }
1715 
1716   @java.lang.Override
getDefaultInstanceForType()1717   public com.google.cloud.compute.v1.InstanceWithNamedPorts getDefaultInstanceForType() {
1718     return DEFAULT_INSTANCE;
1719   }
1720 }
1721