• 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  * Specifies the reservations that this instance can consume from.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.compute.v1.ReservationAffinity}
29  */
30 public final class ReservationAffinity extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.ReservationAffinity)
33     ReservationAffinityOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use ReservationAffinity.newBuilder() to construct.
ReservationAffinity(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private ReservationAffinity(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
ReservationAffinity()40   private ReservationAffinity() {
41     consumeReservationType_ = "";
42     key_ = "";
43     values_ = com.google.protobuf.LazyStringArrayList.EMPTY;
44   }
45 
46   @java.lang.Override
47   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)48   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
49     return new ReservationAffinity();
50   }
51 
52   @java.lang.Override
getUnknownFields()53   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
54     return this.unknownFields;
55   }
56 
getDescriptor()57   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
58     return com.google.cloud.compute.v1.Compute
59         .internal_static_google_cloud_compute_v1_ReservationAffinity_descriptor;
60   }
61 
62   @java.lang.Override
63   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()64       internalGetFieldAccessorTable() {
65     return com.google.cloud.compute.v1.Compute
66         .internal_static_google_cloud_compute_v1_ReservationAffinity_fieldAccessorTable
67         .ensureFieldAccessorsInitialized(
68             com.google.cloud.compute.v1.ReservationAffinity.class,
69             com.google.cloud.compute.v1.ReservationAffinity.Builder.class);
70   }
71 
72   /**
73    *
74    *
75    * <pre>
76    * Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
77    * </pre>
78    *
79    * Protobuf enum {@code google.cloud.compute.v1.ReservationAffinity.ConsumeReservationType}
80    */
81   public enum ConsumeReservationType implements com.google.protobuf.ProtocolMessageEnum {
82     /**
83      *
84      *
85      * <pre>
86      * A value indicating that the enum field is not set.
87      * </pre>
88      *
89      * <code>UNDEFINED_CONSUME_RESERVATION_TYPE = 0;</code>
90      */
91     UNDEFINED_CONSUME_RESERVATION_TYPE(0),
92     /**
93      *
94      *
95      * <pre>
96      * Consume any allocation available.
97      * </pre>
98      *
99      * <code>ANY_RESERVATION = 200008121;</code>
100      */
101     ANY_RESERVATION(200008121),
102     /**
103      *
104      *
105      * <pre>
106      * Do not consume from any allocated capacity.
107      * </pre>
108      *
109      * <code>NO_RESERVATION = 169322030;</code>
110      */
111     NO_RESERVATION(169322030),
112     /**
113      *
114      *
115      * <pre>
116      * Must consume from a specific reservation. Must specify key value fields for specifying the reservations.
117      * </pre>
118      *
119      * <code>SPECIFIC_RESERVATION = 229889055;</code>
120      */
121     SPECIFIC_RESERVATION(229889055),
122     /** <code>UNSPECIFIED = 526786327;</code> */
123     UNSPECIFIED(526786327),
124     UNRECOGNIZED(-1),
125     ;
126 
127     /**
128      *
129      *
130      * <pre>
131      * A value indicating that the enum field is not set.
132      * </pre>
133      *
134      * <code>UNDEFINED_CONSUME_RESERVATION_TYPE = 0;</code>
135      */
136     public static final int UNDEFINED_CONSUME_RESERVATION_TYPE_VALUE = 0;
137     /**
138      *
139      *
140      * <pre>
141      * Consume any allocation available.
142      * </pre>
143      *
144      * <code>ANY_RESERVATION = 200008121;</code>
145      */
146     public static final int ANY_RESERVATION_VALUE = 200008121;
147     /**
148      *
149      *
150      * <pre>
151      * Do not consume from any allocated capacity.
152      * </pre>
153      *
154      * <code>NO_RESERVATION = 169322030;</code>
155      */
156     public static final int NO_RESERVATION_VALUE = 169322030;
157     /**
158      *
159      *
160      * <pre>
161      * Must consume from a specific reservation. Must specify key value fields for specifying the reservations.
162      * </pre>
163      *
164      * <code>SPECIFIC_RESERVATION = 229889055;</code>
165      */
166     public static final int SPECIFIC_RESERVATION_VALUE = 229889055;
167     /** <code>UNSPECIFIED = 526786327;</code> */
168     public static final int UNSPECIFIED_VALUE = 526786327;
169 
getNumber()170     public final int getNumber() {
171       if (this == UNRECOGNIZED) {
172         throw new java.lang.IllegalArgumentException(
173             "Can't get the number of an unknown enum value.");
174       }
175       return value;
176     }
177 
178     /**
179      * @param value The numeric wire value of the corresponding enum entry.
180      * @return The enum associated with the given numeric wire value.
181      * @deprecated Use {@link #forNumber(int)} instead.
182      */
183     @java.lang.Deprecated
valueOf(int value)184     public static ConsumeReservationType valueOf(int value) {
185       return forNumber(value);
186     }
187 
188     /**
189      * @param value The numeric wire value of the corresponding enum entry.
190      * @return The enum associated with the given numeric wire value.
191      */
forNumber(int value)192     public static ConsumeReservationType forNumber(int value) {
193       switch (value) {
194         case 0:
195           return UNDEFINED_CONSUME_RESERVATION_TYPE;
196         case 200008121:
197           return ANY_RESERVATION;
198         case 169322030:
199           return NO_RESERVATION;
200         case 229889055:
201           return SPECIFIC_RESERVATION;
202         case 526786327:
203           return UNSPECIFIED;
204         default:
205           return null;
206       }
207     }
208 
209     public static com.google.protobuf.Internal.EnumLiteMap<ConsumeReservationType>
internalGetValueMap()210         internalGetValueMap() {
211       return internalValueMap;
212     }
213 
214     private static final com.google.protobuf.Internal.EnumLiteMap<ConsumeReservationType>
215         internalValueMap =
216             new com.google.protobuf.Internal.EnumLiteMap<ConsumeReservationType>() {
217               public ConsumeReservationType findValueByNumber(int number) {
218                 return ConsumeReservationType.forNumber(number);
219               }
220             };
221 
getValueDescriptor()222     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
223       if (this == UNRECOGNIZED) {
224         throw new java.lang.IllegalStateException(
225             "Can't get the descriptor of an unrecognized enum value.");
226       }
227       return getDescriptor().getValues().get(ordinal());
228     }
229 
getDescriptorForType()230     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
231       return getDescriptor();
232     }
233 
getDescriptor()234     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
235       return com.google.cloud.compute.v1.ReservationAffinity.getDescriptor().getEnumTypes().get(0);
236     }
237 
238     private static final ConsumeReservationType[] VALUES = values();
239 
valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)240     public static ConsumeReservationType valueOf(
241         com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
242       if (desc.getType() != getDescriptor()) {
243         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
244       }
245       if (desc.getIndex() == -1) {
246         return UNRECOGNIZED;
247       }
248       return VALUES[desc.getIndex()];
249     }
250 
251     private final int value;
252 
ConsumeReservationType(int value)253     private ConsumeReservationType(int value) {
254       this.value = value;
255     }
256 
257     // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.ReservationAffinity.ConsumeReservationType)
258   }
259 
260   private int bitField0_;
261   public static final int CONSUME_RESERVATION_TYPE_FIELD_NUMBER = 300736944;
262 
263   @SuppressWarnings("serial")
264   private volatile java.lang.Object consumeReservationType_ = "";
265   /**
266    *
267    *
268    * <pre>
269    * Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
270    * Check the ConsumeReservationType enum for the list of possible values.
271    * </pre>
272    *
273    * <code>optional string consume_reservation_type = 300736944;</code>
274    *
275    * @return Whether the consumeReservationType field is set.
276    */
277   @java.lang.Override
hasConsumeReservationType()278   public boolean hasConsumeReservationType() {
279     return ((bitField0_ & 0x00000001) != 0);
280   }
281   /**
282    *
283    *
284    * <pre>
285    * Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
286    * Check the ConsumeReservationType enum for the list of possible values.
287    * </pre>
288    *
289    * <code>optional string consume_reservation_type = 300736944;</code>
290    *
291    * @return The consumeReservationType.
292    */
293   @java.lang.Override
getConsumeReservationType()294   public java.lang.String getConsumeReservationType() {
295     java.lang.Object ref = consumeReservationType_;
296     if (ref instanceof java.lang.String) {
297       return (java.lang.String) ref;
298     } else {
299       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
300       java.lang.String s = bs.toStringUtf8();
301       consumeReservationType_ = s;
302       return s;
303     }
304   }
305   /**
306    *
307    *
308    * <pre>
309    * Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
310    * Check the ConsumeReservationType enum for the list of possible values.
311    * </pre>
312    *
313    * <code>optional string consume_reservation_type = 300736944;</code>
314    *
315    * @return The bytes for consumeReservationType.
316    */
317   @java.lang.Override
getConsumeReservationTypeBytes()318   public com.google.protobuf.ByteString getConsumeReservationTypeBytes() {
319     java.lang.Object ref = consumeReservationType_;
320     if (ref instanceof java.lang.String) {
321       com.google.protobuf.ByteString b =
322           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
323       consumeReservationType_ = b;
324       return b;
325     } else {
326       return (com.google.protobuf.ByteString) ref;
327     }
328   }
329 
330   public static final int KEY_FIELD_NUMBER = 106079;
331 
332   @SuppressWarnings("serial")
333   private volatile java.lang.Object key_ = "";
334   /**
335    *
336    *
337    * <pre>
338    * Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.
339    * </pre>
340    *
341    * <code>optional string key = 106079;</code>
342    *
343    * @return Whether the key field is set.
344    */
345   @java.lang.Override
hasKey()346   public boolean hasKey() {
347     return ((bitField0_ & 0x00000002) != 0);
348   }
349   /**
350    *
351    *
352    * <pre>
353    * Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.
354    * </pre>
355    *
356    * <code>optional string key = 106079;</code>
357    *
358    * @return The key.
359    */
360   @java.lang.Override
getKey()361   public java.lang.String getKey() {
362     java.lang.Object ref = key_;
363     if (ref instanceof java.lang.String) {
364       return (java.lang.String) ref;
365     } else {
366       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
367       java.lang.String s = bs.toStringUtf8();
368       key_ = s;
369       return s;
370     }
371   }
372   /**
373    *
374    *
375    * <pre>
376    * Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.
377    * </pre>
378    *
379    * <code>optional string key = 106079;</code>
380    *
381    * @return The bytes for key.
382    */
383   @java.lang.Override
getKeyBytes()384   public com.google.protobuf.ByteString getKeyBytes() {
385     java.lang.Object ref = key_;
386     if (ref instanceof java.lang.String) {
387       com.google.protobuf.ByteString b =
388           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
389       key_ = b;
390       return b;
391     } else {
392       return (com.google.protobuf.ByteString) ref;
393     }
394   }
395 
396   public static final int VALUES_FIELD_NUMBER = 249928994;
397 
398   @SuppressWarnings("serial")
399   private com.google.protobuf.LazyStringList values_;
400   /**
401    *
402    *
403    * <pre>
404    * Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.
405    * </pre>
406    *
407    * <code>repeated string values = 249928994;</code>
408    *
409    * @return A list containing the values.
410    */
getValuesList()411   public com.google.protobuf.ProtocolStringList getValuesList() {
412     return values_;
413   }
414   /**
415    *
416    *
417    * <pre>
418    * Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.
419    * </pre>
420    *
421    * <code>repeated string values = 249928994;</code>
422    *
423    * @return The count of values.
424    */
getValuesCount()425   public int getValuesCount() {
426     return values_.size();
427   }
428   /**
429    *
430    *
431    * <pre>
432    * Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.
433    * </pre>
434    *
435    * <code>repeated string values = 249928994;</code>
436    *
437    * @param index The index of the element to return.
438    * @return The values at the given index.
439    */
getValues(int index)440   public java.lang.String getValues(int index) {
441     return values_.get(index);
442   }
443   /**
444    *
445    *
446    * <pre>
447    * Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.
448    * </pre>
449    *
450    * <code>repeated string values = 249928994;</code>
451    *
452    * @param index The index of the value to return.
453    * @return The bytes of the values at the given index.
454    */
getValuesBytes(int index)455   public com.google.protobuf.ByteString getValuesBytes(int index) {
456     return values_.getByteString(index);
457   }
458 
459   private byte memoizedIsInitialized = -1;
460 
461   @java.lang.Override
isInitialized()462   public final boolean isInitialized() {
463     byte isInitialized = memoizedIsInitialized;
464     if (isInitialized == 1) return true;
465     if (isInitialized == 0) return false;
466 
467     memoizedIsInitialized = 1;
468     return true;
469   }
470 
471   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)472   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
473     if (((bitField0_ & 0x00000002) != 0)) {
474       com.google.protobuf.GeneratedMessageV3.writeString(output, 106079, key_);
475     }
476     for (int i = 0; i < values_.size(); i++) {
477       com.google.protobuf.GeneratedMessageV3.writeString(output, 249928994, values_.getRaw(i));
478     }
479     if (((bitField0_ & 0x00000001) != 0)) {
480       com.google.protobuf.GeneratedMessageV3.writeString(
481           output, 300736944, consumeReservationType_);
482     }
483     getUnknownFields().writeTo(output);
484   }
485 
486   @java.lang.Override
getSerializedSize()487   public int getSerializedSize() {
488     int size = memoizedSize;
489     if (size != -1) return size;
490 
491     size = 0;
492     if (((bitField0_ & 0x00000002) != 0)) {
493       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(106079, key_);
494     }
495     {
496       int dataSize = 0;
497       for (int i = 0; i < values_.size(); i++) {
498         dataSize += computeStringSizeNoTag(values_.getRaw(i));
499       }
500       size += dataSize;
501       size += 5 * getValuesList().size();
502     }
503     if (((bitField0_ & 0x00000001) != 0)) {
504       size +=
505           com.google.protobuf.GeneratedMessageV3.computeStringSize(
506               300736944, consumeReservationType_);
507     }
508     size += getUnknownFields().getSerializedSize();
509     memoizedSize = size;
510     return size;
511   }
512 
513   @java.lang.Override
equals(final java.lang.Object obj)514   public boolean equals(final java.lang.Object obj) {
515     if (obj == this) {
516       return true;
517     }
518     if (!(obj instanceof com.google.cloud.compute.v1.ReservationAffinity)) {
519       return super.equals(obj);
520     }
521     com.google.cloud.compute.v1.ReservationAffinity other =
522         (com.google.cloud.compute.v1.ReservationAffinity) obj;
523 
524     if (hasConsumeReservationType() != other.hasConsumeReservationType()) return false;
525     if (hasConsumeReservationType()) {
526       if (!getConsumeReservationType().equals(other.getConsumeReservationType())) return false;
527     }
528     if (hasKey() != other.hasKey()) return false;
529     if (hasKey()) {
530       if (!getKey().equals(other.getKey())) return false;
531     }
532     if (!getValuesList().equals(other.getValuesList())) return false;
533     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
534     return true;
535   }
536 
537   @java.lang.Override
hashCode()538   public int hashCode() {
539     if (memoizedHashCode != 0) {
540       return memoizedHashCode;
541     }
542     int hash = 41;
543     hash = (19 * hash) + getDescriptor().hashCode();
544     if (hasConsumeReservationType()) {
545       hash = (37 * hash) + CONSUME_RESERVATION_TYPE_FIELD_NUMBER;
546       hash = (53 * hash) + getConsumeReservationType().hashCode();
547     }
548     if (hasKey()) {
549       hash = (37 * hash) + KEY_FIELD_NUMBER;
550       hash = (53 * hash) + getKey().hashCode();
551     }
552     if (getValuesCount() > 0) {
553       hash = (37 * hash) + VALUES_FIELD_NUMBER;
554       hash = (53 * hash) + getValuesList().hashCode();
555     }
556     hash = (29 * hash) + getUnknownFields().hashCode();
557     memoizedHashCode = hash;
558     return hash;
559   }
560 
parseFrom(java.nio.ByteBuffer data)561   public static com.google.cloud.compute.v1.ReservationAffinity parseFrom(java.nio.ByteBuffer data)
562       throws com.google.protobuf.InvalidProtocolBufferException {
563     return PARSER.parseFrom(data);
564   }
565 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)566   public static com.google.cloud.compute.v1.ReservationAffinity parseFrom(
567       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
568       throws com.google.protobuf.InvalidProtocolBufferException {
569     return PARSER.parseFrom(data, extensionRegistry);
570   }
571 
parseFrom( com.google.protobuf.ByteString data)572   public static com.google.cloud.compute.v1.ReservationAffinity parseFrom(
573       com.google.protobuf.ByteString data)
574       throws com.google.protobuf.InvalidProtocolBufferException {
575     return PARSER.parseFrom(data);
576   }
577 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)578   public static com.google.cloud.compute.v1.ReservationAffinity parseFrom(
579       com.google.protobuf.ByteString data,
580       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
581       throws com.google.protobuf.InvalidProtocolBufferException {
582     return PARSER.parseFrom(data, extensionRegistry);
583   }
584 
parseFrom(byte[] data)585   public static com.google.cloud.compute.v1.ReservationAffinity parseFrom(byte[] data)
586       throws com.google.protobuf.InvalidProtocolBufferException {
587     return PARSER.parseFrom(data);
588   }
589 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)590   public static com.google.cloud.compute.v1.ReservationAffinity parseFrom(
591       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
592       throws com.google.protobuf.InvalidProtocolBufferException {
593     return PARSER.parseFrom(data, extensionRegistry);
594   }
595 
parseFrom(java.io.InputStream input)596   public static com.google.cloud.compute.v1.ReservationAffinity parseFrom(java.io.InputStream input)
597       throws java.io.IOException {
598     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
599   }
600 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)601   public static com.google.cloud.compute.v1.ReservationAffinity parseFrom(
602       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
603       throws java.io.IOException {
604     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
605         PARSER, input, extensionRegistry);
606   }
607 
parseDelimitedFrom( java.io.InputStream input)608   public static com.google.cloud.compute.v1.ReservationAffinity parseDelimitedFrom(
609       java.io.InputStream input) throws java.io.IOException {
610     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
611   }
612 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)613   public static com.google.cloud.compute.v1.ReservationAffinity parseDelimitedFrom(
614       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
615       throws java.io.IOException {
616     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
617         PARSER, input, extensionRegistry);
618   }
619 
parseFrom( com.google.protobuf.CodedInputStream input)620   public static com.google.cloud.compute.v1.ReservationAffinity parseFrom(
621       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
622     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
623   }
624 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)625   public static com.google.cloud.compute.v1.ReservationAffinity parseFrom(
626       com.google.protobuf.CodedInputStream input,
627       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
628       throws java.io.IOException {
629     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
630         PARSER, input, extensionRegistry);
631   }
632 
633   @java.lang.Override
newBuilderForType()634   public Builder newBuilderForType() {
635     return newBuilder();
636   }
637 
newBuilder()638   public static Builder newBuilder() {
639     return DEFAULT_INSTANCE.toBuilder();
640   }
641 
newBuilder(com.google.cloud.compute.v1.ReservationAffinity prototype)642   public static Builder newBuilder(com.google.cloud.compute.v1.ReservationAffinity prototype) {
643     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
644   }
645 
646   @java.lang.Override
toBuilder()647   public Builder toBuilder() {
648     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
649   }
650 
651   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)652   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
653     Builder builder = new Builder(parent);
654     return builder;
655   }
656   /**
657    *
658    *
659    * <pre>
660    * Specifies the reservations that this instance can consume from.
661    * </pre>
662    *
663    * Protobuf type {@code google.cloud.compute.v1.ReservationAffinity}
664    */
665   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
666       implements
667       // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.ReservationAffinity)
668       com.google.cloud.compute.v1.ReservationAffinityOrBuilder {
getDescriptor()669     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
670       return com.google.cloud.compute.v1.Compute
671           .internal_static_google_cloud_compute_v1_ReservationAffinity_descriptor;
672     }
673 
674     @java.lang.Override
675     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()676         internalGetFieldAccessorTable() {
677       return com.google.cloud.compute.v1.Compute
678           .internal_static_google_cloud_compute_v1_ReservationAffinity_fieldAccessorTable
679           .ensureFieldAccessorsInitialized(
680               com.google.cloud.compute.v1.ReservationAffinity.class,
681               com.google.cloud.compute.v1.ReservationAffinity.Builder.class);
682     }
683 
684     // Construct using com.google.cloud.compute.v1.ReservationAffinity.newBuilder()
Builder()685     private Builder() {}
686 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)687     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
688       super(parent);
689     }
690 
691     @java.lang.Override
clear()692     public Builder clear() {
693       super.clear();
694       bitField0_ = 0;
695       consumeReservationType_ = "";
696       key_ = "";
697       values_ = com.google.protobuf.LazyStringArrayList.EMPTY;
698       bitField0_ = (bitField0_ & ~0x00000004);
699       return this;
700     }
701 
702     @java.lang.Override
getDescriptorForType()703     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
704       return com.google.cloud.compute.v1.Compute
705           .internal_static_google_cloud_compute_v1_ReservationAffinity_descriptor;
706     }
707 
708     @java.lang.Override
getDefaultInstanceForType()709     public com.google.cloud.compute.v1.ReservationAffinity getDefaultInstanceForType() {
710       return com.google.cloud.compute.v1.ReservationAffinity.getDefaultInstance();
711     }
712 
713     @java.lang.Override
build()714     public com.google.cloud.compute.v1.ReservationAffinity build() {
715       com.google.cloud.compute.v1.ReservationAffinity result = buildPartial();
716       if (!result.isInitialized()) {
717         throw newUninitializedMessageException(result);
718       }
719       return result;
720     }
721 
722     @java.lang.Override
buildPartial()723     public com.google.cloud.compute.v1.ReservationAffinity buildPartial() {
724       com.google.cloud.compute.v1.ReservationAffinity result =
725           new com.google.cloud.compute.v1.ReservationAffinity(this);
726       buildPartialRepeatedFields(result);
727       if (bitField0_ != 0) {
728         buildPartial0(result);
729       }
730       onBuilt();
731       return result;
732     }
733 
buildPartialRepeatedFields( com.google.cloud.compute.v1.ReservationAffinity result)734     private void buildPartialRepeatedFields(
735         com.google.cloud.compute.v1.ReservationAffinity result) {
736       if (((bitField0_ & 0x00000004) != 0)) {
737         values_ = values_.getUnmodifiableView();
738         bitField0_ = (bitField0_ & ~0x00000004);
739       }
740       result.values_ = values_;
741     }
742 
buildPartial0(com.google.cloud.compute.v1.ReservationAffinity result)743     private void buildPartial0(com.google.cloud.compute.v1.ReservationAffinity result) {
744       int from_bitField0_ = bitField0_;
745       int to_bitField0_ = 0;
746       if (((from_bitField0_ & 0x00000001) != 0)) {
747         result.consumeReservationType_ = consumeReservationType_;
748         to_bitField0_ |= 0x00000001;
749       }
750       if (((from_bitField0_ & 0x00000002) != 0)) {
751         result.key_ = key_;
752         to_bitField0_ |= 0x00000002;
753       }
754       result.bitField0_ |= to_bitField0_;
755     }
756 
757     @java.lang.Override
clone()758     public Builder clone() {
759       return super.clone();
760     }
761 
762     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)763     public Builder setField(
764         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
765       return super.setField(field, value);
766     }
767 
768     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)769     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
770       return super.clearField(field);
771     }
772 
773     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)774     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
775       return super.clearOneof(oneof);
776     }
777 
778     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)779     public Builder setRepeatedField(
780         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
781       return super.setRepeatedField(field, index, value);
782     }
783 
784     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)785     public Builder addRepeatedField(
786         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
787       return super.addRepeatedField(field, value);
788     }
789 
790     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)791     public Builder mergeFrom(com.google.protobuf.Message other) {
792       if (other instanceof com.google.cloud.compute.v1.ReservationAffinity) {
793         return mergeFrom((com.google.cloud.compute.v1.ReservationAffinity) other);
794       } else {
795         super.mergeFrom(other);
796         return this;
797       }
798     }
799 
mergeFrom(com.google.cloud.compute.v1.ReservationAffinity other)800     public Builder mergeFrom(com.google.cloud.compute.v1.ReservationAffinity other) {
801       if (other == com.google.cloud.compute.v1.ReservationAffinity.getDefaultInstance())
802         return this;
803       if (other.hasConsumeReservationType()) {
804         consumeReservationType_ = other.consumeReservationType_;
805         bitField0_ |= 0x00000001;
806         onChanged();
807       }
808       if (other.hasKey()) {
809         key_ = other.key_;
810         bitField0_ |= 0x00000002;
811         onChanged();
812       }
813       if (!other.values_.isEmpty()) {
814         if (values_.isEmpty()) {
815           values_ = other.values_;
816           bitField0_ = (bitField0_ & ~0x00000004);
817         } else {
818           ensureValuesIsMutable();
819           values_.addAll(other.values_);
820         }
821         onChanged();
822       }
823       this.mergeUnknownFields(other.getUnknownFields());
824       onChanged();
825       return this;
826     }
827 
828     @java.lang.Override
isInitialized()829     public final boolean isInitialized() {
830       return true;
831     }
832 
833     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)834     public Builder mergeFrom(
835         com.google.protobuf.CodedInputStream input,
836         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
837         throws java.io.IOException {
838       if (extensionRegistry == null) {
839         throw new java.lang.NullPointerException();
840       }
841       try {
842         boolean done = false;
843         while (!done) {
844           int tag = input.readTag();
845           switch (tag) {
846             case 0:
847               done = true;
848               break;
849             case 848634:
850               {
851                 key_ = input.readStringRequireUtf8();
852                 bitField0_ |= 0x00000002;
853                 break;
854               } // case 848634
855             case 1999431954:
856               {
857                 java.lang.String s = input.readStringRequireUtf8();
858                 ensureValuesIsMutable();
859                 values_.add(s);
860                 break;
861               } // case 1999431954
862             case -1889071742:
863               {
864                 consumeReservationType_ = input.readStringRequireUtf8();
865                 bitField0_ |= 0x00000001;
866                 break;
867               } // case -1889071742
868             default:
869               {
870                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
871                   done = true; // was an endgroup tag
872                 }
873                 break;
874               } // default:
875           } // switch (tag)
876         } // while (!done)
877       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
878         throw e.unwrapIOException();
879       } finally {
880         onChanged();
881       } // finally
882       return this;
883     }
884 
885     private int bitField0_;
886 
887     private java.lang.Object consumeReservationType_ = "";
888     /**
889      *
890      *
891      * <pre>
892      * Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
893      * Check the ConsumeReservationType enum for the list of possible values.
894      * </pre>
895      *
896      * <code>optional string consume_reservation_type = 300736944;</code>
897      *
898      * @return Whether the consumeReservationType field is set.
899      */
hasConsumeReservationType()900     public boolean hasConsumeReservationType() {
901       return ((bitField0_ & 0x00000001) != 0);
902     }
903     /**
904      *
905      *
906      * <pre>
907      * Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
908      * Check the ConsumeReservationType enum for the list of possible values.
909      * </pre>
910      *
911      * <code>optional string consume_reservation_type = 300736944;</code>
912      *
913      * @return The consumeReservationType.
914      */
getConsumeReservationType()915     public java.lang.String getConsumeReservationType() {
916       java.lang.Object ref = consumeReservationType_;
917       if (!(ref instanceof java.lang.String)) {
918         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
919         java.lang.String s = bs.toStringUtf8();
920         consumeReservationType_ = s;
921         return s;
922       } else {
923         return (java.lang.String) ref;
924       }
925     }
926     /**
927      *
928      *
929      * <pre>
930      * Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
931      * Check the ConsumeReservationType enum for the list of possible values.
932      * </pre>
933      *
934      * <code>optional string consume_reservation_type = 300736944;</code>
935      *
936      * @return The bytes for consumeReservationType.
937      */
getConsumeReservationTypeBytes()938     public com.google.protobuf.ByteString getConsumeReservationTypeBytes() {
939       java.lang.Object ref = consumeReservationType_;
940       if (ref instanceof String) {
941         com.google.protobuf.ByteString b =
942             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
943         consumeReservationType_ = b;
944         return b;
945       } else {
946         return (com.google.protobuf.ByteString) ref;
947       }
948     }
949     /**
950      *
951      *
952      * <pre>
953      * Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
954      * Check the ConsumeReservationType enum for the list of possible values.
955      * </pre>
956      *
957      * <code>optional string consume_reservation_type = 300736944;</code>
958      *
959      * @param value The consumeReservationType to set.
960      * @return This builder for chaining.
961      */
setConsumeReservationType(java.lang.String value)962     public Builder setConsumeReservationType(java.lang.String value) {
963       if (value == null) {
964         throw new NullPointerException();
965       }
966       consumeReservationType_ = value;
967       bitField0_ |= 0x00000001;
968       onChanged();
969       return this;
970     }
971     /**
972      *
973      *
974      * <pre>
975      * Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
976      * Check the ConsumeReservationType enum for the list of possible values.
977      * </pre>
978      *
979      * <code>optional string consume_reservation_type = 300736944;</code>
980      *
981      * @return This builder for chaining.
982      */
clearConsumeReservationType()983     public Builder clearConsumeReservationType() {
984       consumeReservationType_ = getDefaultInstance().getConsumeReservationType();
985       bitField0_ = (bitField0_ & ~0x00000001);
986       onChanged();
987       return this;
988     }
989     /**
990      *
991      *
992      * <pre>
993      * Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
994      * Check the ConsumeReservationType enum for the list of possible values.
995      * </pre>
996      *
997      * <code>optional string consume_reservation_type = 300736944;</code>
998      *
999      * @param value The bytes for consumeReservationType to set.
1000      * @return This builder for chaining.
1001      */
setConsumeReservationTypeBytes(com.google.protobuf.ByteString value)1002     public Builder setConsumeReservationTypeBytes(com.google.protobuf.ByteString value) {
1003       if (value == null) {
1004         throw new NullPointerException();
1005       }
1006       checkByteStringIsUtf8(value);
1007       consumeReservationType_ = value;
1008       bitField0_ |= 0x00000001;
1009       onChanged();
1010       return this;
1011     }
1012 
1013     private java.lang.Object key_ = "";
1014     /**
1015      *
1016      *
1017      * <pre>
1018      * Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.
1019      * </pre>
1020      *
1021      * <code>optional string key = 106079;</code>
1022      *
1023      * @return Whether the key field is set.
1024      */
hasKey()1025     public boolean hasKey() {
1026       return ((bitField0_ & 0x00000002) != 0);
1027     }
1028     /**
1029      *
1030      *
1031      * <pre>
1032      * Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.
1033      * </pre>
1034      *
1035      * <code>optional string key = 106079;</code>
1036      *
1037      * @return The key.
1038      */
getKey()1039     public java.lang.String getKey() {
1040       java.lang.Object ref = key_;
1041       if (!(ref instanceof java.lang.String)) {
1042         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1043         java.lang.String s = bs.toStringUtf8();
1044         key_ = s;
1045         return s;
1046       } else {
1047         return (java.lang.String) ref;
1048       }
1049     }
1050     /**
1051      *
1052      *
1053      * <pre>
1054      * Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.
1055      * </pre>
1056      *
1057      * <code>optional string key = 106079;</code>
1058      *
1059      * @return The bytes for key.
1060      */
getKeyBytes()1061     public com.google.protobuf.ByteString getKeyBytes() {
1062       java.lang.Object ref = key_;
1063       if (ref instanceof String) {
1064         com.google.protobuf.ByteString b =
1065             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1066         key_ = b;
1067         return b;
1068       } else {
1069         return (com.google.protobuf.ByteString) ref;
1070       }
1071     }
1072     /**
1073      *
1074      *
1075      * <pre>
1076      * Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.
1077      * </pre>
1078      *
1079      * <code>optional string key = 106079;</code>
1080      *
1081      * @param value The key to set.
1082      * @return This builder for chaining.
1083      */
setKey(java.lang.String value)1084     public Builder setKey(java.lang.String value) {
1085       if (value == null) {
1086         throw new NullPointerException();
1087       }
1088       key_ = value;
1089       bitField0_ |= 0x00000002;
1090       onChanged();
1091       return this;
1092     }
1093     /**
1094      *
1095      *
1096      * <pre>
1097      * Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.
1098      * </pre>
1099      *
1100      * <code>optional string key = 106079;</code>
1101      *
1102      * @return This builder for chaining.
1103      */
clearKey()1104     public Builder clearKey() {
1105       key_ = getDefaultInstance().getKey();
1106       bitField0_ = (bitField0_ & ~0x00000002);
1107       onChanged();
1108       return this;
1109     }
1110     /**
1111      *
1112      *
1113      * <pre>
1114      * Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.
1115      * </pre>
1116      *
1117      * <code>optional string key = 106079;</code>
1118      *
1119      * @param value The bytes for key to set.
1120      * @return This builder for chaining.
1121      */
setKeyBytes(com.google.protobuf.ByteString value)1122     public Builder setKeyBytes(com.google.protobuf.ByteString value) {
1123       if (value == null) {
1124         throw new NullPointerException();
1125       }
1126       checkByteStringIsUtf8(value);
1127       key_ = value;
1128       bitField0_ |= 0x00000002;
1129       onChanged();
1130       return this;
1131     }
1132 
1133     private com.google.protobuf.LazyStringList values_ =
1134         com.google.protobuf.LazyStringArrayList.EMPTY;
1135 
ensureValuesIsMutable()1136     private void ensureValuesIsMutable() {
1137       if (!((bitField0_ & 0x00000004) != 0)) {
1138         values_ = new com.google.protobuf.LazyStringArrayList(values_);
1139         bitField0_ |= 0x00000004;
1140       }
1141     }
1142     /**
1143      *
1144      *
1145      * <pre>
1146      * Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.
1147      * </pre>
1148      *
1149      * <code>repeated string values = 249928994;</code>
1150      *
1151      * @return A list containing the values.
1152      */
getValuesList()1153     public com.google.protobuf.ProtocolStringList getValuesList() {
1154       return values_.getUnmodifiableView();
1155     }
1156     /**
1157      *
1158      *
1159      * <pre>
1160      * Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.
1161      * </pre>
1162      *
1163      * <code>repeated string values = 249928994;</code>
1164      *
1165      * @return The count of values.
1166      */
getValuesCount()1167     public int getValuesCount() {
1168       return values_.size();
1169     }
1170     /**
1171      *
1172      *
1173      * <pre>
1174      * Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.
1175      * </pre>
1176      *
1177      * <code>repeated string values = 249928994;</code>
1178      *
1179      * @param index The index of the element to return.
1180      * @return The values at the given index.
1181      */
getValues(int index)1182     public java.lang.String getValues(int index) {
1183       return values_.get(index);
1184     }
1185     /**
1186      *
1187      *
1188      * <pre>
1189      * Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.
1190      * </pre>
1191      *
1192      * <code>repeated string values = 249928994;</code>
1193      *
1194      * @param index The index of the value to return.
1195      * @return The bytes of the values at the given index.
1196      */
getValuesBytes(int index)1197     public com.google.protobuf.ByteString getValuesBytes(int index) {
1198       return values_.getByteString(index);
1199     }
1200     /**
1201      *
1202      *
1203      * <pre>
1204      * Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.
1205      * </pre>
1206      *
1207      * <code>repeated string values = 249928994;</code>
1208      *
1209      * @param index The index to set the value at.
1210      * @param value The values to set.
1211      * @return This builder for chaining.
1212      */
setValues(int index, java.lang.String value)1213     public Builder setValues(int index, java.lang.String value) {
1214       if (value == null) {
1215         throw new NullPointerException();
1216       }
1217       ensureValuesIsMutable();
1218       values_.set(index, value);
1219       onChanged();
1220       return this;
1221     }
1222     /**
1223      *
1224      *
1225      * <pre>
1226      * Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.
1227      * </pre>
1228      *
1229      * <code>repeated string values = 249928994;</code>
1230      *
1231      * @param value The values to add.
1232      * @return This builder for chaining.
1233      */
addValues(java.lang.String value)1234     public Builder addValues(java.lang.String value) {
1235       if (value == null) {
1236         throw new NullPointerException();
1237       }
1238       ensureValuesIsMutable();
1239       values_.add(value);
1240       onChanged();
1241       return this;
1242     }
1243     /**
1244      *
1245      *
1246      * <pre>
1247      * Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.
1248      * </pre>
1249      *
1250      * <code>repeated string values = 249928994;</code>
1251      *
1252      * @param values The values to add.
1253      * @return This builder for chaining.
1254      */
addAllValues(java.lang.Iterable<java.lang.String> values)1255     public Builder addAllValues(java.lang.Iterable<java.lang.String> values) {
1256       ensureValuesIsMutable();
1257       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_);
1258       onChanged();
1259       return this;
1260     }
1261     /**
1262      *
1263      *
1264      * <pre>
1265      * Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.
1266      * </pre>
1267      *
1268      * <code>repeated string values = 249928994;</code>
1269      *
1270      * @return This builder for chaining.
1271      */
clearValues()1272     public Builder clearValues() {
1273       values_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1274       bitField0_ = (bitField0_ & ~0x00000004);
1275       onChanged();
1276       return this;
1277     }
1278     /**
1279      *
1280      *
1281      * <pre>
1282      * Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.
1283      * </pre>
1284      *
1285      * <code>repeated string values = 249928994;</code>
1286      *
1287      * @param value The bytes of the values to add.
1288      * @return This builder for chaining.
1289      */
addValuesBytes(com.google.protobuf.ByteString value)1290     public Builder addValuesBytes(com.google.protobuf.ByteString value) {
1291       if (value == null) {
1292         throw new NullPointerException();
1293       }
1294       checkByteStringIsUtf8(value);
1295       ensureValuesIsMutable();
1296       values_.add(value);
1297       onChanged();
1298       return this;
1299     }
1300 
1301     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1302     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1303       return super.setUnknownFields(unknownFields);
1304     }
1305 
1306     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1307     public final Builder mergeUnknownFields(
1308         final com.google.protobuf.UnknownFieldSet unknownFields) {
1309       return super.mergeUnknownFields(unknownFields);
1310     }
1311 
1312     // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.ReservationAffinity)
1313   }
1314 
1315   // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.ReservationAffinity)
1316   private static final com.google.cloud.compute.v1.ReservationAffinity DEFAULT_INSTANCE;
1317 
1318   static {
1319     DEFAULT_INSTANCE = new com.google.cloud.compute.v1.ReservationAffinity();
1320   }
1321 
getDefaultInstance()1322   public static com.google.cloud.compute.v1.ReservationAffinity getDefaultInstance() {
1323     return DEFAULT_INSTANCE;
1324   }
1325 
1326   private static final com.google.protobuf.Parser<ReservationAffinity> PARSER =
1327       new com.google.protobuf.AbstractParser<ReservationAffinity>() {
1328         @java.lang.Override
1329         public ReservationAffinity parsePartialFrom(
1330             com.google.protobuf.CodedInputStream input,
1331             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1332             throws com.google.protobuf.InvalidProtocolBufferException {
1333           Builder builder = newBuilder();
1334           try {
1335             builder.mergeFrom(input, extensionRegistry);
1336           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1337             throw e.setUnfinishedMessage(builder.buildPartial());
1338           } catch (com.google.protobuf.UninitializedMessageException e) {
1339             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1340           } catch (java.io.IOException e) {
1341             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1342                 .setUnfinishedMessage(builder.buildPartial());
1343           }
1344           return builder.buildPartial();
1345         }
1346       };
1347 
parser()1348   public static com.google.protobuf.Parser<ReservationAffinity> parser() {
1349     return PARSER;
1350   }
1351 
1352   @java.lang.Override
getParserForType()1353   public com.google.protobuf.Parser<ReservationAffinity> getParserForType() {
1354     return PARSER;
1355   }
1356 
1357   @java.lang.Override
getDefaultInstanceForType()1358   public com.google.cloud.compute.v1.ReservationAffinity getDefaultInstanceForType() {
1359     return DEFAULT_INSTANCE;
1360   }
1361 }
1362