• 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  * Metadata
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.compute.v1.Items}
29  */
30 public final class Items extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.Items)
33     ItemsOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use Items.newBuilder() to construct.
Items(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private Items(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
Items()40   private Items() {
41     key_ = "";
42     value_ = "";
43   }
44 
45   @java.lang.Override
46   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)47   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
48     return new Items();
49   }
50 
51   @java.lang.Override
getUnknownFields()52   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
53     return this.unknownFields;
54   }
55 
getDescriptor()56   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
57     return com.google.cloud.compute.v1.Compute
58         .internal_static_google_cloud_compute_v1_Items_descriptor;
59   }
60 
61   @java.lang.Override
62   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()63       internalGetFieldAccessorTable() {
64     return com.google.cloud.compute.v1.Compute
65         .internal_static_google_cloud_compute_v1_Items_fieldAccessorTable
66         .ensureFieldAccessorsInitialized(
67             com.google.cloud.compute.v1.Items.class,
68             com.google.cloud.compute.v1.Items.Builder.class);
69   }
70 
71   private int bitField0_;
72   public static final int KEY_FIELD_NUMBER = 106079;
73 
74   @SuppressWarnings("serial")
75   private volatile java.lang.Object key_ = "";
76   /**
77    *
78    *
79    * <pre>
80    * Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
81    * </pre>
82    *
83    * <code>optional string key = 106079;</code>
84    *
85    * @return Whether the key field is set.
86    */
87   @java.lang.Override
hasKey()88   public boolean hasKey() {
89     return ((bitField0_ & 0x00000001) != 0);
90   }
91   /**
92    *
93    *
94    * <pre>
95    * Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
96    * </pre>
97    *
98    * <code>optional string key = 106079;</code>
99    *
100    * @return The key.
101    */
102   @java.lang.Override
getKey()103   public java.lang.String getKey() {
104     java.lang.Object ref = key_;
105     if (ref instanceof java.lang.String) {
106       return (java.lang.String) ref;
107     } else {
108       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
109       java.lang.String s = bs.toStringUtf8();
110       key_ = s;
111       return s;
112     }
113   }
114   /**
115    *
116    *
117    * <pre>
118    * Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
119    * </pre>
120    *
121    * <code>optional string key = 106079;</code>
122    *
123    * @return The bytes for key.
124    */
125   @java.lang.Override
getKeyBytes()126   public com.google.protobuf.ByteString getKeyBytes() {
127     java.lang.Object ref = key_;
128     if (ref instanceof java.lang.String) {
129       com.google.protobuf.ByteString b =
130           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
131       key_ = b;
132       return b;
133     } else {
134       return (com.google.protobuf.ByteString) ref;
135     }
136   }
137 
138   public static final int VALUE_FIELD_NUMBER = 111972721;
139 
140   @SuppressWarnings("serial")
141   private volatile java.lang.Object value_ = "";
142   /**
143    *
144    *
145    * <pre>
146    * Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
147    * </pre>
148    *
149    * <code>optional string value = 111972721;</code>
150    *
151    * @return Whether the value field is set.
152    */
153   @java.lang.Override
hasValue()154   public boolean hasValue() {
155     return ((bitField0_ & 0x00000002) != 0);
156   }
157   /**
158    *
159    *
160    * <pre>
161    * Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
162    * </pre>
163    *
164    * <code>optional string value = 111972721;</code>
165    *
166    * @return The value.
167    */
168   @java.lang.Override
getValue()169   public java.lang.String getValue() {
170     java.lang.Object ref = value_;
171     if (ref instanceof java.lang.String) {
172       return (java.lang.String) ref;
173     } else {
174       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
175       java.lang.String s = bs.toStringUtf8();
176       value_ = s;
177       return s;
178     }
179   }
180   /**
181    *
182    *
183    * <pre>
184    * Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
185    * </pre>
186    *
187    * <code>optional string value = 111972721;</code>
188    *
189    * @return The bytes for value.
190    */
191   @java.lang.Override
getValueBytes()192   public com.google.protobuf.ByteString getValueBytes() {
193     java.lang.Object ref = value_;
194     if (ref instanceof java.lang.String) {
195       com.google.protobuf.ByteString b =
196           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
197       value_ = b;
198       return b;
199     } else {
200       return (com.google.protobuf.ByteString) ref;
201     }
202   }
203 
204   private byte memoizedIsInitialized = -1;
205 
206   @java.lang.Override
isInitialized()207   public final boolean isInitialized() {
208     byte isInitialized = memoizedIsInitialized;
209     if (isInitialized == 1) return true;
210     if (isInitialized == 0) return false;
211 
212     memoizedIsInitialized = 1;
213     return true;
214   }
215 
216   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)217   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
218     if (((bitField0_ & 0x00000001) != 0)) {
219       com.google.protobuf.GeneratedMessageV3.writeString(output, 106079, key_);
220     }
221     if (((bitField0_ & 0x00000002) != 0)) {
222       com.google.protobuf.GeneratedMessageV3.writeString(output, 111972721, value_);
223     }
224     getUnknownFields().writeTo(output);
225   }
226 
227   @java.lang.Override
getSerializedSize()228   public int getSerializedSize() {
229     int size = memoizedSize;
230     if (size != -1) return size;
231 
232     size = 0;
233     if (((bitField0_ & 0x00000001) != 0)) {
234       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(106079, key_);
235     }
236     if (((bitField0_ & 0x00000002) != 0)) {
237       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(111972721, value_);
238     }
239     size += getUnknownFields().getSerializedSize();
240     memoizedSize = size;
241     return size;
242   }
243 
244   @java.lang.Override
equals(final java.lang.Object obj)245   public boolean equals(final java.lang.Object obj) {
246     if (obj == this) {
247       return true;
248     }
249     if (!(obj instanceof com.google.cloud.compute.v1.Items)) {
250       return super.equals(obj);
251     }
252     com.google.cloud.compute.v1.Items other = (com.google.cloud.compute.v1.Items) obj;
253 
254     if (hasKey() != other.hasKey()) return false;
255     if (hasKey()) {
256       if (!getKey().equals(other.getKey())) return false;
257     }
258     if (hasValue() != other.hasValue()) return false;
259     if (hasValue()) {
260       if (!getValue().equals(other.getValue())) return false;
261     }
262     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
263     return true;
264   }
265 
266   @java.lang.Override
hashCode()267   public int hashCode() {
268     if (memoizedHashCode != 0) {
269       return memoizedHashCode;
270     }
271     int hash = 41;
272     hash = (19 * hash) + getDescriptor().hashCode();
273     if (hasKey()) {
274       hash = (37 * hash) + KEY_FIELD_NUMBER;
275       hash = (53 * hash) + getKey().hashCode();
276     }
277     if (hasValue()) {
278       hash = (37 * hash) + VALUE_FIELD_NUMBER;
279       hash = (53 * hash) + getValue().hashCode();
280     }
281     hash = (29 * hash) + getUnknownFields().hashCode();
282     memoizedHashCode = hash;
283     return hash;
284   }
285 
parseFrom(java.nio.ByteBuffer data)286   public static com.google.cloud.compute.v1.Items parseFrom(java.nio.ByteBuffer data)
287       throws com.google.protobuf.InvalidProtocolBufferException {
288     return PARSER.parseFrom(data);
289   }
290 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)291   public static com.google.cloud.compute.v1.Items parseFrom(
292       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
293       throws com.google.protobuf.InvalidProtocolBufferException {
294     return PARSER.parseFrom(data, extensionRegistry);
295   }
296 
parseFrom(com.google.protobuf.ByteString data)297   public static com.google.cloud.compute.v1.Items parseFrom(com.google.protobuf.ByteString data)
298       throws com.google.protobuf.InvalidProtocolBufferException {
299     return PARSER.parseFrom(data);
300   }
301 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)302   public static com.google.cloud.compute.v1.Items parseFrom(
303       com.google.protobuf.ByteString data,
304       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
305       throws com.google.protobuf.InvalidProtocolBufferException {
306     return PARSER.parseFrom(data, extensionRegistry);
307   }
308 
parseFrom(byte[] data)309   public static com.google.cloud.compute.v1.Items parseFrom(byte[] data)
310       throws com.google.protobuf.InvalidProtocolBufferException {
311     return PARSER.parseFrom(data);
312   }
313 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)314   public static com.google.cloud.compute.v1.Items parseFrom(
315       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
316       throws com.google.protobuf.InvalidProtocolBufferException {
317     return PARSER.parseFrom(data, extensionRegistry);
318   }
319 
parseFrom(java.io.InputStream input)320   public static com.google.cloud.compute.v1.Items parseFrom(java.io.InputStream input)
321       throws java.io.IOException {
322     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
323   }
324 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)325   public static com.google.cloud.compute.v1.Items parseFrom(
326       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
327       throws java.io.IOException {
328     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
329         PARSER, input, extensionRegistry);
330   }
331 
parseDelimitedFrom(java.io.InputStream input)332   public static com.google.cloud.compute.v1.Items parseDelimitedFrom(java.io.InputStream input)
333       throws java.io.IOException {
334     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
335   }
336 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)337   public static com.google.cloud.compute.v1.Items parseDelimitedFrom(
338       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
339       throws java.io.IOException {
340     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
341         PARSER, input, extensionRegistry);
342   }
343 
parseFrom( com.google.protobuf.CodedInputStream input)344   public static com.google.cloud.compute.v1.Items parseFrom(
345       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
346     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
347   }
348 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)349   public static com.google.cloud.compute.v1.Items parseFrom(
350       com.google.protobuf.CodedInputStream input,
351       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
352       throws java.io.IOException {
353     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
354         PARSER, input, extensionRegistry);
355   }
356 
357   @java.lang.Override
newBuilderForType()358   public Builder newBuilderForType() {
359     return newBuilder();
360   }
361 
newBuilder()362   public static Builder newBuilder() {
363     return DEFAULT_INSTANCE.toBuilder();
364   }
365 
newBuilder(com.google.cloud.compute.v1.Items prototype)366   public static Builder newBuilder(com.google.cloud.compute.v1.Items prototype) {
367     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
368   }
369 
370   @java.lang.Override
toBuilder()371   public Builder toBuilder() {
372     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
373   }
374 
375   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)376   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
377     Builder builder = new Builder(parent);
378     return builder;
379   }
380   /**
381    *
382    *
383    * <pre>
384    * Metadata
385    * </pre>
386    *
387    * Protobuf type {@code google.cloud.compute.v1.Items}
388    */
389   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
390       implements
391       // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.Items)
392       com.google.cloud.compute.v1.ItemsOrBuilder {
getDescriptor()393     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
394       return com.google.cloud.compute.v1.Compute
395           .internal_static_google_cloud_compute_v1_Items_descriptor;
396     }
397 
398     @java.lang.Override
399     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()400         internalGetFieldAccessorTable() {
401       return com.google.cloud.compute.v1.Compute
402           .internal_static_google_cloud_compute_v1_Items_fieldAccessorTable
403           .ensureFieldAccessorsInitialized(
404               com.google.cloud.compute.v1.Items.class,
405               com.google.cloud.compute.v1.Items.Builder.class);
406     }
407 
408     // Construct using com.google.cloud.compute.v1.Items.newBuilder()
Builder()409     private Builder() {}
410 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)411     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
412       super(parent);
413     }
414 
415     @java.lang.Override
clear()416     public Builder clear() {
417       super.clear();
418       bitField0_ = 0;
419       key_ = "";
420       value_ = "";
421       return this;
422     }
423 
424     @java.lang.Override
getDescriptorForType()425     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
426       return com.google.cloud.compute.v1.Compute
427           .internal_static_google_cloud_compute_v1_Items_descriptor;
428     }
429 
430     @java.lang.Override
getDefaultInstanceForType()431     public com.google.cloud.compute.v1.Items getDefaultInstanceForType() {
432       return com.google.cloud.compute.v1.Items.getDefaultInstance();
433     }
434 
435     @java.lang.Override
build()436     public com.google.cloud.compute.v1.Items build() {
437       com.google.cloud.compute.v1.Items result = buildPartial();
438       if (!result.isInitialized()) {
439         throw newUninitializedMessageException(result);
440       }
441       return result;
442     }
443 
444     @java.lang.Override
buildPartial()445     public com.google.cloud.compute.v1.Items buildPartial() {
446       com.google.cloud.compute.v1.Items result = new com.google.cloud.compute.v1.Items(this);
447       if (bitField0_ != 0) {
448         buildPartial0(result);
449       }
450       onBuilt();
451       return result;
452     }
453 
buildPartial0(com.google.cloud.compute.v1.Items result)454     private void buildPartial0(com.google.cloud.compute.v1.Items result) {
455       int from_bitField0_ = bitField0_;
456       int to_bitField0_ = 0;
457       if (((from_bitField0_ & 0x00000001) != 0)) {
458         result.key_ = key_;
459         to_bitField0_ |= 0x00000001;
460       }
461       if (((from_bitField0_ & 0x00000002) != 0)) {
462         result.value_ = value_;
463         to_bitField0_ |= 0x00000002;
464       }
465       result.bitField0_ |= to_bitField0_;
466     }
467 
468     @java.lang.Override
clone()469     public Builder clone() {
470       return super.clone();
471     }
472 
473     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)474     public Builder setField(
475         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
476       return super.setField(field, value);
477     }
478 
479     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)480     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
481       return super.clearField(field);
482     }
483 
484     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)485     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
486       return super.clearOneof(oneof);
487     }
488 
489     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)490     public Builder setRepeatedField(
491         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
492       return super.setRepeatedField(field, index, value);
493     }
494 
495     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)496     public Builder addRepeatedField(
497         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
498       return super.addRepeatedField(field, value);
499     }
500 
501     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)502     public Builder mergeFrom(com.google.protobuf.Message other) {
503       if (other instanceof com.google.cloud.compute.v1.Items) {
504         return mergeFrom((com.google.cloud.compute.v1.Items) other);
505       } else {
506         super.mergeFrom(other);
507         return this;
508       }
509     }
510 
mergeFrom(com.google.cloud.compute.v1.Items other)511     public Builder mergeFrom(com.google.cloud.compute.v1.Items other) {
512       if (other == com.google.cloud.compute.v1.Items.getDefaultInstance()) return this;
513       if (other.hasKey()) {
514         key_ = other.key_;
515         bitField0_ |= 0x00000001;
516         onChanged();
517       }
518       if (other.hasValue()) {
519         value_ = other.value_;
520         bitField0_ |= 0x00000002;
521         onChanged();
522       }
523       this.mergeUnknownFields(other.getUnknownFields());
524       onChanged();
525       return this;
526     }
527 
528     @java.lang.Override
isInitialized()529     public final boolean isInitialized() {
530       return true;
531     }
532 
533     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)534     public Builder mergeFrom(
535         com.google.protobuf.CodedInputStream input,
536         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
537         throws java.io.IOException {
538       if (extensionRegistry == null) {
539         throw new java.lang.NullPointerException();
540       }
541       try {
542         boolean done = false;
543         while (!done) {
544           int tag = input.readTag();
545           switch (tag) {
546             case 0:
547               done = true;
548               break;
549             case 848634:
550               {
551                 key_ = input.readStringRequireUtf8();
552                 bitField0_ |= 0x00000001;
553                 break;
554               } // case 848634
555             case 895781770:
556               {
557                 value_ = input.readStringRequireUtf8();
558                 bitField0_ |= 0x00000002;
559                 break;
560               } // case 895781770
561             default:
562               {
563                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
564                   done = true; // was an endgroup tag
565                 }
566                 break;
567               } // default:
568           } // switch (tag)
569         } // while (!done)
570       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
571         throw e.unwrapIOException();
572       } finally {
573         onChanged();
574       } // finally
575       return this;
576     }
577 
578     private int bitField0_;
579 
580     private java.lang.Object key_ = "";
581     /**
582      *
583      *
584      * <pre>
585      * Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
586      * </pre>
587      *
588      * <code>optional string key = 106079;</code>
589      *
590      * @return Whether the key field is set.
591      */
hasKey()592     public boolean hasKey() {
593       return ((bitField0_ & 0x00000001) != 0);
594     }
595     /**
596      *
597      *
598      * <pre>
599      * Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
600      * </pre>
601      *
602      * <code>optional string key = 106079;</code>
603      *
604      * @return The key.
605      */
getKey()606     public java.lang.String getKey() {
607       java.lang.Object ref = key_;
608       if (!(ref instanceof java.lang.String)) {
609         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
610         java.lang.String s = bs.toStringUtf8();
611         key_ = s;
612         return s;
613       } else {
614         return (java.lang.String) ref;
615       }
616     }
617     /**
618      *
619      *
620      * <pre>
621      * Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
622      * </pre>
623      *
624      * <code>optional string key = 106079;</code>
625      *
626      * @return The bytes for key.
627      */
getKeyBytes()628     public com.google.protobuf.ByteString getKeyBytes() {
629       java.lang.Object ref = key_;
630       if (ref instanceof String) {
631         com.google.protobuf.ByteString b =
632             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
633         key_ = b;
634         return b;
635       } else {
636         return (com.google.protobuf.ByteString) ref;
637       }
638     }
639     /**
640      *
641      *
642      * <pre>
643      * Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
644      * </pre>
645      *
646      * <code>optional string key = 106079;</code>
647      *
648      * @param value The key to set.
649      * @return This builder for chaining.
650      */
setKey(java.lang.String value)651     public Builder setKey(java.lang.String value) {
652       if (value == null) {
653         throw new NullPointerException();
654       }
655       key_ = value;
656       bitField0_ |= 0x00000001;
657       onChanged();
658       return this;
659     }
660     /**
661      *
662      *
663      * <pre>
664      * Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
665      * </pre>
666      *
667      * <code>optional string key = 106079;</code>
668      *
669      * @return This builder for chaining.
670      */
clearKey()671     public Builder clearKey() {
672       key_ = getDefaultInstance().getKey();
673       bitField0_ = (bitField0_ & ~0x00000001);
674       onChanged();
675       return this;
676     }
677     /**
678      *
679      *
680      * <pre>
681      * Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
682      * </pre>
683      *
684      * <code>optional string key = 106079;</code>
685      *
686      * @param value The bytes for key to set.
687      * @return This builder for chaining.
688      */
setKeyBytes(com.google.protobuf.ByteString value)689     public Builder setKeyBytes(com.google.protobuf.ByteString value) {
690       if (value == null) {
691         throw new NullPointerException();
692       }
693       checkByteStringIsUtf8(value);
694       key_ = value;
695       bitField0_ |= 0x00000001;
696       onChanged();
697       return this;
698     }
699 
700     private java.lang.Object value_ = "";
701     /**
702      *
703      *
704      * <pre>
705      * Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
706      * </pre>
707      *
708      * <code>optional string value = 111972721;</code>
709      *
710      * @return Whether the value field is set.
711      */
hasValue()712     public boolean hasValue() {
713       return ((bitField0_ & 0x00000002) != 0);
714     }
715     /**
716      *
717      *
718      * <pre>
719      * Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
720      * </pre>
721      *
722      * <code>optional string value = 111972721;</code>
723      *
724      * @return The value.
725      */
getValue()726     public java.lang.String getValue() {
727       java.lang.Object ref = value_;
728       if (!(ref instanceof java.lang.String)) {
729         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
730         java.lang.String s = bs.toStringUtf8();
731         value_ = s;
732         return s;
733       } else {
734         return (java.lang.String) ref;
735       }
736     }
737     /**
738      *
739      *
740      * <pre>
741      * Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
742      * </pre>
743      *
744      * <code>optional string value = 111972721;</code>
745      *
746      * @return The bytes for value.
747      */
getValueBytes()748     public com.google.protobuf.ByteString getValueBytes() {
749       java.lang.Object ref = value_;
750       if (ref instanceof String) {
751         com.google.protobuf.ByteString b =
752             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
753         value_ = b;
754         return b;
755       } else {
756         return (com.google.protobuf.ByteString) ref;
757       }
758     }
759     /**
760      *
761      *
762      * <pre>
763      * Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
764      * </pre>
765      *
766      * <code>optional string value = 111972721;</code>
767      *
768      * @param value The value to set.
769      * @return This builder for chaining.
770      */
setValue(java.lang.String value)771     public Builder setValue(java.lang.String value) {
772       if (value == null) {
773         throw new NullPointerException();
774       }
775       value_ = value;
776       bitField0_ |= 0x00000002;
777       onChanged();
778       return this;
779     }
780     /**
781      *
782      *
783      * <pre>
784      * Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
785      * </pre>
786      *
787      * <code>optional string value = 111972721;</code>
788      *
789      * @return This builder for chaining.
790      */
clearValue()791     public Builder clearValue() {
792       value_ = getDefaultInstance().getValue();
793       bitField0_ = (bitField0_ & ~0x00000002);
794       onChanged();
795       return this;
796     }
797     /**
798      *
799      *
800      * <pre>
801      * Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
802      * </pre>
803      *
804      * <code>optional string value = 111972721;</code>
805      *
806      * @param value The bytes for value to set.
807      * @return This builder for chaining.
808      */
setValueBytes(com.google.protobuf.ByteString value)809     public Builder setValueBytes(com.google.protobuf.ByteString value) {
810       if (value == null) {
811         throw new NullPointerException();
812       }
813       checkByteStringIsUtf8(value);
814       value_ = value;
815       bitField0_ |= 0x00000002;
816       onChanged();
817       return this;
818     }
819 
820     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)821     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
822       return super.setUnknownFields(unknownFields);
823     }
824 
825     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)826     public final Builder mergeUnknownFields(
827         final com.google.protobuf.UnknownFieldSet unknownFields) {
828       return super.mergeUnknownFields(unknownFields);
829     }
830 
831     // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.Items)
832   }
833 
834   // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.Items)
835   private static final com.google.cloud.compute.v1.Items DEFAULT_INSTANCE;
836 
837   static {
838     DEFAULT_INSTANCE = new com.google.cloud.compute.v1.Items();
839   }
840 
getDefaultInstance()841   public static com.google.cloud.compute.v1.Items getDefaultInstance() {
842     return DEFAULT_INSTANCE;
843   }
844 
845   private static final com.google.protobuf.Parser<Items> PARSER =
846       new com.google.protobuf.AbstractParser<Items>() {
847         @java.lang.Override
848         public Items parsePartialFrom(
849             com.google.protobuf.CodedInputStream input,
850             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
851             throws com.google.protobuf.InvalidProtocolBufferException {
852           Builder builder = newBuilder();
853           try {
854             builder.mergeFrom(input, extensionRegistry);
855           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
856             throw e.setUnfinishedMessage(builder.buildPartial());
857           } catch (com.google.protobuf.UninitializedMessageException e) {
858             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
859           } catch (java.io.IOException e) {
860             throw new com.google.protobuf.InvalidProtocolBufferException(e)
861                 .setUnfinishedMessage(builder.buildPartial());
862           }
863           return builder.buildPartial();
864         }
865       };
866 
parser()867   public static com.google.protobuf.Parser<Items> parser() {
868     return PARSER;
869   }
870 
871   @java.lang.Override
getParserForType()872   public com.google.protobuf.Parser<Items> getParserForType() {
873     return PARSER;
874   }
875 
876   @java.lang.Override
getDefaultInstanceForType()877   public com.google.cloud.compute.v1.Items getDefaultInstanceForType() {
878     return DEFAULT_INSTANCE;
879   }
880 }
881