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