1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/cloud/dialogflow/cx/v3/test_case.proto 18 19 package com.google.cloud.dialogflow.cx.v3; 20 21 /** 22 * 23 * 24 * <pre> 25 * Represents a test case. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.dialogflow.cx.v3.TestCase} 29 */ 30 public final class TestCase extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.TestCase) 33 TestCaseOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use TestCase.newBuilder() to construct. TestCase(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private TestCase(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 TestCase()40 private TestCase() { 41 name_ = ""; 42 tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; 43 displayName_ = ""; 44 notes_ = ""; 45 testCaseConversationTurns_ = java.util.Collections.emptyList(); 46 } 47 48 @java.lang.Override 49 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)50 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 51 return new TestCase(); 52 } 53 54 @java.lang.Override getUnknownFields()55 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 56 return this.unknownFields; 57 } 58 getDescriptor()59 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 60 return com.google.cloud.dialogflow.cx.v3.TestCaseProto 61 .internal_static_google_cloud_dialogflow_cx_v3_TestCase_descriptor; 62 } 63 64 @java.lang.Override 65 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()66 internalGetFieldAccessorTable() { 67 return com.google.cloud.dialogflow.cx.v3.TestCaseProto 68 .internal_static_google_cloud_dialogflow_cx_v3_TestCase_fieldAccessorTable 69 .ensureFieldAccessorsInitialized( 70 com.google.cloud.dialogflow.cx.v3.TestCase.class, 71 com.google.cloud.dialogflow.cx.v3.TestCase.Builder.class); 72 } 73 74 public static final int NAME_FIELD_NUMBER = 1; 75 76 @SuppressWarnings("serial") 77 private volatile java.lang.Object name_ = ""; 78 /** 79 * 80 * 81 * <pre> 82 * The unique identifier of the test case. 83 * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase] 84 * will populate the name automatically. Otherwise use format: 85 * `projects/<Project ID>/locations/<LocationID>/agents/ 86 * <AgentID>/testCases/<TestCase ID>`. 87 * </pre> 88 * 89 * <code>string name = 1;</code> 90 * 91 * @return The name. 92 */ 93 @java.lang.Override getName()94 public java.lang.String getName() { 95 java.lang.Object ref = name_; 96 if (ref instanceof java.lang.String) { 97 return (java.lang.String) ref; 98 } else { 99 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 100 java.lang.String s = bs.toStringUtf8(); 101 name_ = s; 102 return s; 103 } 104 } 105 /** 106 * 107 * 108 * <pre> 109 * The unique identifier of the test case. 110 * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase] 111 * will populate the name automatically. Otherwise use format: 112 * `projects/<Project ID>/locations/<LocationID>/agents/ 113 * <AgentID>/testCases/<TestCase ID>`. 114 * </pre> 115 * 116 * <code>string name = 1;</code> 117 * 118 * @return The bytes for name. 119 */ 120 @java.lang.Override getNameBytes()121 public com.google.protobuf.ByteString getNameBytes() { 122 java.lang.Object ref = name_; 123 if (ref instanceof java.lang.String) { 124 com.google.protobuf.ByteString b = 125 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 126 name_ = b; 127 return b; 128 } else { 129 return (com.google.protobuf.ByteString) ref; 130 } 131 } 132 133 public static final int TAGS_FIELD_NUMBER = 2; 134 135 @SuppressWarnings("serial") 136 private com.google.protobuf.LazyStringList tags_; 137 /** 138 * 139 * 140 * <pre> 141 * Tags are short descriptions that users may apply to test cases for 142 * organizational and filtering purposes. Each tag should start with "#" and 143 * has a limit of 30 characters. 144 * </pre> 145 * 146 * <code>repeated string tags = 2;</code> 147 * 148 * @return A list containing the tags. 149 */ getTagsList()150 public com.google.protobuf.ProtocolStringList getTagsList() { 151 return tags_; 152 } 153 /** 154 * 155 * 156 * <pre> 157 * Tags are short descriptions that users may apply to test cases for 158 * organizational and filtering purposes. Each tag should start with "#" and 159 * has a limit of 30 characters. 160 * </pre> 161 * 162 * <code>repeated string tags = 2;</code> 163 * 164 * @return The count of tags. 165 */ getTagsCount()166 public int getTagsCount() { 167 return tags_.size(); 168 } 169 /** 170 * 171 * 172 * <pre> 173 * Tags are short descriptions that users may apply to test cases for 174 * organizational and filtering purposes. Each tag should start with "#" and 175 * has a limit of 30 characters. 176 * </pre> 177 * 178 * <code>repeated string tags = 2;</code> 179 * 180 * @param index The index of the element to return. 181 * @return The tags at the given index. 182 */ getTags(int index)183 public java.lang.String getTags(int index) { 184 return tags_.get(index); 185 } 186 /** 187 * 188 * 189 * <pre> 190 * Tags are short descriptions that users may apply to test cases for 191 * organizational and filtering purposes. Each tag should start with "#" and 192 * has a limit of 30 characters. 193 * </pre> 194 * 195 * <code>repeated string tags = 2;</code> 196 * 197 * @param index The index of the value to return. 198 * @return The bytes of the tags at the given index. 199 */ getTagsBytes(int index)200 public com.google.protobuf.ByteString getTagsBytes(int index) { 201 return tags_.getByteString(index); 202 } 203 204 public static final int DISPLAY_NAME_FIELD_NUMBER = 3; 205 206 @SuppressWarnings("serial") 207 private volatile java.lang.Object displayName_ = ""; 208 /** 209 * 210 * 211 * <pre> 212 * Required. The human-readable name of the test case, unique within the 213 * agent. Limit of 200 characters. 214 * </pre> 215 * 216 * <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code> 217 * 218 * @return The displayName. 219 */ 220 @java.lang.Override getDisplayName()221 public java.lang.String getDisplayName() { 222 java.lang.Object ref = displayName_; 223 if (ref instanceof java.lang.String) { 224 return (java.lang.String) ref; 225 } else { 226 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 227 java.lang.String s = bs.toStringUtf8(); 228 displayName_ = s; 229 return s; 230 } 231 } 232 /** 233 * 234 * 235 * <pre> 236 * Required. The human-readable name of the test case, unique within the 237 * agent. Limit of 200 characters. 238 * </pre> 239 * 240 * <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code> 241 * 242 * @return The bytes for displayName. 243 */ 244 @java.lang.Override getDisplayNameBytes()245 public com.google.protobuf.ByteString getDisplayNameBytes() { 246 java.lang.Object ref = displayName_; 247 if (ref instanceof java.lang.String) { 248 com.google.protobuf.ByteString b = 249 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 250 displayName_ = b; 251 return b; 252 } else { 253 return (com.google.protobuf.ByteString) ref; 254 } 255 } 256 257 public static final int NOTES_FIELD_NUMBER = 4; 258 259 @SuppressWarnings("serial") 260 private volatile java.lang.Object notes_ = ""; 261 /** 262 * 263 * 264 * <pre> 265 * Additional freeform notes about the test case. Limit of 400 characters. 266 * </pre> 267 * 268 * <code>string notes = 4;</code> 269 * 270 * @return The notes. 271 */ 272 @java.lang.Override getNotes()273 public java.lang.String getNotes() { 274 java.lang.Object ref = notes_; 275 if (ref instanceof java.lang.String) { 276 return (java.lang.String) ref; 277 } else { 278 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 279 java.lang.String s = bs.toStringUtf8(); 280 notes_ = s; 281 return s; 282 } 283 } 284 /** 285 * 286 * 287 * <pre> 288 * Additional freeform notes about the test case. Limit of 400 characters. 289 * </pre> 290 * 291 * <code>string notes = 4;</code> 292 * 293 * @return The bytes for notes. 294 */ 295 @java.lang.Override getNotesBytes()296 public com.google.protobuf.ByteString getNotesBytes() { 297 java.lang.Object ref = notes_; 298 if (ref instanceof java.lang.String) { 299 com.google.protobuf.ByteString b = 300 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 301 notes_ = b; 302 return b; 303 } else { 304 return (com.google.protobuf.ByteString) ref; 305 } 306 } 307 308 public static final int TEST_CONFIG_FIELD_NUMBER = 13; 309 private com.google.cloud.dialogflow.cx.v3.TestConfig testConfig_; 310 /** 311 * 312 * 313 * <pre> 314 * Config for the test case. 315 * </pre> 316 * 317 * <code>.google.cloud.dialogflow.cx.v3.TestConfig test_config = 13;</code> 318 * 319 * @return Whether the testConfig field is set. 320 */ 321 @java.lang.Override hasTestConfig()322 public boolean hasTestConfig() { 323 return testConfig_ != null; 324 } 325 /** 326 * 327 * 328 * <pre> 329 * Config for the test case. 330 * </pre> 331 * 332 * <code>.google.cloud.dialogflow.cx.v3.TestConfig test_config = 13;</code> 333 * 334 * @return The testConfig. 335 */ 336 @java.lang.Override getTestConfig()337 public com.google.cloud.dialogflow.cx.v3.TestConfig getTestConfig() { 338 return testConfig_ == null 339 ? com.google.cloud.dialogflow.cx.v3.TestConfig.getDefaultInstance() 340 : testConfig_; 341 } 342 /** 343 * 344 * 345 * <pre> 346 * Config for the test case. 347 * </pre> 348 * 349 * <code>.google.cloud.dialogflow.cx.v3.TestConfig test_config = 13;</code> 350 */ 351 @java.lang.Override getTestConfigOrBuilder()352 public com.google.cloud.dialogflow.cx.v3.TestConfigOrBuilder getTestConfigOrBuilder() { 353 return testConfig_ == null 354 ? com.google.cloud.dialogflow.cx.v3.TestConfig.getDefaultInstance() 355 : testConfig_; 356 } 357 358 public static final int TEST_CASE_CONVERSATION_TURNS_FIELD_NUMBER = 5; 359 360 @SuppressWarnings("serial") 361 private java.util.List<com.google.cloud.dialogflow.cx.v3.ConversationTurn> 362 testCaseConversationTurns_; 363 /** 364 * 365 * 366 * <pre> 367 * The conversation turns uttered when the test case was created, in 368 * chronological order. These include the canonical set of agent utterances 369 * that should occur when the agent is working properly. 370 * </pre> 371 * 372 * <code> 373 * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; 374 * </code> 375 */ 376 @java.lang.Override 377 public java.util.List<com.google.cloud.dialogflow.cx.v3.ConversationTurn> getTestCaseConversationTurnsList()378 getTestCaseConversationTurnsList() { 379 return testCaseConversationTurns_; 380 } 381 /** 382 * 383 * 384 * <pre> 385 * The conversation turns uttered when the test case was created, in 386 * chronological order. These include the canonical set of agent utterances 387 * that should occur when the agent is working properly. 388 * </pre> 389 * 390 * <code> 391 * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; 392 * </code> 393 */ 394 @java.lang.Override 395 public java.util.List<? extends com.google.cloud.dialogflow.cx.v3.ConversationTurnOrBuilder> getTestCaseConversationTurnsOrBuilderList()396 getTestCaseConversationTurnsOrBuilderList() { 397 return testCaseConversationTurns_; 398 } 399 /** 400 * 401 * 402 * <pre> 403 * The conversation turns uttered when the test case was created, in 404 * chronological order. These include the canonical set of agent utterances 405 * that should occur when the agent is working properly. 406 * </pre> 407 * 408 * <code> 409 * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; 410 * </code> 411 */ 412 @java.lang.Override getTestCaseConversationTurnsCount()413 public int getTestCaseConversationTurnsCount() { 414 return testCaseConversationTurns_.size(); 415 } 416 /** 417 * 418 * 419 * <pre> 420 * The conversation turns uttered when the test case was created, in 421 * chronological order. These include the canonical set of agent utterances 422 * that should occur when the agent is working properly. 423 * </pre> 424 * 425 * <code> 426 * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; 427 * </code> 428 */ 429 @java.lang.Override getTestCaseConversationTurns( int index)430 public com.google.cloud.dialogflow.cx.v3.ConversationTurn getTestCaseConversationTurns( 431 int index) { 432 return testCaseConversationTurns_.get(index); 433 } 434 /** 435 * 436 * 437 * <pre> 438 * The conversation turns uttered when the test case was created, in 439 * chronological order. These include the canonical set of agent utterances 440 * that should occur when the agent is working properly. 441 * </pre> 442 * 443 * <code> 444 * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; 445 * </code> 446 */ 447 @java.lang.Override 448 public com.google.cloud.dialogflow.cx.v3.ConversationTurnOrBuilder getTestCaseConversationTurnsOrBuilder(int index)449 getTestCaseConversationTurnsOrBuilder(int index) { 450 return testCaseConversationTurns_.get(index); 451 } 452 453 public static final int CREATION_TIME_FIELD_NUMBER = 10; 454 private com.google.protobuf.Timestamp creationTime_; 455 /** 456 * 457 * 458 * <pre> 459 * Output only. When the test was created. 460 * </pre> 461 * 462 * <code> 463 * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 464 * </code> 465 * 466 * @return Whether the creationTime field is set. 467 */ 468 @java.lang.Override hasCreationTime()469 public boolean hasCreationTime() { 470 return creationTime_ != null; 471 } 472 /** 473 * 474 * 475 * <pre> 476 * Output only. When the test was created. 477 * </pre> 478 * 479 * <code> 480 * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 481 * </code> 482 * 483 * @return The creationTime. 484 */ 485 @java.lang.Override getCreationTime()486 public com.google.protobuf.Timestamp getCreationTime() { 487 return creationTime_ == null 488 ? com.google.protobuf.Timestamp.getDefaultInstance() 489 : creationTime_; 490 } 491 /** 492 * 493 * 494 * <pre> 495 * Output only. When the test was created. 496 * </pre> 497 * 498 * <code> 499 * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 500 * </code> 501 */ 502 @java.lang.Override getCreationTimeOrBuilder()503 public com.google.protobuf.TimestampOrBuilder getCreationTimeOrBuilder() { 504 return creationTime_ == null 505 ? com.google.protobuf.Timestamp.getDefaultInstance() 506 : creationTime_; 507 } 508 509 public static final int LAST_TEST_RESULT_FIELD_NUMBER = 12; 510 private com.google.cloud.dialogflow.cx.v3.TestCaseResult lastTestResult_; 511 /** 512 * 513 * 514 * <pre> 515 * The latest test result. 516 * </pre> 517 * 518 * <code>.google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12;</code> 519 * 520 * @return Whether the lastTestResult field is set. 521 */ 522 @java.lang.Override hasLastTestResult()523 public boolean hasLastTestResult() { 524 return lastTestResult_ != null; 525 } 526 /** 527 * 528 * 529 * <pre> 530 * The latest test result. 531 * </pre> 532 * 533 * <code>.google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12;</code> 534 * 535 * @return The lastTestResult. 536 */ 537 @java.lang.Override getLastTestResult()538 public com.google.cloud.dialogflow.cx.v3.TestCaseResult getLastTestResult() { 539 return lastTestResult_ == null 540 ? com.google.cloud.dialogflow.cx.v3.TestCaseResult.getDefaultInstance() 541 : lastTestResult_; 542 } 543 /** 544 * 545 * 546 * <pre> 547 * The latest test result. 548 * </pre> 549 * 550 * <code>.google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12;</code> 551 */ 552 @java.lang.Override getLastTestResultOrBuilder()553 public com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder getLastTestResultOrBuilder() { 554 return lastTestResult_ == null 555 ? com.google.cloud.dialogflow.cx.v3.TestCaseResult.getDefaultInstance() 556 : lastTestResult_; 557 } 558 559 private byte memoizedIsInitialized = -1; 560 561 @java.lang.Override isInitialized()562 public final boolean isInitialized() { 563 byte isInitialized = memoizedIsInitialized; 564 if (isInitialized == 1) return true; 565 if (isInitialized == 0) return false; 566 567 memoizedIsInitialized = 1; 568 return true; 569 } 570 571 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)572 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 573 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 574 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); 575 } 576 for (int i = 0; i < tags_.size(); i++) { 577 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tags_.getRaw(i)); 578 } 579 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { 580 com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); 581 } 582 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notes_)) { 583 com.google.protobuf.GeneratedMessageV3.writeString(output, 4, notes_); 584 } 585 for (int i = 0; i < testCaseConversationTurns_.size(); i++) { 586 output.writeMessage(5, testCaseConversationTurns_.get(i)); 587 } 588 if (creationTime_ != null) { 589 output.writeMessage(10, getCreationTime()); 590 } 591 if (lastTestResult_ != null) { 592 output.writeMessage(12, getLastTestResult()); 593 } 594 if (testConfig_ != null) { 595 output.writeMessage(13, getTestConfig()); 596 } 597 getUnknownFields().writeTo(output); 598 } 599 600 @java.lang.Override getSerializedSize()601 public int getSerializedSize() { 602 int size = memoizedSize; 603 if (size != -1) return size; 604 605 size = 0; 606 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 607 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); 608 } 609 { 610 int dataSize = 0; 611 for (int i = 0; i < tags_.size(); i++) { 612 dataSize += computeStringSizeNoTag(tags_.getRaw(i)); 613 } 614 size += dataSize; 615 size += 1 * getTagsList().size(); 616 } 617 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { 618 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); 619 } 620 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notes_)) { 621 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, notes_); 622 } 623 for (int i = 0; i < testCaseConversationTurns_.size(); i++) { 624 size += 625 com.google.protobuf.CodedOutputStream.computeMessageSize( 626 5, testCaseConversationTurns_.get(i)); 627 } 628 if (creationTime_ != null) { 629 size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getCreationTime()); 630 } 631 if (lastTestResult_ != null) { 632 size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getLastTestResult()); 633 } 634 if (testConfig_ != null) { 635 size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getTestConfig()); 636 } 637 size += getUnknownFields().getSerializedSize(); 638 memoizedSize = size; 639 return size; 640 } 641 642 @java.lang.Override equals(final java.lang.Object obj)643 public boolean equals(final java.lang.Object obj) { 644 if (obj == this) { 645 return true; 646 } 647 if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.TestCase)) { 648 return super.equals(obj); 649 } 650 com.google.cloud.dialogflow.cx.v3.TestCase other = 651 (com.google.cloud.dialogflow.cx.v3.TestCase) obj; 652 653 if (!getName().equals(other.getName())) return false; 654 if (!getTagsList().equals(other.getTagsList())) return false; 655 if (!getDisplayName().equals(other.getDisplayName())) return false; 656 if (!getNotes().equals(other.getNotes())) return false; 657 if (hasTestConfig() != other.hasTestConfig()) return false; 658 if (hasTestConfig()) { 659 if (!getTestConfig().equals(other.getTestConfig())) return false; 660 } 661 if (!getTestCaseConversationTurnsList().equals(other.getTestCaseConversationTurnsList())) 662 return false; 663 if (hasCreationTime() != other.hasCreationTime()) return false; 664 if (hasCreationTime()) { 665 if (!getCreationTime().equals(other.getCreationTime())) return false; 666 } 667 if (hasLastTestResult() != other.hasLastTestResult()) return false; 668 if (hasLastTestResult()) { 669 if (!getLastTestResult().equals(other.getLastTestResult())) return false; 670 } 671 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 672 return true; 673 } 674 675 @java.lang.Override hashCode()676 public int hashCode() { 677 if (memoizedHashCode != 0) { 678 return memoizedHashCode; 679 } 680 int hash = 41; 681 hash = (19 * hash) + getDescriptor().hashCode(); 682 hash = (37 * hash) + NAME_FIELD_NUMBER; 683 hash = (53 * hash) + getName().hashCode(); 684 if (getTagsCount() > 0) { 685 hash = (37 * hash) + TAGS_FIELD_NUMBER; 686 hash = (53 * hash) + getTagsList().hashCode(); 687 } 688 hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; 689 hash = (53 * hash) + getDisplayName().hashCode(); 690 hash = (37 * hash) + NOTES_FIELD_NUMBER; 691 hash = (53 * hash) + getNotes().hashCode(); 692 if (hasTestConfig()) { 693 hash = (37 * hash) + TEST_CONFIG_FIELD_NUMBER; 694 hash = (53 * hash) + getTestConfig().hashCode(); 695 } 696 if (getTestCaseConversationTurnsCount() > 0) { 697 hash = (37 * hash) + TEST_CASE_CONVERSATION_TURNS_FIELD_NUMBER; 698 hash = (53 * hash) + getTestCaseConversationTurnsList().hashCode(); 699 } 700 if (hasCreationTime()) { 701 hash = (37 * hash) + CREATION_TIME_FIELD_NUMBER; 702 hash = (53 * hash) + getCreationTime().hashCode(); 703 } 704 if (hasLastTestResult()) { 705 hash = (37 * hash) + LAST_TEST_RESULT_FIELD_NUMBER; 706 hash = (53 * hash) + getLastTestResult().hashCode(); 707 } 708 hash = (29 * hash) + getUnknownFields().hashCode(); 709 memoizedHashCode = hash; 710 return hash; 711 } 712 parseFrom(java.nio.ByteBuffer data)713 public static com.google.cloud.dialogflow.cx.v3.TestCase parseFrom(java.nio.ByteBuffer data) 714 throws com.google.protobuf.InvalidProtocolBufferException { 715 return PARSER.parseFrom(data); 716 } 717 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)718 public static com.google.cloud.dialogflow.cx.v3.TestCase parseFrom( 719 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 720 throws com.google.protobuf.InvalidProtocolBufferException { 721 return PARSER.parseFrom(data, extensionRegistry); 722 } 723 parseFrom( com.google.protobuf.ByteString data)724 public static com.google.cloud.dialogflow.cx.v3.TestCase parseFrom( 725 com.google.protobuf.ByteString data) 726 throws com.google.protobuf.InvalidProtocolBufferException { 727 return PARSER.parseFrom(data); 728 } 729 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)730 public static com.google.cloud.dialogflow.cx.v3.TestCase parseFrom( 731 com.google.protobuf.ByteString data, 732 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 733 throws com.google.protobuf.InvalidProtocolBufferException { 734 return PARSER.parseFrom(data, extensionRegistry); 735 } 736 parseFrom(byte[] data)737 public static com.google.cloud.dialogflow.cx.v3.TestCase parseFrom(byte[] data) 738 throws com.google.protobuf.InvalidProtocolBufferException { 739 return PARSER.parseFrom(data); 740 } 741 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)742 public static com.google.cloud.dialogflow.cx.v3.TestCase parseFrom( 743 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 744 throws com.google.protobuf.InvalidProtocolBufferException { 745 return PARSER.parseFrom(data, extensionRegistry); 746 } 747 parseFrom(java.io.InputStream input)748 public static com.google.cloud.dialogflow.cx.v3.TestCase parseFrom(java.io.InputStream input) 749 throws java.io.IOException { 750 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 751 } 752 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)753 public static com.google.cloud.dialogflow.cx.v3.TestCase parseFrom( 754 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 755 throws java.io.IOException { 756 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 757 PARSER, input, extensionRegistry); 758 } 759 parseDelimitedFrom( java.io.InputStream input)760 public static com.google.cloud.dialogflow.cx.v3.TestCase parseDelimitedFrom( 761 java.io.InputStream input) throws java.io.IOException { 762 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 763 } 764 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)765 public static com.google.cloud.dialogflow.cx.v3.TestCase parseDelimitedFrom( 766 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 767 throws java.io.IOException { 768 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 769 PARSER, input, extensionRegistry); 770 } 771 parseFrom( com.google.protobuf.CodedInputStream input)772 public static com.google.cloud.dialogflow.cx.v3.TestCase parseFrom( 773 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 774 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 775 } 776 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)777 public static com.google.cloud.dialogflow.cx.v3.TestCase parseFrom( 778 com.google.protobuf.CodedInputStream input, 779 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 780 throws java.io.IOException { 781 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 782 PARSER, input, extensionRegistry); 783 } 784 785 @java.lang.Override newBuilderForType()786 public Builder newBuilderForType() { 787 return newBuilder(); 788 } 789 newBuilder()790 public static Builder newBuilder() { 791 return DEFAULT_INSTANCE.toBuilder(); 792 } 793 newBuilder(com.google.cloud.dialogflow.cx.v3.TestCase prototype)794 public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.TestCase prototype) { 795 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 796 } 797 798 @java.lang.Override toBuilder()799 public Builder toBuilder() { 800 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 801 } 802 803 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)804 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 805 Builder builder = new Builder(parent); 806 return builder; 807 } 808 /** 809 * 810 * 811 * <pre> 812 * Represents a test case. 813 * </pre> 814 * 815 * Protobuf type {@code google.cloud.dialogflow.cx.v3.TestCase} 816 */ 817 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 818 implements 819 // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.TestCase) 820 com.google.cloud.dialogflow.cx.v3.TestCaseOrBuilder { getDescriptor()821 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 822 return com.google.cloud.dialogflow.cx.v3.TestCaseProto 823 .internal_static_google_cloud_dialogflow_cx_v3_TestCase_descriptor; 824 } 825 826 @java.lang.Override 827 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()828 internalGetFieldAccessorTable() { 829 return com.google.cloud.dialogflow.cx.v3.TestCaseProto 830 .internal_static_google_cloud_dialogflow_cx_v3_TestCase_fieldAccessorTable 831 .ensureFieldAccessorsInitialized( 832 com.google.cloud.dialogflow.cx.v3.TestCase.class, 833 com.google.cloud.dialogflow.cx.v3.TestCase.Builder.class); 834 } 835 836 // Construct using com.google.cloud.dialogflow.cx.v3.TestCase.newBuilder() Builder()837 private Builder() {} 838 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)839 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 840 super(parent); 841 } 842 843 @java.lang.Override clear()844 public Builder clear() { 845 super.clear(); 846 bitField0_ = 0; 847 name_ = ""; 848 tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; 849 bitField0_ = (bitField0_ & ~0x00000002); 850 displayName_ = ""; 851 notes_ = ""; 852 testConfig_ = null; 853 if (testConfigBuilder_ != null) { 854 testConfigBuilder_.dispose(); 855 testConfigBuilder_ = null; 856 } 857 if (testCaseConversationTurnsBuilder_ == null) { 858 testCaseConversationTurns_ = java.util.Collections.emptyList(); 859 } else { 860 testCaseConversationTurns_ = null; 861 testCaseConversationTurnsBuilder_.clear(); 862 } 863 bitField0_ = (bitField0_ & ~0x00000020); 864 creationTime_ = null; 865 if (creationTimeBuilder_ != null) { 866 creationTimeBuilder_.dispose(); 867 creationTimeBuilder_ = null; 868 } 869 lastTestResult_ = null; 870 if (lastTestResultBuilder_ != null) { 871 lastTestResultBuilder_.dispose(); 872 lastTestResultBuilder_ = null; 873 } 874 return this; 875 } 876 877 @java.lang.Override getDescriptorForType()878 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 879 return com.google.cloud.dialogflow.cx.v3.TestCaseProto 880 .internal_static_google_cloud_dialogflow_cx_v3_TestCase_descriptor; 881 } 882 883 @java.lang.Override getDefaultInstanceForType()884 public com.google.cloud.dialogflow.cx.v3.TestCase getDefaultInstanceForType() { 885 return com.google.cloud.dialogflow.cx.v3.TestCase.getDefaultInstance(); 886 } 887 888 @java.lang.Override build()889 public com.google.cloud.dialogflow.cx.v3.TestCase build() { 890 com.google.cloud.dialogflow.cx.v3.TestCase result = buildPartial(); 891 if (!result.isInitialized()) { 892 throw newUninitializedMessageException(result); 893 } 894 return result; 895 } 896 897 @java.lang.Override buildPartial()898 public com.google.cloud.dialogflow.cx.v3.TestCase buildPartial() { 899 com.google.cloud.dialogflow.cx.v3.TestCase result = 900 new com.google.cloud.dialogflow.cx.v3.TestCase(this); 901 buildPartialRepeatedFields(result); 902 if (bitField0_ != 0) { 903 buildPartial0(result); 904 } 905 onBuilt(); 906 return result; 907 } 908 buildPartialRepeatedFields(com.google.cloud.dialogflow.cx.v3.TestCase result)909 private void buildPartialRepeatedFields(com.google.cloud.dialogflow.cx.v3.TestCase result) { 910 if (((bitField0_ & 0x00000002) != 0)) { 911 tags_ = tags_.getUnmodifiableView(); 912 bitField0_ = (bitField0_ & ~0x00000002); 913 } 914 result.tags_ = tags_; 915 if (testCaseConversationTurnsBuilder_ == null) { 916 if (((bitField0_ & 0x00000020) != 0)) { 917 testCaseConversationTurns_ = 918 java.util.Collections.unmodifiableList(testCaseConversationTurns_); 919 bitField0_ = (bitField0_ & ~0x00000020); 920 } 921 result.testCaseConversationTurns_ = testCaseConversationTurns_; 922 } else { 923 result.testCaseConversationTurns_ = testCaseConversationTurnsBuilder_.build(); 924 } 925 } 926 buildPartial0(com.google.cloud.dialogflow.cx.v3.TestCase result)927 private void buildPartial0(com.google.cloud.dialogflow.cx.v3.TestCase result) { 928 int from_bitField0_ = bitField0_; 929 if (((from_bitField0_ & 0x00000001) != 0)) { 930 result.name_ = name_; 931 } 932 if (((from_bitField0_ & 0x00000004) != 0)) { 933 result.displayName_ = displayName_; 934 } 935 if (((from_bitField0_ & 0x00000008) != 0)) { 936 result.notes_ = notes_; 937 } 938 if (((from_bitField0_ & 0x00000010) != 0)) { 939 result.testConfig_ = testConfigBuilder_ == null ? testConfig_ : testConfigBuilder_.build(); 940 } 941 if (((from_bitField0_ & 0x00000040) != 0)) { 942 result.creationTime_ = 943 creationTimeBuilder_ == null ? creationTime_ : creationTimeBuilder_.build(); 944 } 945 if (((from_bitField0_ & 0x00000080) != 0)) { 946 result.lastTestResult_ = 947 lastTestResultBuilder_ == null ? lastTestResult_ : lastTestResultBuilder_.build(); 948 } 949 } 950 951 @java.lang.Override clone()952 public Builder clone() { 953 return super.clone(); 954 } 955 956 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)957 public Builder setField( 958 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 959 return super.setField(field, value); 960 } 961 962 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)963 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 964 return super.clearField(field); 965 } 966 967 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)968 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 969 return super.clearOneof(oneof); 970 } 971 972 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)973 public Builder setRepeatedField( 974 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 975 return super.setRepeatedField(field, index, value); 976 } 977 978 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)979 public Builder addRepeatedField( 980 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 981 return super.addRepeatedField(field, value); 982 } 983 984 @java.lang.Override mergeFrom(com.google.protobuf.Message other)985 public Builder mergeFrom(com.google.protobuf.Message other) { 986 if (other instanceof com.google.cloud.dialogflow.cx.v3.TestCase) { 987 return mergeFrom((com.google.cloud.dialogflow.cx.v3.TestCase) other); 988 } else { 989 super.mergeFrom(other); 990 return this; 991 } 992 } 993 mergeFrom(com.google.cloud.dialogflow.cx.v3.TestCase other)994 public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.TestCase other) { 995 if (other == com.google.cloud.dialogflow.cx.v3.TestCase.getDefaultInstance()) return this; 996 if (!other.getName().isEmpty()) { 997 name_ = other.name_; 998 bitField0_ |= 0x00000001; 999 onChanged(); 1000 } 1001 if (!other.tags_.isEmpty()) { 1002 if (tags_.isEmpty()) { 1003 tags_ = other.tags_; 1004 bitField0_ = (bitField0_ & ~0x00000002); 1005 } else { 1006 ensureTagsIsMutable(); 1007 tags_.addAll(other.tags_); 1008 } 1009 onChanged(); 1010 } 1011 if (!other.getDisplayName().isEmpty()) { 1012 displayName_ = other.displayName_; 1013 bitField0_ |= 0x00000004; 1014 onChanged(); 1015 } 1016 if (!other.getNotes().isEmpty()) { 1017 notes_ = other.notes_; 1018 bitField0_ |= 0x00000008; 1019 onChanged(); 1020 } 1021 if (other.hasTestConfig()) { 1022 mergeTestConfig(other.getTestConfig()); 1023 } 1024 if (testCaseConversationTurnsBuilder_ == null) { 1025 if (!other.testCaseConversationTurns_.isEmpty()) { 1026 if (testCaseConversationTurns_.isEmpty()) { 1027 testCaseConversationTurns_ = other.testCaseConversationTurns_; 1028 bitField0_ = (bitField0_ & ~0x00000020); 1029 } else { 1030 ensureTestCaseConversationTurnsIsMutable(); 1031 testCaseConversationTurns_.addAll(other.testCaseConversationTurns_); 1032 } 1033 onChanged(); 1034 } 1035 } else { 1036 if (!other.testCaseConversationTurns_.isEmpty()) { 1037 if (testCaseConversationTurnsBuilder_.isEmpty()) { 1038 testCaseConversationTurnsBuilder_.dispose(); 1039 testCaseConversationTurnsBuilder_ = null; 1040 testCaseConversationTurns_ = other.testCaseConversationTurns_; 1041 bitField0_ = (bitField0_ & ~0x00000020); 1042 testCaseConversationTurnsBuilder_ = 1043 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 1044 ? getTestCaseConversationTurnsFieldBuilder() 1045 : null; 1046 } else { 1047 testCaseConversationTurnsBuilder_.addAllMessages(other.testCaseConversationTurns_); 1048 } 1049 } 1050 } 1051 if (other.hasCreationTime()) { 1052 mergeCreationTime(other.getCreationTime()); 1053 } 1054 if (other.hasLastTestResult()) { 1055 mergeLastTestResult(other.getLastTestResult()); 1056 } 1057 this.mergeUnknownFields(other.getUnknownFields()); 1058 onChanged(); 1059 return this; 1060 } 1061 1062 @java.lang.Override isInitialized()1063 public final boolean isInitialized() { 1064 return true; 1065 } 1066 1067 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1068 public Builder mergeFrom( 1069 com.google.protobuf.CodedInputStream input, 1070 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1071 throws java.io.IOException { 1072 if (extensionRegistry == null) { 1073 throw new java.lang.NullPointerException(); 1074 } 1075 try { 1076 boolean done = false; 1077 while (!done) { 1078 int tag = input.readTag(); 1079 switch (tag) { 1080 case 0: 1081 done = true; 1082 break; 1083 case 10: 1084 { 1085 name_ = input.readStringRequireUtf8(); 1086 bitField0_ |= 0x00000001; 1087 break; 1088 } // case 10 1089 case 18: 1090 { 1091 java.lang.String s = input.readStringRequireUtf8(); 1092 ensureTagsIsMutable(); 1093 tags_.add(s); 1094 break; 1095 } // case 18 1096 case 26: 1097 { 1098 displayName_ = input.readStringRequireUtf8(); 1099 bitField0_ |= 0x00000004; 1100 break; 1101 } // case 26 1102 case 34: 1103 { 1104 notes_ = input.readStringRequireUtf8(); 1105 bitField0_ |= 0x00000008; 1106 break; 1107 } // case 34 1108 case 42: 1109 { 1110 com.google.cloud.dialogflow.cx.v3.ConversationTurn m = 1111 input.readMessage( 1112 com.google.cloud.dialogflow.cx.v3.ConversationTurn.parser(), 1113 extensionRegistry); 1114 if (testCaseConversationTurnsBuilder_ == null) { 1115 ensureTestCaseConversationTurnsIsMutable(); 1116 testCaseConversationTurns_.add(m); 1117 } else { 1118 testCaseConversationTurnsBuilder_.addMessage(m); 1119 } 1120 break; 1121 } // case 42 1122 case 82: 1123 { 1124 input.readMessage(getCreationTimeFieldBuilder().getBuilder(), extensionRegistry); 1125 bitField0_ |= 0x00000040; 1126 break; 1127 } // case 82 1128 case 98: 1129 { 1130 input.readMessage(getLastTestResultFieldBuilder().getBuilder(), extensionRegistry); 1131 bitField0_ |= 0x00000080; 1132 break; 1133 } // case 98 1134 case 106: 1135 { 1136 input.readMessage(getTestConfigFieldBuilder().getBuilder(), extensionRegistry); 1137 bitField0_ |= 0x00000010; 1138 break; 1139 } // case 106 1140 default: 1141 { 1142 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1143 done = true; // was an endgroup tag 1144 } 1145 break; 1146 } // default: 1147 } // switch (tag) 1148 } // while (!done) 1149 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1150 throw e.unwrapIOException(); 1151 } finally { 1152 onChanged(); 1153 } // finally 1154 return this; 1155 } 1156 1157 private int bitField0_; 1158 1159 private java.lang.Object name_ = ""; 1160 /** 1161 * 1162 * 1163 * <pre> 1164 * The unique identifier of the test case. 1165 * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase] 1166 * will populate the name automatically. Otherwise use format: 1167 * `projects/<Project ID>/locations/<LocationID>/agents/ 1168 * <AgentID>/testCases/<TestCase ID>`. 1169 * </pre> 1170 * 1171 * <code>string name = 1;</code> 1172 * 1173 * @return The name. 1174 */ getName()1175 public java.lang.String getName() { 1176 java.lang.Object ref = name_; 1177 if (!(ref instanceof java.lang.String)) { 1178 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1179 java.lang.String s = bs.toStringUtf8(); 1180 name_ = s; 1181 return s; 1182 } else { 1183 return (java.lang.String) ref; 1184 } 1185 } 1186 /** 1187 * 1188 * 1189 * <pre> 1190 * The unique identifier of the test case. 1191 * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase] 1192 * will populate the name automatically. Otherwise use format: 1193 * `projects/<Project ID>/locations/<LocationID>/agents/ 1194 * <AgentID>/testCases/<TestCase ID>`. 1195 * </pre> 1196 * 1197 * <code>string name = 1;</code> 1198 * 1199 * @return The bytes for name. 1200 */ getNameBytes()1201 public com.google.protobuf.ByteString getNameBytes() { 1202 java.lang.Object ref = name_; 1203 if (ref instanceof String) { 1204 com.google.protobuf.ByteString b = 1205 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1206 name_ = b; 1207 return b; 1208 } else { 1209 return (com.google.protobuf.ByteString) ref; 1210 } 1211 } 1212 /** 1213 * 1214 * 1215 * <pre> 1216 * The unique identifier of the test case. 1217 * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase] 1218 * will populate the name automatically. Otherwise use format: 1219 * `projects/<Project ID>/locations/<LocationID>/agents/ 1220 * <AgentID>/testCases/<TestCase ID>`. 1221 * </pre> 1222 * 1223 * <code>string name = 1;</code> 1224 * 1225 * @param value The name to set. 1226 * @return This builder for chaining. 1227 */ setName(java.lang.String value)1228 public Builder setName(java.lang.String value) { 1229 if (value == null) { 1230 throw new NullPointerException(); 1231 } 1232 name_ = value; 1233 bitField0_ |= 0x00000001; 1234 onChanged(); 1235 return this; 1236 } 1237 /** 1238 * 1239 * 1240 * <pre> 1241 * The unique identifier of the test case. 1242 * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase] 1243 * will populate the name automatically. Otherwise use format: 1244 * `projects/<Project ID>/locations/<LocationID>/agents/ 1245 * <AgentID>/testCases/<TestCase ID>`. 1246 * </pre> 1247 * 1248 * <code>string name = 1;</code> 1249 * 1250 * @return This builder for chaining. 1251 */ clearName()1252 public Builder clearName() { 1253 name_ = getDefaultInstance().getName(); 1254 bitField0_ = (bitField0_ & ~0x00000001); 1255 onChanged(); 1256 return this; 1257 } 1258 /** 1259 * 1260 * 1261 * <pre> 1262 * The unique identifier of the test case. 1263 * [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase] 1264 * will populate the name automatically. Otherwise use format: 1265 * `projects/<Project ID>/locations/<LocationID>/agents/ 1266 * <AgentID>/testCases/<TestCase ID>`. 1267 * </pre> 1268 * 1269 * <code>string name = 1;</code> 1270 * 1271 * @param value The bytes for name to set. 1272 * @return This builder for chaining. 1273 */ setNameBytes(com.google.protobuf.ByteString value)1274 public Builder setNameBytes(com.google.protobuf.ByteString value) { 1275 if (value == null) { 1276 throw new NullPointerException(); 1277 } 1278 checkByteStringIsUtf8(value); 1279 name_ = value; 1280 bitField0_ |= 0x00000001; 1281 onChanged(); 1282 return this; 1283 } 1284 1285 private com.google.protobuf.LazyStringList tags_ = 1286 com.google.protobuf.LazyStringArrayList.EMPTY; 1287 ensureTagsIsMutable()1288 private void ensureTagsIsMutable() { 1289 if (!((bitField0_ & 0x00000002) != 0)) { 1290 tags_ = new com.google.protobuf.LazyStringArrayList(tags_); 1291 bitField0_ |= 0x00000002; 1292 } 1293 } 1294 /** 1295 * 1296 * 1297 * <pre> 1298 * Tags are short descriptions that users may apply to test cases for 1299 * organizational and filtering purposes. Each tag should start with "#" and 1300 * has a limit of 30 characters. 1301 * </pre> 1302 * 1303 * <code>repeated string tags = 2;</code> 1304 * 1305 * @return A list containing the tags. 1306 */ getTagsList()1307 public com.google.protobuf.ProtocolStringList getTagsList() { 1308 return tags_.getUnmodifiableView(); 1309 } 1310 /** 1311 * 1312 * 1313 * <pre> 1314 * Tags are short descriptions that users may apply to test cases for 1315 * organizational and filtering purposes. Each tag should start with "#" and 1316 * has a limit of 30 characters. 1317 * </pre> 1318 * 1319 * <code>repeated string tags = 2;</code> 1320 * 1321 * @return The count of tags. 1322 */ getTagsCount()1323 public int getTagsCount() { 1324 return tags_.size(); 1325 } 1326 /** 1327 * 1328 * 1329 * <pre> 1330 * Tags are short descriptions that users may apply to test cases for 1331 * organizational and filtering purposes. Each tag should start with "#" and 1332 * has a limit of 30 characters. 1333 * </pre> 1334 * 1335 * <code>repeated string tags = 2;</code> 1336 * 1337 * @param index The index of the element to return. 1338 * @return The tags at the given index. 1339 */ getTags(int index)1340 public java.lang.String getTags(int index) { 1341 return tags_.get(index); 1342 } 1343 /** 1344 * 1345 * 1346 * <pre> 1347 * Tags are short descriptions that users may apply to test cases for 1348 * organizational and filtering purposes. Each tag should start with "#" and 1349 * has a limit of 30 characters. 1350 * </pre> 1351 * 1352 * <code>repeated string tags = 2;</code> 1353 * 1354 * @param index The index of the value to return. 1355 * @return The bytes of the tags at the given index. 1356 */ getTagsBytes(int index)1357 public com.google.protobuf.ByteString getTagsBytes(int index) { 1358 return tags_.getByteString(index); 1359 } 1360 /** 1361 * 1362 * 1363 * <pre> 1364 * Tags are short descriptions that users may apply to test cases for 1365 * organizational and filtering purposes. Each tag should start with "#" and 1366 * has a limit of 30 characters. 1367 * </pre> 1368 * 1369 * <code>repeated string tags = 2;</code> 1370 * 1371 * @param index The index to set the value at. 1372 * @param value The tags to set. 1373 * @return This builder for chaining. 1374 */ setTags(int index, java.lang.String value)1375 public Builder setTags(int index, java.lang.String value) { 1376 if (value == null) { 1377 throw new NullPointerException(); 1378 } 1379 ensureTagsIsMutable(); 1380 tags_.set(index, value); 1381 onChanged(); 1382 return this; 1383 } 1384 /** 1385 * 1386 * 1387 * <pre> 1388 * Tags are short descriptions that users may apply to test cases for 1389 * organizational and filtering purposes. Each tag should start with "#" and 1390 * has a limit of 30 characters. 1391 * </pre> 1392 * 1393 * <code>repeated string tags = 2;</code> 1394 * 1395 * @param value The tags to add. 1396 * @return This builder for chaining. 1397 */ addTags(java.lang.String value)1398 public Builder addTags(java.lang.String value) { 1399 if (value == null) { 1400 throw new NullPointerException(); 1401 } 1402 ensureTagsIsMutable(); 1403 tags_.add(value); 1404 onChanged(); 1405 return this; 1406 } 1407 /** 1408 * 1409 * 1410 * <pre> 1411 * Tags are short descriptions that users may apply to test cases for 1412 * organizational and filtering purposes. Each tag should start with "#" and 1413 * has a limit of 30 characters. 1414 * </pre> 1415 * 1416 * <code>repeated string tags = 2;</code> 1417 * 1418 * @param values The tags to add. 1419 * @return This builder for chaining. 1420 */ addAllTags(java.lang.Iterable<java.lang.String> values)1421 public Builder addAllTags(java.lang.Iterable<java.lang.String> values) { 1422 ensureTagsIsMutable(); 1423 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tags_); 1424 onChanged(); 1425 return this; 1426 } 1427 /** 1428 * 1429 * 1430 * <pre> 1431 * Tags are short descriptions that users may apply to test cases for 1432 * organizational and filtering purposes. Each tag should start with "#" and 1433 * has a limit of 30 characters. 1434 * </pre> 1435 * 1436 * <code>repeated string tags = 2;</code> 1437 * 1438 * @return This builder for chaining. 1439 */ clearTags()1440 public Builder clearTags() { 1441 tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1442 bitField0_ = (bitField0_ & ~0x00000002); 1443 onChanged(); 1444 return this; 1445 } 1446 /** 1447 * 1448 * 1449 * <pre> 1450 * Tags are short descriptions that users may apply to test cases for 1451 * organizational and filtering purposes. Each tag should start with "#" and 1452 * has a limit of 30 characters. 1453 * </pre> 1454 * 1455 * <code>repeated string tags = 2;</code> 1456 * 1457 * @param value The bytes of the tags to add. 1458 * @return This builder for chaining. 1459 */ addTagsBytes(com.google.protobuf.ByteString value)1460 public Builder addTagsBytes(com.google.protobuf.ByteString value) { 1461 if (value == null) { 1462 throw new NullPointerException(); 1463 } 1464 checkByteStringIsUtf8(value); 1465 ensureTagsIsMutable(); 1466 tags_.add(value); 1467 onChanged(); 1468 return this; 1469 } 1470 1471 private java.lang.Object displayName_ = ""; 1472 /** 1473 * 1474 * 1475 * <pre> 1476 * Required. The human-readable name of the test case, unique within the 1477 * agent. Limit of 200 characters. 1478 * </pre> 1479 * 1480 * <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code> 1481 * 1482 * @return The displayName. 1483 */ getDisplayName()1484 public java.lang.String getDisplayName() { 1485 java.lang.Object ref = displayName_; 1486 if (!(ref instanceof java.lang.String)) { 1487 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1488 java.lang.String s = bs.toStringUtf8(); 1489 displayName_ = s; 1490 return s; 1491 } else { 1492 return (java.lang.String) ref; 1493 } 1494 } 1495 /** 1496 * 1497 * 1498 * <pre> 1499 * Required. The human-readable name of the test case, unique within the 1500 * agent. Limit of 200 characters. 1501 * </pre> 1502 * 1503 * <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code> 1504 * 1505 * @return The bytes for displayName. 1506 */ getDisplayNameBytes()1507 public com.google.protobuf.ByteString getDisplayNameBytes() { 1508 java.lang.Object ref = displayName_; 1509 if (ref instanceof String) { 1510 com.google.protobuf.ByteString b = 1511 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1512 displayName_ = b; 1513 return b; 1514 } else { 1515 return (com.google.protobuf.ByteString) ref; 1516 } 1517 } 1518 /** 1519 * 1520 * 1521 * <pre> 1522 * Required. The human-readable name of the test case, unique within the 1523 * agent. Limit of 200 characters. 1524 * </pre> 1525 * 1526 * <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code> 1527 * 1528 * @param value The displayName to set. 1529 * @return This builder for chaining. 1530 */ setDisplayName(java.lang.String value)1531 public Builder setDisplayName(java.lang.String value) { 1532 if (value == null) { 1533 throw new NullPointerException(); 1534 } 1535 displayName_ = value; 1536 bitField0_ |= 0x00000004; 1537 onChanged(); 1538 return this; 1539 } 1540 /** 1541 * 1542 * 1543 * <pre> 1544 * Required. The human-readable name of the test case, unique within the 1545 * agent. Limit of 200 characters. 1546 * </pre> 1547 * 1548 * <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code> 1549 * 1550 * @return This builder for chaining. 1551 */ clearDisplayName()1552 public Builder clearDisplayName() { 1553 displayName_ = getDefaultInstance().getDisplayName(); 1554 bitField0_ = (bitField0_ & ~0x00000004); 1555 onChanged(); 1556 return this; 1557 } 1558 /** 1559 * 1560 * 1561 * <pre> 1562 * Required. The human-readable name of the test case, unique within the 1563 * agent. Limit of 200 characters. 1564 * </pre> 1565 * 1566 * <code>string display_name = 3 [(.google.api.field_behavior) = REQUIRED];</code> 1567 * 1568 * @param value The bytes for displayName to set. 1569 * @return This builder for chaining. 1570 */ setDisplayNameBytes(com.google.protobuf.ByteString value)1571 public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { 1572 if (value == null) { 1573 throw new NullPointerException(); 1574 } 1575 checkByteStringIsUtf8(value); 1576 displayName_ = value; 1577 bitField0_ |= 0x00000004; 1578 onChanged(); 1579 return this; 1580 } 1581 1582 private java.lang.Object notes_ = ""; 1583 /** 1584 * 1585 * 1586 * <pre> 1587 * Additional freeform notes about the test case. Limit of 400 characters. 1588 * </pre> 1589 * 1590 * <code>string notes = 4;</code> 1591 * 1592 * @return The notes. 1593 */ getNotes()1594 public java.lang.String getNotes() { 1595 java.lang.Object ref = notes_; 1596 if (!(ref instanceof java.lang.String)) { 1597 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1598 java.lang.String s = bs.toStringUtf8(); 1599 notes_ = s; 1600 return s; 1601 } else { 1602 return (java.lang.String) ref; 1603 } 1604 } 1605 /** 1606 * 1607 * 1608 * <pre> 1609 * Additional freeform notes about the test case. Limit of 400 characters. 1610 * </pre> 1611 * 1612 * <code>string notes = 4;</code> 1613 * 1614 * @return The bytes for notes. 1615 */ getNotesBytes()1616 public com.google.protobuf.ByteString getNotesBytes() { 1617 java.lang.Object ref = notes_; 1618 if (ref instanceof String) { 1619 com.google.protobuf.ByteString b = 1620 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1621 notes_ = b; 1622 return b; 1623 } else { 1624 return (com.google.protobuf.ByteString) ref; 1625 } 1626 } 1627 /** 1628 * 1629 * 1630 * <pre> 1631 * Additional freeform notes about the test case. Limit of 400 characters. 1632 * </pre> 1633 * 1634 * <code>string notes = 4;</code> 1635 * 1636 * @param value The notes to set. 1637 * @return This builder for chaining. 1638 */ setNotes(java.lang.String value)1639 public Builder setNotes(java.lang.String value) { 1640 if (value == null) { 1641 throw new NullPointerException(); 1642 } 1643 notes_ = value; 1644 bitField0_ |= 0x00000008; 1645 onChanged(); 1646 return this; 1647 } 1648 /** 1649 * 1650 * 1651 * <pre> 1652 * Additional freeform notes about the test case. Limit of 400 characters. 1653 * </pre> 1654 * 1655 * <code>string notes = 4;</code> 1656 * 1657 * @return This builder for chaining. 1658 */ clearNotes()1659 public Builder clearNotes() { 1660 notes_ = getDefaultInstance().getNotes(); 1661 bitField0_ = (bitField0_ & ~0x00000008); 1662 onChanged(); 1663 return this; 1664 } 1665 /** 1666 * 1667 * 1668 * <pre> 1669 * Additional freeform notes about the test case. Limit of 400 characters. 1670 * </pre> 1671 * 1672 * <code>string notes = 4;</code> 1673 * 1674 * @param value The bytes for notes to set. 1675 * @return This builder for chaining. 1676 */ setNotesBytes(com.google.protobuf.ByteString value)1677 public Builder setNotesBytes(com.google.protobuf.ByteString value) { 1678 if (value == null) { 1679 throw new NullPointerException(); 1680 } 1681 checkByteStringIsUtf8(value); 1682 notes_ = value; 1683 bitField0_ |= 0x00000008; 1684 onChanged(); 1685 return this; 1686 } 1687 1688 private com.google.cloud.dialogflow.cx.v3.TestConfig testConfig_; 1689 private com.google.protobuf.SingleFieldBuilderV3< 1690 com.google.cloud.dialogflow.cx.v3.TestConfig, 1691 com.google.cloud.dialogflow.cx.v3.TestConfig.Builder, 1692 com.google.cloud.dialogflow.cx.v3.TestConfigOrBuilder> 1693 testConfigBuilder_; 1694 /** 1695 * 1696 * 1697 * <pre> 1698 * Config for the test case. 1699 * </pre> 1700 * 1701 * <code>.google.cloud.dialogflow.cx.v3.TestConfig test_config = 13;</code> 1702 * 1703 * @return Whether the testConfig field is set. 1704 */ hasTestConfig()1705 public boolean hasTestConfig() { 1706 return ((bitField0_ & 0x00000010) != 0); 1707 } 1708 /** 1709 * 1710 * 1711 * <pre> 1712 * Config for the test case. 1713 * </pre> 1714 * 1715 * <code>.google.cloud.dialogflow.cx.v3.TestConfig test_config = 13;</code> 1716 * 1717 * @return The testConfig. 1718 */ getTestConfig()1719 public com.google.cloud.dialogflow.cx.v3.TestConfig getTestConfig() { 1720 if (testConfigBuilder_ == null) { 1721 return testConfig_ == null 1722 ? com.google.cloud.dialogflow.cx.v3.TestConfig.getDefaultInstance() 1723 : testConfig_; 1724 } else { 1725 return testConfigBuilder_.getMessage(); 1726 } 1727 } 1728 /** 1729 * 1730 * 1731 * <pre> 1732 * Config for the test case. 1733 * </pre> 1734 * 1735 * <code>.google.cloud.dialogflow.cx.v3.TestConfig test_config = 13;</code> 1736 */ setTestConfig(com.google.cloud.dialogflow.cx.v3.TestConfig value)1737 public Builder setTestConfig(com.google.cloud.dialogflow.cx.v3.TestConfig value) { 1738 if (testConfigBuilder_ == null) { 1739 if (value == null) { 1740 throw new NullPointerException(); 1741 } 1742 testConfig_ = value; 1743 } else { 1744 testConfigBuilder_.setMessage(value); 1745 } 1746 bitField0_ |= 0x00000010; 1747 onChanged(); 1748 return this; 1749 } 1750 /** 1751 * 1752 * 1753 * <pre> 1754 * Config for the test case. 1755 * </pre> 1756 * 1757 * <code>.google.cloud.dialogflow.cx.v3.TestConfig test_config = 13;</code> 1758 */ setTestConfig( com.google.cloud.dialogflow.cx.v3.TestConfig.Builder builderForValue)1759 public Builder setTestConfig( 1760 com.google.cloud.dialogflow.cx.v3.TestConfig.Builder builderForValue) { 1761 if (testConfigBuilder_ == null) { 1762 testConfig_ = builderForValue.build(); 1763 } else { 1764 testConfigBuilder_.setMessage(builderForValue.build()); 1765 } 1766 bitField0_ |= 0x00000010; 1767 onChanged(); 1768 return this; 1769 } 1770 /** 1771 * 1772 * 1773 * <pre> 1774 * Config for the test case. 1775 * </pre> 1776 * 1777 * <code>.google.cloud.dialogflow.cx.v3.TestConfig test_config = 13;</code> 1778 */ mergeTestConfig(com.google.cloud.dialogflow.cx.v3.TestConfig value)1779 public Builder mergeTestConfig(com.google.cloud.dialogflow.cx.v3.TestConfig value) { 1780 if (testConfigBuilder_ == null) { 1781 if (((bitField0_ & 0x00000010) != 0) 1782 && testConfig_ != null 1783 && testConfig_ != com.google.cloud.dialogflow.cx.v3.TestConfig.getDefaultInstance()) { 1784 getTestConfigBuilder().mergeFrom(value); 1785 } else { 1786 testConfig_ = value; 1787 } 1788 } else { 1789 testConfigBuilder_.mergeFrom(value); 1790 } 1791 bitField0_ |= 0x00000010; 1792 onChanged(); 1793 return this; 1794 } 1795 /** 1796 * 1797 * 1798 * <pre> 1799 * Config for the test case. 1800 * </pre> 1801 * 1802 * <code>.google.cloud.dialogflow.cx.v3.TestConfig test_config = 13;</code> 1803 */ clearTestConfig()1804 public Builder clearTestConfig() { 1805 bitField0_ = (bitField0_ & ~0x00000010); 1806 testConfig_ = null; 1807 if (testConfigBuilder_ != null) { 1808 testConfigBuilder_.dispose(); 1809 testConfigBuilder_ = null; 1810 } 1811 onChanged(); 1812 return this; 1813 } 1814 /** 1815 * 1816 * 1817 * <pre> 1818 * Config for the test case. 1819 * </pre> 1820 * 1821 * <code>.google.cloud.dialogflow.cx.v3.TestConfig test_config = 13;</code> 1822 */ getTestConfigBuilder()1823 public com.google.cloud.dialogflow.cx.v3.TestConfig.Builder getTestConfigBuilder() { 1824 bitField0_ |= 0x00000010; 1825 onChanged(); 1826 return getTestConfigFieldBuilder().getBuilder(); 1827 } 1828 /** 1829 * 1830 * 1831 * <pre> 1832 * Config for the test case. 1833 * </pre> 1834 * 1835 * <code>.google.cloud.dialogflow.cx.v3.TestConfig test_config = 13;</code> 1836 */ getTestConfigOrBuilder()1837 public com.google.cloud.dialogflow.cx.v3.TestConfigOrBuilder getTestConfigOrBuilder() { 1838 if (testConfigBuilder_ != null) { 1839 return testConfigBuilder_.getMessageOrBuilder(); 1840 } else { 1841 return testConfig_ == null 1842 ? com.google.cloud.dialogflow.cx.v3.TestConfig.getDefaultInstance() 1843 : testConfig_; 1844 } 1845 } 1846 /** 1847 * 1848 * 1849 * <pre> 1850 * Config for the test case. 1851 * </pre> 1852 * 1853 * <code>.google.cloud.dialogflow.cx.v3.TestConfig test_config = 13;</code> 1854 */ 1855 private com.google.protobuf.SingleFieldBuilderV3< 1856 com.google.cloud.dialogflow.cx.v3.TestConfig, 1857 com.google.cloud.dialogflow.cx.v3.TestConfig.Builder, 1858 com.google.cloud.dialogflow.cx.v3.TestConfigOrBuilder> getTestConfigFieldBuilder()1859 getTestConfigFieldBuilder() { 1860 if (testConfigBuilder_ == null) { 1861 testConfigBuilder_ = 1862 new com.google.protobuf.SingleFieldBuilderV3< 1863 com.google.cloud.dialogflow.cx.v3.TestConfig, 1864 com.google.cloud.dialogflow.cx.v3.TestConfig.Builder, 1865 com.google.cloud.dialogflow.cx.v3.TestConfigOrBuilder>( 1866 getTestConfig(), getParentForChildren(), isClean()); 1867 testConfig_ = null; 1868 } 1869 return testConfigBuilder_; 1870 } 1871 1872 private java.util.List<com.google.cloud.dialogflow.cx.v3.ConversationTurn> 1873 testCaseConversationTurns_ = java.util.Collections.emptyList(); 1874 ensureTestCaseConversationTurnsIsMutable()1875 private void ensureTestCaseConversationTurnsIsMutable() { 1876 if (!((bitField0_ & 0x00000020) != 0)) { 1877 testCaseConversationTurns_ = 1878 new java.util.ArrayList<com.google.cloud.dialogflow.cx.v3.ConversationTurn>( 1879 testCaseConversationTurns_); 1880 bitField0_ |= 0x00000020; 1881 } 1882 } 1883 1884 private com.google.protobuf.RepeatedFieldBuilderV3< 1885 com.google.cloud.dialogflow.cx.v3.ConversationTurn, 1886 com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder, 1887 com.google.cloud.dialogflow.cx.v3.ConversationTurnOrBuilder> 1888 testCaseConversationTurnsBuilder_; 1889 1890 /** 1891 * 1892 * 1893 * <pre> 1894 * The conversation turns uttered when the test case was created, in 1895 * chronological order. These include the canonical set of agent utterances 1896 * that should occur when the agent is working properly. 1897 * </pre> 1898 * 1899 * <code> 1900 * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; 1901 * </code> 1902 */ 1903 public java.util.List<com.google.cloud.dialogflow.cx.v3.ConversationTurn> getTestCaseConversationTurnsList()1904 getTestCaseConversationTurnsList() { 1905 if (testCaseConversationTurnsBuilder_ == null) { 1906 return java.util.Collections.unmodifiableList(testCaseConversationTurns_); 1907 } else { 1908 return testCaseConversationTurnsBuilder_.getMessageList(); 1909 } 1910 } 1911 /** 1912 * 1913 * 1914 * <pre> 1915 * The conversation turns uttered when the test case was created, in 1916 * chronological order. These include the canonical set of agent utterances 1917 * that should occur when the agent is working properly. 1918 * </pre> 1919 * 1920 * <code> 1921 * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; 1922 * </code> 1923 */ getTestCaseConversationTurnsCount()1924 public int getTestCaseConversationTurnsCount() { 1925 if (testCaseConversationTurnsBuilder_ == null) { 1926 return testCaseConversationTurns_.size(); 1927 } else { 1928 return testCaseConversationTurnsBuilder_.getCount(); 1929 } 1930 } 1931 /** 1932 * 1933 * 1934 * <pre> 1935 * The conversation turns uttered when the test case was created, in 1936 * chronological order. These include the canonical set of agent utterances 1937 * that should occur when the agent is working properly. 1938 * </pre> 1939 * 1940 * <code> 1941 * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; 1942 * </code> 1943 */ getTestCaseConversationTurns( int index)1944 public com.google.cloud.dialogflow.cx.v3.ConversationTurn getTestCaseConversationTurns( 1945 int index) { 1946 if (testCaseConversationTurnsBuilder_ == null) { 1947 return testCaseConversationTurns_.get(index); 1948 } else { 1949 return testCaseConversationTurnsBuilder_.getMessage(index); 1950 } 1951 } 1952 /** 1953 * 1954 * 1955 * <pre> 1956 * The conversation turns uttered when the test case was created, in 1957 * chronological order. These include the canonical set of agent utterances 1958 * that should occur when the agent is working properly. 1959 * </pre> 1960 * 1961 * <code> 1962 * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; 1963 * </code> 1964 */ setTestCaseConversationTurns( int index, com.google.cloud.dialogflow.cx.v3.ConversationTurn value)1965 public Builder setTestCaseConversationTurns( 1966 int index, com.google.cloud.dialogflow.cx.v3.ConversationTurn value) { 1967 if (testCaseConversationTurnsBuilder_ == null) { 1968 if (value == null) { 1969 throw new NullPointerException(); 1970 } 1971 ensureTestCaseConversationTurnsIsMutable(); 1972 testCaseConversationTurns_.set(index, value); 1973 onChanged(); 1974 } else { 1975 testCaseConversationTurnsBuilder_.setMessage(index, value); 1976 } 1977 return this; 1978 } 1979 /** 1980 * 1981 * 1982 * <pre> 1983 * The conversation turns uttered when the test case was created, in 1984 * chronological order. These include the canonical set of agent utterances 1985 * that should occur when the agent is working properly. 1986 * </pre> 1987 * 1988 * <code> 1989 * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; 1990 * </code> 1991 */ setTestCaseConversationTurns( int index, com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder builderForValue)1992 public Builder setTestCaseConversationTurns( 1993 int index, com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder builderForValue) { 1994 if (testCaseConversationTurnsBuilder_ == null) { 1995 ensureTestCaseConversationTurnsIsMutable(); 1996 testCaseConversationTurns_.set(index, builderForValue.build()); 1997 onChanged(); 1998 } else { 1999 testCaseConversationTurnsBuilder_.setMessage(index, builderForValue.build()); 2000 } 2001 return this; 2002 } 2003 /** 2004 * 2005 * 2006 * <pre> 2007 * The conversation turns uttered when the test case was created, in 2008 * chronological order. These include the canonical set of agent utterances 2009 * that should occur when the agent is working properly. 2010 * </pre> 2011 * 2012 * <code> 2013 * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; 2014 * </code> 2015 */ addTestCaseConversationTurns( com.google.cloud.dialogflow.cx.v3.ConversationTurn value)2016 public Builder addTestCaseConversationTurns( 2017 com.google.cloud.dialogflow.cx.v3.ConversationTurn value) { 2018 if (testCaseConversationTurnsBuilder_ == null) { 2019 if (value == null) { 2020 throw new NullPointerException(); 2021 } 2022 ensureTestCaseConversationTurnsIsMutable(); 2023 testCaseConversationTurns_.add(value); 2024 onChanged(); 2025 } else { 2026 testCaseConversationTurnsBuilder_.addMessage(value); 2027 } 2028 return this; 2029 } 2030 /** 2031 * 2032 * 2033 * <pre> 2034 * The conversation turns uttered when the test case was created, in 2035 * chronological order. These include the canonical set of agent utterances 2036 * that should occur when the agent is working properly. 2037 * </pre> 2038 * 2039 * <code> 2040 * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; 2041 * </code> 2042 */ addTestCaseConversationTurns( int index, com.google.cloud.dialogflow.cx.v3.ConversationTurn value)2043 public Builder addTestCaseConversationTurns( 2044 int index, com.google.cloud.dialogflow.cx.v3.ConversationTurn value) { 2045 if (testCaseConversationTurnsBuilder_ == null) { 2046 if (value == null) { 2047 throw new NullPointerException(); 2048 } 2049 ensureTestCaseConversationTurnsIsMutable(); 2050 testCaseConversationTurns_.add(index, value); 2051 onChanged(); 2052 } else { 2053 testCaseConversationTurnsBuilder_.addMessage(index, value); 2054 } 2055 return this; 2056 } 2057 /** 2058 * 2059 * 2060 * <pre> 2061 * The conversation turns uttered when the test case was created, in 2062 * chronological order. These include the canonical set of agent utterances 2063 * that should occur when the agent is working properly. 2064 * </pre> 2065 * 2066 * <code> 2067 * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; 2068 * </code> 2069 */ addTestCaseConversationTurns( com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder builderForValue)2070 public Builder addTestCaseConversationTurns( 2071 com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder builderForValue) { 2072 if (testCaseConversationTurnsBuilder_ == null) { 2073 ensureTestCaseConversationTurnsIsMutable(); 2074 testCaseConversationTurns_.add(builderForValue.build()); 2075 onChanged(); 2076 } else { 2077 testCaseConversationTurnsBuilder_.addMessage(builderForValue.build()); 2078 } 2079 return this; 2080 } 2081 /** 2082 * 2083 * 2084 * <pre> 2085 * The conversation turns uttered when the test case was created, in 2086 * chronological order. These include the canonical set of agent utterances 2087 * that should occur when the agent is working properly. 2088 * </pre> 2089 * 2090 * <code> 2091 * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; 2092 * </code> 2093 */ addTestCaseConversationTurns( int index, com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder builderForValue)2094 public Builder addTestCaseConversationTurns( 2095 int index, com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder builderForValue) { 2096 if (testCaseConversationTurnsBuilder_ == null) { 2097 ensureTestCaseConversationTurnsIsMutable(); 2098 testCaseConversationTurns_.add(index, builderForValue.build()); 2099 onChanged(); 2100 } else { 2101 testCaseConversationTurnsBuilder_.addMessage(index, builderForValue.build()); 2102 } 2103 return this; 2104 } 2105 /** 2106 * 2107 * 2108 * <pre> 2109 * The conversation turns uttered when the test case was created, in 2110 * chronological order. These include the canonical set of agent utterances 2111 * that should occur when the agent is working properly. 2112 * </pre> 2113 * 2114 * <code> 2115 * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; 2116 * </code> 2117 */ addAllTestCaseConversationTurns( java.lang.Iterable<? extends com.google.cloud.dialogflow.cx.v3.ConversationTurn> values)2118 public Builder addAllTestCaseConversationTurns( 2119 java.lang.Iterable<? extends com.google.cloud.dialogflow.cx.v3.ConversationTurn> values) { 2120 if (testCaseConversationTurnsBuilder_ == null) { 2121 ensureTestCaseConversationTurnsIsMutable(); 2122 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, testCaseConversationTurns_); 2123 onChanged(); 2124 } else { 2125 testCaseConversationTurnsBuilder_.addAllMessages(values); 2126 } 2127 return this; 2128 } 2129 /** 2130 * 2131 * 2132 * <pre> 2133 * The conversation turns uttered when the test case was created, in 2134 * chronological order. These include the canonical set of agent utterances 2135 * that should occur when the agent is working properly. 2136 * </pre> 2137 * 2138 * <code> 2139 * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; 2140 * </code> 2141 */ clearTestCaseConversationTurns()2142 public Builder clearTestCaseConversationTurns() { 2143 if (testCaseConversationTurnsBuilder_ == null) { 2144 testCaseConversationTurns_ = java.util.Collections.emptyList(); 2145 bitField0_ = (bitField0_ & ~0x00000020); 2146 onChanged(); 2147 } else { 2148 testCaseConversationTurnsBuilder_.clear(); 2149 } 2150 return this; 2151 } 2152 /** 2153 * 2154 * 2155 * <pre> 2156 * The conversation turns uttered when the test case was created, in 2157 * chronological order. These include the canonical set of agent utterances 2158 * that should occur when the agent is working properly. 2159 * </pre> 2160 * 2161 * <code> 2162 * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; 2163 * </code> 2164 */ removeTestCaseConversationTurns(int index)2165 public Builder removeTestCaseConversationTurns(int index) { 2166 if (testCaseConversationTurnsBuilder_ == null) { 2167 ensureTestCaseConversationTurnsIsMutable(); 2168 testCaseConversationTurns_.remove(index); 2169 onChanged(); 2170 } else { 2171 testCaseConversationTurnsBuilder_.remove(index); 2172 } 2173 return this; 2174 } 2175 /** 2176 * 2177 * 2178 * <pre> 2179 * The conversation turns uttered when the test case was created, in 2180 * chronological order. These include the canonical set of agent utterances 2181 * that should occur when the agent is working properly. 2182 * </pre> 2183 * 2184 * <code> 2185 * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; 2186 * </code> 2187 */ 2188 public com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder getTestCaseConversationTurnsBuilder(int index)2189 getTestCaseConversationTurnsBuilder(int index) { 2190 return getTestCaseConversationTurnsFieldBuilder().getBuilder(index); 2191 } 2192 /** 2193 * 2194 * 2195 * <pre> 2196 * The conversation turns uttered when the test case was created, in 2197 * chronological order. These include the canonical set of agent utterances 2198 * that should occur when the agent is working properly. 2199 * </pre> 2200 * 2201 * <code> 2202 * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; 2203 * </code> 2204 */ 2205 public com.google.cloud.dialogflow.cx.v3.ConversationTurnOrBuilder getTestCaseConversationTurnsOrBuilder(int index)2206 getTestCaseConversationTurnsOrBuilder(int index) { 2207 if (testCaseConversationTurnsBuilder_ == null) { 2208 return testCaseConversationTurns_.get(index); 2209 } else { 2210 return testCaseConversationTurnsBuilder_.getMessageOrBuilder(index); 2211 } 2212 } 2213 /** 2214 * 2215 * 2216 * <pre> 2217 * The conversation turns uttered when the test case was created, in 2218 * chronological order. These include the canonical set of agent utterances 2219 * that should occur when the agent is working properly. 2220 * </pre> 2221 * 2222 * <code> 2223 * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; 2224 * </code> 2225 */ 2226 public java.util.List<? extends com.google.cloud.dialogflow.cx.v3.ConversationTurnOrBuilder> getTestCaseConversationTurnsOrBuilderList()2227 getTestCaseConversationTurnsOrBuilderList() { 2228 if (testCaseConversationTurnsBuilder_ != null) { 2229 return testCaseConversationTurnsBuilder_.getMessageOrBuilderList(); 2230 } else { 2231 return java.util.Collections.unmodifiableList(testCaseConversationTurns_); 2232 } 2233 } 2234 /** 2235 * 2236 * 2237 * <pre> 2238 * The conversation turns uttered when the test case was created, in 2239 * chronological order. These include the canonical set of agent utterances 2240 * that should occur when the agent is working properly. 2241 * </pre> 2242 * 2243 * <code> 2244 * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; 2245 * </code> 2246 */ 2247 public com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder addTestCaseConversationTurnsBuilder()2248 addTestCaseConversationTurnsBuilder() { 2249 return getTestCaseConversationTurnsFieldBuilder() 2250 .addBuilder(com.google.cloud.dialogflow.cx.v3.ConversationTurn.getDefaultInstance()); 2251 } 2252 /** 2253 * 2254 * 2255 * <pre> 2256 * The conversation turns uttered when the test case was created, in 2257 * chronological order. These include the canonical set of agent utterances 2258 * that should occur when the agent is working properly. 2259 * </pre> 2260 * 2261 * <code> 2262 * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; 2263 * </code> 2264 */ 2265 public com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder addTestCaseConversationTurnsBuilder(int index)2266 addTestCaseConversationTurnsBuilder(int index) { 2267 return getTestCaseConversationTurnsFieldBuilder() 2268 .addBuilder( 2269 index, com.google.cloud.dialogflow.cx.v3.ConversationTurn.getDefaultInstance()); 2270 } 2271 /** 2272 * 2273 * 2274 * <pre> 2275 * The conversation turns uttered when the test case was created, in 2276 * chronological order. These include the canonical set of agent utterances 2277 * that should occur when the agent is working properly. 2278 * </pre> 2279 * 2280 * <code> 2281 * repeated .google.cloud.dialogflow.cx.v3.ConversationTurn test_case_conversation_turns = 5; 2282 * </code> 2283 */ 2284 public java.util.List<com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder> getTestCaseConversationTurnsBuilderList()2285 getTestCaseConversationTurnsBuilderList() { 2286 return getTestCaseConversationTurnsFieldBuilder().getBuilderList(); 2287 } 2288 2289 private com.google.protobuf.RepeatedFieldBuilderV3< 2290 com.google.cloud.dialogflow.cx.v3.ConversationTurn, 2291 com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder, 2292 com.google.cloud.dialogflow.cx.v3.ConversationTurnOrBuilder> getTestCaseConversationTurnsFieldBuilder()2293 getTestCaseConversationTurnsFieldBuilder() { 2294 if (testCaseConversationTurnsBuilder_ == null) { 2295 testCaseConversationTurnsBuilder_ = 2296 new com.google.protobuf.RepeatedFieldBuilderV3< 2297 com.google.cloud.dialogflow.cx.v3.ConversationTurn, 2298 com.google.cloud.dialogflow.cx.v3.ConversationTurn.Builder, 2299 com.google.cloud.dialogflow.cx.v3.ConversationTurnOrBuilder>( 2300 testCaseConversationTurns_, 2301 ((bitField0_ & 0x00000020) != 0), 2302 getParentForChildren(), 2303 isClean()); 2304 testCaseConversationTurns_ = null; 2305 } 2306 return testCaseConversationTurnsBuilder_; 2307 } 2308 2309 private com.google.protobuf.Timestamp creationTime_; 2310 private com.google.protobuf.SingleFieldBuilderV3< 2311 com.google.protobuf.Timestamp, 2312 com.google.protobuf.Timestamp.Builder, 2313 com.google.protobuf.TimestampOrBuilder> 2314 creationTimeBuilder_; 2315 /** 2316 * 2317 * 2318 * <pre> 2319 * Output only. When the test was created. 2320 * </pre> 2321 * 2322 * <code> 2323 * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2324 * </code> 2325 * 2326 * @return Whether the creationTime field is set. 2327 */ hasCreationTime()2328 public boolean hasCreationTime() { 2329 return ((bitField0_ & 0x00000040) != 0); 2330 } 2331 /** 2332 * 2333 * 2334 * <pre> 2335 * Output only. When the test was created. 2336 * </pre> 2337 * 2338 * <code> 2339 * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2340 * </code> 2341 * 2342 * @return The creationTime. 2343 */ getCreationTime()2344 public com.google.protobuf.Timestamp getCreationTime() { 2345 if (creationTimeBuilder_ == null) { 2346 return creationTime_ == null 2347 ? com.google.protobuf.Timestamp.getDefaultInstance() 2348 : creationTime_; 2349 } else { 2350 return creationTimeBuilder_.getMessage(); 2351 } 2352 } 2353 /** 2354 * 2355 * 2356 * <pre> 2357 * Output only. When the test was created. 2358 * </pre> 2359 * 2360 * <code> 2361 * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2362 * </code> 2363 */ setCreationTime(com.google.protobuf.Timestamp value)2364 public Builder setCreationTime(com.google.protobuf.Timestamp value) { 2365 if (creationTimeBuilder_ == null) { 2366 if (value == null) { 2367 throw new NullPointerException(); 2368 } 2369 creationTime_ = value; 2370 } else { 2371 creationTimeBuilder_.setMessage(value); 2372 } 2373 bitField0_ |= 0x00000040; 2374 onChanged(); 2375 return this; 2376 } 2377 /** 2378 * 2379 * 2380 * <pre> 2381 * Output only. When the test was created. 2382 * </pre> 2383 * 2384 * <code> 2385 * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2386 * </code> 2387 */ setCreationTime(com.google.protobuf.Timestamp.Builder builderForValue)2388 public Builder setCreationTime(com.google.protobuf.Timestamp.Builder builderForValue) { 2389 if (creationTimeBuilder_ == null) { 2390 creationTime_ = builderForValue.build(); 2391 } else { 2392 creationTimeBuilder_.setMessage(builderForValue.build()); 2393 } 2394 bitField0_ |= 0x00000040; 2395 onChanged(); 2396 return this; 2397 } 2398 /** 2399 * 2400 * 2401 * <pre> 2402 * Output only. When the test was created. 2403 * </pre> 2404 * 2405 * <code> 2406 * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2407 * </code> 2408 */ mergeCreationTime(com.google.protobuf.Timestamp value)2409 public Builder mergeCreationTime(com.google.protobuf.Timestamp value) { 2410 if (creationTimeBuilder_ == null) { 2411 if (((bitField0_ & 0x00000040) != 0) 2412 && creationTime_ != null 2413 && creationTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 2414 getCreationTimeBuilder().mergeFrom(value); 2415 } else { 2416 creationTime_ = value; 2417 } 2418 } else { 2419 creationTimeBuilder_.mergeFrom(value); 2420 } 2421 bitField0_ |= 0x00000040; 2422 onChanged(); 2423 return this; 2424 } 2425 /** 2426 * 2427 * 2428 * <pre> 2429 * Output only. When the test was created. 2430 * </pre> 2431 * 2432 * <code> 2433 * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2434 * </code> 2435 */ clearCreationTime()2436 public Builder clearCreationTime() { 2437 bitField0_ = (bitField0_ & ~0x00000040); 2438 creationTime_ = null; 2439 if (creationTimeBuilder_ != null) { 2440 creationTimeBuilder_.dispose(); 2441 creationTimeBuilder_ = null; 2442 } 2443 onChanged(); 2444 return this; 2445 } 2446 /** 2447 * 2448 * 2449 * <pre> 2450 * Output only. When the test was created. 2451 * </pre> 2452 * 2453 * <code> 2454 * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2455 * </code> 2456 */ getCreationTimeBuilder()2457 public com.google.protobuf.Timestamp.Builder getCreationTimeBuilder() { 2458 bitField0_ |= 0x00000040; 2459 onChanged(); 2460 return getCreationTimeFieldBuilder().getBuilder(); 2461 } 2462 /** 2463 * 2464 * 2465 * <pre> 2466 * Output only. When the test was created. 2467 * </pre> 2468 * 2469 * <code> 2470 * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2471 * </code> 2472 */ getCreationTimeOrBuilder()2473 public com.google.protobuf.TimestampOrBuilder getCreationTimeOrBuilder() { 2474 if (creationTimeBuilder_ != null) { 2475 return creationTimeBuilder_.getMessageOrBuilder(); 2476 } else { 2477 return creationTime_ == null 2478 ? com.google.protobuf.Timestamp.getDefaultInstance() 2479 : creationTime_; 2480 } 2481 } 2482 /** 2483 * 2484 * 2485 * <pre> 2486 * Output only. When the test was created. 2487 * </pre> 2488 * 2489 * <code> 2490 * .google.protobuf.Timestamp creation_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2491 * </code> 2492 */ 2493 private com.google.protobuf.SingleFieldBuilderV3< 2494 com.google.protobuf.Timestamp, 2495 com.google.protobuf.Timestamp.Builder, 2496 com.google.protobuf.TimestampOrBuilder> getCreationTimeFieldBuilder()2497 getCreationTimeFieldBuilder() { 2498 if (creationTimeBuilder_ == null) { 2499 creationTimeBuilder_ = 2500 new com.google.protobuf.SingleFieldBuilderV3< 2501 com.google.protobuf.Timestamp, 2502 com.google.protobuf.Timestamp.Builder, 2503 com.google.protobuf.TimestampOrBuilder>( 2504 getCreationTime(), getParentForChildren(), isClean()); 2505 creationTime_ = null; 2506 } 2507 return creationTimeBuilder_; 2508 } 2509 2510 private com.google.cloud.dialogflow.cx.v3.TestCaseResult lastTestResult_; 2511 private com.google.protobuf.SingleFieldBuilderV3< 2512 com.google.cloud.dialogflow.cx.v3.TestCaseResult, 2513 com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder, 2514 com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder> 2515 lastTestResultBuilder_; 2516 /** 2517 * 2518 * 2519 * <pre> 2520 * The latest test result. 2521 * </pre> 2522 * 2523 * <code>.google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12;</code> 2524 * 2525 * @return Whether the lastTestResult field is set. 2526 */ hasLastTestResult()2527 public boolean hasLastTestResult() { 2528 return ((bitField0_ & 0x00000080) != 0); 2529 } 2530 /** 2531 * 2532 * 2533 * <pre> 2534 * The latest test result. 2535 * </pre> 2536 * 2537 * <code>.google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12;</code> 2538 * 2539 * @return The lastTestResult. 2540 */ getLastTestResult()2541 public com.google.cloud.dialogflow.cx.v3.TestCaseResult getLastTestResult() { 2542 if (lastTestResultBuilder_ == null) { 2543 return lastTestResult_ == null 2544 ? com.google.cloud.dialogflow.cx.v3.TestCaseResult.getDefaultInstance() 2545 : lastTestResult_; 2546 } else { 2547 return lastTestResultBuilder_.getMessage(); 2548 } 2549 } 2550 /** 2551 * 2552 * 2553 * <pre> 2554 * The latest test result. 2555 * </pre> 2556 * 2557 * <code>.google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12;</code> 2558 */ setLastTestResult(com.google.cloud.dialogflow.cx.v3.TestCaseResult value)2559 public Builder setLastTestResult(com.google.cloud.dialogflow.cx.v3.TestCaseResult value) { 2560 if (lastTestResultBuilder_ == null) { 2561 if (value == null) { 2562 throw new NullPointerException(); 2563 } 2564 lastTestResult_ = value; 2565 } else { 2566 lastTestResultBuilder_.setMessage(value); 2567 } 2568 bitField0_ |= 0x00000080; 2569 onChanged(); 2570 return this; 2571 } 2572 /** 2573 * 2574 * 2575 * <pre> 2576 * The latest test result. 2577 * </pre> 2578 * 2579 * <code>.google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12;</code> 2580 */ setLastTestResult( com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder builderForValue)2581 public Builder setLastTestResult( 2582 com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder builderForValue) { 2583 if (lastTestResultBuilder_ == null) { 2584 lastTestResult_ = builderForValue.build(); 2585 } else { 2586 lastTestResultBuilder_.setMessage(builderForValue.build()); 2587 } 2588 bitField0_ |= 0x00000080; 2589 onChanged(); 2590 return this; 2591 } 2592 /** 2593 * 2594 * 2595 * <pre> 2596 * The latest test result. 2597 * </pre> 2598 * 2599 * <code>.google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12;</code> 2600 */ mergeLastTestResult(com.google.cloud.dialogflow.cx.v3.TestCaseResult value)2601 public Builder mergeLastTestResult(com.google.cloud.dialogflow.cx.v3.TestCaseResult value) { 2602 if (lastTestResultBuilder_ == null) { 2603 if (((bitField0_ & 0x00000080) != 0) 2604 && lastTestResult_ != null 2605 && lastTestResult_ 2606 != com.google.cloud.dialogflow.cx.v3.TestCaseResult.getDefaultInstance()) { 2607 getLastTestResultBuilder().mergeFrom(value); 2608 } else { 2609 lastTestResult_ = value; 2610 } 2611 } else { 2612 lastTestResultBuilder_.mergeFrom(value); 2613 } 2614 bitField0_ |= 0x00000080; 2615 onChanged(); 2616 return this; 2617 } 2618 /** 2619 * 2620 * 2621 * <pre> 2622 * The latest test result. 2623 * </pre> 2624 * 2625 * <code>.google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12;</code> 2626 */ clearLastTestResult()2627 public Builder clearLastTestResult() { 2628 bitField0_ = (bitField0_ & ~0x00000080); 2629 lastTestResult_ = null; 2630 if (lastTestResultBuilder_ != null) { 2631 lastTestResultBuilder_.dispose(); 2632 lastTestResultBuilder_ = null; 2633 } 2634 onChanged(); 2635 return this; 2636 } 2637 /** 2638 * 2639 * 2640 * <pre> 2641 * The latest test result. 2642 * </pre> 2643 * 2644 * <code>.google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12;</code> 2645 */ getLastTestResultBuilder()2646 public com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder getLastTestResultBuilder() { 2647 bitField0_ |= 0x00000080; 2648 onChanged(); 2649 return getLastTestResultFieldBuilder().getBuilder(); 2650 } 2651 /** 2652 * 2653 * 2654 * <pre> 2655 * The latest test result. 2656 * </pre> 2657 * 2658 * <code>.google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12;</code> 2659 */ getLastTestResultOrBuilder()2660 public com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder getLastTestResultOrBuilder() { 2661 if (lastTestResultBuilder_ != null) { 2662 return lastTestResultBuilder_.getMessageOrBuilder(); 2663 } else { 2664 return lastTestResult_ == null 2665 ? com.google.cloud.dialogflow.cx.v3.TestCaseResult.getDefaultInstance() 2666 : lastTestResult_; 2667 } 2668 } 2669 /** 2670 * 2671 * 2672 * <pre> 2673 * The latest test result. 2674 * </pre> 2675 * 2676 * <code>.google.cloud.dialogflow.cx.v3.TestCaseResult last_test_result = 12;</code> 2677 */ 2678 private com.google.protobuf.SingleFieldBuilderV3< 2679 com.google.cloud.dialogflow.cx.v3.TestCaseResult, 2680 com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder, 2681 com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder> getLastTestResultFieldBuilder()2682 getLastTestResultFieldBuilder() { 2683 if (lastTestResultBuilder_ == null) { 2684 lastTestResultBuilder_ = 2685 new com.google.protobuf.SingleFieldBuilderV3< 2686 com.google.cloud.dialogflow.cx.v3.TestCaseResult, 2687 com.google.cloud.dialogflow.cx.v3.TestCaseResult.Builder, 2688 com.google.cloud.dialogflow.cx.v3.TestCaseResultOrBuilder>( 2689 getLastTestResult(), getParentForChildren(), isClean()); 2690 lastTestResult_ = null; 2691 } 2692 return lastTestResultBuilder_; 2693 } 2694 2695 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2696 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 2697 return super.setUnknownFields(unknownFields); 2698 } 2699 2700 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2701 public final Builder mergeUnknownFields( 2702 final com.google.protobuf.UnknownFieldSet unknownFields) { 2703 return super.mergeUnknownFields(unknownFields); 2704 } 2705 2706 // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.TestCase) 2707 } 2708 2709 // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.TestCase) 2710 private static final com.google.cloud.dialogflow.cx.v3.TestCase DEFAULT_INSTANCE; 2711 2712 static { 2713 DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.TestCase(); 2714 } 2715 getDefaultInstance()2716 public static com.google.cloud.dialogflow.cx.v3.TestCase getDefaultInstance() { 2717 return DEFAULT_INSTANCE; 2718 } 2719 2720 private static final com.google.protobuf.Parser<TestCase> PARSER = 2721 new com.google.protobuf.AbstractParser<TestCase>() { 2722 @java.lang.Override 2723 public TestCase parsePartialFrom( 2724 com.google.protobuf.CodedInputStream input, 2725 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2726 throws com.google.protobuf.InvalidProtocolBufferException { 2727 Builder builder = newBuilder(); 2728 try { 2729 builder.mergeFrom(input, extensionRegistry); 2730 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2731 throw e.setUnfinishedMessage(builder.buildPartial()); 2732 } catch (com.google.protobuf.UninitializedMessageException e) { 2733 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 2734 } catch (java.io.IOException e) { 2735 throw new com.google.protobuf.InvalidProtocolBufferException(e) 2736 .setUnfinishedMessage(builder.buildPartial()); 2737 } 2738 return builder.buildPartial(); 2739 } 2740 }; 2741 parser()2742 public static com.google.protobuf.Parser<TestCase> parser() { 2743 return PARSER; 2744 } 2745 2746 @java.lang.Override getParserForType()2747 public com.google.protobuf.Parser<TestCase> getParserForType() { 2748 return PARSER; 2749 } 2750 2751 @java.lang.Override getDefaultInstanceForType()2752 public com.google.cloud.dialogflow.cx.v3.TestCase getDefaultInstanceForType() { 2753 return DEFAULT_INSTANCE; 2754 } 2755 } 2756