• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 // Generated by the protocol buffer compiler.  DO NOT EDIT!
17 // source: google/cloud/compute/v1/compute.proto
18 
19 package com.google.cloud.compute.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.compute.v1.Reservation}
29  */
30 public final class Reservation extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.Reservation)
33     ReservationOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use Reservation.newBuilder() to construct.
Reservation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private Reservation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
Reservation()40   private Reservation() {
41     commitment_ = "";
42     creationTimestamp_ = "";
43     description_ = "";
44     kind_ = "";
45     name_ = "";
46     selfLink_ = "";
47     status_ = "";
48     zone_ = "";
49   }
50 
51   @java.lang.Override
52   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)53   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
54     return new Reservation();
55   }
56 
57   @java.lang.Override
getUnknownFields()58   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
59     return this.unknownFields;
60   }
61 
getDescriptor()62   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
63     return com.google.cloud.compute.v1.Compute
64         .internal_static_google_cloud_compute_v1_Reservation_descriptor;
65   }
66 
67   @SuppressWarnings({"rawtypes"})
68   @java.lang.Override
internalGetMapField(int number)69   protected com.google.protobuf.MapField internalGetMapField(int number) {
70     switch (number) {
71       case 22220385:
72         return internalGetResourcePolicies();
73       default:
74         throw new RuntimeException("Invalid map field number: " + number);
75     }
76   }
77 
78   @java.lang.Override
79   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()80       internalGetFieldAccessorTable() {
81     return com.google.cloud.compute.v1.Compute
82         .internal_static_google_cloud_compute_v1_Reservation_fieldAccessorTable
83         .ensureFieldAccessorsInitialized(
84             com.google.cloud.compute.v1.Reservation.class,
85             com.google.cloud.compute.v1.Reservation.Builder.class);
86   }
87 
88   /**
89    *
90    *
91    * <pre>
92    * [Output Only] The status of the reservation.
93    * </pre>
94    *
95    * Protobuf enum {@code google.cloud.compute.v1.Reservation.Status}
96    */
97   public enum Status implements com.google.protobuf.ProtocolMessageEnum {
98     /**
99      *
100      *
101      * <pre>
102      * A value indicating that the enum field is not set.
103      * </pre>
104      *
105      * <code>UNDEFINED_STATUS = 0;</code>
106      */
107     UNDEFINED_STATUS(0),
108     /**
109      *
110      *
111      * <pre>
112      * Resources are being allocated for the reservation.
113      * </pre>
114      *
115      * <code>CREATING = 455564985;</code>
116      */
117     CREATING(455564985),
118     /**
119      *
120      *
121      * <pre>
122      * Reservation is currently being deleted.
123      * </pre>
124      *
125      * <code>DELETING = 528602024;</code>
126      */
127     DELETING(528602024),
128     /** <code>INVALID = 530283991;</code> */
129     INVALID(530283991),
130     /**
131      *
132      *
133      * <pre>
134      * Reservation has allocated all its resources.
135      * </pre>
136      *
137      * <code>READY = 77848963;</code>
138      */
139     READY(77848963),
140     /**
141      *
142      *
143      * <pre>
144      * Reservation is currently being resized.
145      * </pre>
146      *
147      * <code>UPDATING = 494614342;</code>
148      */
149     UPDATING(494614342),
150     UNRECOGNIZED(-1),
151     ;
152 
153     /**
154      *
155      *
156      * <pre>
157      * A value indicating that the enum field is not set.
158      * </pre>
159      *
160      * <code>UNDEFINED_STATUS = 0;</code>
161      */
162     public static final int UNDEFINED_STATUS_VALUE = 0;
163     /**
164      *
165      *
166      * <pre>
167      * Resources are being allocated for the reservation.
168      * </pre>
169      *
170      * <code>CREATING = 455564985;</code>
171      */
172     public static final int CREATING_VALUE = 455564985;
173     /**
174      *
175      *
176      * <pre>
177      * Reservation is currently being deleted.
178      * </pre>
179      *
180      * <code>DELETING = 528602024;</code>
181      */
182     public static final int DELETING_VALUE = 528602024;
183     /** <code>INVALID = 530283991;</code> */
184     public static final int INVALID_VALUE = 530283991;
185     /**
186      *
187      *
188      * <pre>
189      * Reservation has allocated all its resources.
190      * </pre>
191      *
192      * <code>READY = 77848963;</code>
193      */
194     public static final int READY_VALUE = 77848963;
195     /**
196      *
197      *
198      * <pre>
199      * Reservation is currently being resized.
200      * </pre>
201      *
202      * <code>UPDATING = 494614342;</code>
203      */
204     public static final int UPDATING_VALUE = 494614342;
205 
getNumber()206     public final int getNumber() {
207       if (this == UNRECOGNIZED) {
208         throw new java.lang.IllegalArgumentException(
209             "Can't get the number of an unknown enum value.");
210       }
211       return value;
212     }
213 
214     /**
215      * @param value The numeric wire value of the corresponding enum entry.
216      * @return The enum associated with the given numeric wire value.
217      * @deprecated Use {@link #forNumber(int)} instead.
218      */
219     @java.lang.Deprecated
valueOf(int value)220     public static Status valueOf(int value) {
221       return forNumber(value);
222     }
223 
224     /**
225      * @param value The numeric wire value of the corresponding enum entry.
226      * @return The enum associated with the given numeric wire value.
227      */
forNumber(int value)228     public static Status forNumber(int value) {
229       switch (value) {
230         case 0:
231           return UNDEFINED_STATUS;
232         case 455564985:
233           return CREATING;
234         case 528602024:
235           return DELETING;
236         case 530283991:
237           return INVALID;
238         case 77848963:
239           return READY;
240         case 494614342:
241           return UPDATING;
242         default:
243           return null;
244       }
245     }
246 
internalGetValueMap()247     public static com.google.protobuf.Internal.EnumLiteMap<Status> internalGetValueMap() {
248       return internalValueMap;
249     }
250 
251     private static final com.google.protobuf.Internal.EnumLiteMap<Status> internalValueMap =
252         new com.google.protobuf.Internal.EnumLiteMap<Status>() {
253           public Status findValueByNumber(int number) {
254             return Status.forNumber(number);
255           }
256         };
257 
getValueDescriptor()258     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
259       if (this == UNRECOGNIZED) {
260         throw new java.lang.IllegalStateException(
261             "Can't get the descriptor of an unrecognized enum value.");
262       }
263       return getDescriptor().getValues().get(ordinal());
264     }
265 
getDescriptorForType()266     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
267       return getDescriptor();
268     }
269 
getDescriptor()270     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
271       return com.google.cloud.compute.v1.Reservation.getDescriptor().getEnumTypes().get(0);
272     }
273 
274     private static final Status[] VALUES = values();
275 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)276     public static Status valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
277       if (desc.getType() != getDescriptor()) {
278         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
279       }
280       if (desc.getIndex() == -1) {
281         return UNRECOGNIZED;
282       }
283       return VALUES[desc.getIndex()];
284     }
285 
286     private final int value;
287 
Status(int value)288     private Status(int value) {
289       this.value = value;
290     }
291 
292     // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.Reservation.Status)
293   }
294 
295   private int bitField0_;
296   public static final int COMMITMENT_FIELD_NUMBER = 482134805;
297 
298   @SuppressWarnings("serial")
299   private volatile java.lang.Object commitment_ = "";
300   /**
301    *
302    *
303    * <pre>
304    * [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
305    * </pre>
306    *
307    * <code>optional string commitment = 482134805;</code>
308    *
309    * @return Whether the commitment field is set.
310    */
311   @java.lang.Override
hasCommitment()312   public boolean hasCommitment() {
313     return ((bitField0_ & 0x00000001) != 0);
314   }
315   /**
316    *
317    *
318    * <pre>
319    * [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
320    * </pre>
321    *
322    * <code>optional string commitment = 482134805;</code>
323    *
324    * @return The commitment.
325    */
326   @java.lang.Override
getCommitment()327   public java.lang.String getCommitment() {
328     java.lang.Object ref = commitment_;
329     if (ref instanceof java.lang.String) {
330       return (java.lang.String) ref;
331     } else {
332       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
333       java.lang.String s = bs.toStringUtf8();
334       commitment_ = s;
335       return s;
336     }
337   }
338   /**
339    *
340    *
341    * <pre>
342    * [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
343    * </pre>
344    *
345    * <code>optional string commitment = 482134805;</code>
346    *
347    * @return The bytes for commitment.
348    */
349   @java.lang.Override
getCommitmentBytes()350   public com.google.protobuf.ByteString getCommitmentBytes() {
351     java.lang.Object ref = commitment_;
352     if (ref instanceof java.lang.String) {
353       com.google.protobuf.ByteString b =
354           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
355       commitment_ = b;
356       return b;
357     } else {
358       return (com.google.protobuf.ByteString) ref;
359     }
360   }
361 
362   public static final int CREATION_TIMESTAMP_FIELD_NUMBER = 30525366;
363 
364   @SuppressWarnings("serial")
365   private volatile java.lang.Object creationTimestamp_ = "";
366   /**
367    *
368    *
369    * <pre>
370    * [Output Only] Creation timestamp in RFC3339 text format.
371    * </pre>
372    *
373    * <code>optional string creation_timestamp = 30525366;</code>
374    *
375    * @return Whether the creationTimestamp field is set.
376    */
377   @java.lang.Override
hasCreationTimestamp()378   public boolean hasCreationTimestamp() {
379     return ((bitField0_ & 0x00000002) != 0);
380   }
381   /**
382    *
383    *
384    * <pre>
385    * [Output Only] Creation timestamp in RFC3339 text format.
386    * </pre>
387    *
388    * <code>optional string creation_timestamp = 30525366;</code>
389    *
390    * @return The creationTimestamp.
391    */
392   @java.lang.Override
getCreationTimestamp()393   public java.lang.String getCreationTimestamp() {
394     java.lang.Object ref = creationTimestamp_;
395     if (ref instanceof java.lang.String) {
396       return (java.lang.String) ref;
397     } else {
398       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
399       java.lang.String s = bs.toStringUtf8();
400       creationTimestamp_ = s;
401       return s;
402     }
403   }
404   /**
405    *
406    *
407    * <pre>
408    * [Output Only] Creation timestamp in RFC3339 text format.
409    * </pre>
410    *
411    * <code>optional string creation_timestamp = 30525366;</code>
412    *
413    * @return The bytes for creationTimestamp.
414    */
415   @java.lang.Override
getCreationTimestampBytes()416   public com.google.protobuf.ByteString getCreationTimestampBytes() {
417     java.lang.Object ref = creationTimestamp_;
418     if (ref instanceof java.lang.String) {
419       com.google.protobuf.ByteString b =
420           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
421       creationTimestamp_ = b;
422       return b;
423     } else {
424       return (com.google.protobuf.ByteString) ref;
425     }
426   }
427 
428   public static final int DESCRIPTION_FIELD_NUMBER = 422937596;
429 
430   @SuppressWarnings("serial")
431   private volatile java.lang.Object description_ = "";
432   /**
433    *
434    *
435    * <pre>
436    * An optional description of this resource. Provide this property when you create the resource.
437    * </pre>
438    *
439    * <code>optional string description = 422937596;</code>
440    *
441    * @return Whether the description field is set.
442    */
443   @java.lang.Override
hasDescription()444   public boolean hasDescription() {
445     return ((bitField0_ & 0x00000004) != 0);
446   }
447   /**
448    *
449    *
450    * <pre>
451    * An optional description of this resource. Provide this property when you create the resource.
452    * </pre>
453    *
454    * <code>optional string description = 422937596;</code>
455    *
456    * @return The description.
457    */
458   @java.lang.Override
getDescription()459   public java.lang.String getDescription() {
460     java.lang.Object ref = description_;
461     if (ref instanceof java.lang.String) {
462       return (java.lang.String) ref;
463     } else {
464       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
465       java.lang.String s = bs.toStringUtf8();
466       description_ = s;
467       return s;
468     }
469   }
470   /**
471    *
472    *
473    * <pre>
474    * An optional description of this resource. Provide this property when you create the resource.
475    * </pre>
476    *
477    * <code>optional string description = 422937596;</code>
478    *
479    * @return The bytes for description.
480    */
481   @java.lang.Override
getDescriptionBytes()482   public com.google.protobuf.ByteString getDescriptionBytes() {
483     java.lang.Object ref = description_;
484     if (ref instanceof java.lang.String) {
485       com.google.protobuf.ByteString b =
486           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
487       description_ = b;
488       return b;
489     } else {
490       return (com.google.protobuf.ByteString) ref;
491     }
492   }
493 
494   public static final int ID_FIELD_NUMBER = 3355;
495   private long id_ = 0L;
496   /**
497    *
498    *
499    * <pre>
500    * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
501    * </pre>
502    *
503    * <code>optional uint64 id = 3355;</code>
504    *
505    * @return Whether the id field is set.
506    */
507   @java.lang.Override
hasId()508   public boolean hasId() {
509     return ((bitField0_ & 0x00000008) != 0);
510   }
511   /**
512    *
513    *
514    * <pre>
515    * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
516    * </pre>
517    *
518    * <code>optional uint64 id = 3355;</code>
519    *
520    * @return The id.
521    */
522   @java.lang.Override
getId()523   public long getId() {
524     return id_;
525   }
526 
527   public static final int KIND_FIELD_NUMBER = 3292052;
528 
529   @SuppressWarnings("serial")
530   private volatile java.lang.Object kind_ = "";
531   /**
532    *
533    *
534    * <pre>
535    * [Output Only] Type of the resource. Always compute#reservations for reservations.
536    * </pre>
537    *
538    * <code>optional string kind = 3292052;</code>
539    *
540    * @return Whether the kind field is set.
541    */
542   @java.lang.Override
hasKind()543   public boolean hasKind() {
544     return ((bitField0_ & 0x00000010) != 0);
545   }
546   /**
547    *
548    *
549    * <pre>
550    * [Output Only] Type of the resource. Always compute#reservations for reservations.
551    * </pre>
552    *
553    * <code>optional string kind = 3292052;</code>
554    *
555    * @return The kind.
556    */
557   @java.lang.Override
getKind()558   public java.lang.String getKind() {
559     java.lang.Object ref = kind_;
560     if (ref instanceof java.lang.String) {
561       return (java.lang.String) ref;
562     } else {
563       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
564       java.lang.String s = bs.toStringUtf8();
565       kind_ = s;
566       return s;
567     }
568   }
569   /**
570    *
571    *
572    * <pre>
573    * [Output Only] Type of the resource. Always compute#reservations for reservations.
574    * </pre>
575    *
576    * <code>optional string kind = 3292052;</code>
577    *
578    * @return The bytes for kind.
579    */
580   @java.lang.Override
getKindBytes()581   public com.google.protobuf.ByteString getKindBytes() {
582     java.lang.Object ref = kind_;
583     if (ref instanceof java.lang.String) {
584       com.google.protobuf.ByteString b =
585           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
586       kind_ = b;
587       return b;
588     } else {
589       return (com.google.protobuf.ByteString) ref;
590     }
591   }
592 
593   public static final int NAME_FIELD_NUMBER = 3373707;
594 
595   @SuppressWarnings("serial")
596   private volatile java.lang.Object name_ = "";
597   /**
598    *
599    *
600    * <pre>
601    * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
602    * </pre>
603    *
604    * <code>optional string name = 3373707;</code>
605    *
606    * @return Whether the name field is set.
607    */
608   @java.lang.Override
hasName()609   public boolean hasName() {
610     return ((bitField0_ & 0x00000020) != 0);
611   }
612   /**
613    *
614    *
615    * <pre>
616    * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
617    * </pre>
618    *
619    * <code>optional string name = 3373707;</code>
620    *
621    * @return The name.
622    */
623   @java.lang.Override
getName()624   public java.lang.String getName() {
625     java.lang.Object ref = name_;
626     if (ref instanceof java.lang.String) {
627       return (java.lang.String) ref;
628     } else {
629       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
630       java.lang.String s = bs.toStringUtf8();
631       name_ = s;
632       return s;
633     }
634   }
635   /**
636    *
637    *
638    * <pre>
639    * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
640    * </pre>
641    *
642    * <code>optional string name = 3373707;</code>
643    *
644    * @return The bytes for name.
645    */
646   @java.lang.Override
getNameBytes()647   public com.google.protobuf.ByteString getNameBytes() {
648     java.lang.Object ref = name_;
649     if (ref instanceof java.lang.String) {
650       com.google.protobuf.ByteString b =
651           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
652       name_ = b;
653       return b;
654     } else {
655       return (com.google.protobuf.ByteString) ref;
656     }
657   }
658 
659   public static final int RESOURCE_POLICIES_FIELD_NUMBER = 22220385;
660 
661   private static final class ResourcePoliciesDefaultEntryHolder {
662     static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
663         com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
664             com.google.cloud.compute.v1.Compute
665                 .internal_static_google_cloud_compute_v1_Reservation_ResourcePoliciesEntry_descriptor,
666             com.google.protobuf.WireFormat.FieldType.STRING,
667             "",
668             com.google.protobuf.WireFormat.FieldType.STRING,
669             "");
670   }
671 
672   @SuppressWarnings("serial")
673   private com.google.protobuf.MapField<java.lang.String, java.lang.String> resourcePolicies_;
674 
675   private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetResourcePolicies()676       internalGetResourcePolicies() {
677     if (resourcePolicies_ == null) {
678       return com.google.protobuf.MapField.emptyMapField(
679           ResourcePoliciesDefaultEntryHolder.defaultEntry);
680     }
681     return resourcePolicies_;
682   }
683 
getResourcePoliciesCount()684   public int getResourcePoliciesCount() {
685     return internalGetResourcePolicies().getMap().size();
686   }
687   /**
688    *
689    *
690    * <pre>
691    * Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.
692    * </pre>
693    *
694    * <code>map&lt;string, string&gt; resource_policies = 22220385;</code>
695    */
696   @java.lang.Override
containsResourcePolicies(java.lang.String key)697   public boolean containsResourcePolicies(java.lang.String key) {
698     if (key == null) {
699       throw new NullPointerException("map key");
700     }
701     return internalGetResourcePolicies().getMap().containsKey(key);
702   }
703   /** Use {@link #getResourcePoliciesMap()} instead. */
704   @java.lang.Override
705   @java.lang.Deprecated
getResourcePolicies()706   public java.util.Map<java.lang.String, java.lang.String> getResourcePolicies() {
707     return getResourcePoliciesMap();
708   }
709   /**
710    *
711    *
712    * <pre>
713    * Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.
714    * </pre>
715    *
716    * <code>map&lt;string, string&gt; resource_policies = 22220385;</code>
717    */
718   @java.lang.Override
getResourcePoliciesMap()719   public java.util.Map<java.lang.String, java.lang.String> getResourcePoliciesMap() {
720     return internalGetResourcePolicies().getMap();
721   }
722   /**
723    *
724    *
725    * <pre>
726    * Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.
727    * </pre>
728    *
729    * <code>map&lt;string, string&gt; resource_policies = 22220385;</code>
730    */
731   @java.lang.Override
getResourcePoliciesOrDefault( java.lang.String key, java.lang.String defaultValue)732   public /* nullable */ java.lang.String getResourcePoliciesOrDefault(
733       java.lang.String key,
734       /* nullable */
735       java.lang.String defaultValue) {
736     if (key == null) {
737       throw new NullPointerException("map key");
738     }
739     java.util.Map<java.lang.String, java.lang.String> map = internalGetResourcePolicies().getMap();
740     return map.containsKey(key) ? map.get(key) : defaultValue;
741   }
742   /**
743    *
744    *
745    * <pre>
746    * Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.
747    * </pre>
748    *
749    * <code>map&lt;string, string&gt; resource_policies = 22220385;</code>
750    */
751   @java.lang.Override
getResourcePoliciesOrThrow(java.lang.String key)752   public java.lang.String getResourcePoliciesOrThrow(java.lang.String key) {
753     if (key == null) {
754       throw new NullPointerException("map key");
755     }
756     java.util.Map<java.lang.String, java.lang.String> map = internalGetResourcePolicies().getMap();
757     if (!map.containsKey(key)) {
758       throw new java.lang.IllegalArgumentException();
759     }
760     return map.get(key);
761   }
762 
763   public static final int RESOURCE_STATUS_FIELD_NUMBER = 249429315;
764   private com.google.cloud.compute.v1.AllocationResourceStatus resourceStatus_;
765   /**
766    *
767    *
768    * <pre>
769    * [Output Only] Status information for Reservation resource.
770    * </pre>
771    *
772    * <code>optional .google.cloud.compute.v1.AllocationResourceStatus resource_status = 249429315;
773    * </code>
774    *
775    * @return Whether the resourceStatus field is set.
776    */
777   @java.lang.Override
hasResourceStatus()778   public boolean hasResourceStatus() {
779     return ((bitField0_ & 0x00000040) != 0);
780   }
781   /**
782    *
783    *
784    * <pre>
785    * [Output Only] Status information for Reservation resource.
786    * </pre>
787    *
788    * <code>optional .google.cloud.compute.v1.AllocationResourceStatus resource_status = 249429315;
789    * </code>
790    *
791    * @return The resourceStatus.
792    */
793   @java.lang.Override
getResourceStatus()794   public com.google.cloud.compute.v1.AllocationResourceStatus getResourceStatus() {
795     return resourceStatus_ == null
796         ? com.google.cloud.compute.v1.AllocationResourceStatus.getDefaultInstance()
797         : resourceStatus_;
798   }
799   /**
800    *
801    *
802    * <pre>
803    * [Output Only] Status information for Reservation resource.
804    * </pre>
805    *
806    * <code>optional .google.cloud.compute.v1.AllocationResourceStatus resource_status = 249429315;
807    * </code>
808    */
809   @java.lang.Override
810   public com.google.cloud.compute.v1.AllocationResourceStatusOrBuilder
getResourceStatusOrBuilder()811       getResourceStatusOrBuilder() {
812     return resourceStatus_ == null
813         ? com.google.cloud.compute.v1.AllocationResourceStatus.getDefaultInstance()
814         : resourceStatus_;
815   }
816 
817   public static final int SATISFIES_PZS_FIELD_NUMBER = 480964267;
818   private boolean satisfiesPzs_ = false;
819   /**
820    *
821    *
822    * <pre>
823    * [Output Only] Reserved for future use.
824    * </pre>
825    *
826    * <code>optional bool satisfies_pzs = 480964267;</code>
827    *
828    * @return Whether the satisfiesPzs field is set.
829    */
830   @java.lang.Override
hasSatisfiesPzs()831   public boolean hasSatisfiesPzs() {
832     return ((bitField0_ & 0x00000080) != 0);
833   }
834   /**
835    *
836    *
837    * <pre>
838    * [Output Only] Reserved for future use.
839    * </pre>
840    *
841    * <code>optional bool satisfies_pzs = 480964267;</code>
842    *
843    * @return The satisfiesPzs.
844    */
845   @java.lang.Override
getSatisfiesPzs()846   public boolean getSatisfiesPzs() {
847     return satisfiesPzs_;
848   }
849 
850   public static final int SELF_LINK_FIELD_NUMBER = 456214797;
851 
852   @SuppressWarnings("serial")
853   private volatile java.lang.Object selfLink_ = "";
854   /**
855    *
856    *
857    * <pre>
858    * [Output Only] Server-defined fully-qualified URL for this resource.
859    * </pre>
860    *
861    * <code>optional string self_link = 456214797;</code>
862    *
863    * @return Whether the selfLink field is set.
864    */
865   @java.lang.Override
hasSelfLink()866   public boolean hasSelfLink() {
867     return ((bitField0_ & 0x00000100) != 0);
868   }
869   /**
870    *
871    *
872    * <pre>
873    * [Output Only] Server-defined fully-qualified URL for this resource.
874    * </pre>
875    *
876    * <code>optional string self_link = 456214797;</code>
877    *
878    * @return The selfLink.
879    */
880   @java.lang.Override
getSelfLink()881   public java.lang.String getSelfLink() {
882     java.lang.Object ref = selfLink_;
883     if (ref instanceof java.lang.String) {
884       return (java.lang.String) ref;
885     } else {
886       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
887       java.lang.String s = bs.toStringUtf8();
888       selfLink_ = s;
889       return s;
890     }
891   }
892   /**
893    *
894    *
895    * <pre>
896    * [Output Only] Server-defined fully-qualified URL for this resource.
897    * </pre>
898    *
899    * <code>optional string self_link = 456214797;</code>
900    *
901    * @return The bytes for selfLink.
902    */
903   @java.lang.Override
getSelfLinkBytes()904   public com.google.protobuf.ByteString getSelfLinkBytes() {
905     java.lang.Object ref = selfLink_;
906     if (ref instanceof java.lang.String) {
907       com.google.protobuf.ByteString b =
908           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
909       selfLink_ = b;
910       return b;
911     } else {
912       return (com.google.protobuf.ByteString) ref;
913     }
914   }
915 
916   public static final int SHARE_SETTINGS_FIELD_NUMBER = 266668163;
917   private com.google.cloud.compute.v1.ShareSettings shareSettings_;
918   /**
919    *
920    *
921    * <pre>
922    * Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.
923    * </pre>
924    *
925    * <code>optional .google.cloud.compute.v1.ShareSettings share_settings = 266668163;</code>
926    *
927    * @return Whether the shareSettings field is set.
928    */
929   @java.lang.Override
hasShareSettings()930   public boolean hasShareSettings() {
931     return ((bitField0_ & 0x00000200) != 0);
932   }
933   /**
934    *
935    *
936    * <pre>
937    * Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.
938    * </pre>
939    *
940    * <code>optional .google.cloud.compute.v1.ShareSettings share_settings = 266668163;</code>
941    *
942    * @return The shareSettings.
943    */
944   @java.lang.Override
getShareSettings()945   public com.google.cloud.compute.v1.ShareSettings getShareSettings() {
946     return shareSettings_ == null
947         ? com.google.cloud.compute.v1.ShareSettings.getDefaultInstance()
948         : shareSettings_;
949   }
950   /**
951    *
952    *
953    * <pre>
954    * Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.
955    * </pre>
956    *
957    * <code>optional .google.cloud.compute.v1.ShareSettings share_settings = 266668163;</code>
958    */
959   @java.lang.Override
getShareSettingsOrBuilder()960   public com.google.cloud.compute.v1.ShareSettingsOrBuilder getShareSettingsOrBuilder() {
961     return shareSettings_ == null
962         ? com.google.cloud.compute.v1.ShareSettings.getDefaultInstance()
963         : shareSettings_;
964   }
965 
966   public static final int SPECIFIC_RESERVATION_FIELD_NUMBER = 404901951;
967   private com.google.cloud.compute.v1.AllocationSpecificSKUReservation specificReservation_;
968   /**
969    *
970    *
971    * <pre>
972    * Reservation for instances with specific machine shapes.
973    * </pre>
974    *
975    * <code>
976    * optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;
977    * </code>
978    *
979    * @return Whether the specificReservation field is set.
980    */
981   @java.lang.Override
hasSpecificReservation()982   public boolean hasSpecificReservation() {
983     return ((bitField0_ & 0x00000400) != 0);
984   }
985   /**
986    *
987    *
988    * <pre>
989    * Reservation for instances with specific machine shapes.
990    * </pre>
991    *
992    * <code>
993    * optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;
994    * </code>
995    *
996    * @return The specificReservation.
997    */
998   @java.lang.Override
getSpecificReservation()999   public com.google.cloud.compute.v1.AllocationSpecificSKUReservation getSpecificReservation() {
1000     return specificReservation_ == null
1001         ? com.google.cloud.compute.v1.AllocationSpecificSKUReservation.getDefaultInstance()
1002         : specificReservation_;
1003   }
1004   /**
1005    *
1006    *
1007    * <pre>
1008    * Reservation for instances with specific machine shapes.
1009    * </pre>
1010    *
1011    * <code>
1012    * optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;
1013    * </code>
1014    */
1015   @java.lang.Override
1016   public com.google.cloud.compute.v1.AllocationSpecificSKUReservationOrBuilder
getSpecificReservationOrBuilder()1017       getSpecificReservationOrBuilder() {
1018     return specificReservation_ == null
1019         ? com.google.cloud.compute.v1.AllocationSpecificSKUReservation.getDefaultInstance()
1020         : specificReservation_;
1021   }
1022 
1023   public static final int SPECIFIC_RESERVATION_REQUIRED_FIELD_NUMBER = 226550687;
1024   private boolean specificReservationRequired_ = false;
1025   /**
1026    *
1027    *
1028    * <pre>
1029    * Indicates whether the reservation can be consumed by VMs with affinity for "any" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.
1030    * </pre>
1031    *
1032    * <code>optional bool specific_reservation_required = 226550687;</code>
1033    *
1034    * @return Whether the specificReservationRequired field is set.
1035    */
1036   @java.lang.Override
hasSpecificReservationRequired()1037   public boolean hasSpecificReservationRequired() {
1038     return ((bitField0_ & 0x00000800) != 0);
1039   }
1040   /**
1041    *
1042    *
1043    * <pre>
1044    * Indicates whether the reservation can be consumed by VMs with affinity for "any" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.
1045    * </pre>
1046    *
1047    * <code>optional bool specific_reservation_required = 226550687;</code>
1048    *
1049    * @return The specificReservationRequired.
1050    */
1051   @java.lang.Override
getSpecificReservationRequired()1052   public boolean getSpecificReservationRequired() {
1053     return specificReservationRequired_;
1054   }
1055 
1056   public static final int STATUS_FIELD_NUMBER = 181260274;
1057 
1058   @SuppressWarnings("serial")
1059   private volatile java.lang.Object status_ = "";
1060   /**
1061    *
1062    *
1063    * <pre>
1064    * [Output Only] The status of the reservation.
1065    * Check the Status enum for the list of possible values.
1066    * </pre>
1067    *
1068    * <code>optional string status = 181260274;</code>
1069    *
1070    * @return Whether the status field is set.
1071    */
1072   @java.lang.Override
hasStatus()1073   public boolean hasStatus() {
1074     return ((bitField0_ & 0x00001000) != 0);
1075   }
1076   /**
1077    *
1078    *
1079    * <pre>
1080    * [Output Only] The status of the reservation.
1081    * Check the Status enum for the list of possible values.
1082    * </pre>
1083    *
1084    * <code>optional string status = 181260274;</code>
1085    *
1086    * @return The status.
1087    */
1088   @java.lang.Override
getStatus()1089   public java.lang.String getStatus() {
1090     java.lang.Object ref = status_;
1091     if (ref instanceof java.lang.String) {
1092       return (java.lang.String) ref;
1093     } else {
1094       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1095       java.lang.String s = bs.toStringUtf8();
1096       status_ = s;
1097       return s;
1098     }
1099   }
1100   /**
1101    *
1102    *
1103    * <pre>
1104    * [Output Only] The status of the reservation.
1105    * Check the Status enum for the list of possible values.
1106    * </pre>
1107    *
1108    * <code>optional string status = 181260274;</code>
1109    *
1110    * @return The bytes for status.
1111    */
1112   @java.lang.Override
getStatusBytes()1113   public com.google.protobuf.ByteString getStatusBytes() {
1114     java.lang.Object ref = status_;
1115     if (ref instanceof java.lang.String) {
1116       com.google.protobuf.ByteString b =
1117           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1118       status_ = b;
1119       return b;
1120     } else {
1121       return (com.google.protobuf.ByteString) ref;
1122     }
1123   }
1124 
1125   public static final int ZONE_FIELD_NUMBER = 3744684;
1126 
1127   @SuppressWarnings("serial")
1128   private volatile java.lang.Object zone_ = "";
1129   /**
1130    *
1131    *
1132    * <pre>
1133    * Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
1134    * </pre>
1135    *
1136    * <code>optional string zone = 3744684;</code>
1137    *
1138    * @return Whether the zone field is set.
1139    */
1140   @java.lang.Override
hasZone()1141   public boolean hasZone() {
1142     return ((bitField0_ & 0x00002000) != 0);
1143   }
1144   /**
1145    *
1146    *
1147    * <pre>
1148    * Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
1149    * </pre>
1150    *
1151    * <code>optional string zone = 3744684;</code>
1152    *
1153    * @return The zone.
1154    */
1155   @java.lang.Override
getZone()1156   public java.lang.String getZone() {
1157     java.lang.Object ref = zone_;
1158     if (ref instanceof java.lang.String) {
1159       return (java.lang.String) ref;
1160     } else {
1161       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1162       java.lang.String s = bs.toStringUtf8();
1163       zone_ = s;
1164       return s;
1165     }
1166   }
1167   /**
1168    *
1169    *
1170    * <pre>
1171    * Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
1172    * </pre>
1173    *
1174    * <code>optional string zone = 3744684;</code>
1175    *
1176    * @return The bytes for zone.
1177    */
1178   @java.lang.Override
getZoneBytes()1179   public com.google.protobuf.ByteString getZoneBytes() {
1180     java.lang.Object ref = zone_;
1181     if (ref instanceof java.lang.String) {
1182       com.google.protobuf.ByteString b =
1183           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1184       zone_ = b;
1185       return b;
1186     } else {
1187       return (com.google.protobuf.ByteString) ref;
1188     }
1189   }
1190 
1191   private byte memoizedIsInitialized = -1;
1192 
1193   @java.lang.Override
isInitialized()1194   public final boolean isInitialized() {
1195     byte isInitialized = memoizedIsInitialized;
1196     if (isInitialized == 1) return true;
1197     if (isInitialized == 0) return false;
1198 
1199     memoizedIsInitialized = 1;
1200     return true;
1201   }
1202 
1203   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)1204   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
1205     if (((bitField0_ & 0x00000008) != 0)) {
1206       output.writeUInt64(3355, id_);
1207     }
1208     if (((bitField0_ & 0x00000010) != 0)) {
1209       com.google.protobuf.GeneratedMessageV3.writeString(output, 3292052, kind_);
1210     }
1211     if (((bitField0_ & 0x00000020) != 0)) {
1212       com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_);
1213     }
1214     if (((bitField0_ & 0x00002000) != 0)) {
1215       com.google.protobuf.GeneratedMessageV3.writeString(output, 3744684, zone_);
1216     }
1217     com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
1218         output,
1219         internalGetResourcePolicies(),
1220         ResourcePoliciesDefaultEntryHolder.defaultEntry,
1221         22220385);
1222     if (((bitField0_ & 0x00000002) != 0)) {
1223       com.google.protobuf.GeneratedMessageV3.writeString(output, 30525366, creationTimestamp_);
1224     }
1225     if (((bitField0_ & 0x00001000) != 0)) {
1226       com.google.protobuf.GeneratedMessageV3.writeString(output, 181260274, status_);
1227     }
1228     if (((bitField0_ & 0x00000800) != 0)) {
1229       output.writeBool(226550687, specificReservationRequired_);
1230     }
1231     if (((bitField0_ & 0x00000040) != 0)) {
1232       output.writeMessage(249429315, getResourceStatus());
1233     }
1234     if (((bitField0_ & 0x00000200) != 0)) {
1235       output.writeMessage(266668163, getShareSettings());
1236     }
1237     if (((bitField0_ & 0x00000400) != 0)) {
1238       output.writeMessage(404901951, getSpecificReservation());
1239     }
1240     if (((bitField0_ & 0x00000004) != 0)) {
1241       com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_);
1242     }
1243     if (((bitField0_ & 0x00000100) != 0)) {
1244       com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_);
1245     }
1246     if (((bitField0_ & 0x00000080) != 0)) {
1247       output.writeBool(480964267, satisfiesPzs_);
1248     }
1249     if (((bitField0_ & 0x00000001) != 0)) {
1250       com.google.protobuf.GeneratedMessageV3.writeString(output, 482134805, commitment_);
1251     }
1252     getUnknownFields().writeTo(output);
1253   }
1254 
1255   @java.lang.Override
getSerializedSize()1256   public int getSerializedSize() {
1257     int size = memoizedSize;
1258     if (size != -1) return size;
1259 
1260     size = 0;
1261     if (((bitField0_ & 0x00000008) != 0)) {
1262       size += com.google.protobuf.CodedOutputStream.computeUInt64Size(3355, id_);
1263     }
1264     if (((bitField0_ & 0x00000010) != 0)) {
1265       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3292052, kind_);
1266     }
1267     if (((bitField0_ & 0x00000020) != 0)) {
1268       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_);
1269     }
1270     if (((bitField0_ & 0x00002000) != 0)) {
1271       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3744684, zone_);
1272     }
1273     for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
1274         internalGetResourcePolicies().getMap().entrySet()) {
1275       com.google.protobuf.MapEntry<java.lang.String, java.lang.String> resourcePolicies__ =
1276           ResourcePoliciesDefaultEntryHolder.defaultEntry
1277               .newBuilderForType()
1278               .setKey(entry.getKey())
1279               .setValue(entry.getValue())
1280               .build();
1281       size +=
1282           com.google.protobuf.CodedOutputStream.computeMessageSize(22220385, resourcePolicies__);
1283     }
1284     if (((bitField0_ & 0x00000002) != 0)) {
1285       size +=
1286           com.google.protobuf.GeneratedMessageV3.computeStringSize(30525366, creationTimestamp_);
1287     }
1288     if (((bitField0_ & 0x00001000) != 0)) {
1289       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(181260274, status_);
1290     }
1291     if (((bitField0_ & 0x00000800) != 0)) {
1292       size +=
1293           com.google.protobuf.CodedOutputStream.computeBoolSize(
1294               226550687, specificReservationRequired_);
1295     }
1296     if (((bitField0_ & 0x00000040) != 0)) {
1297       size +=
1298           com.google.protobuf.CodedOutputStream.computeMessageSize(249429315, getResourceStatus());
1299     }
1300     if (((bitField0_ & 0x00000200) != 0)) {
1301       size +=
1302           com.google.protobuf.CodedOutputStream.computeMessageSize(266668163, getShareSettings());
1303     }
1304     if (((bitField0_ & 0x00000400) != 0)) {
1305       size +=
1306           com.google.protobuf.CodedOutputStream.computeMessageSize(
1307               404901951, getSpecificReservation());
1308     }
1309     if (((bitField0_ & 0x00000004) != 0)) {
1310       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_);
1311     }
1312     if (((bitField0_ & 0x00000100) != 0)) {
1313       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_);
1314     }
1315     if (((bitField0_ & 0x00000080) != 0)) {
1316       size += com.google.protobuf.CodedOutputStream.computeBoolSize(480964267, satisfiesPzs_);
1317     }
1318     if (((bitField0_ & 0x00000001) != 0)) {
1319       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(482134805, commitment_);
1320     }
1321     size += getUnknownFields().getSerializedSize();
1322     memoizedSize = size;
1323     return size;
1324   }
1325 
1326   @java.lang.Override
equals(final java.lang.Object obj)1327   public boolean equals(final java.lang.Object obj) {
1328     if (obj == this) {
1329       return true;
1330     }
1331     if (!(obj instanceof com.google.cloud.compute.v1.Reservation)) {
1332       return super.equals(obj);
1333     }
1334     com.google.cloud.compute.v1.Reservation other = (com.google.cloud.compute.v1.Reservation) obj;
1335 
1336     if (hasCommitment() != other.hasCommitment()) return false;
1337     if (hasCommitment()) {
1338       if (!getCommitment().equals(other.getCommitment())) return false;
1339     }
1340     if (hasCreationTimestamp() != other.hasCreationTimestamp()) return false;
1341     if (hasCreationTimestamp()) {
1342       if (!getCreationTimestamp().equals(other.getCreationTimestamp())) return false;
1343     }
1344     if (hasDescription() != other.hasDescription()) return false;
1345     if (hasDescription()) {
1346       if (!getDescription().equals(other.getDescription())) return false;
1347     }
1348     if (hasId() != other.hasId()) return false;
1349     if (hasId()) {
1350       if (getId() != other.getId()) return false;
1351     }
1352     if (hasKind() != other.hasKind()) return false;
1353     if (hasKind()) {
1354       if (!getKind().equals(other.getKind())) return false;
1355     }
1356     if (hasName() != other.hasName()) return false;
1357     if (hasName()) {
1358       if (!getName().equals(other.getName())) return false;
1359     }
1360     if (!internalGetResourcePolicies().equals(other.internalGetResourcePolicies())) return false;
1361     if (hasResourceStatus() != other.hasResourceStatus()) return false;
1362     if (hasResourceStatus()) {
1363       if (!getResourceStatus().equals(other.getResourceStatus())) return false;
1364     }
1365     if (hasSatisfiesPzs() != other.hasSatisfiesPzs()) return false;
1366     if (hasSatisfiesPzs()) {
1367       if (getSatisfiesPzs() != other.getSatisfiesPzs()) return false;
1368     }
1369     if (hasSelfLink() != other.hasSelfLink()) return false;
1370     if (hasSelfLink()) {
1371       if (!getSelfLink().equals(other.getSelfLink())) return false;
1372     }
1373     if (hasShareSettings() != other.hasShareSettings()) return false;
1374     if (hasShareSettings()) {
1375       if (!getShareSettings().equals(other.getShareSettings())) return false;
1376     }
1377     if (hasSpecificReservation() != other.hasSpecificReservation()) return false;
1378     if (hasSpecificReservation()) {
1379       if (!getSpecificReservation().equals(other.getSpecificReservation())) return false;
1380     }
1381     if (hasSpecificReservationRequired() != other.hasSpecificReservationRequired()) return false;
1382     if (hasSpecificReservationRequired()) {
1383       if (getSpecificReservationRequired() != other.getSpecificReservationRequired()) return false;
1384     }
1385     if (hasStatus() != other.hasStatus()) return false;
1386     if (hasStatus()) {
1387       if (!getStatus().equals(other.getStatus())) return false;
1388     }
1389     if (hasZone() != other.hasZone()) return false;
1390     if (hasZone()) {
1391       if (!getZone().equals(other.getZone())) return false;
1392     }
1393     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1394     return true;
1395   }
1396 
1397   @java.lang.Override
hashCode()1398   public int hashCode() {
1399     if (memoizedHashCode != 0) {
1400       return memoizedHashCode;
1401     }
1402     int hash = 41;
1403     hash = (19 * hash) + getDescriptor().hashCode();
1404     if (hasCommitment()) {
1405       hash = (37 * hash) + COMMITMENT_FIELD_NUMBER;
1406       hash = (53 * hash) + getCommitment().hashCode();
1407     }
1408     if (hasCreationTimestamp()) {
1409       hash = (37 * hash) + CREATION_TIMESTAMP_FIELD_NUMBER;
1410       hash = (53 * hash) + getCreationTimestamp().hashCode();
1411     }
1412     if (hasDescription()) {
1413       hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
1414       hash = (53 * hash) + getDescription().hashCode();
1415     }
1416     if (hasId()) {
1417       hash = (37 * hash) + ID_FIELD_NUMBER;
1418       hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getId());
1419     }
1420     if (hasKind()) {
1421       hash = (37 * hash) + KIND_FIELD_NUMBER;
1422       hash = (53 * hash) + getKind().hashCode();
1423     }
1424     if (hasName()) {
1425       hash = (37 * hash) + NAME_FIELD_NUMBER;
1426       hash = (53 * hash) + getName().hashCode();
1427     }
1428     if (!internalGetResourcePolicies().getMap().isEmpty()) {
1429       hash = (37 * hash) + RESOURCE_POLICIES_FIELD_NUMBER;
1430       hash = (53 * hash) + internalGetResourcePolicies().hashCode();
1431     }
1432     if (hasResourceStatus()) {
1433       hash = (37 * hash) + RESOURCE_STATUS_FIELD_NUMBER;
1434       hash = (53 * hash) + getResourceStatus().hashCode();
1435     }
1436     if (hasSatisfiesPzs()) {
1437       hash = (37 * hash) + SATISFIES_PZS_FIELD_NUMBER;
1438       hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSatisfiesPzs());
1439     }
1440     if (hasSelfLink()) {
1441       hash = (37 * hash) + SELF_LINK_FIELD_NUMBER;
1442       hash = (53 * hash) + getSelfLink().hashCode();
1443     }
1444     if (hasShareSettings()) {
1445       hash = (37 * hash) + SHARE_SETTINGS_FIELD_NUMBER;
1446       hash = (53 * hash) + getShareSettings().hashCode();
1447     }
1448     if (hasSpecificReservation()) {
1449       hash = (37 * hash) + SPECIFIC_RESERVATION_FIELD_NUMBER;
1450       hash = (53 * hash) + getSpecificReservation().hashCode();
1451     }
1452     if (hasSpecificReservationRequired()) {
1453       hash = (37 * hash) + SPECIFIC_RESERVATION_REQUIRED_FIELD_NUMBER;
1454       hash =
1455           (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSpecificReservationRequired());
1456     }
1457     if (hasStatus()) {
1458       hash = (37 * hash) + STATUS_FIELD_NUMBER;
1459       hash = (53 * hash) + getStatus().hashCode();
1460     }
1461     if (hasZone()) {
1462       hash = (37 * hash) + ZONE_FIELD_NUMBER;
1463       hash = (53 * hash) + getZone().hashCode();
1464     }
1465     hash = (29 * hash) + getUnknownFields().hashCode();
1466     memoizedHashCode = hash;
1467     return hash;
1468   }
1469 
parseFrom(java.nio.ByteBuffer data)1470   public static com.google.cloud.compute.v1.Reservation parseFrom(java.nio.ByteBuffer data)
1471       throws com.google.protobuf.InvalidProtocolBufferException {
1472     return PARSER.parseFrom(data);
1473   }
1474 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1475   public static com.google.cloud.compute.v1.Reservation parseFrom(
1476       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1477       throws com.google.protobuf.InvalidProtocolBufferException {
1478     return PARSER.parseFrom(data, extensionRegistry);
1479   }
1480 
parseFrom( com.google.protobuf.ByteString data)1481   public static com.google.cloud.compute.v1.Reservation parseFrom(
1482       com.google.protobuf.ByteString data)
1483       throws com.google.protobuf.InvalidProtocolBufferException {
1484     return PARSER.parseFrom(data);
1485   }
1486 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1487   public static com.google.cloud.compute.v1.Reservation parseFrom(
1488       com.google.protobuf.ByteString data,
1489       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1490       throws com.google.protobuf.InvalidProtocolBufferException {
1491     return PARSER.parseFrom(data, extensionRegistry);
1492   }
1493 
parseFrom(byte[] data)1494   public static com.google.cloud.compute.v1.Reservation parseFrom(byte[] data)
1495       throws com.google.protobuf.InvalidProtocolBufferException {
1496     return PARSER.parseFrom(data);
1497   }
1498 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1499   public static com.google.cloud.compute.v1.Reservation parseFrom(
1500       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1501       throws com.google.protobuf.InvalidProtocolBufferException {
1502     return PARSER.parseFrom(data, extensionRegistry);
1503   }
1504 
parseFrom(java.io.InputStream input)1505   public static com.google.cloud.compute.v1.Reservation parseFrom(java.io.InputStream input)
1506       throws java.io.IOException {
1507     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1508   }
1509 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1510   public static com.google.cloud.compute.v1.Reservation parseFrom(
1511       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1512       throws java.io.IOException {
1513     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1514         PARSER, input, extensionRegistry);
1515   }
1516 
parseDelimitedFrom( java.io.InputStream input)1517   public static com.google.cloud.compute.v1.Reservation parseDelimitedFrom(
1518       java.io.InputStream input) throws java.io.IOException {
1519     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
1520   }
1521 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1522   public static com.google.cloud.compute.v1.Reservation parseDelimitedFrom(
1523       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1524       throws java.io.IOException {
1525     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
1526         PARSER, input, extensionRegistry);
1527   }
1528 
parseFrom( com.google.protobuf.CodedInputStream input)1529   public static com.google.cloud.compute.v1.Reservation parseFrom(
1530       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
1531     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1532   }
1533 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1534   public static com.google.cloud.compute.v1.Reservation parseFrom(
1535       com.google.protobuf.CodedInputStream input,
1536       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1537       throws java.io.IOException {
1538     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1539         PARSER, input, extensionRegistry);
1540   }
1541 
1542   @java.lang.Override
newBuilderForType()1543   public Builder newBuilderForType() {
1544     return newBuilder();
1545   }
1546 
newBuilder()1547   public static Builder newBuilder() {
1548     return DEFAULT_INSTANCE.toBuilder();
1549   }
1550 
newBuilder(com.google.cloud.compute.v1.Reservation prototype)1551   public static Builder newBuilder(com.google.cloud.compute.v1.Reservation prototype) {
1552     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1553   }
1554 
1555   @java.lang.Override
toBuilder()1556   public Builder toBuilder() {
1557     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
1558   }
1559 
1560   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1561   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1562     Builder builder = new Builder(parent);
1563     return builder;
1564   }
1565   /**
1566    *
1567    *
1568    * <pre>
1569    * Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources.
1570    * </pre>
1571    *
1572    * Protobuf type {@code google.cloud.compute.v1.Reservation}
1573    */
1574   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
1575       implements
1576       // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.Reservation)
1577       com.google.cloud.compute.v1.ReservationOrBuilder {
getDescriptor()1578     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1579       return com.google.cloud.compute.v1.Compute
1580           .internal_static_google_cloud_compute_v1_Reservation_descriptor;
1581     }
1582 
1583     @SuppressWarnings({"rawtypes"})
internalGetMapField(int number)1584     protected com.google.protobuf.MapField internalGetMapField(int number) {
1585       switch (number) {
1586         case 22220385:
1587           return internalGetResourcePolicies();
1588         default:
1589           throw new RuntimeException("Invalid map field number: " + number);
1590       }
1591     }
1592 
1593     @SuppressWarnings({"rawtypes"})
internalGetMutableMapField(int number)1594     protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
1595       switch (number) {
1596         case 22220385:
1597           return internalGetMutableResourcePolicies();
1598         default:
1599           throw new RuntimeException("Invalid map field number: " + number);
1600       }
1601     }
1602 
1603     @java.lang.Override
1604     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()1605         internalGetFieldAccessorTable() {
1606       return com.google.cloud.compute.v1.Compute
1607           .internal_static_google_cloud_compute_v1_Reservation_fieldAccessorTable
1608           .ensureFieldAccessorsInitialized(
1609               com.google.cloud.compute.v1.Reservation.class,
1610               com.google.cloud.compute.v1.Reservation.Builder.class);
1611     }
1612 
1613     // Construct using com.google.cloud.compute.v1.Reservation.newBuilder()
Builder()1614     private Builder() {
1615       maybeForceBuilderInitialization();
1616     }
1617 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1618     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1619       super(parent);
1620       maybeForceBuilderInitialization();
1621     }
1622 
maybeForceBuilderInitialization()1623     private void maybeForceBuilderInitialization() {
1624       if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
1625         getResourceStatusFieldBuilder();
1626         getShareSettingsFieldBuilder();
1627         getSpecificReservationFieldBuilder();
1628       }
1629     }
1630 
1631     @java.lang.Override
clear()1632     public Builder clear() {
1633       super.clear();
1634       bitField0_ = 0;
1635       commitment_ = "";
1636       creationTimestamp_ = "";
1637       description_ = "";
1638       id_ = 0L;
1639       kind_ = "";
1640       name_ = "";
1641       internalGetMutableResourcePolicies().clear();
1642       resourceStatus_ = null;
1643       if (resourceStatusBuilder_ != null) {
1644         resourceStatusBuilder_.dispose();
1645         resourceStatusBuilder_ = null;
1646       }
1647       satisfiesPzs_ = false;
1648       selfLink_ = "";
1649       shareSettings_ = null;
1650       if (shareSettingsBuilder_ != null) {
1651         shareSettingsBuilder_.dispose();
1652         shareSettingsBuilder_ = null;
1653       }
1654       specificReservation_ = null;
1655       if (specificReservationBuilder_ != null) {
1656         specificReservationBuilder_.dispose();
1657         specificReservationBuilder_ = null;
1658       }
1659       specificReservationRequired_ = false;
1660       status_ = "";
1661       zone_ = "";
1662       return this;
1663     }
1664 
1665     @java.lang.Override
getDescriptorForType()1666     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
1667       return com.google.cloud.compute.v1.Compute
1668           .internal_static_google_cloud_compute_v1_Reservation_descriptor;
1669     }
1670 
1671     @java.lang.Override
getDefaultInstanceForType()1672     public com.google.cloud.compute.v1.Reservation getDefaultInstanceForType() {
1673       return com.google.cloud.compute.v1.Reservation.getDefaultInstance();
1674     }
1675 
1676     @java.lang.Override
build()1677     public com.google.cloud.compute.v1.Reservation build() {
1678       com.google.cloud.compute.v1.Reservation result = buildPartial();
1679       if (!result.isInitialized()) {
1680         throw newUninitializedMessageException(result);
1681       }
1682       return result;
1683     }
1684 
1685     @java.lang.Override
buildPartial()1686     public com.google.cloud.compute.v1.Reservation buildPartial() {
1687       com.google.cloud.compute.v1.Reservation result =
1688           new com.google.cloud.compute.v1.Reservation(this);
1689       if (bitField0_ != 0) {
1690         buildPartial0(result);
1691       }
1692       onBuilt();
1693       return result;
1694     }
1695 
buildPartial0(com.google.cloud.compute.v1.Reservation result)1696     private void buildPartial0(com.google.cloud.compute.v1.Reservation result) {
1697       int from_bitField0_ = bitField0_;
1698       int to_bitField0_ = 0;
1699       if (((from_bitField0_ & 0x00000001) != 0)) {
1700         result.commitment_ = commitment_;
1701         to_bitField0_ |= 0x00000001;
1702       }
1703       if (((from_bitField0_ & 0x00000002) != 0)) {
1704         result.creationTimestamp_ = creationTimestamp_;
1705         to_bitField0_ |= 0x00000002;
1706       }
1707       if (((from_bitField0_ & 0x00000004) != 0)) {
1708         result.description_ = description_;
1709         to_bitField0_ |= 0x00000004;
1710       }
1711       if (((from_bitField0_ & 0x00000008) != 0)) {
1712         result.id_ = id_;
1713         to_bitField0_ |= 0x00000008;
1714       }
1715       if (((from_bitField0_ & 0x00000010) != 0)) {
1716         result.kind_ = kind_;
1717         to_bitField0_ |= 0x00000010;
1718       }
1719       if (((from_bitField0_ & 0x00000020) != 0)) {
1720         result.name_ = name_;
1721         to_bitField0_ |= 0x00000020;
1722       }
1723       if (((from_bitField0_ & 0x00000040) != 0)) {
1724         result.resourcePolicies_ = internalGetResourcePolicies();
1725         result.resourcePolicies_.makeImmutable();
1726       }
1727       if (((from_bitField0_ & 0x00000080) != 0)) {
1728         result.resourceStatus_ =
1729             resourceStatusBuilder_ == null ? resourceStatus_ : resourceStatusBuilder_.build();
1730         to_bitField0_ |= 0x00000040;
1731       }
1732       if (((from_bitField0_ & 0x00000100) != 0)) {
1733         result.satisfiesPzs_ = satisfiesPzs_;
1734         to_bitField0_ |= 0x00000080;
1735       }
1736       if (((from_bitField0_ & 0x00000200) != 0)) {
1737         result.selfLink_ = selfLink_;
1738         to_bitField0_ |= 0x00000100;
1739       }
1740       if (((from_bitField0_ & 0x00000400) != 0)) {
1741         result.shareSettings_ =
1742             shareSettingsBuilder_ == null ? shareSettings_ : shareSettingsBuilder_.build();
1743         to_bitField0_ |= 0x00000200;
1744       }
1745       if (((from_bitField0_ & 0x00000800) != 0)) {
1746         result.specificReservation_ =
1747             specificReservationBuilder_ == null
1748                 ? specificReservation_
1749                 : specificReservationBuilder_.build();
1750         to_bitField0_ |= 0x00000400;
1751       }
1752       if (((from_bitField0_ & 0x00001000) != 0)) {
1753         result.specificReservationRequired_ = specificReservationRequired_;
1754         to_bitField0_ |= 0x00000800;
1755       }
1756       if (((from_bitField0_ & 0x00002000) != 0)) {
1757         result.status_ = status_;
1758         to_bitField0_ |= 0x00001000;
1759       }
1760       if (((from_bitField0_ & 0x00004000) != 0)) {
1761         result.zone_ = zone_;
1762         to_bitField0_ |= 0x00002000;
1763       }
1764       result.bitField0_ |= to_bitField0_;
1765     }
1766 
1767     @java.lang.Override
clone()1768     public Builder clone() {
1769       return super.clone();
1770     }
1771 
1772     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1773     public Builder setField(
1774         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1775       return super.setField(field, value);
1776     }
1777 
1778     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1779     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1780       return super.clearField(field);
1781     }
1782 
1783     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1784     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1785       return super.clearOneof(oneof);
1786     }
1787 
1788     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1789     public Builder setRepeatedField(
1790         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
1791       return super.setRepeatedField(field, index, value);
1792     }
1793 
1794     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1795     public Builder addRepeatedField(
1796         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1797       return super.addRepeatedField(field, value);
1798     }
1799 
1800     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1801     public Builder mergeFrom(com.google.protobuf.Message other) {
1802       if (other instanceof com.google.cloud.compute.v1.Reservation) {
1803         return mergeFrom((com.google.cloud.compute.v1.Reservation) other);
1804       } else {
1805         super.mergeFrom(other);
1806         return this;
1807       }
1808     }
1809 
mergeFrom(com.google.cloud.compute.v1.Reservation other)1810     public Builder mergeFrom(com.google.cloud.compute.v1.Reservation other) {
1811       if (other == com.google.cloud.compute.v1.Reservation.getDefaultInstance()) return this;
1812       if (other.hasCommitment()) {
1813         commitment_ = other.commitment_;
1814         bitField0_ |= 0x00000001;
1815         onChanged();
1816       }
1817       if (other.hasCreationTimestamp()) {
1818         creationTimestamp_ = other.creationTimestamp_;
1819         bitField0_ |= 0x00000002;
1820         onChanged();
1821       }
1822       if (other.hasDescription()) {
1823         description_ = other.description_;
1824         bitField0_ |= 0x00000004;
1825         onChanged();
1826       }
1827       if (other.hasId()) {
1828         setId(other.getId());
1829       }
1830       if (other.hasKind()) {
1831         kind_ = other.kind_;
1832         bitField0_ |= 0x00000010;
1833         onChanged();
1834       }
1835       if (other.hasName()) {
1836         name_ = other.name_;
1837         bitField0_ |= 0x00000020;
1838         onChanged();
1839       }
1840       internalGetMutableResourcePolicies().mergeFrom(other.internalGetResourcePolicies());
1841       bitField0_ |= 0x00000040;
1842       if (other.hasResourceStatus()) {
1843         mergeResourceStatus(other.getResourceStatus());
1844       }
1845       if (other.hasSatisfiesPzs()) {
1846         setSatisfiesPzs(other.getSatisfiesPzs());
1847       }
1848       if (other.hasSelfLink()) {
1849         selfLink_ = other.selfLink_;
1850         bitField0_ |= 0x00000200;
1851         onChanged();
1852       }
1853       if (other.hasShareSettings()) {
1854         mergeShareSettings(other.getShareSettings());
1855       }
1856       if (other.hasSpecificReservation()) {
1857         mergeSpecificReservation(other.getSpecificReservation());
1858       }
1859       if (other.hasSpecificReservationRequired()) {
1860         setSpecificReservationRequired(other.getSpecificReservationRequired());
1861       }
1862       if (other.hasStatus()) {
1863         status_ = other.status_;
1864         bitField0_ |= 0x00002000;
1865         onChanged();
1866       }
1867       if (other.hasZone()) {
1868         zone_ = other.zone_;
1869         bitField0_ |= 0x00004000;
1870         onChanged();
1871       }
1872       this.mergeUnknownFields(other.getUnknownFields());
1873       onChanged();
1874       return this;
1875     }
1876 
1877     @java.lang.Override
isInitialized()1878     public final boolean isInitialized() {
1879       return true;
1880     }
1881 
1882     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1883     public Builder mergeFrom(
1884         com.google.protobuf.CodedInputStream input,
1885         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1886         throws java.io.IOException {
1887       if (extensionRegistry == null) {
1888         throw new java.lang.NullPointerException();
1889       }
1890       try {
1891         boolean done = false;
1892         while (!done) {
1893           int tag = input.readTag();
1894           switch (tag) {
1895             case 0:
1896               done = true;
1897               break;
1898             case 26840:
1899               {
1900                 id_ = input.readUInt64();
1901                 bitField0_ |= 0x00000008;
1902                 break;
1903               } // case 26840
1904             case 26336418:
1905               {
1906                 kind_ = input.readStringRequireUtf8();
1907                 bitField0_ |= 0x00000010;
1908                 break;
1909               } // case 26336418
1910             case 26989658:
1911               {
1912                 name_ = input.readStringRequireUtf8();
1913                 bitField0_ |= 0x00000020;
1914                 break;
1915               } // case 26989658
1916             case 29957474:
1917               {
1918                 zone_ = input.readStringRequireUtf8();
1919                 bitField0_ |= 0x00004000;
1920                 break;
1921               } // case 29957474
1922             case 177763082:
1923               {
1924                 com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
1925                     resourcePolicies__ =
1926                         input.readMessage(
1927                             ResourcePoliciesDefaultEntryHolder.defaultEntry.getParserForType(),
1928                             extensionRegistry);
1929                 internalGetMutableResourcePolicies()
1930                     .getMutableMap()
1931                     .put(resourcePolicies__.getKey(), resourcePolicies__.getValue());
1932                 bitField0_ |= 0x00000040;
1933                 break;
1934               } // case 177763082
1935             case 244202930:
1936               {
1937                 creationTimestamp_ = input.readStringRequireUtf8();
1938                 bitField0_ |= 0x00000002;
1939                 break;
1940               } // case 244202930
1941             case 1450082194:
1942               {
1943                 status_ = input.readStringRequireUtf8();
1944                 bitField0_ |= 0x00002000;
1945                 break;
1946               } // case 1450082194
1947             case 1812405496:
1948               {
1949                 specificReservationRequired_ = input.readBool();
1950                 bitField0_ |= 0x00001000;
1951                 break;
1952               } // case 1812405496
1953             case 1995434522:
1954               {
1955                 input.readMessage(getResourceStatusFieldBuilder().getBuilder(), extensionRegistry);
1956                 bitField0_ |= 0x00000080;
1957                 break;
1958               } // case 1995434522
1959             case 2133345306:
1960               {
1961                 input.readMessage(getShareSettingsFieldBuilder().getBuilder(), extensionRegistry);
1962                 bitField0_ |= 0x00000400;
1963                 break;
1964               } // case 2133345306
1965             case -1055751686:
1966               {
1967                 input.readMessage(
1968                     getSpecificReservationFieldBuilder().getBuilder(), extensionRegistry);
1969                 bitField0_ |= 0x00000800;
1970                 break;
1971               } // case -1055751686
1972             case -911466526:
1973               {
1974                 description_ = input.readStringRequireUtf8();
1975                 bitField0_ |= 0x00000004;
1976                 break;
1977               } // case -911466526
1978             case -645248918:
1979               {
1980                 selfLink_ = input.readStringRequireUtf8();
1981                 bitField0_ |= 0x00000200;
1982                 break;
1983               } // case -645248918
1984             case -447253160:
1985               {
1986                 satisfiesPzs_ = input.readBool();
1987                 bitField0_ |= 0x00000100;
1988                 break;
1989               } // case -447253160
1990             case -437888854:
1991               {
1992                 commitment_ = input.readStringRequireUtf8();
1993                 bitField0_ |= 0x00000001;
1994                 break;
1995               } // case -437888854
1996             default:
1997               {
1998                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1999                   done = true; // was an endgroup tag
2000                 }
2001                 break;
2002               } // default:
2003           } // switch (tag)
2004         } // while (!done)
2005       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2006         throw e.unwrapIOException();
2007       } finally {
2008         onChanged();
2009       } // finally
2010       return this;
2011     }
2012 
2013     private int bitField0_;
2014 
2015     private java.lang.Object commitment_ = "";
2016     /**
2017      *
2018      *
2019      * <pre>
2020      * [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
2021      * </pre>
2022      *
2023      * <code>optional string commitment = 482134805;</code>
2024      *
2025      * @return Whether the commitment field is set.
2026      */
hasCommitment()2027     public boolean hasCommitment() {
2028       return ((bitField0_ & 0x00000001) != 0);
2029     }
2030     /**
2031      *
2032      *
2033      * <pre>
2034      * [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
2035      * </pre>
2036      *
2037      * <code>optional string commitment = 482134805;</code>
2038      *
2039      * @return The commitment.
2040      */
getCommitment()2041     public java.lang.String getCommitment() {
2042       java.lang.Object ref = commitment_;
2043       if (!(ref instanceof java.lang.String)) {
2044         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2045         java.lang.String s = bs.toStringUtf8();
2046         commitment_ = s;
2047         return s;
2048       } else {
2049         return (java.lang.String) ref;
2050       }
2051     }
2052     /**
2053      *
2054      *
2055      * <pre>
2056      * [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
2057      * </pre>
2058      *
2059      * <code>optional string commitment = 482134805;</code>
2060      *
2061      * @return The bytes for commitment.
2062      */
getCommitmentBytes()2063     public com.google.protobuf.ByteString getCommitmentBytes() {
2064       java.lang.Object ref = commitment_;
2065       if (ref instanceof String) {
2066         com.google.protobuf.ByteString b =
2067             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2068         commitment_ = b;
2069         return b;
2070       } else {
2071         return (com.google.protobuf.ByteString) ref;
2072       }
2073     }
2074     /**
2075      *
2076      *
2077      * <pre>
2078      * [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
2079      * </pre>
2080      *
2081      * <code>optional string commitment = 482134805;</code>
2082      *
2083      * @param value The commitment to set.
2084      * @return This builder for chaining.
2085      */
setCommitment(java.lang.String value)2086     public Builder setCommitment(java.lang.String value) {
2087       if (value == null) {
2088         throw new NullPointerException();
2089       }
2090       commitment_ = value;
2091       bitField0_ |= 0x00000001;
2092       onChanged();
2093       return this;
2094     }
2095     /**
2096      *
2097      *
2098      * <pre>
2099      * [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
2100      * </pre>
2101      *
2102      * <code>optional string commitment = 482134805;</code>
2103      *
2104      * @return This builder for chaining.
2105      */
clearCommitment()2106     public Builder clearCommitment() {
2107       commitment_ = getDefaultInstance().getCommitment();
2108       bitField0_ = (bitField0_ & ~0x00000001);
2109       onChanged();
2110       return this;
2111     }
2112     /**
2113      *
2114      *
2115      * <pre>
2116      * [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
2117      * </pre>
2118      *
2119      * <code>optional string commitment = 482134805;</code>
2120      *
2121      * @param value The bytes for commitment to set.
2122      * @return This builder for chaining.
2123      */
setCommitmentBytes(com.google.protobuf.ByteString value)2124     public Builder setCommitmentBytes(com.google.protobuf.ByteString value) {
2125       if (value == null) {
2126         throw new NullPointerException();
2127       }
2128       checkByteStringIsUtf8(value);
2129       commitment_ = value;
2130       bitField0_ |= 0x00000001;
2131       onChanged();
2132       return this;
2133     }
2134 
2135     private java.lang.Object creationTimestamp_ = "";
2136     /**
2137      *
2138      *
2139      * <pre>
2140      * [Output Only] Creation timestamp in RFC3339 text format.
2141      * </pre>
2142      *
2143      * <code>optional string creation_timestamp = 30525366;</code>
2144      *
2145      * @return Whether the creationTimestamp field is set.
2146      */
hasCreationTimestamp()2147     public boolean hasCreationTimestamp() {
2148       return ((bitField0_ & 0x00000002) != 0);
2149     }
2150     /**
2151      *
2152      *
2153      * <pre>
2154      * [Output Only] Creation timestamp in RFC3339 text format.
2155      * </pre>
2156      *
2157      * <code>optional string creation_timestamp = 30525366;</code>
2158      *
2159      * @return The creationTimestamp.
2160      */
getCreationTimestamp()2161     public java.lang.String getCreationTimestamp() {
2162       java.lang.Object ref = creationTimestamp_;
2163       if (!(ref instanceof java.lang.String)) {
2164         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2165         java.lang.String s = bs.toStringUtf8();
2166         creationTimestamp_ = s;
2167         return s;
2168       } else {
2169         return (java.lang.String) ref;
2170       }
2171     }
2172     /**
2173      *
2174      *
2175      * <pre>
2176      * [Output Only] Creation timestamp in RFC3339 text format.
2177      * </pre>
2178      *
2179      * <code>optional string creation_timestamp = 30525366;</code>
2180      *
2181      * @return The bytes for creationTimestamp.
2182      */
getCreationTimestampBytes()2183     public com.google.protobuf.ByteString getCreationTimestampBytes() {
2184       java.lang.Object ref = creationTimestamp_;
2185       if (ref instanceof String) {
2186         com.google.protobuf.ByteString b =
2187             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2188         creationTimestamp_ = b;
2189         return b;
2190       } else {
2191         return (com.google.protobuf.ByteString) ref;
2192       }
2193     }
2194     /**
2195      *
2196      *
2197      * <pre>
2198      * [Output Only] Creation timestamp in RFC3339 text format.
2199      * </pre>
2200      *
2201      * <code>optional string creation_timestamp = 30525366;</code>
2202      *
2203      * @param value The creationTimestamp to set.
2204      * @return This builder for chaining.
2205      */
setCreationTimestamp(java.lang.String value)2206     public Builder setCreationTimestamp(java.lang.String value) {
2207       if (value == null) {
2208         throw new NullPointerException();
2209       }
2210       creationTimestamp_ = value;
2211       bitField0_ |= 0x00000002;
2212       onChanged();
2213       return this;
2214     }
2215     /**
2216      *
2217      *
2218      * <pre>
2219      * [Output Only] Creation timestamp in RFC3339 text format.
2220      * </pre>
2221      *
2222      * <code>optional string creation_timestamp = 30525366;</code>
2223      *
2224      * @return This builder for chaining.
2225      */
clearCreationTimestamp()2226     public Builder clearCreationTimestamp() {
2227       creationTimestamp_ = getDefaultInstance().getCreationTimestamp();
2228       bitField0_ = (bitField0_ & ~0x00000002);
2229       onChanged();
2230       return this;
2231     }
2232     /**
2233      *
2234      *
2235      * <pre>
2236      * [Output Only] Creation timestamp in RFC3339 text format.
2237      * </pre>
2238      *
2239      * <code>optional string creation_timestamp = 30525366;</code>
2240      *
2241      * @param value The bytes for creationTimestamp to set.
2242      * @return This builder for chaining.
2243      */
setCreationTimestampBytes(com.google.protobuf.ByteString value)2244     public Builder setCreationTimestampBytes(com.google.protobuf.ByteString value) {
2245       if (value == null) {
2246         throw new NullPointerException();
2247       }
2248       checkByteStringIsUtf8(value);
2249       creationTimestamp_ = value;
2250       bitField0_ |= 0x00000002;
2251       onChanged();
2252       return this;
2253     }
2254 
2255     private java.lang.Object description_ = "";
2256     /**
2257      *
2258      *
2259      * <pre>
2260      * An optional description of this resource. Provide this property when you create the resource.
2261      * </pre>
2262      *
2263      * <code>optional string description = 422937596;</code>
2264      *
2265      * @return Whether the description field is set.
2266      */
hasDescription()2267     public boolean hasDescription() {
2268       return ((bitField0_ & 0x00000004) != 0);
2269     }
2270     /**
2271      *
2272      *
2273      * <pre>
2274      * An optional description of this resource. Provide this property when you create the resource.
2275      * </pre>
2276      *
2277      * <code>optional string description = 422937596;</code>
2278      *
2279      * @return The description.
2280      */
getDescription()2281     public java.lang.String getDescription() {
2282       java.lang.Object ref = description_;
2283       if (!(ref instanceof java.lang.String)) {
2284         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2285         java.lang.String s = bs.toStringUtf8();
2286         description_ = s;
2287         return s;
2288       } else {
2289         return (java.lang.String) ref;
2290       }
2291     }
2292     /**
2293      *
2294      *
2295      * <pre>
2296      * An optional description of this resource. Provide this property when you create the resource.
2297      * </pre>
2298      *
2299      * <code>optional string description = 422937596;</code>
2300      *
2301      * @return The bytes for description.
2302      */
getDescriptionBytes()2303     public com.google.protobuf.ByteString getDescriptionBytes() {
2304       java.lang.Object ref = description_;
2305       if (ref instanceof String) {
2306         com.google.protobuf.ByteString b =
2307             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2308         description_ = b;
2309         return b;
2310       } else {
2311         return (com.google.protobuf.ByteString) ref;
2312       }
2313     }
2314     /**
2315      *
2316      *
2317      * <pre>
2318      * An optional description of this resource. Provide this property when you create the resource.
2319      * </pre>
2320      *
2321      * <code>optional string description = 422937596;</code>
2322      *
2323      * @param value The description to set.
2324      * @return This builder for chaining.
2325      */
setDescription(java.lang.String value)2326     public Builder setDescription(java.lang.String value) {
2327       if (value == null) {
2328         throw new NullPointerException();
2329       }
2330       description_ = value;
2331       bitField0_ |= 0x00000004;
2332       onChanged();
2333       return this;
2334     }
2335     /**
2336      *
2337      *
2338      * <pre>
2339      * An optional description of this resource. Provide this property when you create the resource.
2340      * </pre>
2341      *
2342      * <code>optional string description = 422937596;</code>
2343      *
2344      * @return This builder for chaining.
2345      */
clearDescription()2346     public Builder clearDescription() {
2347       description_ = getDefaultInstance().getDescription();
2348       bitField0_ = (bitField0_ & ~0x00000004);
2349       onChanged();
2350       return this;
2351     }
2352     /**
2353      *
2354      *
2355      * <pre>
2356      * An optional description of this resource. Provide this property when you create the resource.
2357      * </pre>
2358      *
2359      * <code>optional string description = 422937596;</code>
2360      *
2361      * @param value The bytes for description to set.
2362      * @return This builder for chaining.
2363      */
setDescriptionBytes(com.google.protobuf.ByteString value)2364     public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
2365       if (value == null) {
2366         throw new NullPointerException();
2367       }
2368       checkByteStringIsUtf8(value);
2369       description_ = value;
2370       bitField0_ |= 0x00000004;
2371       onChanged();
2372       return this;
2373     }
2374 
2375     private long id_;
2376     /**
2377      *
2378      *
2379      * <pre>
2380      * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2381      * </pre>
2382      *
2383      * <code>optional uint64 id = 3355;</code>
2384      *
2385      * @return Whether the id field is set.
2386      */
2387     @java.lang.Override
hasId()2388     public boolean hasId() {
2389       return ((bitField0_ & 0x00000008) != 0);
2390     }
2391     /**
2392      *
2393      *
2394      * <pre>
2395      * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2396      * </pre>
2397      *
2398      * <code>optional uint64 id = 3355;</code>
2399      *
2400      * @return The id.
2401      */
2402     @java.lang.Override
getId()2403     public long getId() {
2404       return id_;
2405     }
2406     /**
2407      *
2408      *
2409      * <pre>
2410      * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2411      * </pre>
2412      *
2413      * <code>optional uint64 id = 3355;</code>
2414      *
2415      * @param value The id to set.
2416      * @return This builder for chaining.
2417      */
setId(long value)2418     public Builder setId(long value) {
2419 
2420       id_ = value;
2421       bitField0_ |= 0x00000008;
2422       onChanged();
2423       return this;
2424     }
2425     /**
2426      *
2427      *
2428      * <pre>
2429      * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2430      * </pre>
2431      *
2432      * <code>optional uint64 id = 3355;</code>
2433      *
2434      * @return This builder for chaining.
2435      */
clearId()2436     public Builder clearId() {
2437       bitField0_ = (bitField0_ & ~0x00000008);
2438       id_ = 0L;
2439       onChanged();
2440       return this;
2441     }
2442 
2443     private java.lang.Object kind_ = "";
2444     /**
2445      *
2446      *
2447      * <pre>
2448      * [Output Only] Type of the resource. Always compute#reservations for reservations.
2449      * </pre>
2450      *
2451      * <code>optional string kind = 3292052;</code>
2452      *
2453      * @return Whether the kind field is set.
2454      */
hasKind()2455     public boolean hasKind() {
2456       return ((bitField0_ & 0x00000010) != 0);
2457     }
2458     /**
2459      *
2460      *
2461      * <pre>
2462      * [Output Only] Type of the resource. Always compute#reservations for reservations.
2463      * </pre>
2464      *
2465      * <code>optional string kind = 3292052;</code>
2466      *
2467      * @return The kind.
2468      */
getKind()2469     public java.lang.String getKind() {
2470       java.lang.Object ref = kind_;
2471       if (!(ref instanceof java.lang.String)) {
2472         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2473         java.lang.String s = bs.toStringUtf8();
2474         kind_ = s;
2475         return s;
2476       } else {
2477         return (java.lang.String) ref;
2478       }
2479     }
2480     /**
2481      *
2482      *
2483      * <pre>
2484      * [Output Only] Type of the resource. Always compute#reservations for reservations.
2485      * </pre>
2486      *
2487      * <code>optional string kind = 3292052;</code>
2488      *
2489      * @return The bytes for kind.
2490      */
getKindBytes()2491     public com.google.protobuf.ByteString getKindBytes() {
2492       java.lang.Object ref = kind_;
2493       if (ref instanceof String) {
2494         com.google.protobuf.ByteString b =
2495             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2496         kind_ = b;
2497         return b;
2498       } else {
2499         return (com.google.protobuf.ByteString) ref;
2500       }
2501     }
2502     /**
2503      *
2504      *
2505      * <pre>
2506      * [Output Only] Type of the resource. Always compute#reservations for reservations.
2507      * </pre>
2508      *
2509      * <code>optional string kind = 3292052;</code>
2510      *
2511      * @param value The kind to set.
2512      * @return This builder for chaining.
2513      */
setKind(java.lang.String value)2514     public Builder setKind(java.lang.String value) {
2515       if (value == null) {
2516         throw new NullPointerException();
2517       }
2518       kind_ = value;
2519       bitField0_ |= 0x00000010;
2520       onChanged();
2521       return this;
2522     }
2523     /**
2524      *
2525      *
2526      * <pre>
2527      * [Output Only] Type of the resource. Always compute#reservations for reservations.
2528      * </pre>
2529      *
2530      * <code>optional string kind = 3292052;</code>
2531      *
2532      * @return This builder for chaining.
2533      */
clearKind()2534     public Builder clearKind() {
2535       kind_ = getDefaultInstance().getKind();
2536       bitField0_ = (bitField0_ & ~0x00000010);
2537       onChanged();
2538       return this;
2539     }
2540     /**
2541      *
2542      *
2543      * <pre>
2544      * [Output Only] Type of the resource. Always compute#reservations for reservations.
2545      * </pre>
2546      *
2547      * <code>optional string kind = 3292052;</code>
2548      *
2549      * @param value The bytes for kind to set.
2550      * @return This builder for chaining.
2551      */
setKindBytes(com.google.protobuf.ByteString value)2552     public Builder setKindBytes(com.google.protobuf.ByteString value) {
2553       if (value == null) {
2554         throw new NullPointerException();
2555       }
2556       checkByteStringIsUtf8(value);
2557       kind_ = value;
2558       bitField0_ |= 0x00000010;
2559       onChanged();
2560       return this;
2561     }
2562 
2563     private java.lang.Object name_ = "";
2564     /**
2565      *
2566      *
2567      * <pre>
2568      * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
2569      * </pre>
2570      *
2571      * <code>optional string name = 3373707;</code>
2572      *
2573      * @return Whether the name field is set.
2574      */
hasName()2575     public boolean hasName() {
2576       return ((bitField0_ & 0x00000020) != 0);
2577     }
2578     /**
2579      *
2580      *
2581      * <pre>
2582      * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
2583      * </pre>
2584      *
2585      * <code>optional string name = 3373707;</code>
2586      *
2587      * @return The name.
2588      */
getName()2589     public java.lang.String getName() {
2590       java.lang.Object ref = name_;
2591       if (!(ref instanceof java.lang.String)) {
2592         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2593         java.lang.String s = bs.toStringUtf8();
2594         name_ = s;
2595         return s;
2596       } else {
2597         return (java.lang.String) ref;
2598       }
2599     }
2600     /**
2601      *
2602      *
2603      * <pre>
2604      * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
2605      * </pre>
2606      *
2607      * <code>optional string name = 3373707;</code>
2608      *
2609      * @return The bytes for name.
2610      */
getNameBytes()2611     public com.google.protobuf.ByteString getNameBytes() {
2612       java.lang.Object ref = name_;
2613       if (ref instanceof String) {
2614         com.google.protobuf.ByteString b =
2615             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2616         name_ = b;
2617         return b;
2618       } else {
2619         return (com.google.protobuf.ByteString) ref;
2620       }
2621     }
2622     /**
2623      *
2624      *
2625      * <pre>
2626      * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
2627      * </pre>
2628      *
2629      * <code>optional string name = 3373707;</code>
2630      *
2631      * @param value The name to set.
2632      * @return This builder for chaining.
2633      */
setName(java.lang.String value)2634     public Builder setName(java.lang.String value) {
2635       if (value == null) {
2636         throw new NullPointerException();
2637       }
2638       name_ = value;
2639       bitField0_ |= 0x00000020;
2640       onChanged();
2641       return this;
2642     }
2643     /**
2644      *
2645      *
2646      * <pre>
2647      * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
2648      * </pre>
2649      *
2650      * <code>optional string name = 3373707;</code>
2651      *
2652      * @return This builder for chaining.
2653      */
clearName()2654     public Builder clearName() {
2655       name_ = getDefaultInstance().getName();
2656       bitField0_ = (bitField0_ & ~0x00000020);
2657       onChanged();
2658       return this;
2659     }
2660     /**
2661      *
2662      *
2663      * <pre>
2664      * The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
2665      * </pre>
2666      *
2667      * <code>optional string name = 3373707;</code>
2668      *
2669      * @param value The bytes for name to set.
2670      * @return This builder for chaining.
2671      */
setNameBytes(com.google.protobuf.ByteString value)2672     public Builder setNameBytes(com.google.protobuf.ByteString value) {
2673       if (value == null) {
2674         throw new NullPointerException();
2675       }
2676       checkByteStringIsUtf8(value);
2677       name_ = value;
2678       bitField0_ |= 0x00000020;
2679       onChanged();
2680       return this;
2681     }
2682 
2683     private com.google.protobuf.MapField<java.lang.String, java.lang.String> resourcePolicies_;
2684 
2685     private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetResourcePolicies()2686         internalGetResourcePolicies() {
2687       if (resourcePolicies_ == null) {
2688         return com.google.protobuf.MapField.emptyMapField(
2689             ResourcePoliciesDefaultEntryHolder.defaultEntry);
2690       }
2691       return resourcePolicies_;
2692     }
2693 
2694     private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetMutableResourcePolicies()2695         internalGetMutableResourcePolicies() {
2696       if (resourcePolicies_ == null) {
2697         resourcePolicies_ =
2698             com.google.protobuf.MapField.newMapField(
2699                 ResourcePoliciesDefaultEntryHolder.defaultEntry);
2700       }
2701       if (!resourcePolicies_.isMutable()) {
2702         resourcePolicies_ = resourcePolicies_.copy();
2703       }
2704       bitField0_ |= 0x00000040;
2705       onChanged();
2706       return resourcePolicies_;
2707     }
2708 
getResourcePoliciesCount()2709     public int getResourcePoliciesCount() {
2710       return internalGetResourcePolicies().getMap().size();
2711     }
2712     /**
2713      *
2714      *
2715      * <pre>
2716      * Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.
2717      * </pre>
2718      *
2719      * <code>map&lt;string, string&gt; resource_policies = 22220385;</code>
2720      */
2721     @java.lang.Override
containsResourcePolicies(java.lang.String key)2722     public boolean containsResourcePolicies(java.lang.String key) {
2723       if (key == null) {
2724         throw new NullPointerException("map key");
2725       }
2726       return internalGetResourcePolicies().getMap().containsKey(key);
2727     }
2728     /** Use {@link #getResourcePoliciesMap()} instead. */
2729     @java.lang.Override
2730     @java.lang.Deprecated
getResourcePolicies()2731     public java.util.Map<java.lang.String, java.lang.String> getResourcePolicies() {
2732       return getResourcePoliciesMap();
2733     }
2734     /**
2735      *
2736      *
2737      * <pre>
2738      * Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.
2739      * </pre>
2740      *
2741      * <code>map&lt;string, string&gt; resource_policies = 22220385;</code>
2742      */
2743     @java.lang.Override
getResourcePoliciesMap()2744     public java.util.Map<java.lang.String, java.lang.String> getResourcePoliciesMap() {
2745       return internalGetResourcePolicies().getMap();
2746     }
2747     /**
2748      *
2749      *
2750      * <pre>
2751      * Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.
2752      * </pre>
2753      *
2754      * <code>map&lt;string, string&gt; resource_policies = 22220385;</code>
2755      */
2756     @java.lang.Override
getResourcePoliciesOrDefault( java.lang.String key, java.lang.String defaultValue)2757     public /* nullable */ java.lang.String getResourcePoliciesOrDefault(
2758         java.lang.String key,
2759         /* nullable */
2760         java.lang.String defaultValue) {
2761       if (key == null) {
2762         throw new NullPointerException("map key");
2763       }
2764       java.util.Map<java.lang.String, java.lang.String> map =
2765           internalGetResourcePolicies().getMap();
2766       return map.containsKey(key) ? map.get(key) : defaultValue;
2767     }
2768     /**
2769      *
2770      *
2771      * <pre>
2772      * Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.
2773      * </pre>
2774      *
2775      * <code>map&lt;string, string&gt; resource_policies = 22220385;</code>
2776      */
2777     @java.lang.Override
getResourcePoliciesOrThrow(java.lang.String key)2778     public java.lang.String getResourcePoliciesOrThrow(java.lang.String key) {
2779       if (key == null) {
2780         throw new NullPointerException("map key");
2781       }
2782       java.util.Map<java.lang.String, java.lang.String> map =
2783           internalGetResourcePolicies().getMap();
2784       if (!map.containsKey(key)) {
2785         throw new java.lang.IllegalArgumentException();
2786       }
2787       return map.get(key);
2788     }
2789 
clearResourcePolicies()2790     public Builder clearResourcePolicies() {
2791       bitField0_ = (bitField0_ & ~0x00000040);
2792       internalGetMutableResourcePolicies().getMutableMap().clear();
2793       return this;
2794     }
2795     /**
2796      *
2797      *
2798      * <pre>
2799      * Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.
2800      * </pre>
2801      *
2802      * <code>map&lt;string, string&gt; resource_policies = 22220385;</code>
2803      */
removeResourcePolicies(java.lang.String key)2804     public Builder removeResourcePolicies(java.lang.String key) {
2805       if (key == null) {
2806         throw new NullPointerException("map key");
2807       }
2808       internalGetMutableResourcePolicies().getMutableMap().remove(key);
2809       return this;
2810     }
2811     /** Use alternate mutation accessors instead. */
2812     @java.lang.Deprecated
getMutableResourcePolicies()2813     public java.util.Map<java.lang.String, java.lang.String> getMutableResourcePolicies() {
2814       bitField0_ |= 0x00000040;
2815       return internalGetMutableResourcePolicies().getMutableMap();
2816     }
2817     /**
2818      *
2819      *
2820      * <pre>
2821      * Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.
2822      * </pre>
2823      *
2824      * <code>map&lt;string, string&gt; resource_policies = 22220385;</code>
2825      */
putResourcePolicies(java.lang.String key, java.lang.String value)2826     public Builder putResourcePolicies(java.lang.String key, java.lang.String value) {
2827       if (key == null) {
2828         throw new NullPointerException("map key");
2829       }
2830       if (value == null) {
2831         throw new NullPointerException("map value");
2832       }
2833       internalGetMutableResourcePolicies().getMutableMap().put(key, value);
2834       bitField0_ |= 0x00000040;
2835       return this;
2836     }
2837     /**
2838      *
2839      *
2840      * <pre>
2841      * Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.
2842      * </pre>
2843      *
2844      * <code>map&lt;string, string&gt; resource_policies = 22220385;</code>
2845      */
putAllResourcePolicies( java.util.Map<java.lang.String, java.lang.String> values)2846     public Builder putAllResourcePolicies(
2847         java.util.Map<java.lang.String, java.lang.String> values) {
2848       internalGetMutableResourcePolicies().getMutableMap().putAll(values);
2849       bitField0_ |= 0x00000040;
2850       return this;
2851     }
2852 
2853     private com.google.cloud.compute.v1.AllocationResourceStatus resourceStatus_;
2854     private com.google.protobuf.SingleFieldBuilderV3<
2855             com.google.cloud.compute.v1.AllocationResourceStatus,
2856             com.google.cloud.compute.v1.AllocationResourceStatus.Builder,
2857             com.google.cloud.compute.v1.AllocationResourceStatusOrBuilder>
2858         resourceStatusBuilder_;
2859     /**
2860      *
2861      *
2862      * <pre>
2863      * [Output Only] Status information for Reservation resource.
2864      * </pre>
2865      *
2866      * <code>optional .google.cloud.compute.v1.AllocationResourceStatus resource_status = 249429315;
2867      * </code>
2868      *
2869      * @return Whether the resourceStatus field is set.
2870      */
hasResourceStatus()2871     public boolean hasResourceStatus() {
2872       return ((bitField0_ & 0x00000080) != 0);
2873     }
2874     /**
2875      *
2876      *
2877      * <pre>
2878      * [Output Only] Status information for Reservation resource.
2879      * </pre>
2880      *
2881      * <code>optional .google.cloud.compute.v1.AllocationResourceStatus resource_status = 249429315;
2882      * </code>
2883      *
2884      * @return The resourceStatus.
2885      */
getResourceStatus()2886     public com.google.cloud.compute.v1.AllocationResourceStatus getResourceStatus() {
2887       if (resourceStatusBuilder_ == null) {
2888         return resourceStatus_ == null
2889             ? com.google.cloud.compute.v1.AllocationResourceStatus.getDefaultInstance()
2890             : resourceStatus_;
2891       } else {
2892         return resourceStatusBuilder_.getMessage();
2893       }
2894     }
2895     /**
2896      *
2897      *
2898      * <pre>
2899      * [Output Only] Status information for Reservation resource.
2900      * </pre>
2901      *
2902      * <code>optional .google.cloud.compute.v1.AllocationResourceStatus resource_status = 249429315;
2903      * </code>
2904      */
setResourceStatus(com.google.cloud.compute.v1.AllocationResourceStatus value)2905     public Builder setResourceStatus(com.google.cloud.compute.v1.AllocationResourceStatus value) {
2906       if (resourceStatusBuilder_ == null) {
2907         if (value == null) {
2908           throw new NullPointerException();
2909         }
2910         resourceStatus_ = value;
2911       } else {
2912         resourceStatusBuilder_.setMessage(value);
2913       }
2914       bitField0_ |= 0x00000080;
2915       onChanged();
2916       return this;
2917     }
2918     /**
2919      *
2920      *
2921      * <pre>
2922      * [Output Only] Status information for Reservation resource.
2923      * </pre>
2924      *
2925      * <code>optional .google.cloud.compute.v1.AllocationResourceStatus resource_status = 249429315;
2926      * </code>
2927      */
setResourceStatus( com.google.cloud.compute.v1.AllocationResourceStatus.Builder builderForValue)2928     public Builder setResourceStatus(
2929         com.google.cloud.compute.v1.AllocationResourceStatus.Builder builderForValue) {
2930       if (resourceStatusBuilder_ == null) {
2931         resourceStatus_ = builderForValue.build();
2932       } else {
2933         resourceStatusBuilder_.setMessage(builderForValue.build());
2934       }
2935       bitField0_ |= 0x00000080;
2936       onChanged();
2937       return this;
2938     }
2939     /**
2940      *
2941      *
2942      * <pre>
2943      * [Output Only] Status information for Reservation resource.
2944      * </pre>
2945      *
2946      * <code>optional .google.cloud.compute.v1.AllocationResourceStatus resource_status = 249429315;
2947      * </code>
2948      */
mergeResourceStatus(com.google.cloud.compute.v1.AllocationResourceStatus value)2949     public Builder mergeResourceStatus(com.google.cloud.compute.v1.AllocationResourceStatus value) {
2950       if (resourceStatusBuilder_ == null) {
2951         if (((bitField0_ & 0x00000080) != 0)
2952             && resourceStatus_ != null
2953             && resourceStatus_
2954                 != com.google.cloud.compute.v1.AllocationResourceStatus.getDefaultInstance()) {
2955           getResourceStatusBuilder().mergeFrom(value);
2956         } else {
2957           resourceStatus_ = value;
2958         }
2959       } else {
2960         resourceStatusBuilder_.mergeFrom(value);
2961       }
2962       bitField0_ |= 0x00000080;
2963       onChanged();
2964       return this;
2965     }
2966     /**
2967      *
2968      *
2969      * <pre>
2970      * [Output Only] Status information for Reservation resource.
2971      * </pre>
2972      *
2973      * <code>optional .google.cloud.compute.v1.AllocationResourceStatus resource_status = 249429315;
2974      * </code>
2975      */
clearResourceStatus()2976     public Builder clearResourceStatus() {
2977       bitField0_ = (bitField0_ & ~0x00000080);
2978       resourceStatus_ = null;
2979       if (resourceStatusBuilder_ != null) {
2980         resourceStatusBuilder_.dispose();
2981         resourceStatusBuilder_ = null;
2982       }
2983       onChanged();
2984       return this;
2985     }
2986     /**
2987      *
2988      *
2989      * <pre>
2990      * [Output Only] Status information for Reservation resource.
2991      * </pre>
2992      *
2993      * <code>optional .google.cloud.compute.v1.AllocationResourceStatus resource_status = 249429315;
2994      * </code>
2995      */
getResourceStatusBuilder()2996     public com.google.cloud.compute.v1.AllocationResourceStatus.Builder getResourceStatusBuilder() {
2997       bitField0_ |= 0x00000080;
2998       onChanged();
2999       return getResourceStatusFieldBuilder().getBuilder();
3000     }
3001     /**
3002      *
3003      *
3004      * <pre>
3005      * [Output Only] Status information for Reservation resource.
3006      * </pre>
3007      *
3008      * <code>optional .google.cloud.compute.v1.AllocationResourceStatus resource_status = 249429315;
3009      * </code>
3010      */
3011     public com.google.cloud.compute.v1.AllocationResourceStatusOrBuilder
getResourceStatusOrBuilder()3012         getResourceStatusOrBuilder() {
3013       if (resourceStatusBuilder_ != null) {
3014         return resourceStatusBuilder_.getMessageOrBuilder();
3015       } else {
3016         return resourceStatus_ == null
3017             ? com.google.cloud.compute.v1.AllocationResourceStatus.getDefaultInstance()
3018             : resourceStatus_;
3019       }
3020     }
3021     /**
3022      *
3023      *
3024      * <pre>
3025      * [Output Only] Status information for Reservation resource.
3026      * </pre>
3027      *
3028      * <code>optional .google.cloud.compute.v1.AllocationResourceStatus resource_status = 249429315;
3029      * </code>
3030      */
3031     private com.google.protobuf.SingleFieldBuilderV3<
3032             com.google.cloud.compute.v1.AllocationResourceStatus,
3033             com.google.cloud.compute.v1.AllocationResourceStatus.Builder,
3034             com.google.cloud.compute.v1.AllocationResourceStatusOrBuilder>
getResourceStatusFieldBuilder()3035         getResourceStatusFieldBuilder() {
3036       if (resourceStatusBuilder_ == null) {
3037         resourceStatusBuilder_ =
3038             new com.google.protobuf.SingleFieldBuilderV3<
3039                 com.google.cloud.compute.v1.AllocationResourceStatus,
3040                 com.google.cloud.compute.v1.AllocationResourceStatus.Builder,
3041                 com.google.cloud.compute.v1.AllocationResourceStatusOrBuilder>(
3042                 getResourceStatus(), getParentForChildren(), isClean());
3043         resourceStatus_ = null;
3044       }
3045       return resourceStatusBuilder_;
3046     }
3047 
3048     private boolean satisfiesPzs_;
3049     /**
3050      *
3051      *
3052      * <pre>
3053      * [Output Only] Reserved for future use.
3054      * </pre>
3055      *
3056      * <code>optional bool satisfies_pzs = 480964267;</code>
3057      *
3058      * @return Whether the satisfiesPzs field is set.
3059      */
3060     @java.lang.Override
hasSatisfiesPzs()3061     public boolean hasSatisfiesPzs() {
3062       return ((bitField0_ & 0x00000100) != 0);
3063     }
3064     /**
3065      *
3066      *
3067      * <pre>
3068      * [Output Only] Reserved for future use.
3069      * </pre>
3070      *
3071      * <code>optional bool satisfies_pzs = 480964267;</code>
3072      *
3073      * @return The satisfiesPzs.
3074      */
3075     @java.lang.Override
getSatisfiesPzs()3076     public boolean getSatisfiesPzs() {
3077       return satisfiesPzs_;
3078     }
3079     /**
3080      *
3081      *
3082      * <pre>
3083      * [Output Only] Reserved for future use.
3084      * </pre>
3085      *
3086      * <code>optional bool satisfies_pzs = 480964267;</code>
3087      *
3088      * @param value The satisfiesPzs to set.
3089      * @return This builder for chaining.
3090      */
setSatisfiesPzs(boolean value)3091     public Builder setSatisfiesPzs(boolean value) {
3092 
3093       satisfiesPzs_ = value;
3094       bitField0_ |= 0x00000100;
3095       onChanged();
3096       return this;
3097     }
3098     /**
3099      *
3100      *
3101      * <pre>
3102      * [Output Only] Reserved for future use.
3103      * </pre>
3104      *
3105      * <code>optional bool satisfies_pzs = 480964267;</code>
3106      *
3107      * @return This builder for chaining.
3108      */
clearSatisfiesPzs()3109     public Builder clearSatisfiesPzs() {
3110       bitField0_ = (bitField0_ & ~0x00000100);
3111       satisfiesPzs_ = false;
3112       onChanged();
3113       return this;
3114     }
3115 
3116     private java.lang.Object selfLink_ = "";
3117     /**
3118      *
3119      *
3120      * <pre>
3121      * [Output Only] Server-defined fully-qualified URL for this resource.
3122      * </pre>
3123      *
3124      * <code>optional string self_link = 456214797;</code>
3125      *
3126      * @return Whether the selfLink field is set.
3127      */
hasSelfLink()3128     public boolean hasSelfLink() {
3129       return ((bitField0_ & 0x00000200) != 0);
3130     }
3131     /**
3132      *
3133      *
3134      * <pre>
3135      * [Output Only] Server-defined fully-qualified URL for this resource.
3136      * </pre>
3137      *
3138      * <code>optional string self_link = 456214797;</code>
3139      *
3140      * @return The selfLink.
3141      */
getSelfLink()3142     public java.lang.String getSelfLink() {
3143       java.lang.Object ref = selfLink_;
3144       if (!(ref instanceof java.lang.String)) {
3145         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3146         java.lang.String s = bs.toStringUtf8();
3147         selfLink_ = s;
3148         return s;
3149       } else {
3150         return (java.lang.String) ref;
3151       }
3152     }
3153     /**
3154      *
3155      *
3156      * <pre>
3157      * [Output Only] Server-defined fully-qualified URL for this resource.
3158      * </pre>
3159      *
3160      * <code>optional string self_link = 456214797;</code>
3161      *
3162      * @return The bytes for selfLink.
3163      */
getSelfLinkBytes()3164     public com.google.protobuf.ByteString getSelfLinkBytes() {
3165       java.lang.Object ref = selfLink_;
3166       if (ref instanceof String) {
3167         com.google.protobuf.ByteString b =
3168             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3169         selfLink_ = b;
3170         return b;
3171       } else {
3172         return (com.google.protobuf.ByteString) ref;
3173       }
3174     }
3175     /**
3176      *
3177      *
3178      * <pre>
3179      * [Output Only] Server-defined fully-qualified URL for this resource.
3180      * </pre>
3181      *
3182      * <code>optional string self_link = 456214797;</code>
3183      *
3184      * @param value The selfLink to set.
3185      * @return This builder for chaining.
3186      */
setSelfLink(java.lang.String value)3187     public Builder setSelfLink(java.lang.String value) {
3188       if (value == null) {
3189         throw new NullPointerException();
3190       }
3191       selfLink_ = value;
3192       bitField0_ |= 0x00000200;
3193       onChanged();
3194       return this;
3195     }
3196     /**
3197      *
3198      *
3199      * <pre>
3200      * [Output Only] Server-defined fully-qualified URL for this resource.
3201      * </pre>
3202      *
3203      * <code>optional string self_link = 456214797;</code>
3204      *
3205      * @return This builder for chaining.
3206      */
clearSelfLink()3207     public Builder clearSelfLink() {
3208       selfLink_ = getDefaultInstance().getSelfLink();
3209       bitField0_ = (bitField0_ & ~0x00000200);
3210       onChanged();
3211       return this;
3212     }
3213     /**
3214      *
3215      *
3216      * <pre>
3217      * [Output Only] Server-defined fully-qualified URL for this resource.
3218      * </pre>
3219      *
3220      * <code>optional string self_link = 456214797;</code>
3221      *
3222      * @param value The bytes for selfLink to set.
3223      * @return This builder for chaining.
3224      */
setSelfLinkBytes(com.google.protobuf.ByteString value)3225     public Builder setSelfLinkBytes(com.google.protobuf.ByteString value) {
3226       if (value == null) {
3227         throw new NullPointerException();
3228       }
3229       checkByteStringIsUtf8(value);
3230       selfLink_ = value;
3231       bitField0_ |= 0x00000200;
3232       onChanged();
3233       return this;
3234     }
3235 
3236     private com.google.cloud.compute.v1.ShareSettings shareSettings_;
3237     private com.google.protobuf.SingleFieldBuilderV3<
3238             com.google.cloud.compute.v1.ShareSettings,
3239             com.google.cloud.compute.v1.ShareSettings.Builder,
3240             com.google.cloud.compute.v1.ShareSettingsOrBuilder>
3241         shareSettingsBuilder_;
3242     /**
3243      *
3244      *
3245      * <pre>
3246      * Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.
3247      * </pre>
3248      *
3249      * <code>optional .google.cloud.compute.v1.ShareSettings share_settings = 266668163;</code>
3250      *
3251      * @return Whether the shareSettings field is set.
3252      */
hasShareSettings()3253     public boolean hasShareSettings() {
3254       return ((bitField0_ & 0x00000400) != 0);
3255     }
3256     /**
3257      *
3258      *
3259      * <pre>
3260      * Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.
3261      * </pre>
3262      *
3263      * <code>optional .google.cloud.compute.v1.ShareSettings share_settings = 266668163;</code>
3264      *
3265      * @return The shareSettings.
3266      */
getShareSettings()3267     public com.google.cloud.compute.v1.ShareSettings getShareSettings() {
3268       if (shareSettingsBuilder_ == null) {
3269         return shareSettings_ == null
3270             ? com.google.cloud.compute.v1.ShareSettings.getDefaultInstance()
3271             : shareSettings_;
3272       } else {
3273         return shareSettingsBuilder_.getMessage();
3274       }
3275     }
3276     /**
3277      *
3278      *
3279      * <pre>
3280      * Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.
3281      * </pre>
3282      *
3283      * <code>optional .google.cloud.compute.v1.ShareSettings share_settings = 266668163;</code>
3284      */
setShareSettings(com.google.cloud.compute.v1.ShareSettings value)3285     public Builder setShareSettings(com.google.cloud.compute.v1.ShareSettings value) {
3286       if (shareSettingsBuilder_ == null) {
3287         if (value == null) {
3288           throw new NullPointerException();
3289         }
3290         shareSettings_ = value;
3291       } else {
3292         shareSettingsBuilder_.setMessage(value);
3293       }
3294       bitField0_ |= 0x00000400;
3295       onChanged();
3296       return this;
3297     }
3298     /**
3299      *
3300      *
3301      * <pre>
3302      * Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.
3303      * </pre>
3304      *
3305      * <code>optional .google.cloud.compute.v1.ShareSettings share_settings = 266668163;</code>
3306      */
setShareSettings( com.google.cloud.compute.v1.ShareSettings.Builder builderForValue)3307     public Builder setShareSettings(
3308         com.google.cloud.compute.v1.ShareSettings.Builder builderForValue) {
3309       if (shareSettingsBuilder_ == null) {
3310         shareSettings_ = builderForValue.build();
3311       } else {
3312         shareSettingsBuilder_.setMessage(builderForValue.build());
3313       }
3314       bitField0_ |= 0x00000400;
3315       onChanged();
3316       return this;
3317     }
3318     /**
3319      *
3320      *
3321      * <pre>
3322      * Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.
3323      * </pre>
3324      *
3325      * <code>optional .google.cloud.compute.v1.ShareSettings share_settings = 266668163;</code>
3326      */
mergeShareSettings(com.google.cloud.compute.v1.ShareSettings value)3327     public Builder mergeShareSettings(com.google.cloud.compute.v1.ShareSettings value) {
3328       if (shareSettingsBuilder_ == null) {
3329         if (((bitField0_ & 0x00000400) != 0)
3330             && shareSettings_ != null
3331             && shareSettings_ != com.google.cloud.compute.v1.ShareSettings.getDefaultInstance()) {
3332           getShareSettingsBuilder().mergeFrom(value);
3333         } else {
3334           shareSettings_ = value;
3335         }
3336       } else {
3337         shareSettingsBuilder_.mergeFrom(value);
3338       }
3339       bitField0_ |= 0x00000400;
3340       onChanged();
3341       return this;
3342     }
3343     /**
3344      *
3345      *
3346      * <pre>
3347      * Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.
3348      * </pre>
3349      *
3350      * <code>optional .google.cloud.compute.v1.ShareSettings share_settings = 266668163;</code>
3351      */
clearShareSettings()3352     public Builder clearShareSettings() {
3353       bitField0_ = (bitField0_ & ~0x00000400);
3354       shareSettings_ = null;
3355       if (shareSettingsBuilder_ != null) {
3356         shareSettingsBuilder_.dispose();
3357         shareSettingsBuilder_ = null;
3358       }
3359       onChanged();
3360       return this;
3361     }
3362     /**
3363      *
3364      *
3365      * <pre>
3366      * Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.
3367      * </pre>
3368      *
3369      * <code>optional .google.cloud.compute.v1.ShareSettings share_settings = 266668163;</code>
3370      */
getShareSettingsBuilder()3371     public com.google.cloud.compute.v1.ShareSettings.Builder getShareSettingsBuilder() {
3372       bitField0_ |= 0x00000400;
3373       onChanged();
3374       return getShareSettingsFieldBuilder().getBuilder();
3375     }
3376     /**
3377      *
3378      *
3379      * <pre>
3380      * Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.
3381      * </pre>
3382      *
3383      * <code>optional .google.cloud.compute.v1.ShareSettings share_settings = 266668163;</code>
3384      */
getShareSettingsOrBuilder()3385     public com.google.cloud.compute.v1.ShareSettingsOrBuilder getShareSettingsOrBuilder() {
3386       if (shareSettingsBuilder_ != null) {
3387         return shareSettingsBuilder_.getMessageOrBuilder();
3388       } else {
3389         return shareSettings_ == null
3390             ? com.google.cloud.compute.v1.ShareSettings.getDefaultInstance()
3391             : shareSettings_;
3392       }
3393     }
3394     /**
3395      *
3396      *
3397      * <pre>
3398      * Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.
3399      * </pre>
3400      *
3401      * <code>optional .google.cloud.compute.v1.ShareSettings share_settings = 266668163;</code>
3402      */
3403     private com.google.protobuf.SingleFieldBuilderV3<
3404             com.google.cloud.compute.v1.ShareSettings,
3405             com.google.cloud.compute.v1.ShareSettings.Builder,
3406             com.google.cloud.compute.v1.ShareSettingsOrBuilder>
getShareSettingsFieldBuilder()3407         getShareSettingsFieldBuilder() {
3408       if (shareSettingsBuilder_ == null) {
3409         shareSettingsBuilder_ =
3410             new com.google.protobuf.SingleFieldBuilderV3<
3411                 com.google.cloud.compute.v1.ShareSettings,
3412                 com.google.cloud.compute.v1.ShareSettings.Builder,
3413                 com.google.cloud.compute.v1.ShareSettingsOrBuilder>(
3414                 getShareSettings(), getParentForChildren(), isClean());
3415         shareSettings_ = null;
3416       }
3417       return shareSettingsBuilder_;
3418     }
3419 
3420     private com.google.cloud.compute.v1.AllocationSpecificSKUReservation specificReservation_;
3421     private com.google.protobuf.SingleFieldBuilderV3<
3422             com.google.cloud.compute.v1.AllocationSpecificSKUReservation,
3423             com.google.cloud.compute.v1.AllocationSpecificSKUReservation.Builder,
3424             com.google.cloud.compute.v1.AllocationSpecificSKUReservationOrBuilder>
3425         specificReservationBuilder_;
3426     /**
3427      *
3428      *
3429      * <pre>
3430      * Reservation for instances with specific machine shapes.
3431      * </pre>
3432      *
3433      * <code>
3434      * optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;
3435      * </code>
3436      *
3437      * @return Whether the specificReservation field is set.
3438      */
hasSpecificReservation()3439     public boolean hasSpecificReservation() {
3440       return ((bitField0_ & 0x00000800) != 0);
3441     }
3442     /**
3443      *
3444      *
3445      * <pre>
3446      * Reservation for instances with specific machine shapes.
3447      * </pre>
3448      *
3449      * <code>
3450      * optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;
3451      * </code>
3452      *
3453      * @return The specificReservation.
3454      */
getSpecificReservation()3455     public com.google.cloud.compute.v1.AllocationSpecificSKUReservation getSpecificReservation() {
3456       if (specificReservationBuilder_ == null) {
3457         return specificReservation_ == null
3458             ? com.google.cloud.compute.v1.AllocationSpecificSKUReservation.getDefaultInstance()
3459             : specificReservation_;
3460       } else {
3461         return specificReservationBuilder_.getMessage();
3462       }
3463     }
3464     /**
3465      *
3466      *
3467      * <pre>
3468      * Reservation for instances with specific machine shapes.
3469      * </pre>
3470      *
3471      * <code>
3472      * optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;
3473      * </code>
3474      */
setSpecificReservation( com.google.cloud.compute.v1.AllocationSpecificSKUReservation value)3475     public Builder setSpecificReservation(
3476         com.google.cloud.compute.v1.AllocationSpecificSKUReservation value) {
3477       if (specificReservationBuilder_ == null) {
3478         if (value == null) {
3479           throw new NullPointerException();
3480         }
3481         specificReservation_ = value;
3482       } else {
3483         specificReservationBuilder_.setMessage(value);
3484       }
3485       bitField0_ |= 0x00000800;
3486       onChanged();
3487       return this;
3488     }
3489     /**
3490      *
3491      *
3492      * <pre>
3493      * Reservation for instances with specific machine shapes.
3494      * </pre>
3495      *
3496      * <code>
3497      * optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;
3498      * </code>
3499      */
setSpecificReservation( com.google.cloud.compute.v1.AllocationSpecificSKUReservation.Builder builderForValue)3500     public Builder setSpecificReservation(
3501         com.google.cloud.compute.v1.AllocationSpecificSKUReservation.Builder builderForValue) {
3502       if (specificReservationBuilder_ == null) {
3503         specificReservation_ = builderForValue.build();
3504       } else {
3505         specificReservationBuilder_.setMessage(builderForValue.build());
3506       }
3507       bitField0_ |= 0x00000800;
3508       onChanged();
3509       return this;
3510     }
3511     /**
3512      *
3513      *
3514      * <pre>
3515      * Reservation for instances with specific machine shapes.
3516      * </pre>
3517      *
3518      * <code>
3519      * optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;
3520      * </code>
3521      */
mergeSpecificReservation( com.google.cloud.compute.v1.AllocationSpecificSKUReservation value)3522     public Builder mergeSpecificReservation(
3523         com.google.cloud.compute.v1.AllocationSpecificSKUReservation value) {
3524       if (specificReservationBuilder_ == null) {
3525         if (((bitField0_ & 0x00000800) != 0)
3526             && specificReservation_ != null
3527             && specificReservation_
3528                 != com.google.cloud.compute.v1.AllocationSpecificSKUReservation
3529                     .getDefaultInstance()) {
3530           getSpecificReservationBuilder().mergeFrom(value);
3531         } else {
3532           specificReservation_ = value;
3533         }
3534       } else {
3535         specificReservationBuilder_.mergeFrom(value);
3536       }
3537       bitField0_ |= 0x00000800;
3538       onChanged();
3539       return this;
3540     }
3541     /**
3542      *
3543      *
3544      * <pre>
3545      * Reservation for instances with specific machine shapes.
3546      * </pre>
3547      *
3548      * <code>
3549      * optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;
3550      * </code>
3551      */
clearSpecificReservation()3552     public Builder clearSpecificReservation() {
3553       bitField0_ = (bitField0_ & ~0x00000800);
3554       specificReservation_ = null;
3555       if (specificReservationBuilder_ != null) {
3556         specificReservationBuilder_.dispose();
3557         specificReservationBuilder_ = null;
3558       }
3559       onChanged();
3560       return this;
3561     }
3562     /**
3563      *
3564      *
3565      * <pre>
3566      * Reservation for instances with specific machine shapes.
3567      * </pre>
3568      *
3569      * <code>
3570      * optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;
3571      * </code>
3572      */
3573     public com.google.cloud.compute.v1.AllocationSpecificSKUReservation.Builder
getSpecificReservationBuilder()3574         getSpecificReservationBuilder() {
3575       bitField0_ |= 0x00000800;
3576       onChanged();
3577       return getSpecificReservationFieldBuilder().getBuilder();
3578     }
3579     /**
3580      *
3581      *
3582      * <pre>
3583      * Reservation for instances with specific machine shapes.
3584      * </pre>
3585      *
3586      * <code>
3587      * optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;
3588      * </code>
3589      */
3590     public com.google.cloud.compute.v1.AllocationSpecificSKUReservationOrBuilder
getSpecificReservationOrBuilder()3591         getSpecificReservationOrBuilder() {
3592       if (specificReservationBuilder_ != null) {
3593         return specificReservationBuilder_.getMessageOrBuilder();
3594       } else {
3595         return specificReservation_ == null
3596             ? com.google.cloud.compute.v1.AllocationSpecificSKUReservation.getDefaultInstance()
3597             : specificReservation_;
3598       }
3599     }
3600     /**
3601      *
3602      *
3603      * <pre>
3604      * Reservation for instances with specific machine shapes.
3605      * </pre>
3606      *
3607      * <code>
3608      * optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;
3609      * </code>
3610      */
3611     private com.google.protobuf.SingleFieldBuilderV3<
3612             com.google.cloud.compute.v1.AllocationSpecificSKUReservation,
3613             com.google.cloud.compute.v1.AllocationSpecificSKUReservation.Builder,
3614             com.google.cloud.compute.v1.AllocationSpecificSKUReservationOrBuilder>
getSpecificReservationFieldBuilder()3615         getSpecificReservationFieldBuilder() {
3616       if (specificReservationBuilder_ == null) {
3617         specificReservationBuilder_ =
3618             new com.google.protobuf.SingleFieldBuilderV3<
3619                 com.google.cloud.compute.v1.AllocationSpecificSKUReservation,
3620                 com.google.cloud.compute.v1.AllocationSpecificSKUReservation.Builder,
3621                 com.google.cloud.compute.v1.AllocationSpecificSKUReservationOrBuilder>(
3622                 getSpecificReservation(), getParentForChildren(), isClean());
3623         specificReservation_ = null;
3624       }
3625       return specificReservationBuilder_;
3626     }
3627 
3628     private boolean specificReservationRequired_;
3629     /**
3630      *
3631      *
3632      * <pre>
3633      * Indicates whether the reservation can be consumed by VMs with affinity for "any" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.
3634      * </pre>
3635      *
3636      * <code>optional bool specific_reservation_required = 226550687;</code>
3637      *
3638      * @return Whether the specificReservationRequired field is set.
3639      */
3640     @java.lang.Override
hasSpecificReservationRequired()3641     public boolean hasSpecificReservationRequired() {
3642       return ((bitField0_ & 0x00001000) != 0);
3643     }
3644     /**
3645      *
3646      *
3647      * <pre>
3648      * Indicates whether the reservation can be consumed by VMs with affinity for "any" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.
3649      * </pre>
3650      *
3651      * <code>optional bool specific_reservation_required = 226550687;</code>
3652      *
3653      * @return The specificReservationRequired.
3654      */
3655     @java.lang.Override
getSpecificReservationRequired()3656     public boolean getSpecificReservationRequired() {
3657       return specificReservationRequired_;
3658     }
3659     /**
3660      *
3661      *
3662      * <pre>
3663      * Indicates whether the reservation can be consumed by VMs with affinity for "any" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.
3664      * </pre>
3665      *
3666      * <code>optional bool specific_reservation_required = 226550687;</code>
3667      *
3668      * @param value The specificReservationRequired to set.
3669      * @return This builder for chaining.
3670      */
setSpecificReservationRequired(boolean value)3671     public Builder setSpecificReservationRequired(boolean value) {
3672 
3673       specificReservationRequired_ = value;
3674       bitField0_ |= 0x00001000;
3675       onChanged();
3676       return this;
3677     }
3678     /**
3679      *
3680      *
3681      * <pre>
3682      * Indicates whether the reservation can be consumed by VMs with affinity for "any" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.
3683      * </pre>
3684      *
3685      * <code>optional bool specific_reservation_required = 226550687;</code>
3686      *
3687      * @return This builder for chaining.
3688      */
clearSpecificReservationRequired()3689     public Builder clearSpecificReservationRequired() {
3690       bitField0_ = (bitField0_ & ~0x00001000);
3691       specificReservationRequired_ = false;
3692       onChanged();
3693       return this;
3694     }
3695 
3696     private java.lang.Object status_ = "";
3697     /**
3698      *
3699      *
3700      * <pre>
3701      * [Output Only] The status of the reservation.
3702      * Check the Status enum for the list of possible values.
3703      * </pre>
3704      *
3705      * <code>optional string status = 181260274;</code>
3706      *
3707      * @return Whether the status field is set.
3708      */
hasStatus()3709     public boolean hasStatus() {
3710       return ((bitField0_ & 0x00002000) != 0);
3711     }
3712     /**
3713      *
3714      *
3715      * <pre>
3716      * [Output Only] The status of the reservation.
3717      * Check the Status enum for the list of possible values.
3718      * </pre>
3719      *
3720      * <code>optional string status = 181260274;</code>
3721      *
3722      * @return The status.
3723      */
getStatus()3724     public java.lang.String getStatus() {
3725       java.lang.Object ref = status_;
3726       if (!(ref instanceof java.lang.String)) {
3727         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3728         java.lang.String s = bs.toStringUtf8();
3729         status_ = s;
3730         return s;
3731       } else {
3732         return (java.lang.String) ref;
3733       }
3734     }
3735     /**
3736      *
3737      *
3738      * <pre>
3739      * [Output Only] The status of the reservation.
3740      * Check the Status enum for the list of possible values.
3741      * </pre>
3742      *
3743      * <code>optional string status = 181260274;</code>
3744      *
3745      * @return The bytes for status.
3746      */
getStatusBytes()3747     public com.google.protobuf.ByteString getStatusBytes() {
3748       java.lang.Object ref = status_;
3749       if (ref instanceof String) {
3750         com.google.protobuf.ByteString b =
3751             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3752         status_ = b;
3753         return b;
3754       } else {
3755         return (com.google.protobuf.ByteString) ref;
3756       }
3757     }
3758     /**
3759      *
3760      *
3761      * <pre>
3762      * [Output Only] The status of the reservation.
3763      * Check the Status enum for the list of possible values.
3764      * </pre>
3765      *
3766      * <code>optional string status = 181260274;</code>
3767      *
3768      * @param value The status to set.
3769      * @return This builder for chaining.
3770      */
setStatus(java.lang.String value)3771     public Builder setStatus(java.lang.String value) {
3772       if (value == null) {
3773         throw new NullPointerException();
3774       }
3775       status_ = value;
3776       bitField0_ |= 0x00002000;
3777       onChanged();
3778       return this;
3779     }
3780     /**
3781      *
3782      *
3783      * <pre>
3784      * [Output Only] The status of the reservation.
3785      * Check the Status enum for the list of possible values.
3786      * </pre>
3787      *
3788      * <code>optional string status = 181260274;</code>
3789      *
3790      * @return This builder for chaining.
3791      */
clearStatus()3792     public Builder clearStatus() {
3793       status_ = getDefaultInstance().getStatus();
3794       bitField0_ = (bitField0_ & ~0x00002000);
3795       onChanged();
3796       return this;
3797     }
3798     /**
3799      *
3800      *
3801      * <pre>
3802      * [Output Only] The status of the reservation.
3803      * Check the Status enum for the list of possible values.
3804      * </pre>
3805      *
3806      * <code>optional string status = 181260274;</code>
3807      *
3808      * @param value The bytes for status to set.
3809      * @return This builder for chaining.
3810      */
setStatusBytes(com.google.protobuf.ByteString value)3811     public Builder setStatusBytes(com.google.protobuf.ByteString value) {
3812       if (value == null) {
3813         throw new NullPointerException();
3814       }
3815       checkByteStringIsUtf8(value);
3816       status_ = value;
3817       bitField0_ |= 0x00002000;
3818       onChanged();
3819       return this;
3820     }
3821 
3822     private java.lang.Object zone_ = "";
3823     /**
3824      *
3825      *
3826      * <pre>
3827      * Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
3828      * </pre>
3829      *
3830      * <code>optional string zone = 3744684;</code>
3831      *
3832      * @return Whether the zone field is set.
3833      */
hasZone()3834     public boolean hasZone() {
3835       return ((bitField0_ & 0x00004000) != 0);
3836     }
3837     /**
3838      *
3839      *
3840      * <pre>
3841      * Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
3842      * </pre>
3843      *
3844      * <code>optional string zone = 3744684;</code>
3845      *
3846      * @return The zone.
3847      */
getZone()3848     public java.lang.String getZone() {
3849       java.lang.Object ref = zone_;
3850       if (!(ref instanceof java.lang.String)) {
3851         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3852         java.lang.String s = bs.toStringUtf8();
3853         zone_ = s;
3854         return s;
3855       } else {
3856         return (java.lang.String) ref;
3857       }
3858     }
3859     /**
3860      *
3861      *
3862      * <pre>
3863      * Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
3864      * </pre>
3865      *
3866      * <code>optional string zone = 3744684;</code>
3867      *
3868      * @return The bytes for zone.
3869      */
getZoneBytes()3870     public com.google.protobuf.ByteString getZoneBytes() {
3871       java.lang.Object ref = zone_;
3872       if (ref instanceof String) {
3873         com.google.protobuf.ByteString b =
3874             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3875         zone_ = b;
3876         return b;
3877       } else {
3878         return (com.google.protobuf.ByteString) ref;
3879       }
3880     }
3881     /**
3882      *
3883      *
3884      * <pre>
3885      * Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
3886      * </pre>
3887      *
3888      * <code>optional string zone = 3744684;</code>
3889      *
3890      * @param value The zone to set.
3891      * @return This builder for chaining.
3892      */
setZone(java.lang.String value)3893     public Builder setZone(java.lang.String value) {
3894       if (value == null) {
3895         throw new NullPointerException();
3896       }
3897       zone_ = value;
3898       bitField0_ |= 0x00004000;
3899       onChanged();
3900       return this;
3901     }
3902     /**
3903      *
3904      *
3905      * <pre>
3906      * Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
3907      * </pre>
3908      *
3909      * <code>optional string zone = 3744684;</code>
3910      *
3911      * @return This builder for chaining.
3912      */
clearZone()3913     public Builder clearZone() {
3914       zone_ = getDefaultInstance().getZone();
3915       bitField0_ = (bitField0_ & ~0x00004000);
3916       onChanged();
3917       return this;
3918     }
3919     /**
3920      *
3921      *
3922      * <pre>
3923      * Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
3924      * </pre>
3925      *
3926      * <code>optional string zone = 3744684;</code>
3927      *
3928      * @param value The bytes for zone to set.
3929      * @return This builder for chaining.
3930      */
setZoneBytes(com.google.protobuf.ByteString value)3931     public Builder setZoneBytes(com.google.protobuf.ByteString value) {
3932       if (value == null) {
3933         throw new NullPointerException();
3934       }
3935       checkByteStringIsUtf8(value);
3936       zone_ = value;
3937       bitField0_ |= 0x00004000;
3938       onChanged();
3939       return this;
3940     }
3941 
3942     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)3943     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
3944       return super.setUnknownFields(unknownFields);
3945     }
3946 
3947     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3948     public final Builder mergeUnknownFields(
3949         final com.google.protobuf.UnknownFieldSet unknownFields) {
3950       return super.mergeUnknownFields(unknownFields);
3951     }
3952 
3953     // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.Reservation)
3954   }
3955 
3956   // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.Reservation)
3957   private static final com.google.cloud.compute.v1.Reservation DEFAULT_INSTANCE;
3958 
3959   static {
3960     DEFAULT_INSTANCE = new com.google.cloud.compute.v1.Reservation();
3961   }
3962 
getDefaultInstance()3963   public static com.google.cloud.compute.v1.Reservation getDefaultInstance() {
3964     return DEFAULT_INSTANCE;
3965   }
3966 
3967   private static final com.google.protobuf.Parser<Reservation> PARSER =
3968       new com.google.protobuf.AbstractParser<Reservation>() {
3969         @java.lang.Override
3970         public Reservation parsePartialFrom(
3971             com.google.protobuf.CodedInputStream input,
3972             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3973             throws com.google.protobuf.InvalidProtocolBufferException {
3974           Builder builder = newBuilder();
3975           try {
3976             builder.mergeFrom(input, extensionRegistry);
3977           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3978             throw e.setUnfinishedMessage(builder.buildPartial());
3979           } catch (com.google.protobuf.UninitializedMessageException e) {
3980             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
3981           } catch (java.io.IOException e) {
3982             throw new com.google.protobuf.InvalidProtocolBufferException(e)
3983                 .setUnfinishedMessage(builder.buildPartial());
3984           }
3985           return builder.buildPartial();
3986         }
3987       };
3988 
parser()3989   public static com.google.protobuf.Parser<Reservation> parser() {
3990     return PARSER;
3991   }
3992 
3993   @java.lang.Override
getParserForType()3994   public com.google.protobuf.Parser<Reservation> getParserForType() {
3995     return PARSER;
3996   }
3997 
3998   @java.lang.Override
getDefaultInstanceForType()3999   public com.google.cloud.compute.v1.Reservation getDefaultInstanceForType() {
4000     return DEFAULT_INSTANCE;
4001   }
4002 }
4003