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