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