• 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  * A specification of the parameters to use when creating the instance template from a source instance.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.compute.v1.SourceInstanceParams}
29  */
30 public final class SourceInstanceParams extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.SourceInstanceParams)
33     SourceInstanceParamsOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use SourceInstanceParams.newBuilder() to construct.
SourceInstanceParams(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private SourceInstanceParams(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
SourceInstanceParams()40   private SourceInstanceParams() {
41     diskConfigs_ = java.util.Collections.emptyList();
42   }
43 
44   @java.lang.Override
45   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)46   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
47     return new SourceInstanceParams();
48   }
49 
50   @java.lang.Override
getUnknownFields()51   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
52     return this.unknownFields;
53   }
54 
getDescriptor()55   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
56     return com.google.cloud.compute.v1.Compute
57         .internal_static_google_cloud_compute_v1_SourceInstanceParams_descriptor;
58   }
59 
60   @java.lang.Override
61   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()62       internalGetFieldAccessorTable() {
63     return com.google.cloud.compute.v1.Compute
64         .internal_static_google_cloud_compute_v1_SourceInstanceParams_fieldAccessorTable
65         .ensureFieldAccessorsInitialized(
66             com.google.cloud.compute.v1.SourceInstanceParams.class,
67             com.google.cloud.compute.v1.SourceInstanceParams.Builder.class);
68   }
69 
70   public static final int DISK_CONFIGS_FIELD_NUMBER = 235580623;
71 
72   @SuppressWarnings("serial")
73   private java.util.List<com.google.cloud.compute.v1.DiskInstantiationConfig> diskConfigs_;
74   /**
75    *
76    *
77    * <pre>
78    * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
79    * </pre>
80    *
81    * <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;
82    * </code>
83    */
84   @java.lang.Override
getDiskConfigsList()85   public java.util.List<com.google.cloud.compute.v1.DiskInstantiationConfig> getDiskConfigsList() {
86     return diskConfigs_;
87   }
88   /**
89    *
90    *
91    * <pre>
92    * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
93    * </pre>
94    *
95    * <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;
96    * </code>
97    */
98   @java.lang.Override
99   public java.util.List<? extends com.google.cloud.compute.v1.DiskInstantiationConfigOrBuilder>
getDiskConfigsOrBuilderList()100       getDiskConfigsOrBuilderList() {
101     return diskConfigs_;
102   }
103   /**
104    *
105    *
106    * <pre>
107    * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
108    * </pre>
109    *
110    * <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;
111    * </code>
112    */
113   @java.lang.Override
getDiskConfigsCount()114   public int getDiskConfigsCount() {
115     return diskConfigs_.size();
116   }
117   /**
118    *
119    *
120    * <pre>
121    * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
122    * </pre>
123    *
124    * <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;
125    * </code>
126    */
127   @java.lang.Override
getDiskConfigs(int index)128   public com.google.cloud.compute.v1.DiskInstantiationConfig getDiskConfigs(int index) {
129     return diskConfigs_.get(index);
130   }
131   /**
132    *
133    *
134    * <pre>
135    * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
136    * </pre>
137    *
138    * <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;
139    * </code>
140    */
141   @java.lang.Override
getDiskConfigsOrBuilder( int index)142   public com.google.cloud.compute.v1.DiskInstantiationConfigOrBuilder getDiskConfigsOrBuilder(
143       int index) {
144     return diskConfigs_.get(index);
145   }
146 
147   private byte memoizedIsInitialized = -1;
148 
149   @java.lang.Override
isInitialized()150   public final boolean isInitialized() {
151     byte isInitialized = memoizedIsInitialized;
152     if (isInitialized == 1) return true;
153     if (isInitialized == 0) return false;
154 
155     memoizedIsInitialized = 1;
156     return true;
157   }
158 
159   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)160   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
161     for (int i = 0; i < diskConfigs_.size(); i++) {
162       output.writeMessage(235580623, diskConfigs_.get(i));
163     }
164     getUnknownFields().writeTo(output);
165   }
166 
167   @java.lang.Override
getSerializedSize()168   public int getSerializedSize() {
169     int size = memoizedSize;
170     if (size != -1) return size;
171 
172     size = 0;
173     for (int i = 0; i < diskConfigs_.size(); i++) {
174       size +=
175           com.google.protobuf.CodedOutputStream.computeMessageSize(235580623, diskConfigs_.get(i));
176     }
177     size += getUnknownFields().getSerializedSize();
178     memoizedSize = size;
179     return size;
180   }
181 
182   @java.lang.Override
equals(final java.lang.Object obj)183   public boolean equals(final java.lang.Object obj) {
184     if (obj == this) {
185       return true;
186     }
187     if (!(obj instanceof com.google.cloud.compute.v1.SourceInstanceParams)) {
188       return super.equals(obj);
189     }
190     com.google.cloud.compute.v1.SourceInstanceParams other =
191         (com.google.cloud.compute.v1.SourceInstanceParams) obj;
192 
193     if (!getDiskConfigsList().equals(other.getDiskConfigsList())) return false;
194     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
195     return true;
196   }
197 
198   @java.lang.Override
hashCode()199   public int hashCode() {
200     if (memoizedHashCode != 0) {
201       return memoizedHashCode;
202     }
203     int hash = 41;
204     hash = (19 * hash) + getDescriptor().hashCode();
205     if (getDiskConfigsCount() > 0) {
206       hash = (37 * hash) + DISK_CONFIGS_FIELD_NUMBER;
207       hash = (53 * hash) + getDiskConfigsList().hashCode();
208     }
209     hash = (29 * hash) + getUnknownFields().hashCode();
210     memoizedHashCode = hash;
211     return hash;
212   }
213 
parseFrom(java.nio.ByteBuffer data)214   public static com.google.cloud.compute.v1.SourceInstanceParams parseFrom(java.nio.ByteBuffer data)
215       throws com.google.protobuf.InvalidProtocolBufferException {
216     return PARSER.parseFrom(data);
217   }
218 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)219   public static com.google.cloud.compute.v1.SourceInstanceParams parseFrom(
220       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
221       throws com.google.protobuf.InvalidProtocolBufferException {
222     return PARSER.parseFrom(data, extensionRegistry);
223   }
224 
parseFrom( com.google.protobuf.ByteString data)225   public static com.google.cloud.compute.v1.SourceInstanceParams parseFrom(
226       com.google.protobuf.ByteString data)
227       throws com.google.protobuf.InvalidProtocolBufferException {
228     return PARSER.parseFrom(data);
229   }
230 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)231   public static com.google.cloud.compute.v1.SourceInstanceParams parseFrom(
232       com.google.protobuf.ByteString data,
233       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
234       throws com.google.protobuf.InvalidProtocolBufferException {
235     return PARSER.parseFrom(data, extensionRegistry);
236   }
237 
parseFrom(byte[] data)238   public static com.google.cloud.compute.v1.SourceInstanceParams parseFrom(byte[] data)
239       throws com.google.protobuf.InvalidProtocolBufferException {
240     return PARSER.parseFrom(data);
241   }
242 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)243   public static com.google.cloud.compute.v1.SourceInstanceParams parseFrom(
244       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
245       throws com.google.protobuf.InvalidProtocolBufferException {
246     return PARSER.parseFrom(data, extensionRegistry);
247   }
248 
parseFrom( java.io.InputStream input)249   public static com.google.cloud.compute.v1.SourceInstanceParams parseFrom(
250       java.io.InputStream input) throws java.io.IOException {
251     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
252   }
253 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)254   public static com.google.cloud.compute.v1.SourceInstanceParams parseFrom(
255       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
256       throws java.io.IOException {
257     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
258         PARSER, input, extensionRegistry);
259   }
260 
parseDelimitedFrom( java.io.InputStream input)261   public static com.google.cloud.compute.v1.SourceInstanceParams parseDelimitedFrom(
262       java.io.InputStream input) throws java.io.IOException {
263     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
264   }
265 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)266   public static com.google.cloud.compute.v1.SourceInstanceParams parseDelimitedFrom(
267       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
268       throws java.io.IOException {
269     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
270         PARSER, input, extensionRegistry);
271   }
272 
parseFrom( com.google.protobuf.CodedInputStream input)273   public static com.google.cloud.compute.v1.SourceInstanceParams parseFrom(
274       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
275     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
276   }
277 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)278   public static com.google.cloud.compute.v1.SourceInstanceParams parseFrom(
279       com.google.protobuf.CodedInputStream input,
280       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
281       throws java.io.IOException {
282     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
283         PARSER, input, extensionRegistry);
284   }
285 
286   @java.lang.Override
newBuilderForType()287   public Builder newBuilderForType() {
288     return newBuilder();
289   }
290 
newBuilder()291   public static Builder newBuilder() {
292     return DEFAULT_INSTANCE.toBuilder();
293   }
294 
newBuilder(com.google.cloud.compute.v1.SourceInstanceParams prototype)295   public static Builder newBuilder(com.google.cloud.compute.v1.SourceInstanceParams prototype) {
296     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
297   }
298 
299   @java.lang.Override
toBuilder()300   public Builder toBuilder() {
301     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
302   }
303 
304   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)305   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
306     Builder builder = new Builder(parent);
307     return builder;
308   }
309   /**
310    *
311    *
312    * <pre>
313    * A specification of the parameters to use when creating the instance template from a source instance.
314    * </pre>
315    *
316    * Protobuf type {@code google.cloud.compute.v1.SourceInstanceParams}
317    */
318   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
319       implements
320       // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.SourceInstanceParams)
321       com.google.cloud.compute.v1.SourceInstanceParamsOrBuilder {
getDescriptor()322     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
323       return com.google.cloud.compute.v1.Compute
324           .internal_static_google_cloud_compute_v1_SourceInstanceParams_descriptor;
325     }
326 
327     @java.lang.Override
328     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()329         internalGetFieldAccessorTable() {
330       return com.google.cloud.compute.v1.Compute
331           .internal_static_google_cloud_compute_v1_SourceInstanceParams_fieldAccessorTable
332           .ensureFieldAccessorsInitialized(
333               com.google.cloud.compute.v1.SourceInstanceParams.class,
334               com.google.cloud.compute.v1.SourceInstanceParams.Builder.class);
335     }
336 
337     // Construct using com.google.cloud.compute.v1.SourceInstanceParams.newBuilder()
Builder()338     private Builder() {}
339 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)340     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
341       super(parent);
342     }
343 
344     @java.lang.Override
clear()345     public Builder clear() {
346       super.clear();
347       bitField0_ = 0;
348       if (diskConfigsBuilder_ == null) {
349         diskConfigs_ = java.util.Collections.emptyList();
350       } else {
351         diskConfigs_ = null;
352         diskConfigsBuilder_.clear();
353       }
354       bitField0_ = (bitField0_ & ~0x00000001);
355       return this;
356     }
357 
358     @java.lang.Override
getDescriptorForType()359     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
360       return com.google.cloud.compute.v1.Compute
361           .internal_static_google_cloud_compute_v1_SourceInstanceParams_descriptor;
362     }
363 
364     @java.lang.Override
getDefaultInstanceForType()365     public com.google.cloud.compute.v1.SourceInstanceParams getDefaultInstanceForType() {
366       return com.google.cloud.compute.v1.SourceInstanceParams.getDefaultInstance();
367     }
368 
369     @java.lang.Override
build()370     public com.google.cloud.compute.v1.SourceInstanceParams build() {
371       com.google.cloud.compute.v1.SourceInstanceParams result = buildPartial();
372       if (!result.isInitialized()) {
373         throw newUninitializedMessageException(result);
374       }
375       return result;
376     }
377 
378     @java.lang.Override
buildPartial()379     public com.google.cloud.compute.v1.SourceInstanceParams buildPartial() {
380       com.google.cloud.compute.v1.SourceInstanceParams result =
381           new com.google.cloud.compute.v1.SourceInstanceParams(this);
382       buildPartialRepeatedFields(result);
383       if (bitField0_ != 0) {
384         buildPartial0(result);
385       }
386       onBuilt();
387       return result;
388     }
389 
buildPartialRepeatedFields( com.google.cloud.compute.v1.SourceInstanceParams result)390     private void buildPartialRepeatedFields(
391         com.google.cloud.compute.v1.SourceInstanceParams result) {
392       if (diskConfigsBuilder_ == null) {
393         if (((bitField0_ & 0x00000001) != 0)) {
394           diskConfigs_ = java.util.Collections.unmodifiableList(diskConfigs_);
395           bitField0_ = (bitField0_ & ~0x00000001);
396         }
397         result.diskConfigs_ = diskConfigs_;
398       } else {
399         result.diskConfigs_ = diskConfigsBuilder_.build();
400       }
401     }
402 
buildPartial0(com.google.cloud.compute.v1.SourceInstanceParams result)403     private void buildPartial0(com.google.cloud.compute.v1.SourceInstanceParams result) {
404       int from_bitField0_ = bitField0_;
405     }
406 
407     @java.lang.Override
clone()408     public Builder clone() {
409       return super.clone();
410     }
411 
412     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)413     public Builder setField(
414         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
415       return super.setField(field, value);
416     }
417 
418     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)419     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
420       return super.clearField(field);
421     }
422 
423     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)424     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
425       return super.clearOneof(oneof);
426     }
427 
428     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)429     public Builder setRepeatedField(
430         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
431       return super.setRepeatedField(field, index, value);
432     }
433 
434     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)435     public Builder addRepeatedField(
436         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
437       return super.addRepeatedField(field, value);
438     }
439 
440     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)441     public Builder mergeFrom(com.google.protobuf.Message other) {
442       if (other instanceof com.google.cloud.compute.v1.SourceInstanceParams) {
443         return mergeFrom((com.google.cloud.compute.v1.SourceInstanceParams) other);
444       } else {
445         super.mergeFrom(other);
446         return this;
447       }
448     }
449 
mergeFrom(com.google.cloud.compute.v1.SourceInstanceParams other)450     public Builder mergeFrom(com.google.cloud.compute.v1.SourceInstanceParams other) {
451       if (other == com.google.cloud.compute.v1.SourceInstanceParams.getDefaultInstance())
452         return this;
453       if (diskConfigsBuilder_ == null) {
454         if (!other.diskConfigs_.isEmpty()) {
455           if (diskConfigs_.isEmpty()) {
456             diskConfigs_ = other.diskConfigs_;
457             bitField0_ = (bitField0_ & ~0x00000001);
458           } else {
459             ensureDiskConfigsIsMutable();
460             diskConfigs_.addAll(other.diskConfigs_);
461           }
462           onChanged();
463         }
464       } else {
465         if (!other.diskConfigs_.isEmpty()) {
466           if (diskConfigsBuilder_.isEmpty()) {
467             diskConfigsBuilder_.dispose();
468             diskConfigsBuilder_ = null;
469             diskConfigs_ = other.diskConfigs_;
470             bitField0_ = (bitField0_ & ~0x00000001);
471             diskConfigsBuilder_ =
472                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
473                     ? getDiskConfigsFieldBuilder()
474                     : null;
475           } else {
476             diskConfigsBuilder_.addAllMessages(other.diskConfigs_);
477           }
478         }
479       }
480       this.mergeUnknownFields(other.getUnknownFields());
481       onChanged();
482       return this;
483     }
484 
485     @java.lang.Override
isInitialized()486     public final boolean isInitialized() {
487       return true;
488     }
489 
490     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)491     public Builder mergeFrom(
492         com.google.protobuf.CodedInputStream input,
493         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
494         throws java.io.IOException {
495       if (extensionRegistry == null) {
496         throw new java.lang.NullPointerException();
497       }
498       try {
499         boolean done = false;
500         while (!done) {
501           int tag = input.readTag();
502           switch (tag) {
503             case 0:
504               done = true;
505               break;
506             case 1884644986:
507               {
508                 com.google.cloud.compute.v1.DiskInstantiationConfig m =
509                     input.readMessage(
510                         com.google.cloud.compute.v1.DiskInstantiationConfig.parser(),
511                         extensionRegistry);
512                 if (diskConfigsBuilder_ == null) {
513                   ensureDiskConfigsIsMutable();
514                   diskConfigs_.add(m);
515                 } else {
516                   diskConfigsBuilder_.addMessage(m);
517                 }
518                 break;
519               } // case 1884644986
520             default:
521               {
522                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
523                   done = true; // was an endgroup tag
524                 }
525                 break;
526               } // default:
527           } // switch (tag)
528         } // while (!done)
529       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
530         throw e.unwrapIOException();
531       } finally {
532         onChanged();
533       } // finally
534       return this;
535     }
536 
537     private int bitField0_;
538 
539     private java.util.List<com.google.cloud.compute.v1.DiskInstantiationConfig> diskConfigs_ =
540         java.util.Collections.emptyList();
541 
ensureDiskConfigsIsMutable()542     private void ensureDiskConfigsIsMutable() {
543       if (!((bitField0_ & 0x00000001) != 0)) {
544         diskConfigs_ =
545             new java.util.ArrayList<com.google.cloud.compute.v1.DiskInstantiationConfig>(
546                 diskConfigs_);
547         bitField0_ |= 0x00000001;
548       }
549     }
550 
551     private com.google.protobuf.RepeatedFieldBuilderV3<
552             com.google.cloud.compute.v1.DiskInstantiationConfig,
553             com.google.cloud.compute.v1.DiskInstantiationConfig.Builder,
554             com.google.cloud.compute.v1.DiskInstantiationConfigOrBuilder>
555         diskConfigsBuilder_;
556 
557     /**
558      *
559      *
560      * <pre>
561      * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
562      * </pre>
563      *
564      * <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;
565      * </code>
566      */
567     public java.util.List<com.google.cloud.compute.v1.DiskInstantiationConfig>
getDiskConfigsList()568         getDiskConfigsList() {
569       if (diskConfigsBuilder_ == null) {
570         return java.util.Collections.unmodifiableList(diskConfigs_);
571       } else {
572         return diskConfigsBuilder_.getMessageList();
573       }
574     }
575     /**
576      *
577      *
578      * <pre>
579      * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
580      * </pre>
581      *
582      * <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;
583      * </code>
584      */
getDiskConfigsCount()585     public int getDiskConfigsCount() {
586       if (diskConfigsBuilder_ == null) {
587         return diskConfigs_.size();
588       } else {
589         return diskConfigsBuilder_.getCount();
590       }
591     }
592     /**
593      *
594      *
595      * <pre>
596      * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
597      * </pre>
598      *
599      * <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;
600      * </code>
601      */
getDiskConfigs(int index)602     public com.google.cloud.compute.v1.DiskInstantiationConfig getDiskConfigs(int index) {
603       if (diskConfigsBuilder_ == null) {
604         return diskConfigs_.get(index);
605       } else {
606         return diskConfigsBuilder_.getMessage(index);
607       }
608     }
609     /**
610      *
611      *
612      * <pre>
613      * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
614      * </pre>
615      *
616      * <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;
617      * </code>
618      */
setDiskConfigs( int index, com.google.cloud.compute.v1.DiskInstantiationConfig value)619     public Builder setDiskConfigs(
620         int index, com.google.cloud.compute.v1.DiskInstantiationConfig value) {
621       if (diskConfigsBuilder_ == null) {
622         if (value == null) {
623           throw new NullPointerException();
624         }
625         ensureDiskConfigsIsMutable();
626         diskConfigs_.set(index, value);
627         onChanged();
628       } else {
629         diskConfigsBuilder_.setMessage(index, value);
630       }
631       return this;
632     }
633     /**
634      *
635      *
636      * <pre>
637      * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
638      * </pre>
639      *
640      * <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;
641      * </code>
642      */
setDiskConfigs( int index, com.google.cloud.compute.v1.DiskInstantiationConfig.Builder builderForValue)643     public Builder setDiskConfigs(
644         int index, com.google.cloud.compute.v1.DiskInstantiationConfig.Builder builderForValue) {
645       if (diskConfigsBuilder_ == null) {
646         ensureDiskConfigsIsMutable();
647         diskConfigs_.set(index, builderForValue.build());
648         onChanged();
649       } else {
650         diskConfigsBuilder_.setMessage(index, builderForValue.build());
651       }
652       return this;
653     }
654     /**
655      *
656      *
657      * <pre>
658      * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
659      * </pre>
660      *
661      * <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;
662      * </code>
663      */
addDiskConfigs(com.google.cloud.compute.v1.DiskInstantiationConfig value)664     public Builder addDiskConfigs(com.google.cloud.compute.v1.DiskInstantiationConfig value) {
665       if (diskConfigsBuilder_ == null) {
666         if (value == null) {
667           throw new NullPointerException();
668         }
669         ensureDiskConfigsIsMutable();
670         diskConfigs_.add(value);
671         onChanged();
672       } else {
673         diskConfigsBuilder_.addMessage(value);
674       }
675       return this;
676     }
677     /**
678      *
679      *
680      * <pre>
681      * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
682      * </pre>
683      *
684      * <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;
685      * </code>
686      */
addDiskConfigs( int index, com.google.cloud.compute.v1.DiskInstantiationConfig value)687     public Builder addDiskConfigs(
688         int index, com.google.cloud.compute.v1.DiskInstantiationConfig value) {
689       if (diskConfigsBuilder_ == null) {
690         if (value == null) {
691           throw new NullPointerException();
692         }
693         ensureDiskConfigsIsMutable();
694         diskConfigs_.add(index, value);
695         onChanged();
696       } else {
697         diskConfigsBuilder_.addMessage(index, value);
698       }
699       return this;
700     }
701     /**
702      *
703      *
704      * <pre>
705      * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
706      * </pre>
707      *
708      * <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;
709      * </code>
710      */
addDiskConfigs( com.google.cloud.compute.v1.DiskInstantiationConfig.Builder builderForValue)711     public Builder addDiskConfigs(
712         com.google.cloud.compute.v1.DiskInstantiationConfig.Builder builderForValue) {
713       if (diskConfigsBuilder_ == null) {
714         ensureDiskConfigsIsMutable();
715         diskConfigs_.add(builderForValue.build());
716         onChanged();
717       } else {
718         diskConfigsBuilder_.addMessage(builderForValue.build());
719       }
720       return this;
721     }
722     /**
723      *
724      *
725      * <pre>
726      * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
727      * </pre>
728      *
729      * <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;
730      * </code>
731      */
addDiskConfigs( int index, com.google.cloud.compute.v1.DiskInstantiationConfig.Builder builderForValue)732     public Builder addDiskConfigs(
733         int index, com.google.cloud.compute.v1.DiskInstantiationConfig.Builder builderForValue) {
734       if (diskConfigsBuilder_ == null) {
735         ensureDiskConfigsIsMutable();
736         diskConfigs_.add(index, builderForValue.build());
737         onChanged();
738       } else {
739         diskConfigsBuilder_.addMessage(index, builderForValue.build());
740       }
741       return this;
742     }
743     /**
744      *
745      *
746      * <pre>
747      * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
748      * </pre>
749      *
750      * <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;
751      * </code>
752      */
addAllDiskConfigs( java.lang.Iterable<? extends com.google.cloud.compute.v1.DiskInstantiationConfig> values)753     public Builder addAllDiskConfigs(
754         java.lang.Iterable<? extends com.google.cloud.compute.v1.DiskInstantiationConfig> values) {
755       if (diskConfigsBuilder_ == null) {
756         ensureDiskConfigsIsMutable();
757         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, diskConfigs_);
758         onChanged();
759       } else {
760         diskConfigsBuilder_.addAllMessages(values);
761       }
762       return this;
763     }
764     /**
765      *
766      *
767      * <pre>
768      * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
769      * </pre>
770      *
771      * <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;
772      * </code>
773      */
clearDiskConfigs()774     public Builder clearDiskConfigs() {
775       if (diskConfigsBuilder_ == null) {
776         diskConfigs_ = java.util.Collections.emptyList();
777         bitField0_ = (bitField0_ & ~0x00000001);
778         onChanged();
779       } else {
780         diskConfigsBuilder_.clear();
781       }
782       return this;
783     }
784     /**
785      *
786      *
787      * <pre>
788      * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
789      * </pre>
790      *
791      * <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;
792      * </code>
793      */
removeDiskConfigs(int index)794     public Builder removeDiskConfigs(int index) {
795       if (diskConfigsBuilder_ == null) {
796         ensureDiskConfigsIsMutable();
797         diskConfigs_.remove(index);
798         onChanged();
799       } else {
800         diskConfigsBuilder_.remove(index);
801       }
802       return this;
803     }
804     /**
805      *
806      *
807      * <pre>
808      * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
809      * </pre>
810      *
811      * <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;
812      * </code>
813      */
getDiskConfigsBuilder( int index)814     public com.google.cloud.compute.v1.DiskInstantiationConfig.Builder getDiskConfigsBuilder(
815         int index) {
816       return getDiskConfigsFieldBuilder().getBuilder(index);
817     }
818     /**
819      *
820      *
821      * <pre>
822      * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
823      * </pre>
824      *
825      * <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;
826      * </code>
827      */
getDiskConfigsOrBuilder( int index)828     public com.google.cloud.compute.v1.DiskInstantiationConfigOrBuilder getDiskConfigsOrBuilder(
829         int index) {
830       if (diskConfigsBuilder_ == null) {
831         return diskConfigs_.get(index);
832       } else {
833         return diskConfigsBuilder_.getMessageOrBuilder(index);
834       }
835     }
836     /**
837      *
838      *
839      * <pre>
840      * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
841      * </pre>
842      *
843      * <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;
844      * </code>
845      */
846     public java.util.List<? extends com.google.cloud.compute.v1.DiskInstantiationConfigOrBuilder>
getDiskConfigsOrBuilderList()847         getDiskConfigsOrBuilderList() {
848       if (diskConfigsBuilder_ != null) {
849         return diskConfigsBuilder_.getMessageOrBuilderList();
850       } else {
851         return java.util.Collections.unmodifiableList(diskConfigs_);
852       }
853     }
854     /**
855      *
856      *
857      * <pre>
858      * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
859      * </pre>
860      *
861      * <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;
862      * </code>
863      */
addDiskConfigsBuilder()864     public com.google.cloud.compute.v1.DiskInstantiationConfig.Builder addDiskConfigsBuilder() {
865       return getDiskConfigsFieldBuilder()
866           .addBuilder(com.google.cloud.compute.v1.DiskInstantiationConfig.getDefaultInstance());
867     }
868     /**
869      *
870      *
871      * <pre>
872      * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
873      * </pre>
874      *
875      * <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;
876      * </code>
877      */
addDiskConfigsBuilder( int index)878     public com.google.cloud.compute.v1.DiskInstantiationConfig.Builder addDiskConfigsBuilder(
879         int index) {
880       return getDiskConfigsFieldBuilder()
881           .addBuilder(
882               index, com.google.cloud.compute.v1.DiskInstantiationConfig.getDefaultInstance());
883     }
884     /**
885      *
886      *
887      * <pre>
888      * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
889      * </pre>
890      *
891      * <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;
892      * </code>
893      */
894     public java.util.List<com.google.cloud.compute.v1.DiskInstantiationConfig.Builder>
getDiskConfigsBuilderList()895         getDiskConfigsBuilderList() {
896       return getDiskConfigsFieldBuilder().getBuilderList();
897     }
898 
899     private com.google.protobuf.RepeatedFieldBuilderV3<
900             com.google.cloud.compute.v1.DiskInstantiationConfig,
901             com.google.cloud.compute.v1.DiskInstantiationConfig.Builder,
902             com.google.cloud.compute.v1.DiskInstantiationConfigOrBuilder>
getDiskConfigsFieldBuilder()903         getDiskConfigsFieldBuilder() {
904       if (diskConfigsBuilder_ == null) {
905         diskConfigsBuilder_ =
906             new com.google.protobuf.RepeatedFieldBuilderV3<
907                 com.google.cloud.compute.v1.DiskInstantiationConfig,
908                 com.google.cloud.compute.v1.DiskInstantiationConfig.Builder,
909                 com.google.cloud.compute.v1.DiskInstantiationConfigOrBuilder>(
910                 diskConfigs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
911         diskConfigs_ = null;
912       }
913       return diskConfigsBuilder_;
914     }
915 
916     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)917     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
918       return super.setUnknownFields(unknownFields);
919     }
920 
921     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)922     public final Builder mergeUnknownFields(
923         final com.google.protobuf.UnknownFieldSet unknownFields) {
924       return super.mergeUnknownFields(unknownFields);
925     }
926 
927     // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.SourceInstanceParams)
928   }
929 
930   // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.SourceInstanceParams)
931   private static final com.google.cloud.compute.v1.SourceInstanceParams DEFAULT_INSTANCE;
932 
933   static {
934     DEFAULT_INSTANCE = new com.google.cloud.compute.v1.SourceInstanceParams();
935   }
936 
getDefaultInstance()937   public static com.google.cloud.compute.v1.SourceInstanceParams getDefaultInstance() {
938     return DEFAULT_INSTANCE;
939   }
940 
941   private static final com.google.protobuf.Parser<SourceInstanceParams> PARSER =
942       new com.google.protobuf.AbstractParser<SourceInstanceParams>() {
943         @java.lang.Override
944         public SourceInstanceParams parsePartialFrom(
945             com.google.protobuf.CodedInputStream input,
946             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
947             throws com.google.protobuf.InvalidProtocolBufferException {
948           Builder builder = newBuilder();
949           try {
950             builder.mergeFrom(input, extensionRegistry);
951           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
952             throw e.setUnfinishedMessage(builder.buildPartial());
953           } catch (com.google.protobuf.UninitializedMessageException e) {
954             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
955           } catch (java.io.IOException e) {
956             throw new com.google.protobuf.InvalidProtocolBufferException(e)
957                 .setUnfinishedMessage(builder.buildPartial());
958           }
959           return builder.buildPartial();
960         }
961       };
962 
parser()963   public static com.google.protobuf.Parser<SourceInstanceParams> parser() {
964     return PARSER;
965   }
966 
967   @java.lang.Override
getParserForType()968   public com.google.protobuf.Parser<SourceInstanceParams> getParserForType() {
969     return PARSER;
970   }
971 
972   @java.lang.Override
getDefaultInstanceForType()973   public com.google.cloud.compute.v1.SourceInstanceParams getDefaultInstanceForType() {
974     return DEFAULT_INSTANCE;
975   }
976 }
977