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/rpc/error_details.proto 18 19 package com.google.rpc; 20 21 /** 22 * 23 * 24 * <pre> 25 * Describes the cause of the error with structured details. 26 * Example of an error when contacting the "pubsub.googleapis.com" API when it 27 * is not enabled: 28 * { "reason": "API_DISABLED" 29 * "domain": "googleapis.com" 30 * "metadata": { 31 * "resource": "projects/123", 32 * "service": "pubsub.googleapis.com" 33 * } 34 * } 35 * This response indicates that the pubsub.googleapis.com API is not enabled. 36 * Example of an error that is returned when attempting to create a Spanner 37 * instance in a region that is out of stock: 38 * { "reason": "STOCKOUT" 39 * "domain": "spanner.googleapis.com", 40 * "metadata": { 41 * "availableRegions": "us-central1,us-east2" 42 * } 43 * } 44 * </pre> 45 * 46 * Protobuf type {@code google.rpc.ErrorInfo} 47 */ 48 public final class ErrorInfo extends com.google.protobuf.GeneratedMessageV3 49 implements 50 // @@protoc_insertion_point(message_implements:google.rpc.ErrorInfo) 51 ErrorInfoOrBuilder { 52 private static final long serialVersionUID = 0L; 53 // Use ErrorInfo.newBuilder() to construct. ErrorInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)54 private ErrorInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 55 super(builder); 56 } 57 ErrorInfo()58 private ErrorInfo() { 59 reason_ = ""; 60 domain_ = ""; 61 } 62 63 @java.lang.Override 64 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)65 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 66 return new ErrorInfo(); 67 } 68 69 @java.lang.Override getUnknownFields()70 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 71 return this.unknownFields; 72 } 73 getDescriptor()74 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 75 return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_ErrorInfo_descriptor; 76 } 77 78 @SuppressWarnings({"rawtypes"}) 79 @java.lang.Override internalGetMapField(int number)80 protected com.google.protobuf.MapField internalGetMapField(int number) { 81 switch (number) { 82 case 3: 83 return internalGetMetadata(); 84 default: 85 throw new RuntimeException("Invalid map field number: " + number); 86 } 87 } 88 89 @java.lang.Override 90 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()91 internalGetFieldAccessorTable() { 92 return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_ErrorInfo_fieldAccessorTable 93 .ensureFieldAccessorsInitialized( 94 com.google.rpc.ErrorInfo.class, com.google.rpc.ErrorInfo.Builder.class); 95 } 96 97 public static final int REASON_FIELD_NUMBER = 1; 98 99 @SuppressWarnings("serial") 100 private volatile java.lang.Object reason_ = ""; 101 /** 102 * 103 * 104 * <pre> 105 * The reason of the error. This is a constant value that identifies the 106 * proximate cause of the error. Error reasons are unique within a particular 107 * domain of errors. This should be at most 63 characters and match a 108 * regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents 109 * UPPER_SNAKE_CASE. 110 * </pre> 111 * 112 * <code>string reason = 1;</code> 113 * 114 * @return The reason. 115 */ 116 @java.lang.Override getReason()117 public java.lang.String getReason() { 118 java.lang.Object ref = reason_; 119 if (ref instanceof java.lang.String) { 120 return (java.lang.String) ref; 121 } else { 122 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 123 java.lang.String s = bs.toStringUtf8(); 124 reason_ = s; 125 return s; 126 } 127 } 128 /** 129 * 130 * 131 * <pre> 132 * The reason of the error. This is a constant value that identifies the 133 * proximate cause of the error. Error reasons are unique within a particular 134 * domain of errors. This should be at most 63 characters and match a 135 * regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents 136 * UPPER_SNAKE_CASE. 137 * </pre> 138 * 139 * <code>string reason = 1;</code> 140 * 141 * @return The bytes for reason. 142 */ 143 @java.lang.Override getReasonBytes()144 public com.google.protobuf.ByteString getReasonBytes() { 145 java.lang.Object ref = reason_; 146 if (ref instanceof java.lang.String) { 147 com.google.protobuf.ByteString b = 148 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 149 reason_ = b; 150 return b; 151 } else { 152 return (com.google.protobuf.ByteString) ref; 153 } 154 } 155 156 public static final int DOMAIN_FIELD_NUMBER = 2; 157 158 @SuppressWarnings("serial") 159 private volatile java.lang.Object domain_ = ""; 160 /** 161 * 162 * 163 * <pre> 164 * The logical grouping to which the "reason" belongs. The error domain 165 * is typically the registered service name of the tool or product that 166 * generates the error. Example: "pubsub.googleapis.com". If the error is 167 * generated by some common infrastructure, the error domain must be a 168 * globally unique value that identifies the infrastructure. For Google API 169 * infrastructure, the error domain is "googleapis.com". 170 * </pre> 171 * 172 * <code>string domain = 2;</code> 173 * 174 * @return The domain. 175 */ 176 @java.lang.Override getDomain()177 public java.lang.String getDomain() { 178 java.lang.Object ref = domain_; 179 if (ref instanceof java.lang.String) { 180 return (java.lang.String) ref; 181 } else { 182 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 183 java.lang.String s = bs.toStringUtf8(); 184 domain_ = s; 185 return s; 186 } 187 } 188 /** 189 * 190 * 191 * <pre> 192 * The logical grouping to which the "reason" belongs. The error domain 193 * is typically the registered service name of the tool or product that 194 * generates the error. Example: "pubsub.googleapis.com". If the error is 195 * generated by some common infrastructure, the error domain must be a 196 * globally unique value that identifies the infrastructure. For Google API 197 * infrastructure, the error domain is "googleapis.com". 198 * </pre> 199 * 200 * <code>string domain = 2;</code> 201 * 202 * @return The bytes for domain. 203 */ 204 @java.lang.Override getDomainBytes()205 public com.google.protobuf.ByteString getDomainBytes() { 206 java.lang.Object ref = domain_; 207 if (ref instanceof java.lang.String) { 208 com.google.protobuf.ByteString b = 209 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 210 domain_ = b; 211 return b; 212 } else { 213 return (com.google.protobuf.ByteString) ref; 214 } 215 } 216 217 public static final int METADATA_FIELD_NUMBER = 3; 218 219 private static final class MetadataDefaultEntryHolder { 220 static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry = 221 com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance( 222 com.google.rpc.ErrorDetailsProto 223 .internal_static_google_rpc_ErrorInfo_MetadataEntry_descriptor, 224 com.google.protobuf.WireFormat.FieldType.STRING, 225 "", 226 com.google.protobuf.WireFormat.FieldType.STRING, 227 ""); 228 } 229 230 @SuppressWarnings("serial") 231 private com.google.protobuf.MapField<java.lang.String, java.lang.String> metadata_; 232 internalGetMetadata()233 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMetadata() { 234 if (metadata_ == null) { 235 return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); 236 } 237 return metadata_; 238 } 239 getMetadataCount()240 public int getMetadataCount() { 241 return internalGetMetadata().getMap().size(); 242 } 243 /** 244 * 245 * 246 * <pre> 247 * Additional structured details about this error. 248 * Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in 249 * length. When identifying the current value of an exceeded limit, the units 250 * should be contained in the key, not the value. For example, rather than 251 * {"instanceLimit": "100/request"}, should be returned as, 252 * {"instanceLimitPerRequest": "100"}, if the client exceeds the number of 253 * instances that can be created in a single (batch) request. 254 * </pre> 255 * 256 * <code>map<string, string> metadata = 3;</code> 257 */ 258 @java.lang.Override containsMetadata(java.lang.String key)259 public boolean containsMetadata(java.lang.String key) { 260 if (key == null) { 261 throw new NullPointerException("map key"); 262 } 263 return internalGetMetadata().getMap().containsKey(key); 264 } 265 /** Use {@link #getMetadataMap()} instead. */ 266 @java.lang.Override 267 @java.lang.Deprecated getMetadata()268 public java.util.Map<java.lang.String, java.lang.String> getMetadata() { 269 return getMetadataMap(); 270 } 271 /** 272 * 273 * 274 * <pre> 275 * Additional structured details about this error. 276 * Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in 277 * length. When identifying the current value of an exceeded limit, the units 278 * should be contained in the key, not the value. For example, rather than 279 * {"instanceLimit": "100/request"}, should be returned as, 280 * {"instanceLimitPerRequest": "100"}, if the client exceeds the number of 281 * instances that can be created in a single (batch) request. 282 * </pre> 283 * 284 * <code>map<string, string> metadata = 3;</code> 285 */ 286 @java.lang.Override getMetadataMap()287 public java.util.Map<java.lang.String, java.lang.String> getMetadataMap() { 288 return internalGetMetadata().getMap(); 289 } 290 /** 291 * 292 * 293 * <pre> 294 * Additional structured details about this error. 295 * Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in 296 * length. When identifying the current value of an exceeded limit, the units 297 * should be contained in the key, not the value. For example, rather than 298 * {"instanceLimit": "100/request"}, should be returned as, 299 * {"instanceLimitPerRequest": "100"}, if the client exceeds the number of 300 * instances that can be created in a single (batch) request. 301 * </pre> 302 * 303 * <code>map<string, string> metadata = 3;</code> 304 */ 305 @java.lang.Override getMetadataOrDefault( java.lang.String key, java.lang.String defaultValue)306 public /* nullable */ java.lang.String getMetadataOrDefault( 307 java.lang.String key, 308 /* nullable */ 309 java.lang.String defaultValue) { 310 if (key == null) { 311 throw new NullPointerException("map key"); 312 } 313 java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap(); 314 return map.containsKey(key) ? map.get(key) : defaultValue; 315 } 316 /** 317 * 318 * 319 * <pre> 320 * Additional structured details about this error. 321 * Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in 322 * length. When identifying the current value of an exceeded limit, the units 323 * should be contained in the key, not the value. For example, rather than 324 * {"instanceLimit": "100/request"}, should be returned as, 325 * {"instanceLimitPerRequest": "100"}, if the client exceeds the number of 326 * instances that can be created in a single (batch) request. 327 * </pre> 328 * 329 * <code>map<string, string> metadata = 3;</code> 330 */ 331 @java.lang.Override getMetadataOrThrow(java.lang.String key)332 public java.lang.String getMetadataOrThrow(java.lang.String key) { 333 if (key == null) { 334 throw new NullPointerException("map key"); 335 } 336 java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap(); 337 if (!map.containsKey(key)) { 338 throw new java.lang.IllegalArgumentException(); 339 } 340 return map.get(key); 341 } 342 343 private byte memoizedIsInitialized = -1; 344 345 @java.lang.Override isInitialized()346 public final boolean isInitialized() { 347 byte isInitialized = memoizedIsInitialized; 348 if (isInitialized == 1) return true; 349 if (isInitialized == 0) return false; 350 351 memoizedIsInitialized = 1; 352 return true; 353 } 354 355 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)356 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 357 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reason_)) { 358 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, reason_); 359 } 360 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(domain_)) { 361 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, domain_); 362 } 363 com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( 364 output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 3); 365 getUnknownFields().writeTo(output); 366 } 367 368 @java.lang.Override getSerializedSize()369 public int getSerializedSize() { 370 int size = memoizedSize; 371 if (size != -1) return size; 372 373 size = 0; 374 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reason_)) { 375 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, reason_); 376 } 377 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(domain_)) { 378 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, domain_); 379 } 380 for (java.util.Map.Entry<java.lang.String, java.lang.String> entry : 381 internalGetMetadata().getMap().entrySet()) { 382 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> metadata__ = 383 MetadataDefaultEntryHolder.defaultEntry 384 .newBuilderForType() 385 .setKey(entry.getKey()) 386 .setValue(entry.getValue()) 387 .build(); 388 size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, metadata__); 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.rpc.ErrorInfo)) { 401 return super.equals(obj); 402 } 403 com.google.rpc.ErrorInfo other = (com.google.rpc.ErrorInfo) obj; 404 405 if (!getReason().equals(other.getReason())) return false; 406 if (!getDomain().equals(other.getDomain())) return false; 407 if (!internalGetMetadata().equals(other.internalGetMetadata())) return false; 408 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 409 return true; 410 } 411 412 @java.lang.Override hashCode()413 public int hashCode() { 414 if (memoizedHashCode != 0) { 415 return memoizedHashCode; 416 } 417 int hash = 41; 418 hash = (19 * hash) + getDescriptor().hashCode(); 419 hash = (37 * hash) + REASON_FIELD_NUMBER; 420 hash = (53 * hash) + getReason().hashCode(); 421 hash = (37 * hash) + DOMAIN_FIELD_NUMBER; 422 hash = (53 * hash) + getDomain().hashCode(); 423 if (!internalGetMetadata().getMap().isEmpty()) { 424 hash = (37 * hash) + METADATA_FIELD_NUMBER; 425 hash = (53 * hash) + internalGetMetadata().hashCode(); 426 } 427 hash = (29 * hash) + getUnknownFields().hashCode(); 428 memoizedHashCode = hash; 429 return hash; 430 } 431 parseFrom(java.nio.ByteBuffer data)432 public static com.google.rpc.ErrorInfo parseFrom(java.nio.ByteBuffer data) 433 throws com.google.protobuf.InvalidProtocolBufferException { 434 return PARSER.parseFrom(data); 435 } 436 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)437 public static com.google.rpc.ErrorInfo parseFrom( 438 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 439 throws com.google.protobuf.InvalidProtocolBufferException { 440 return PARSER.parseFrom(data, extensionRegistry); 441 } 442 parseFrom(com.google.protobuf.ByteString data)443 public static com.google.rpc.ErrorInfo parseFrom(com.google.protobuf.ByteString data) 444 throws com.google.protobuf.InvalidProtocolBufferException { 445 return PARSER.parseFrom(data); 446 } 447 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)448 public static com.google.rpc.ErrorInfo parseFrom( 449 com.google.protobuf.ByteString data, 450 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 451 throws com.google.protobuf.InvalidProtocolBufferException { 452 return PARSER.parseFrom(data, extensionRegistry); 453 } 454 parseFrom(byte[] data)455 public static com.google.rpc.ErrorInfo parseFrom(byte[] data) 456 throws com.google.protobuf.InvalidProtocolBufferException { 457 return PARSER.parseFrom(data); 458 } 459 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)460 public static com.google.rpc.ErrorInfo parseFrom( 461 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 462 throws com.google.protobuf.InvalidProtocolBufferException { 463 return PARSER.parseFrom(data, extensionRegistry); 464 } 465 parseFrom(java.io.InputStream input)466 public static com.google.rpc.ErrorInfo parseFrom(java.io.InputStream input) 467 throws java.io.IOException { 468 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 469 } 470 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)471 public static com.google.rpc.ErrorInfo parseFrom( 472 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 473 throws java.io.IOException { 474 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 475 PARSER, input, extensionRegistry); 476 } 477 parseDelimitedFrom(java.io.InputStream input)478 public static com.google.rpc.ErrorInfo parseDelimitedFrom(java.io.InputStream input) 479 throws java.io.IOException { 480 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 481 } 482 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)483 public static com.google.rpc.ErrorInfo parseDelimitedFrom( 484 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 485 throws java.io.IOException { 486 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 487 PARSER, input, extensionRegistry); 488 } 489 parseFrom(com.google.protobuf.CodedInputStream input)490 public static com.google.rpc.ErrorInfo parseFrom(com.google.protobuf.CodedInputStream input) 491 throws java.io.IOException { 492 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 493 } 494 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)495 public static com.google.rpc.ErrorInfo parseFrom( 496 com.google.protobuf.CodedInputStream input, 497 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 498 throws java.io.IOException { 499 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 500 PARSER, input, extensionRegistry); 501 } 502 503 @java.lang.Override newBuilderForType()504 public Builder newBuilderForType() { 505 return newBuilder(); 506 } 507 newBuilder()508 public static Builder newBuilder() { 509 return DEFAULT_INSTANCE.toBuilder(); 510 } 511 newBuilder(com.google.rpc.ErrorInfo prototype)512 public static Builder newBuilder(com.google.rpc.ErrorInfo prototype) { 513 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 514 } 515 516 @java.lang.Override toBuilder()517 public Builder toBuilder() { 518 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 519 } 520 521 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)522 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 523 Builder builder = new Builder(parent); 524 return builder; 525 } 526 /** 527 * 528 * 529 * <pre> 530 * Describes the cause of the error with structured details. 531 * Example of an error when contacting the "pubsub.googleapis.com" API when it 532 * is not enabled: 533 * { "reason": "API_DISABLED" 534 * "domain": "googleapis.com" 535 * "metadata": { 536 * "resource": "projects/123", 537 * "service": "pubsub.googleapis.com" 538 * } 539 * } 540 * This response indicates that the pubsub.googleapis.com API is not enabled. 541 * Example of an error that is returned when attempting to create a Spanner 542 * instance in a region that is out of stock: 543 * { "reason": "STOCKOUT" 544 * "domain": "spanner.googleapis.com", 545 * "metadata": { 546 * "availableRegions": "us-central1,us-east2" 547 * } 548 * } 549 * </pre> 550 * 551 * Protobuf type {@code google.rpc.ErrorInfo} 552 */ 553 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 554 implements 555 // @@protoc_insertion_point(builder_implements:google.rpc.ErrorInfo) 556 com.google.rpc.ErrorInfoOrBuilder { getDescriptor()557 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 558 return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_ErrorInfo_descriptor; 559 } 560 561 @SuppressWarnings({"rawtypes"}) internalGetMapField(int number)562 protected com.google.protobuf.MapField internalGetMapField(int number) { 563 switch (number) { 564 case 3: 565 return internalGetMetadata(); 566 default: 567 throw new RuntimeException("Invalid map field number: " + number); 568 } 569 } 570 571 @SuppressWarnings({"rawtypes"}) internalGetMutableMapField(int number)572 protected com.google.protobuf.MapField internalGetMutableMapField(int number) { 573 switch (number) { 574 case 3: 575 return internalGetMutableMetadata(); 576 default: 577 throw new RuntimeException("Invalid map field number: " + number); 578 } 579 } 580 581 @java.lang.Override 582 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()583 internalGetFieldAccessorTable() { 584 return com.google.rpc.ErrorDetailsProto 585 .internal_static_google_rpc_ErrorInfo_fieldAccessorTable 586 .ensureFieldAccessorsInitialized( 587 com.google.rpc.ErrorInfo.class, com.google.rpc.ErrorInfo.Builder.class); 588 } 589 590 // Construct using com.google.rpc.ErrorInfo.newBuilder() Builder()591 private Builder() {} 592 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)593 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 594 super(parent); 595 } 596 597 @java.lang.Override clear()598 public Builder clear() { 599 super.clear(); 600 bitField0_ = 0; 601 reason_ = ""; 602 domain_ = ""; 603 internalGetMutableMetadata().clear(); 604 return this; 605 } 606 607 @java.lang.Override getDescriptorForType()608 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 609 return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_ErrorInfo_descriptor; 610 } 611 612 @java.lang.Override getDefaultInstanceForType()613 public com.google.rpc.ErrorInfo getDefaultInstanceForType() { 614 return com.google.rpc.ErrorInfo.getDefaultInstance(); 615 } 616 617 @java.lang.Override build()618 public com.google.rpc.ErrorInfo build() { 619 com.google.rpc.ErrorInfo result = buildPartial(); 620 if (!result.isInitialized()) { 621 throw newUninitializedMessageException(result); 622 } 623 return result; 624 } 625 626 @java.lang.Override buildPartial()627 public com.google.rpc.ErrorInfo buildPartial() { 628 com.google.rpc.ErrorInfo result = new com.google.rpc.ErrorInfo(this); 629 if (bitField0_ != 0) { 630 buildPartial0(result); 631 } 632 onBuilt(); 633 return result; 634 } 635 buildPartial0(com.google.rpc.ErrorInfo result)636 private void buildPartial0(com.google.rpc.ErrorInfo result) { 637 int from_bitField0_ = bitField0_; 638 if (((from_bitField0_ & 0x00000001) != 0)) { 639 result.reason_ = reason_; 640 } 641 if (((from_bitField0_ & 0x00000002) != 0)) { 642 result.domain_ = domain_; 643 } 644 if (((from_bitField0_ & 0x00000004) != 0)) { 645 result.metadata_ = internalGetMetadata(); 646 result.metadata_.makeImmutable(); 647 } 648 } 649 650 @java.lang.Override clone()651 public Builder clone() { 652 return super.clone(); 653 } 654 655 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)656 public Builder setField( 657 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 658 return super.setField(field, value); 659 } 660 661 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)662 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 663 return super.clearField(field); 664 } 665 666 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)667 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 668 return super.clearOneof(oneof); 669 } 670 671 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)672 public Builder setRepeatedField( 673 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 674 return super.setRepeatedField(field, index, value); 675 } 676 677 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)678 public Builder addRepeatedField( 679 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 680 return super.addRepeatedField(field, value); 681 } 682 683 @java.lang.Override mergeFrom(com.google.protobuf.Message other)684 public Builder mergeFrom(com.google.protobuf.Message other) { 685 if (other instanceof com.google.rpc.ErrorInfo) { 686 return mergeFrom((com.google.rpc.ErrorInfo) other); 687 } else { 688 super.mergeFrom(other); 689 return this; 690 } 691 } 692 mergeFrom(com.google.rpc.ErrorInfo other)693 public Builder mergeFrom(com.google.rpc.ErrorInfo other) { 694 if (other == com.google.rpc.ErrorInfo.getDefaultInstance()) return this; 695 if (!other.getReason().isEmpty()) { 696 reason_ = other.reason_; 697 bitField0_ |= 0x00000001; 698 onChanged(); 699 } 700 if (!other.getDomain().isEmpty()) { 701 domain_ = other.domain_; 702 bitField0_ |= 0x00000002; 703 onChanged(); 704 } 705 internalGetMutableMetadata().mergeFrom(other.internalGetMetadata()); 706 bitField0_ |= 0x00000004; 707 this.mergeUnknownFields(other.getUnknownFields()); 708 onChanged(); 709 return this; 710 } 711 712 @java.lang.Override isInitialized()713 public final boolean isInitialized() { 714 return true; 715 } 716 717 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)718 public Builder mergeFrom( 719 com.google.protobuf.CodedInputStream input, 720 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 721 throws java.io.IOException { 722 if (extensionRegistry == null) { 723 throw new java.lang.NullPointerException(); 724 } 725 try { 726 boolean done = false; 727 while (!done) { 728 int tag = input.readTag(); 729 switch (tag) { 730 case 0: 731 done = true; 732 break; 733 case 10: 734 { 735 reason_ = input.readStringRequireUtf8(); 736 bitField0_ |= 0x00000001; 737 break; 738 } // case 10 739 case 18: 740 { 741 domain_ = input.readStringRequireUtf8(); 742 bitField0_ |= 0x00000002; 743 break; 744 } // case 18 745 case 26: 746 { 747 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> metadata__ = 748 input.readMessage( 749 MetadataDefaultEntryHolder.defaultEntry.getParserForType(), 750 extensionRegistry); 751 internalGetMutableMetadata() 752 .getMutableMap() 753 .put(metadata__.getKey(), metadata__.getValue()); 754 bitField0_ |= 0x00000004; 755 break; 756 } // case 26 757 default: 758 { 759 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 760 done = true; // was an endgroup tag 761 } 762 break; 763 } // default: 764 } // switch (tag) 765 } // while (!done) 766 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 767 throw e.unwrapIOException(); 768 } finally { 769 onChanged(); 770 } // finally 771 return this; 772 } 773 774 private int bitField0_; 775 776 private java.lang.Object reason_ = ""; 777 /** 778 * 779 * 780 * <pre> 781 * The reason of the error. This is a constant value that identifies the 782 * proximate cause of the error. Error reasons are unique within a particular 783 * domain of errors. This should be at most 63 characters and match a 784 * regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents 785 * UPPER_SNAKE_CASE. 786 * </pre> 787 * 788 * <code>string reason = 1;</code> 789 * 790 * @return The reason. 791 */ getReason()792 public java.lang.String getReason() { 793 java.lang.Object ref = reason_; 794 if (!(ref instanceof java.lang.String)) { 795 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 796 java.lang.String s = bs.toStringUtf8(); 797 reason_ = s; 798 return s; 799 } else { 800 return (java.lang.String) ref; 801 } 802 } 803 /** 804 * 805 * 806 * <pre> 807 * The reason of the error. This is a constant value that identifies the 808 * proximate cause of the error. Error reasons are unique within a particular 809 * domain of errors. This should be at most 63 characters and match a 810 * regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents 811 * UPPER_SNAKE_CASE. 812 * </pre> 813 * 814 * <code>string reason = 1;</code> 815 * 816 * @return The bytes for reason. 817 */ getReasonBytes()818 public com.google.protobuf.ByteString getReasonBytes() { 819 java.lang.Object ref = reason_; 820 if (ref instanceof String) { 821 com.google.protobuf.ByteString b = 822 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 823 reason_ = b; 824 return b; 825 } else { 826 return (com.google.protobuf.ByteString) ref; 827 } 828 } 829 /** 830 * 831 * 832 * <pre> 833 * The reason of the error. This is a constant value that identifies the 834 * proximate cause of the error. Error reasons are unique within a particular 835 * domain of errors. This should be at most 63 characters and match a 836 * regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents 837 * UPPER_SNAKE_CASE. 838 * </pre> 839 * 840 * <code>string reason = 1;</code> 841 * 842 * @param value The reason to set. 843 * @return This builder for chaining. 844 */ setReason(java.lang.String value)845 public Builder setReason(java.lang.String value) { 846 if (value == null) { 847 throw new NullPointerException(); 848 } 849 reason_ = value; 850 bitField0_ |= 0x00000001; 851 onChanged(); 852 return this; 853 } 854 /** 855 * 856 * 857 * <pre> 858 * The reason of the error. This is a constant value that identifies the 859 * proximate cause of the error. Error reasons are unique within a particular 860 * domain of errors. This should be at most 63 characters and match a 861 * regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents 862 * UPPER_SNAKE_CASE. 863 * </pre> 864 * 865 * <code>string reason = 1;</code> 866 * 867 * @return This builder for chaining. 868 */ clearReason()869 public Builder clearReason() { 870 reason_ = getDefaultInstance().getReason(); 871 bitField0_ = (bitField0_ & ~0x00000001); 872 onChanged(); 873 return this; 874 } 875 /** 876 * 877 * 878 * <pre> 879 * The reason of the error. This is a constant value that identifies the 880 * proximate cause of the error. Error reasons are unique within a particular 881 * domain of errors. This should be at most 63 characters and match a 882 * regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents 883 * UPPER_SNAKE_CASE. 884 * </pre> 885 * 886 * <code>string reason = 1;</code> 887 * 888 * @param value The bytes for reason to set. 889 * @return This builder for chaining. 890 */ setReasonBytes(com.google.protobuf.ByteString value)891 public Builder setReasonBytes(com.google.protobuf.ByteString value) { 892 if (value == null) { 893 throw new NullPointerException(); 894 } 895 checkByteStringIsUtf8(value); 896 reason_ = value; 897 bitField0_ |= 0x00000001; 898 onChanged(); 899 return this; 900 } 901 902 private java.lang.Object domain_ = ""; 903 /** 904 * 905 * 906 * <pre> 907 * The logical grouping to which the "reason" belongs. The error domain 908 * is typically the registered service name of the tool or product that 909 * generates the error. Example: "pubsub.googleapis.com". If the error is 910 * generated by some common infrastructure, the error domain must be a 911 * globally unique value that identifies the infrastructure. For Google API 912 * infrastructure, the error domain is "googleapis.com". 913 * </pre> 914 * 915 * <code>string domain = 2;</code> 916 * 917 * @return The domain. 918 */ getDomain()919 public java.lang.String getDomain() { 920 java.lang.Object ref = domain_; 921 if (!(ref instanceof java.lang.String)) { 922 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 923 java.lang.String s = bs.toStringUtf8(); 924 domain_ = s; 925 return s; 926 } else { 927 return (java.lang.String) ref; 928 } 929 } 930 /** 931 * 932 * 933 * <pre> 934 * The logical grouping to which the "reason" belongs. The error domain 935 * is typically the registered service name of the tool or product that 936 * generates the error. Example: "pubsub.googleapis.com". If the error is 937 * generated by some common infrastructure, the error domain must be a 938 * globally unique value that identifies the infrastructure. For Google API 939 * infrastructure, the error domain is "googleapis.com". 940 * </pre> 941 * 942 * <code>string domain = 2;</code> 943 * 944 * @return The bytes for domain. 945 */ getDomainBytes()946 public com.google.protobuf.ByteString getDomainBytes() { 947 java.lang.Object ref = domain_; 948 if (ref instanceof String) { 949 com.google.protobuf.ByteString b = 950 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 951 domain_ = b; 952 return b; 953 } else { 954 return (com.google.protobuf.ByteString) ref; 955 } 956 } 957 /** 958 * 959 * 960 * <pre> 961 * The logical grouping to which the "reason" belongs. The error domain 962 * is typically the registered service name of the tool or product that 963 * generates the error. Example: "pubsub.googleapis.com". If the error is 964 * generated by some common infrastructure, the error domain must be a 965 * globally unique value that identifies the infrastructure. For Google API 966 * infrastructure, the error domain is "googleapis.com". 967 * </pre> 968 * 969 * <code>string domain = 2;</code> 970 * 971 * @param value The domain to set. 972 * @return This builder for chaining. 973 */ setDomain(java.lang.String value)974 public Builder setDomain(java.lang.String value) { 975 if (value == null) { 976 throw new NullPointerException(); 977 } 978 domain_ = value; 979 bitField0_ |= 0x00000002; 980 onChanged(); 981 return this; 982 } 983 /** 984 * 985 * 986 * <pre> 987 * The logical grouping to which the "reason" belongs. The error domain 988 * is typically the registered service name of the tool or product that 989 * generates the error. Example: "pubsub.googleapis.com". If the error is 990 * generated by some common infrastructure, the error domain must be a 991 * globally unique value that identifies the infrastructure. For Google API 992 * infrastructure, the error domain is "googleapis.com". 993 * </pre> 994 * 995 * <code>string domain = 2;</code> 996 * 997 * @return This builder for chaining. 998 */ clearDomain()999 public Builder clearDomain() { 1000 domain_ = getDefaultInstance().getDomain(); 1001 bitField0_ = (bitField0_ & ~0x00000002); 1002 onChanged(); 1003 return this; 1004 } 1005 /** 1006 * 1007 * 1008 * <pre> 1009 * The logical grouping to which the "reason" belongs. The error domain 1010 * is typically the registered service name of the tool or product that 1011 * generates the error. Example: "pubsub.googleapis.com". If the error is 1012 * generated by some common infrastructure, the error domain must be a 1013 * globally unique value that identifies the infrastructure. For Google API 1014 * infrastructure, the error domain is "googleapis.com". 1015 * </pre> 1016 * 1017 * <code>string domain = 2;</code> 1018 * 1019 * @param value The bytes for domain to set. 1020 * @return This builder for chaining. 1021 */ setDomainBytes(com.google.protobuf.ByteString value)1022 public Builder setDomainBytes(com.google.protobuf.ByteString value) { 1023 if (value == null) { 1024 throw new NullPointerException(); 1025 } 1026 checkByteStringIsUtf8(value); 1027 domain_ = value; 1028 bitField0_ |= 0x00000002; 1029 onChanged(); 1030 return this; 1031 } 1032 1033 private com.google.protobuf.MapField<java.lang.String, java.lang.String> metadata_; 1034 internalGetMetadata()1035 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMetadata() { 1036 if (metadata_ == null) { 1037 return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); 1038 } 1039 return metadata_; 1040 } 1041 1042 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableMetadata()1043 internalGetMutableMetadata() { 1044 if (metadata_ == null) { 1045 metadata_ = 1046 com.google.protobuf.MapField.newMapField(MetadataDefaultEntryHolder.defaultEntry); 1047 } 1048 if (!metadata_.isMutable()) { 1049 metadata_ = metadata_.copy(); 1050 } 1051 bitField0_ |= 0x00000004; 1052 onChanged(); 1053 return metadata_; 1054 } 1055 getMetadataCount()1056 public int getMetadataCount() { 1057 return internalGetMetadata().getMap().size(); 1058 } 1059 /** 1060 * 1061 * 1062 * <pre> 1063 * Additional structured details about this error. 1064 * Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in 1065 * length. When identifying the current value of an exceeded limit, the units 1066 * should be contained in the key, not the value. For example, rather than 1067 * {"instanceLimit": "100/request"}, should be returned as, 1068 * {"instanceLimitPerRequest": "100"}, if the client exceeds the number of 1069 * instances that can be created in a single (batch) request. 1070 * </pre> 1071 * 1072 * <code>map<string, string> metadata = 3;</code> 1073 */ 1074 @java.lang.Override containsMetadata(java.lang.String key)1075 public boolean containsMetadata(java.lang.String key) { 1076 if (key == null) { 1077 throw new NullPointerException("map key"); 1078 } 1079 return internalGetMetadata().getMap().containsKey(key); 1080 } 1081 /** Use {@link #getMetadataMap()} instead. */ 1082 @java.lang.Override 1083 @java.lang.Deprecated getMetadata()1084 public java.util.Map<java.lang.String, java.lang.String> getMetadata() { 1085 return getMetadataMap(); 1086 } 1087 /** 1088 * 1089 * 1090 * <pre> 1091 * Additional structured details about this error. 1092 * Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in 1093 * length. When identifying the current value of an exceeded limit, the units 1094 * should be contained in the key, not the value. For example, rather than 1095 * {"instanceLimit": "100/request"}, should be returned as, 1096 * {"instanceLimitPerRequest": "100"}, if the client exceeds the number of 1097 * instances that can be created in a single (batch) request. 1098 * </pre> 1099 * 1100 * <code>map<string, string> metadata = 3;</code> 1101 */ 1102 @java.lang.Override getMetadataMap()1103 public java.util.Map<java.lang.String, java.lang.String> getMetadataMap() { 1104 return internalGetMetadata().getMap(); 1105 } 1106 /** 1107 * 1108 * 1109 * <pre> 1110 * Additional structured details about this error. 1111 * Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in 1112 * length. When identifying the current value of an exceeded limit, the units 1113 * should be contained in the key, not the value. For example, rather than 1114 * {"instanceLimit": "100/request"}, should be returned as, 1115 * {"instanceLimitPerRequest": "100"}, if the client exceeds the number of 1116 * instances that can be created in a single (batch) request. 1117 * </pre> 1118 * 1119 * <code>map<string, string> metadata = 3;</code> 1120 */ 1121 @java.lang.Override getMetadataOrDefault( java.lang.String key, java.lang.String defaultValue)1122 public /* nullable */ java.lang.String getMetadataOrDefault( 1123 java.lang.String key, 1124 /* nullable */ 1125 java.lang.String defaultValue) { 1126 if (key == null) { 1127 throw new NullPointerException("map key"); 1128 } 1129 java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap(); 1130 return map.containsKey(key) ? map.get(key) : defaultValue; 1131 } 1132 /** 1133 * 1134 * 1135 * <pre> 1136 * Additional structured details about this error. 1137 * Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in 1138 * length. When identifying the current value of an exceeded limit, the units 1139 * should be contained in the key, not the value. For example, rather than 1140 * {"instanceLimit": "100/request"}, should be returned as, 1141 * {"instanceLimitPerRequest": "100"}, if the client exceeds the number of 1142 * instances that can be created in a single (batch) request. 1143 * </pre> 1144 * 1145 * <code>map<string, string> metadata = 3;</code> 1146 */ 1147 @java.lang.Override getMetadataOrThrow(java.lang.String key)1148 public java.lang.String getMetadataOrThrow(java.lang.String key) { 1149 if (key == null) { 1150 throw new NullPointerException("map key"); 1151 } 1152 java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap(); 1153 if (!map.containsKey(key)) { 1154 throw new java.lang.IllegalArgumentException(); 1155 } 1156 return map.get(key); 1157 } 1158 clearMetadata()1159 public Builder clearMetadata() { 1160 bitField0_ = (bitField0_ & ~0x00000004); 1161 internalGetMutableMetadata().getMutableMap().clear(); 1162 return this; 1163 } 1164 /** 1165 * 1166 * 1167 * <pre> 1168 * Additional structured details about this error. 1169 * Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in 1170 * length. When identifying the current value of an exceeded limit, the units 1171 * should be contained in the key, not the value. For example, rather than 1172 * {"instanceLimit": "100/request"}, should be returned as, 1173 * {"instanceLimitPerRequest": "100"}, if the client exceeds the number of 1174 * instances that can be created in a single (batch) request. 1175 * </pre> 1176 * 1177 * <code>map<string, string> metadata = 3;</code> 1178 */ removeMetadata(java.lang.String key)1179 public Builder removeMetadata(java.lang.String key) { 1180 if (key == null) { 1181 throw new NullPointerException("map key"); 1182 } 1183 internalGetMutableMetadata().getMutableMap().remove(key); 1184 return this; 1185 } 1186 /** Use alternate mutation accessors instead. */ 1187 @java.lang.Deprecated getMutableMetadata()1188 public java.util.Map<java.lang.String, java.lang.String> getMutableMetadata() { 1189 bitField0_ |= 0x00000004; 1190 return internalGetMutableMetadata().getMutableMap(); 1191 } 1192 /** 1193 * 1194 * 1195 * <pre> 1196 * Additional structured details about this error. 1197 * Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in 1198 * length. When identifying the current value of an exceeded limit, the units 1199 * should be contained in the key, not the value. For example, rather than 1200 * {"instanceLimit": "100/request"}, should be returned as, 1201 * {"instanceLimitPerRequest": "100"}, if the client exceeds the number of 1202 * instances that can be created in a single (batch) request. 1203 * </pre> 1204 * 1205 * <code>map<string, string> metadata = 3;</code> 1206 */ putMetadata(java.lang.String key, java.lang.String value)1207 public Builder putMetadata(java.lang.String key, java.lang.String value) { 1208 if (key == null) { 1209 throw new NullPointerException("map key"); 1210 } 1211 if (value == null) { 1212 throw new NullPointerException("map value"); 1213 } 1214 internalGetMutableMetadata().getMutableMap().put(key, value); 1215 bitField0_ |= 0x00000004; 1216 return this; 1217 } 1218 /** 1219 * 1220 * 1221 * <pre> 1222 * Additional structured details about this error. 1223 * Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in 1224 * length. When identifying the current value of an exceeded limit, the units 1225 * should be contained in the key, not the value. For example, rather than 1226 * {"instanceLimit": "100/request"}, should be returned as, 1227 * {"instanceLimitPerRequest": "100"}, if the client exceeds the number of 1228 * instances that can be created in a single (batch) request. 1229 * </pre> 1230 * 1231 * <code>map<string, string> metadata = 3;</code> 1232 */ putAllMetadata(java.util.Map<java.lang.String, java.lang.String> values)1233 public Builder putAllMetadata(java.util.Map<java.lang.String, java.lang.String> values) { 1234 internalGetMutableMetadata().getMutableMap().putAll(values); 1235 bitField0_ |= 0x00000004; 1236 return this; 1237 } 1238 1239 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1240 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1241 return super.setUnknownFields(unknownFields); 1242 } 1243 1244 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1245 public final Builder mergeUnknownFields( 1246 final com.google.protobuf.UnknownFieldSet unknownFields) { 1247 return super.mergeUnknownFields(unknownFields); 1248 } 1249 1250 // @@protoc_insertion_point(builder_scope:google.rpc.ErrorInfo) 1251 } 1252 1253 // @@protoc_insertion_point(class_scope:google.rpc.ErrorInfo) 1254 private static final com.google.rpc.ErrorInfo DEFAULT_INSTANCE; 1255 1256 static { 1257 DEFAULT_INSTANCE = new com.google.rpc.ErrorInfo(); 1258 } 1259 getDefaultInstance()1260 public static com.google.rpc.ErrorInfo getDefaultInstance() { 1261 return DEFAULT_INSTANCE; 1262 } 1263 1264 private static final com.google.protobuf.Parser<ErrorInfo> PARSER = 1265 new com.google.protobuf.AbstractParser<ErrorInfo>() { 1266 @java.lang.Override 1267 public ErrorInfo parsePartialFrom( 1268 com.google.protobuf.CodedInputStream input, 1269 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1270 throws com.google.protobuf.InvalidProtocolBufferException { 1271 Builder builder = newBuilder(); 1272 try { 1273 builder.mergeFrom(input, extensionRegistry); 1274 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1275 throw e.setUnfinishedMessage(builder.buildPartial()); 1276 } catch (com.google.protobuf.UninitializedMessageException e) { 1277 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1278 } catch (java.io.IOException e) { 1279 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1280 .setUnfinishedMessage(builder.buildPartial()); 1281 } 1282 return builder.buildPartial(); 1283 } 1284 }; 1285 parser()1286 public static com.google.protobuf.Parser<ErrorInfo> parser() { 1287 return PARSER; 1288 } 1289 1290 @java.lang.Override getParserForType()1291 public com.google.protobuf.Parser<ErrorInfo> getParserForType() { 1292 return PARSER; 1293 } 1294 1295 @java.lang.Override getDefaultInstanceForType()1296 public com.google.rpc.ErrorInfo getDefaultInstanceForType() { 1297 return DEFAULT_INSTANCE; 1298 } 1299 } 1300