• 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  * </pre>
26  *
27  * Protobuf type {@code google.cloud.compute.v1.Errors}
28  */
29 public final class Errors extends com.google.protobuf.GeneratedMessageV3
30     implements
31     // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.Errors)
32     ErrorsOrBuilder {
33   private static final long serialVersionUID = 0L;
34   // Use Errors.newBuilder() to construct.
Errors(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)35   private Errors(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
36     super(builder);
37   }
38 
Errors()39   private Errors() {
40     code_ = "";
41     errorDetails_ = java.util.Collections.emptyList();
42     location_ = "";
43     message_ = "";
44   }
45 
46   @java.lang.Override
47   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)48   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
49     return new Errors();
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_Errors_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_Errors_fieldAccessorTable
67         .ensureFieldAccessorsInitialized(
68             com.google.cloud.compute.v1.Errors.class,
69             com.google.cloud.compute.v1.Errors.Builder.class);
70   }
71 
72   private int bitField0_;
73   public static final int CODE_FIELD_NUMBER = 3059181;
74 
75   @SuppressWarnings("serial")
76   private volatile java.lang.Object code_ = "";
77   /**
78    *
79    *
80    * <pre>
81    * [Output Only] The error type identifier for this error.
82    * </pre>
83    *
84    * <code>optional string code = 3059181;</code>
85    *
86    * @return Whether the code field is set.
87    */
88   @java.lang.Override
hasCode()89   public boolean hasCode() {
90     return ((bitField0_ & 0x00000001) != 0);
91   }
92   /**
93    *
94    *
95    * <pre>
96    * [Output Only] The error type identifier for this error.
97    * </pre>
98    *
99    * <code>optional string code = 3059181;</code>
100    *
101    * @return The code.
102    */
103   @java.lang.Override
getCode()104   public java.lang.String getCode() {
105     java.lang.Object ref = code_;
106     if (ref instanceof java.lang.String) {
107       return (java.lang.String) ref;
108     } else {
109       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
110       java.lang.String s = bs.toStringUtf8();
111       code_ = s;
112       return s;
113     }
114   }
115   /**
116    *
117    *
118    * <pre>
119    * [Output Only] The error type identifier for this error.
120    * </pre>
121    *
122    * <code>optional string code = 3059181;</code>
123    *
124    * @return The bytes for code.
125    */
126   @java.lang.Override
getCodeBytes()127   public com.google.protobuf.ByteString getCodeBytes() {
128     java.lang.Object ref = code_;
129     if (ref instanceof java.lang.String) {
130       com.google.protobuf.ByteString b =
131           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
132       code_ = b;
133       return b;
134     } else {
135       return (com.google.protobuf.ByteString) ref;
136     }
137   }
138 
139   public static final int ERROR_DETAILS_FIELD_NUMBER = 274653963;
140 
141   @SuppressWarnings("serial")
142   private java.util.List<com.google.cloud.compute.v1.ErrorDetails> errorDetails_;
143   /**
144    *
145    *
146    * <pre>
147    * [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
148    * </pre>
149    *
150    * <code>repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;</code>
151    */
152   @java.lang.Override
getErrorDetailsList()153   public java.util.List<com.google.cloud.compute.v1.ErrorDetails> getErrorDetailsList() {
154     return errorDetails_;
155   }
156   /**
157    *
158    *
159    * <pre>
160    * [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
161    * </pre>
162    *
163    * <code>repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;</code>
164    */
165   @java.lang.Override
166   public java.util.List<? extends com.google.cloud.compute.v1.ErrorDetailsOrBuilder>
getErrorDetailsOrBuilderList()167       getErrorDetailsOrBuilderList() {
168     return errorDetails_;
169   }
170   /**
171    *
172    *
173    * <pre>
174    * [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
175    * </pre>
176    *
177    * <code>repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;</code>
178    */
179   @java.lang.Override
getErrorDetailsCount()180   public int getErrorDetailsCount() {
181     return errorDetails_.size();
182   }
183   /**
184    *
185    *
186    * <pre>
187    * [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
188    * </pre>
189    *
190    * <code>repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;</code>
191    */
192   @java.lang.Override
getErrorDetails(int index)193   public com.google.cloud.compute.v1.ErrorDetails getErrorDetails(int index) {
194     return errorDetails_.get(index);
195   }
196   /**
197    *
198    *
199    * <pre>
200    * [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
201    * </pre>
202    *
203    * <code>repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;</code>
204    */
205   @java.lang.Override
getErrorDetailsOrBuilder(int index)206   public com.google.cloud.compute.v1.ErrorDetailsOrBuilder getErrorDetailsOrBuilder(int index) {
207     return errorDetails_.get(index);
208   }
209 
210   public static final int LOCATION_FIELD_NUMBER = 290430901;
211 
212   @SuppressWarnings("serial")
213   private volatile java.lang.Object location_ = "";
214   /**
215    *
216    *
217    * <pre>
218    * [Output Only] Indicates the field in the request that caused the error. This property is optional.
219    * </pre>
220    *
221    * <code>optional string location = 290430901;</code>
222    *
223    * @return Whether the location field is set.
224    */
225   @java.lang.Override
hasLocation()226   public boolean hasLocation() {
227     return ((bitField0_ & 0x00000002) != 0);
228   }
229   /**
230    *
231    *
232    * <pre>
233    * [Output Only] Indicates the field in the request that caused the error. This property is optional.
234    * </pre>
235    *
236    * <code>optional string location = 290430901;</code>
237    *
238    * @return The location.
239    */
240   @java.lang.Override
getLocation()241   public java.lang.String getLocation() {
242     java.lang.Object ref = location_;
243     if (ref instanceof java.lang.String) {
244       return (java.lang.String) ref;
245     } else {
246       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
247       java.lang.String s = bs.toStringUtf8();
248       location_ = s;
249       return s;
250     }
251   }
252   /**
253    *
254    *
255    * <pre>
256    * [Output Only] Indicates the field in the request that caused the error. This property is optional.
257    * </pre>
258    *
259    * <code>optional string location = 290430901;</code>
260    *
261    * @return The bytes for location.
262    */
263   @java.lang.Override
getLocationBytes()264   public com.google.protobuf.ByteString getLocationBytes() {
265     java.lang.Object ref = location_;
266     if (ref instanceof java.lang.String) {
267       com.google.protobuf.ByteString b =
268           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
269       location_ = b;
270       return b;
271     } else {
272       return (com.google.protobuf.ByteString) ref;
273     }
274   }
275 
276   public static final int MESSAGE_FIELD_NUMBER = 418054151;
277 
278   @SuppressWarnings("serial")
279   private volatile java.lang.Object message_ = "";
280   /**
281    *
282    *
283    * <pre>
284    * [Output Only] An optional, human-readable error message.
285    * </pre>
286    *
287    * <code>optional string message = 418054151;</code>
288    *
289    * @return Whether the message field is set.
290    */
291   @java.lang.Override
hasMessage()292   public boolean hasMessage() {
293     return ((bitField0_ & 0x00000004) != 0);
294   }
295   /**
296    *
297    *
298    * <pre>
299    * [Output Only] An optional, human-readable error message.
300    * </pre>
301    *
302    * <code>optional string message = 418054151;</code>
303    *
304    * @return The message.
305    */
306   @java.lang.Override
getMessage()307   public java.lang.String getMessage() {
308     java.lang.Object ref = message_;
309     if (ref instanceof java.lang.String) {
310       return (java.lang.String) ref;
311     } else {
312       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
313       java.lang.String s = bs.toStringUtf8();
314       message_ = s;
315       return s;
316     }
317   }
318   /**
319    *
320    *
321    * <pre>
322    * [Output Only] An optional, human-readable error message.
323    * </pre>
324    *
325    * <code>optional string message = 418054151;</code>
326    *
327    * @return The bytes for message.
328    */
329   @java.lang.Override
getMessageBytes()330   public com.google.protobuf.ByteString getMessageBytes() {
331     java.lang.Object ref = message_;
332     if (ref instanceof java.lang.String) {
333       com.google.protobuf.ByteString b =
334           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
335       message_ = b;
336       return b;
337     } else {
338       return (com.google.protobuf.ByteString) ref;
339     }
340   }
341 
342   private byte memoizedIsInitialized = -1;
343 
344   @java.lang.Override
isInitialized()345   public final boolean isInitialized() {
346     byte isInitialized = memoizedIsInitialized;
347     if (isInitialized == 1) return true;
348     if (isInitialized == 0) return false;
349 
350     memoizedIsInitialized = 1;
351     return true;
352   }
353 
354   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)355   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
356     if (((bitField0_ & 0x00000001) != 0)) {
357       com.google.protobuf.GeneratedMessageV3.writeString(output, 3059181, code_);
358     }
359     for (int i = 0; i < errorDetails_.size(); i++) {
360       output.writeMessage(274653963, errorDetails_.get(i));
361     }
362     if (((bitField0_ & 0x00000002) != 0)) {
363       com.google.protobuf.GeneratedMessageV3.writeString(output, 290430901, location_);
364     }
365     if (((bitField0_ & 0x00000004) != 0)) {
366       com.google.protobuf.GeneratedMessageV3.writeString(output, 418054151, message_);
367     }
368     getUnknownFields().writeTo(output);
369   }
370 
371   @java.lang.Override
getSerializedSize()372   public int getSerializedSize() {
373     int size = memoizedSize;
374     if (size != -1) return size;
375 
376     size = 0;
377     if (((bitField0_ & 0x00000001) != 0)) {
378       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3059181, code_);
379     }
380     for (int i = 0; i < errorDetails_.size(); i++) {
381       size +=
382           com.google.protobuf.CodedOutputStream.computeMessageSize(274653963, errorDetails_.get(i));
383     }
384     if (((bitField0_ & 0x00000002) != 0)) {
385       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(290430901, location_);
386     }
387     if (((bitField0_ & 0x00000004) != 0)) {
388       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(418054151, message_);
389     }
390     size += getUnknownFields().getSerializedSize();
391     memoizedSize = size;
392     return size;
393   }
394 
395   @java.lang.Override
equals(final java.lang.Object obj)396   public boolean equals(final java.lang.Object obj) {
397     if (obj == this) {
398       return true;
399     }
400     if (!(obj instanceof com.google.cloud.compute.v1.Errors)) {
401       return super.equals(obj);
402     }
403     com.google.cloud.compute.v1.Errors other = (com.google.cloud.compute.v1.Errors) obj;
404 
405     if (hasCode() != other.hasCode()) return false;
406     if (hasCode()) {
407       if (!getCode().equals(other.getCode())) return false;
408     }
409     if (!getErrorDetailsList().equals(other.getErrorDetailsList())) return false;
410     if (hasLocation() != other.hasLocation()) return false;
411     if (hasLocation()) {
412       if (!getLocation().equals(other.getLocation())) return false;
413     }
414     if (hasMessage() != other.hasMessage()) return false;
415     if (hasMessage()) {
416       if (!getMessage().equals(other.getMessage())) return false;
417     }
418     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
419     return true;
420   }
421 
422   @java.lang.Override
hashCode()423   public int hashCode() {
424     if (memoizedHashCode != 0) {
425       return memoizedHashCode;
426     }
427     int hash = 41;
428     hash = (19 * hash) + getDescriptor().hashCode();
429     if (hasCode()) {
430       hash = (37 * hash) + CODE_FIELD_NUMBER;
431       hash = (53 * hash) + getCode().hashCode();
432     }
433     if (getErrorDetailsCount() > 0) {
434       hash = (37 * hash) + ERROR_DETAILS_FIELD_NUMBER;
435       hash = (53 * hash) + getErrorDetailsList().hashCode();
436     }
437     if (hasLocation()) {
438       hash = (37 * hash) + LOCATION_FIELD_NUMBER;
439       hash = (53 * hash) + getLocation().hashCode();
440     }
441     if (hasMessage()) {
442       hash = (37 * hash) + MESSAGE_FIELD_NUMBER;
443       hash = (53 * hash) + getMessage().hashCode();
444     }
445     hash = (29 * hash) + getUnknownFields().hashCode();
446     memoizedHashCode = hash;
447     return hash;
448   }
449 
parseFrom(java.nio.ByteBuffer data)450   public static com.google.cloud.compute.v1.Errors parseFrom(java.nio.ByteBuffer data)
451       throws com.google.protobuf.InvalidProtocolBufferException {
452     return PARSER.parseFrom(data);
453   }
454 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)455   public static com.google.cloud.compute.v1.Errors parseFrom(
456       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
457       throws com.google.protobuf.InvalidProtocolBufferException {
458     return PARSER.parseFrom(data, extensionRegistry);
459   }
460 
parseFrom(com.google.protobuf.ByteString data)461   public static com.google.cloud.compute.v1.Errors parseFrom(com.google.protobuf.ByteString data)
462       throws com.google.protobuf.InvalidProtocolBufferException {
463     return PARSER.parseFrom(data);
464   }
465 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)466   public static com.google.cloud.compute.v1.Errors parseFrom(
467       com.google.protobuf.ByteString data,
468       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
469       throws com.google.protobuf.InvalidProtocolBufferException {
470     return PARSER.parseFrom(data, extensionRegistry);
471   }
472 
parseFrom(byte[] data)473   public static com.google.cloud.compute.v1.Errors parseFrom(byte[] data)
474       throws com.google.protobuf.InvalidProtocolBufferException {
475     return PARSER.parseFrom(data);
476   }
477 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)478   public static com.google.cloud.compute.v1.Errors parseFrom(
479       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
480       throws com.google.protobuf.InvalidProtocolBufferException {
481     return PARSER.parseFrom(data, extensionRegistry);
482   }
483 
parseFrom(java.io.InputStream input)484   public static com.google.cloud.compute.v1.Errors parseFrom(java.io.InputStream input)
485       throws java.io.IOException {
486     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
487   }
488 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)489   public static com.google.cloud.compute.v1.Errors parseFrom(
490       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
491       throws java.io.IOException {
492     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
493         PARSER, input, extensionRegistry);
494   }
495 
parseDelimitedFrom(java.io.InputStream input)496   public static com.google.cloud.compute.v1.Errors parseDelimitedFrom(java.io.InputStream input)
497       throws java.io.IOException {
498     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
499   }
500 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)501   public static com.google.cloud.compute.v1.Errors parseDelimitedFrom(
502       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
503       throws java.io.IOException {
504     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
505         PARSER, input, extensionRegistry);
506   }
507 
parseFrom( com.google.protobuf.CodedInputStream input)508   public static com.google.cloud.compute.v1.Errors parseFrom(
509       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
510     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
511   }
512 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)513   public static com.google.cloud.compute.v1.Errors parseFrom(
514       com.google.protobuf.CodedInputStream input,
515       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
516       throws java.io.IOException {
517     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
518         PARSER, input, extensionRegistry);
519   }
520 
521   @java.lang.Override
newBuilderForType()522   public Builder newBuilderForType() {
523     return newBuilder();
524   }
525 
newBuilder()526   public static Builder newBuilder() {
527     return DEFAULT_INSTANCE.toBuilder();
528   }
529 
newBuilder(com.google.cloud.compute.v1.Errors prototype)530   public static Builder newBuilder(com.google.cloud.compute.v1.Errors prototype) {
531     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
532   }
533 
534   @java.lang.Override
toBuilder()535   public Builder toBuilder() {
536     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
537   }
538 
539   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)540   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
541     Builder builder = new Builder(parent);
542     return builder;
543   }
544   /**
545    *
546    *
547    * <pre>
548    * </pre>
549    *
550    * Protobuf type {@code google.cloud.compute.v1.Errors}
551    */
552   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
553       implements
554       // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.Errors)
555       com.google.cloud.compute.v1.ErrorsOrBuilder {
getDescriptor()556     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
557       return com.google.cloud.compute.v1.Compute
558           .internal_static_google_cloud_compute_v1_Errors_descriptor;
559     }
560 
561     @java.lang.Override
562     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()563         internalGetFieldAccessorTable() {
564       return com.google.cloud.compute.v1.Compute
565           .internal_static_google_cloud_compute_v1_Errors_fieldAccessorTable
566           .ensureFieldAccessorsInitialized(
567               com.google.cloud.compute.v1.Errors.class,
568               com.google.cloud.compute.v1.Errors.Builder.class);
569     }
570 
571     // Construct using com.google.cloud.compute.v1.Errors.newBuilder()
Builder()572     private Builder() {}
573 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)574     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
575       super(parent);
576     }
577 
578     @java.lang.Override
clear()579     public Builder clear() {
580       super.clear();
581       bitField0_ = 0;
582       code_ = "";
583       if (errorDetailsBuilder_ == null) {
584         errorDetails_ = java.util.Collections.emptyList();
585       } else {
586         errorDetails_ = null;
587         errorDetailsBuilder_.clear();
588       }
589       bitField0_ = (bitField0_ & ~0x00000002);
590       location_ = "";
591       message_ = "";
592       return this;
593     }
594 
595     @java.lang.Override
getDescriptorForType()596     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
597       return com.google.cloud.compute.v1.Compute
598           .internal_static_google_cloud_compute_v1_Errors_descriptor;
599     }
600 
601     @java.lang.Override
getDefaultInstanceForType()602     public com.google.cloud.compute.v1.Errors getDefaultInstanceForType() {
603       return com.google.cloud.compute.v1.Errors.getDefaultInstance();
604     }
605 
606     @java.lang.Override
build()607     public com.google.cloud.compute.v1.Errors build() {
608       com.google.cloud.compute.v1.Errors result = buildPartial();
609       if (!result.isInitialized()) {
610         throw newUninitializedMessageException(result);
611       }
612       return result;
613     }
614 
615     @java.lang.Override
buildPartial()616     public com.google.cloud.compute.v1.Errors buildPartial() {
617       com.google.cloud.compute.v1.Errors result = new com.google.cloud.compute.v1.Errors(this);
618       buildPartialRepeatedFields(result);
619       if (bitField0_ != 0) {
620         buildPartial0(result);
621       }
622       onBuilt();
623       return result;
624     }
625 
buildPartialRepeatedFields(com.google.cloud.compute.v1.Errors result)626     private void buildPartialRepeatedFields(com.google.cloud.compute.v1.Errors result) {
627       if (errorDetailsBuilder_ == null) {
628         if (((bitField0_ & 0x00000002) != 0)) {
629           errorDetails_ = java.util.Collections.unmodifiableList(errorDetails_);
630           bitField0_ = (bitField0_ & ~0x00000002);
631         }
632         result.errorDetails_ = errorDetails_;
633       } else {
634         result.errorDetails_ = errorDetailsBuilder_.build();
635       }
636     }
637 
buildPartial0(com.google.cloud.compute.v1.Errors result)638     private void buildPartial0(com.google.cloud.compute.v1.Errors result) {
639       int from_bitField0_ = bitField0_;
640       int to_bitField0_ = 0;
641       if (((from_bitField0_ & 0x00000001) != 0)) {
642         result.code_ = code_;
643         to_bitField0_ |= 0x00000001;
644       }
645       if (((from_bitField0_ & 0x00000004) != 0)) {
646         result.location_ = location_;
647         to_bitField0_ |= 0x00000002;
648       }
649       if (((from_bitField0_ & 0x00000008) != 0)) {
650         result.message_ = message_;
651         to_bitField0_ |= 0x00000004;
652       }
653       result.bitField0_ |= to_bitField0_;
654     }
655 
656     @java.lang.Override
clone()657     public Builder clone() {
658       return super.clone();
659     }
660 
661     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)662     public Builder setField(
663         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
664       return super.setField(field, value);
665     }
666 
667     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)668     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
669       return super.clearField(field);
670     }
671 
672     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)673     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
674       return super.clearOneof(oneof);
675     }
676 
677     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)678     public Builder setRepeatedField(
679         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
680       return super.setRepeatedField(field, index, value);
681     }
682 
683     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)684     public Builder addRepeatedField(
685         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
686       return super.addRepeatedField(field, value);
687     }
688 
689     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)690     public Builder mergeFrom(com.google.protobuf.Message other) {
691       if (other instanceof com.google.cloud.compute.v1.Errors) {
692         return mergeFrom((com.google.cloud.compute.v1.Errors) other);
693       } else {
694         super.mergeFrom(other);
695         return this;
696       }
697     }
698 
mergeFrom(com.google.cloud.compute.v1.Errors other)699     public Builder mergeFrom(com.google.cloud.compute.v1.Errors other) {
700       if (other == com.google.cloud.compute.v1.Errors.getDefaultInstance()) return this;
701       if (other.hasCode()) {
702         code_ = other.code_;
703         bitField0_ |= 0x00000001;
704         onChanged();
705       }
706       if (errorDetailsBuilder_ == null) {
707         if (!other.errorDetails_.isEmpty()) {
708           if (errorDetails_.isEmpty()) {
709             errorDetails_ = other.errorDetails_;
710             bitField0_ = (bitField0_ & ~0x00000002);
711           } else {
712             ensureErrorDetailsIsMutable();
713             errorDetails_.addAll(other.errorDetails_);
714           }
715           onChanged();
716         }
717       } else {
718         if (!other.errorDetails_.isEmpty()) {
719           if (errorDetailsBuilder_.isEmpty()) {
720             errorDetailsBuilder_.dispose();
721             errorDetailsBuilder_ = null;
722             errorDetails_ = other.errorDetails_;
723             bitField0_ = (bitField0_ & ~0x00000002);
724             errorDetailsBuilder_ =
725                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
726                     ? getErrorDetailsFieldBuilder()
727                     : null;
728           } else {
729             errorDetailsBuilder_.addAllMessages(other.errorDetails_);
730           }
731         }
732       }
733       if (other.hasLocation()) {
734         location_ = other.location_;
735         bitField0_ |= 0x00000004;
736         onChanged();
737       }
738       if (other.hasMessage()) {
739         message_ = other.message_;
740         bitField0_ |= 0x00000008;
741         onChanged();
742       }
743       this.mergeUnknownFields(other.getUnknownFields());
744       onChanged();
745       return this;
746     }
747 
748     @java.lang.Override
isInitialized()749     public final boolean isInitialized() {
750       return true;
751     }
752 
753     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)754     public Builder mergeFrom(
755         com.google.protobuf.CodedInputStream input,
756         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
757         throws java.io.IOException {
758       if (extensionRegistry == null) {
759         throw new java.lang.NullPointerException();
760       }
761       try {
762         boolean done = false;
763         while (!done) {
764           int tag = input.readTag();
765           switch (tag) {
766             case 0:
767               done = true;
768               break;
769             case 24473450:
770               {
771                 code_ = input.readStringRequireUtf8();
772                 bitField0_ |= 0x00000001;
773                 break;
774               } // case 24473450
775             case -2097735590:
776               {
777                 com.google.cloud.compute.v1.ErrorDetails m =
778                     input.readMessage(
779                         com.google.cloud.compute.v1.ErrorDetails.parser(), extensionRegistry);
780                 if (errorDetailsBuilder_ == null) {
781                   ensureErrorDetailsIsMutable();
782                   errorDetails_.add(m);
783                 } else {
784                   errorDetailsBuilder_.addMessage(m);
785                 }
786                 break;
787               } // case -2097735590
788             case -1971520086:
789               {
790                 location_ = input.readStringRequireUtf8();
791                 bitField0_ |= 0x00000004;
792                 break;
793               } // case -1971520086
794             case -950534086:
795               {
796                 message_ = input.readStringRequireUtf8();
797                 bitField0_ |= 0x00000008;
798                 break;
799               } // case -950534086
800             default:
801               {
802                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
803                   done = true; // was an endgroup tag
804                 }
805                 break;
806               } // default:
807           } // switch (tag)
808         } // while (!done)
809       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
810         throw e.unwrapIOException();
811       } finally {
812         onChanged();
813       } // finally
814       return this;
815     }
816 
817     private int bitField0_;
818 
819     private java.lang.Object code_ = "";
820     /**
821      *
822      *
823      * <pre>
824      * [Output Only] The error type identifier for this error.
825      * </pre>
826      *
827      * <code>optional string code = 3059181;</code>
828      *
829      * @return Whether the code field is set.
830      */
hasCode()831     public boolean hasCode() {
832       return ((bitField0_ & 0x00000001) != 0);
833     }
834     /**
835      *
836      *
837      * <pre>
838      * [Output Only] The error type identifier for this error.
839      * </pre>
840      *
841      * <code>optional string code = 3059181;</code>
842      *
843      * @return The code.
844      */
getCode()845     public java.lang.String getCode() {
846       java.lang.Object ref = code_;
847       if (!(ref instanceof java.lang.String)) {
848         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
849         java.lang.String s = bs.toStringUtf8();
850         code_ = s;
851         return s;
852       } else {
853         return (java.lang.String) ref;
854       }
855     }
856     /**
857      *
858      *
859      * <pre>
860      * [Output Only] The error type identifier for this error.
861      * </pre>
862      *
863      * <code>optional string code = 3059181;</code>
864      *
865      * @return The bytes for code.
866      */
getCodeBytes()867     public com.google.protobuf.ByteString getCodeBytes() {
868       java.lang.Object ref = code_;
869       if (ref instanceof String) {
870         com.google.protobuf.ByteString b =
871             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
872         code_ = b;
873         return b;
874       } else {
875         return (com.google.protobuf.ByteString) ref;
876       }
877     }
878     /**
879      *
880      *
881      * <pre>
882      * [Output Only] The error type identifier for this error.
883      * </pre>
884      *
885      * <code>optional string code = 3059181;</code>
886      *
887      * @param value The code to set.
888      * @return This builder for chaining.
889      */
setCode(java.lang.String value)890     public Builder setCode(java.lang.String value) {
891       if (value == null) {
892         throw new NullPointerException();
893       }
894       code_ = value;
895       bitField0_ |= 0x00000001;
896       onChanged();
897       return this;
898     }
899     /**
900      *
901      *
902      * <pre>
903      * [Output Only] The error type identifier for this error.
904      * </pre>
905      *
906      * <code>optional string code = 3059181;</code>
907      *
908      * @return This builder for chaining.
909      */
clearCode()910     public Builder clearCode() {
911       code_ = getDefaultInstance().getCode();
912       bitField0_ = (bitField0_ & ~0x00000001);
913       onChanged();
914       return this;
915     }
916     /**
917      *
918      *
919      * <pre>
920      * [Output Only] The error type identifier for this error.
921      * </pre>
922      *
923      * <code>optional string code = 3059181;</code>
924      *
925      * @param value The bytes for code to set.
926      * @return This builder for chaining.
927      */
setCodeBytes(com.google.protobuf.ByteString value)928     public Builder setCodeBytes(com.google.protobuf.ByteString value) {
929       if (value == null) {
930         throw new NullPointerException();
931       }
932       checkByteStringIsUtf8(value);
933       code_ = value;
934       bitField0_ |= 0x00000001;
935       onChanged();
936       return this;
937     }
938 
939     private java.util.List<com.google.cloud.compute.v1.ErrorDetails> errorDetails_ =
940         java.util.Collections.emptyList();
941 
ensureErrorDetailsIsMutable()942     private void ensureErrorDetailsIsMutable() {
943       if (!((bitField0_ & 0x00000002) != 0)) {
944         errorDetails_ =
945             new java.util.ArrayList<com.google.cloud.compute.v1.ErrorDetails>(errorDetails_);
946         bitField0_ |= 0x00000002;
947       }
948     }
949 
950     private com.google.protobuf.RepeatedFieldBuilderV3<
951             com.google.cloud.compute.v1.ErrorDetails,
952             com.google.cloud.compute.v1.ErrorDetails.Builder,
953             com.google.cloud.compute.v1.ErrorDetailsOrBuilder>
954         errorDetailsBuilder_;
955 
956     /**
957      *
958      *
959      * <pre>
960      * [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
961      * </pre>
962      *
963      * <code>repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;</code>
964      */
getErrorDetailsList()965     public java.util.List<com.google.cloud.compute.v1.ErrorDetails> getErrorDetailsList() {
966       if (errorDetailsBuilder_ == null) {
967         return java.util.Collections.unmodifiableList(errorDetails_);
968       } else {
969         return errorDetailsBuilder_.getMessageList();
970       }
971     }
972     /**
973      *
974      *
975      * <pre>
976      * [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
977      * </pre>
978      *
979      * <code>repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;</code>
980      */
getErrorDetailsCount()981     public int getErrorDetailsCount() {
982       if (errorDetailsBuilder_ == null) {
983         return errorDetails_.size();
984       } else {
985         return errorDetailsBuilder_.getCount();
986       }
987     }
988     /**
989      *
990      *
991      * <pre>
992      * [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
993      * </pre>
994      *
995      * <code>repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;</code>
996      */
getErrorDetails(int index)997     public com.google.cloud.compute.v1.ErrorDetails getErrorDetails(int index) {
998       if (errorDetailsBuilder_ == null) {
999         return errorDetails_.get(index);
1000       } else {
1001         return errorDetailsBuilder_.getMessage(index);
1002       }
1003     }
1004     /**
1005      *
1006      *
1007      * <pre>
1008      * [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
1009      * </pre>
1010      *
1011      * <code>repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;</code>
1012      */
setErrorDetails(int index, com.google.cloud.compute.v1.ErrorDetails value)1013     public Builder setErrorDetails(int index, com.google.cloud.compute.v1.ErrorDetails value) {
1014       if (errorDetailsBuilder_ == null) {
1015         if (value == null) {
1016           throw new NullPointerException();
1017         }
1018         ensureErrorDetailsIsMutable();
1019         errorDetails_.set(index, value);
1020         onChanged();
1021       } else {
1022         errorDetailsBuilder_.setMessage(index, value);
1023       }
1024       return this;
1025     }
1026     /**
1027      *
1028      *
1029      * <pre>
1030      * [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
1031      * </pre>
1032      *
1033      * <code>repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;</code>
1034      */
setErrorDetails( int index, com.google.cloud.compute.v1.ErrorDetails.Builder builderForValue)1035     public Builder setErrorDetails(
1036         int index, com.google.cloud.compute.v1.ErrorDetails.Builder builderForValue) {
1037       if (errorDetailsBuilder_ == null) {
1038         ensureErrorDetailsIsMutable();
1039         errorDetails_.set(index, builderForValue.build());
1040         onChanged();
1041       } else {
1042         errorDetailsBuilder_.setMessage(index, builderForValue.build());
1043       }
1044       return this;
1045     }
1046     /**
1047      *
1048      *
1049      * <pre>
1050      * [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
1051      * </pre>
1052      *
1053      * <code>repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;</code>
1054      */
addErrorDetails(com.google.cloud.compute.v1.ErrorDetails value)1055     public Builder addErrorDetails(com.google.cloud.compute.v1.ErrorDetails value) {
1056       if (errorDetailsBuilder_ == null) {
1057         if (value == null) {
1058           throw new NullPointerException();
1059         }
1060         ensureErrorDetailsIsMutable();
1061         errorDetails_.add(value);
1062         onChanged();
1063       } else {
1064         errorDetailsBuilder_.addMessage(value);
1065       }
1066       return this;
1067     }
1068     /**
1069      *
1070      *
1071      * <pre>
1072      * [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
1073      * </pre>
1074      *
1075      * <code>repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;</code>
1076      */
addErrorDetails(int index, com.google.cloud.compute.v1.ErrorDetails value)1077     public Builder addErrorDetails(int index, com.google.cloud.compute.v1.ErrorDetails value) {
1078       if (errorDetailsBuilder_ == null) {
1079         if (value == null) {
1080           throw new NullPointerException();
1081         }
1082         ensureErrorDetailsIsMutable();
1083         errorDetails_.add(index, value);
1084         onChanged();
1085       } else {
1086         errorDetailsBuilder_.addMessage(index, value);
1087       }
1088       return this;
1089     }
1090     /**
1091      *
1092      *
1093      * <pre>
1094      * [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
1095      * </pre>
1096      *
1097      * <code>repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;</code>
1098      */
addErrorDetails( com.google.cloud.compute.v1.ErrorDetails.Builder builderForValue)1099     public Builder addErrorDetails(
1100         com.google.cloud.compute.v1.ErrorDetails.Builder builderForValue) {
1101       if (errorDetailsBuilder_ == null) {
1102         ensureErrorDetailsIsMutable();
1103         errorDetails_.add(builderForValue.build());
1104         onChanged();
1105       } else {
1106         errorDetailsBuilder_.addMessage(builderForValue.build());
1107       }
1108       return this;
1109     }
1110     /**
1111      *
1112      *
1113      * <pre>
1114      * [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
1115      * </pre>
1116      *
1117      * <code>repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;</code>
1118      */
addErrorDetails( int index, com.google.cloud.compute.v1.ErrorDetails.Builder builderForValue)1119     public Builder addErrorDetails(
1120         int index, com.google.cloud.compute.v1.ErrorDetails.Builder builderForValue) {
1121       if (errorDetailsBuilder_ == null) {
1122         ensureErrorDetailsIsMutable();
1123         errorDetails_.add(index, builderForValue.build());
1124         onChanged();
1125       } else {
1126         errorDetailsBuilder_.addMessage(index, builderForValue.build());
1127       }
1128       return this;
1129     }
1130     /**
1131      *
1132      *
1133      * <pre>
1134      * [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
1135      * </pre>
1136      *
1137      * <code>repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;</code>
1138      */
addAllErrorDetails( java.lang.Iterable<? extends com.google.cloud.compute.v1.ErrorDetails> values)1139     public Builder addAllErrorDetails(
1140         java.lang.Iterable<? extends com.google.cloud.compute.v1.ErrorDetails> values) {
1141       if (errorDetailsBuilder_ == null) {
1142         ensureErrorDetailsIsMutable();
1143         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, errorDetails_);
1144         onChanged();
1145       } else {
1146         errorDetailsBuilder_.addAllMessages(values);
1147       }
1148       return this;
1149     }
1150     /**
1151      *
1152      *
1153      * <pre>
1154      * [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
1155      * </pre>
1156      *
1157      * <code>repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;</code>
1158      */
clearErrorDetails()1159     public Builder clearErrorDetails() {
1160       if (errorDetailsBuilder_ == null) {
1161         errorDetails_ = java.util.Collections.emptyList();
1162         bitField0_ = (bitField0_ & ~0x00000002);
1163         onChanged();
1164       } else {
1165         errorDetailsBuilder_.clear();
1166       }
1167       return this;
1168     }
1169     /**
1170      *
1171      *
1172      * <pre>
1173      * [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
1174      * </pre>
1175      *
1176      * <code>repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;</code>
1177      */
removeErrorDetails(int index)1178     public Builder removeErrorDetails(int index) {
1179       if (errorDetailsBuilder_ == null) {
1180         ensureErrorDetailsIsMutable();
1181         errorDetails_.remove(index);
1182         onChanged();
1183       } else {
1184         errorDetailsBuilder_.remove(index);
1185       }
1186       return this;
1187     }
1188     /**
1189      *
1190      *
1191      * <pre>
1192      * [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
1193      * </pre>
1194      *
1195      * <code>repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;</code>
1196      */
getErrorDetailsBuilder(int index)1197     public com.google.cloud.compute.v1.ErrorDetails.Builder getErrorDetailsBuilder(int index) {
1198       return getErrorDetailsFieldBuilder().getBuilder(index);
1199     }
1200     /**
1201      *
1202      *
1203      * <pre>
1204      * [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
1205      * </pre>
1206      *
1207      * <code>repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;</code>
1208      */
getErrorDetailsOrBuilder(int index)1209     public com.google.cloud.compute.v1.ErrorDetailsOrBuilder getErrorDetailsOrBuilder(int index) {
1210       if (errorDetailsBuilder_ == null) {
1211         return errorDetails_.get(index);
1212       } else {
1213         return errorDetailsBuilder_.getMessageOrBuilder(index);
1214       }
1215     }
1216     /**
1217      *
1218      *
1219      * <pre>
1220      * [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
1221      * </pre>
1222      *
1223      * <code>repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;</code>
1224      */
1225     public java.util.List<? extends com.google.cloud.compute.v1.ErrorDetailsOrBuilder>
getErrorDetailsOrBuilderList()1226         getErrorDetailsOrBuilderList() {
1227       if (errorDetailsBuilder_ != null) {
1228         return errorDetailsBuilder_.getMessageOrBuilderList();
1229       } else {
1230         return java.util.Collections.unmodifiableList(errorDetails_);
1231       }
1232     }
1233     /**
1234      *
1235      *
1236      * <pre>
1237      * [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
1238      * </pre>
1239      *
1240      * <code>repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;</code>
1241      */
addErrorDetailsBuilder()1242     public com.google.cloud.compute.v1.ErrorDetails.Builder addErrorDetailsBuilder() {
1243       return getErrorDetailsFieldBuilder()
1244           .addBuilder(com.google.cloud.compute.v1.ErrorDetails.getDefaultInstance());
1245     }
1246     /**
1247      *
1248      *
1249      * <pre>
1250      * [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
1251      * </pre>
1252      *
1253      * <code>repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;</code>
1254      */
addErrorDetailsBuilder(int index)1255     public com.google.cloud.compute.v1.ErrorDetails.Builder addErrorDetailsBuilder(int index) {
1256       return getErrorDetailsFieldBuilder()
1257           .addBuilder(index, com.google.cloud.compute.v1.ErrorDetails.getDefaultInstance());
1258     }
1259     /**
1260      *
1261      *
1262      * <pre>
1263      * [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
1264      * </pre>
1265      *
1266      * <code>repeated .google.cloud.compute.v1.ErrorDetails error_details = 274653963;</code>
1267      */
1268     public java.util.List<com.google.cloud.compute.v1.ErrorDetails.Builder>
getErrorDetailsBuilderList()1269         getErrorDetailsBuilderList() {
1270       return getErrorDetailsFieldBuilder().getBuilderList();
1271     }
1272 
1273     private com.google.protobuf.RepeatedFieldBuilderV3<
1274             com.google.cloud.compute.v1.ErrorDetails,
1275             com.google.cloud.compute.v1.ErrorDetails.Builder,
1276             com.google.cloud.compute.v1.ErrorDetailsOrBuilder>
getErrorDetailsFieldBuilder()1277         getErrorDetailsFieldBuilder() {
1278       if (errorDetailsBuilder_ == null) {
1279         errorDetailsBuilder_ =
1280             new com.google.protobuf.RepeatedFieldBuilderV3<
1281                 com.google.cloud.compute.v1.ErrorDetails,
1282                 com.google.cloud.compute.v1.ErrorDetails.Builder,
1283                 com.google.cloud.compute.v1.ErrorDetailsOrBuilder>(
1284                 errorDetails_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
1285         errorDetails_ = null;
1286       }
1287       return errorDetailsBuilder_;
1288     }
1289 
1290     private java.lang.Object location_ = "";
1291     /**
1292      *
1293      *
1294      * <pre>
1295      * [Output Only] Indicates the field in the request that caused the error. This property is optional.
1296      * </pre>
1297      *
1298      * <code>optional string location = 290430901;</code>
1299      *
1300      * @return Whether the location field is set.
1301      */
hasLocation()1302     public boolean hasLocation() {
1303       return ((bitField0_ & 0x00000004) != 0);
1304     }
1305     /**
1306      *
1307      *
1308      * <pre>
1309      * [Output Only] Indicates the field in the request that caused the error. This property is optional.
1310      * </pre>
1311      *
1312      * <code>optional string location = 290430901;</code>
1313      *
1314      * @return The location.
1315      */
getLocation()1316     public java.lang.String getLocation() {
1317       java.lang.Object ref = location_;
1318       if (!(ref instanceof java.lang.String)) {
1319         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1320         java.lang.String s = bs.toStringUtf8();
1321         location_ = s;
1322         return s;
1323       } else {
1324         return (java.lang.String) ref;
1325       }
1326     }
1327     /**
1328      *
1329      *
1330      * <pre>
1331      * [Output Only] Indicates the field in the request that caused the error. This property is optional.
1332      * </pre>
1333      *
1334      * <code>optional string location = 290430901;</code>
1335      *
1336      * @return The bytes for location.
1337      */
getLocationBytes()1338     public com.google.protobuf.ByteString getLocationBytes() {
1339       java.lang.Object ref = location_;
1340       if (ref instanceof String) {
1341         com.google.protobuf.ByteString b =
1342             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1343         location_ = b;
1344         return b;
1345       } else {
1346         return (com.google.protobuf.ByteString) ref;
1347       }
1348     }
1349     /**
1350      *
1351      *
1352      * <pre>
1353      * [Output Only] Indicates the field in the request that caused the error. This property is optional.
1354      * </pre>
1355      *
1356      * <code>optional string location = 290430901;</code>
1357      *
1358      * @param value The location to set.
1359      * @return This builder for chaining.
1360      */
setLocation(java.lang.String value)1361     public Builder setLocation(java.lang.String value) {
1362       if (value == null) {
1363         throw new NullPointerException();
1364       }
1365       location_ = value;
1366       bitField0_ |= 0x00000004;
1367       onChanged();
1368       return this;
1369     }
1370     /**
1371      *
1372      *
1373      * <pre>
1374      * [Output Only] Indicates the field in the request that caused the error. This property is optional.
1375      * </pre>
1376      *
1377      * <code>optional string location = 290430901;</code>
1378      *
1379      * @return This builder for chaining.
1380      */
clearLocation()1381     public Builder clearLocation() {
1382       location_ = getDefaultInstance().getLocation();
1383       bitField0_ = (bitField0_ & ~0x00000004);
1384       onChanged();
1385       return this;
1386     }
1387     /**
1388      *
1389      *
1390      * <pre>
1391      * [Output Only] Indicates the field in the request that caused the error. This property is optional.
1392      * </pre>
1393      *
1394      * <code>optional string location = 290430901;</code>
1395      *
1396      * @param value The bytes for location to set.
1397      * @return This builder for chaining.
1398      */
setLocationBytes(com.google.protobuf.ByteString value)1399     public Builder setLocationBytes(com.google.protobuf.ByteString value) {
1400       if (value == null) {
1401         throw new NullPointerException();
1402       }
1403       checkByteStringIsUtf8(value);
1404       location_ = value;
1405       bitField0_ |= 0x00000004;
1406       onChanged();
1407       return this;
1408     }
1409 
1410     private java.lang.Object message_ = "";
1411     /**
1412      *
1413      *
1414      * <pre>
1415      * [Output Only] An optional, human-readable error message.
1416      * </pre>
1417      *
1418      * <code>optional string message = 418054151;</code>
1419      *
1420      * @return Whether the message field is set.
1421      */
hasMessage()1422     public boolean hasMessage() {
1423       return ((bitField0_ & 0x00000008) != 0);
1424     }
1425     /**
1426      *
1427      *
1428      * <pre>
1429      * [Output Only] An optional, human-readable error message.
1430      * </pre>
1431      *
1432      * <code>optional string message = 418054151;</code>
1433      *
1434      * @return The message.
1435      */
getMessage()1436     public java.lang.String getMessage() {
1437       java.lang.Object ref = message_;
1438       if (!(ref instanceof java.lang.String)) {
1439         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1440         java.lang.String s = bs.toStringUtf8();
1441         message_ = s;
1442         return s;
1443       } else {
1444         return (java.lang.String) ref;
1445       }
1446     }
1447     /**
1448      *
1449      *
1450      * <pre>
1451      * [Output Only] An optional, human-readable error message.
1452      * </pre>
1453      *
1454      * <code>optional string message = 418054151;</code>
1455      *
1456      * @return The bytes for message.
1457      */
getMessageBytes()1458     public com.google.protobuf.ByteString getMessageBytes() {
1459       java.lang.Object ref = message_;
1460       if (ref instanceof String) {
1461         com.google.protobuf.ByteString b =
1462             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1463         message_ = b;
1464         return b;
1465       } else {
1466         return (com.google.protobuf.ByteString) ref;
1467       }
1468     }
1469     /**
1470      *
1471      *
1472      * <pre>
1473      * [Output Only] An optional, human-readable error message.
1474      * </pre>
1475      *
1476      * <code>optional string message = 418054151;</code>
1477      *
1478      * @param value The message to set.
1479      * @return This builder for chaining.
1480      */
setMessage(java.lang.String value)1481     public Builder setMessage(java.lang.String value) {
1482       if (value == null) {
1483         throw new NullPointerException();
1484       }
1485       message_ = value;
1486       bitField0_ |= 0x00000008;
1487       onChanged();
1488       return this;
1489     }
1490     /**
1491      *
1492      *
1493      * <pre>
1494      * [Output Only] An optional, human-readable error message.
1495      * </pre>
1496      *
1497      * <code>optional string message = 418054151;</code>
1498      *
1499      * @return This builder for chaining.
1500      */
clearMessage()1501     public Builder clearMessage() {
1502       message_ = getDefaultInstance().getMessage();
1503       bitField0_ = (bitField0_ & ~0x00000008);
1504       onChanged();
1505       return this;
1506     }
1507     /**
1508      *
1509      *
1510      * <pre>
1511      * [Output Only] An optional, human-readable error message.
1512      * </pre>
1513      *
1514      * <code>optional string message = 418054151;</code>
1515      *
1516      * @param value The bytes for message to set.
1517      * @return This builder for chaining.
1518      */
setMessageBytes(com.google.protobuf.ByteString value)1519     public Builder setMessageBytes(com.google.protobuf.ByteString value) {
1520       if (value == null) {
1521         throw new NullPointerException();
1522       }
1523       checkByteStringIsUtf8(value);
1524       message_ = value;
1525       bitField0_ |= 0x00000008;
1526       onChanged();
1527       return this;
1528     }
1529 
1530     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1531     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1532       return super.setUnknownFields(unknownFields);
1533     }
1534 
1535     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1536     public final Builder mergeUnknownFields(
1537         final com.google.protobuf.UnknownFieldSet unknownFields) {
1538       return super.mergeUnknownFields(unknownFields);
1539     }
1540 
1541     // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.Errors)
1542   }
1543 
1544   // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.Errors)
1545   private static final com.google.cloud.compute.v1.Errors DEFAULT_INSTANCE;
1546 
1547   static {
1548     DEFAULT_INSTANCE = new com.google.cloud.compute.v1.Errors();
1549   }
1550 
getDefaultInstance()1551   public static com.google.cloud.compute.v1.Errors getDefaultInstance() {
1552     return DEFAULT_INSTANCE;
1553   }
1554 
1555   private static final com.google.protobuf.Parser<Errors> PARSER =
1556       new com.google.protobuf.AbstractParser<Errors>() {
1557         @java.lang.Override
1558         public Errors parsePartialFrom(
1559             com.google.protobuf.CodedInputStream input,
1560             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1561             throws com.google.protobuf.InvalidProtocolBufferException {
1562           Builder builder = newBuilder();
1563           try {
1564             builder.mergeFrom(input, extensionRegistry);
1565           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1566             throw e.setUnfinishedMessage(builder.buildPartial());
1567           } catch (com.google.protobuf.UninitializedMessageException e) {
1568             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1569           } catch (java.io.IOException e) {
1570             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1571                 .setUnfinishedMessage(builder.buildPartial());
1572           }
1573           return builder.buildPartial();
1574         }
1575       };
1576 
parser()1577   public static com.google.protobuf.Parser<Errors> parser() {
1578     return PARSER;
1579   }
1580 
1581   @java.lang.Override
getParserForType()1582   public com.google.protobuf.Parser<Errors> getParserForType() {
1583     return PARSER;
1584   }
1585 
1586   @java.lang.Override
getDefaultInstanceForType()1587   public com.google.cloud.compute.v1.Errors getDefaultInstanceForType() {
1588     return DEFAULT_INSTANCE;
1589   }
1590 }
1591