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