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 * Error info for running a test. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.dialogflow.cx.v3.TestError} 29 */ 30 public final class TestError extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.TestError) 33 TestErrorOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use TestError.newBuilder() to construct. TestError(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private TestError(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 TestError()40 private TestError() { 41 testCase_ = ""; 42 } 43 44 @java.lang.Override 45 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)46 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 47 return new TestError(); 48 } 49 50 @java.lang.Override getUnknownFields()51 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 52 return this.unknownFields; 53 } 54 getDescriptor()55 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 56 return com.google.cloud.dialogflow.cx.v3.TestCaseProto 57 .internal_static_google_cloud_dialogflow_cx_v3_TestError_descriptor; 58 } 59 60 @java.lang.Override 61 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()62 internalGetFieldAccessorTable() { 63 return com.google.cloud.dialogflow.cx.v3.TestCaseProto 64 .internal_static_google_cloud_dialogflow_cx_v3_TestError_fieldAccessorTable 65 .ensureFieldAccessorsInitialized( 66 com.google.cloud.dialogflow.cx.v3.TestError.class, 67 com.google.cloud.dialogflow.cx.v3.TestError.Builder.class); 68 } 69 70 public static final int TEST_CASE_FIELD_NUMBER = 1; 71 72 @SuppressWarnings("serial") 73 private volatile java.lang.Object testCase_ = ""; 74 /** 75 * 76 * 77 * <pre> 78 * The test case resource name. 79 * </pre> 80 * 81 * <code>string test_case = 1 [(.google.api.resource_reference) = { ... }</code> 82 * 83 * @return The testCase. 84 */ 85 @java.lang.Override getTestCase()86 public java.lang.String getTestCase() { 87 java.lang.Object ref = testCase_; 88 if (ref instanceof java.lang.String) { 89 return (java.lang.String) ref; 90 } else { 91 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 92 java.lang.String s = bs.toStringUtf8(); 93 testCase_ = s; 94 return s; 95 } 96 } 97 /** 98 * 99 * 100 * <pre> 101 * The test case resource name. 102 * </pre> 103 * 104 * <code>string test_case = 1 [(.google.api.resource_reference) = { ... }</code> 105 * 106 * @return The bytes for testCase. 107 */ 108 @java.lang.Override getTestCaseBytes()109 public com.google.protobuf.ByteString getTestCaseBytes() { 110 java.lang.Object ref = testCase_; 111 if (ref instanceof java.lang.String) { 112 com.google.protobuf.ByteString b = 113 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 114 testCase_ = b; 115 return b; 116 } else { 117 return (com.google.protobuf.ByteString) ref; 118 } 119 } 120 121 public static final int STATUS_FIELD_NUMBER = 2; 122 private com.google.rpc.Status status_; 123 /** 124 * 125 * 126 * <pre> 127 * The status associated with the test. 128 * </pre> 129 * 130 * <code>.google.rpc.Status status = 2;</code> 131 * 132 * @return Whether the status field is set. 133 */ 134 @java.lang.Override hasStatus()135 public boolean hasStatus() { 136 return status_ != null; 137 } 138 /** 139 * 140 * 141 * <pre> 142 * The status associated with the test. 143 * </pre> 144 * 145 * <code>.google.rpc.Status status = 2;</code> 146 * 147 * @return The status. 148 */ 149 @java.lang.Override getStatus()150 public com.google.rpc.Status getStatus() { 151 return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; 152 } 153 /** 154 * 155 * 156 * <pre> 157 * The status associated with the test. 158 * </pre> 159 * 160 * <code>.google.rpc.Status status = 2;</code> 161 */ 162 @java.lang.Override getStatusOrBuilder()163 public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { 164 return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; 165 } 166 167 public static final int TEST_TIME_FIELD_NUMBER = 3; 168 private com.google.protobuf.Timestamp testTime_; 169 /** 170 * 171 * 172 * <pre> 173 * The timestamp when the test was completed. 174 * </pre> 175 * 176 * <code>.google.protobuf.Timestamp test_time = 3;</code> 177 * 178 * @return Whether the testTime field is set. 179 */ 180 @java.lang.Override hasTestTime()181 public boolean hasTestTime() { 182 return testTime_ != null; 183 } 184 /** 185 * 186 * 187 * <pre> 188 * The timestamp when the test was completed. 189 * </pre> 190 * 191 * <code>.google.protobuf.Timestamp test_time = 3;</code> 192 * 193 * @return The testTime. 194 */ 195 @java.lang.Override getTestTime()196 public com.google.protobuf.Timestamp getTestTime() { 197 return testTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : testTime_; 198 } 199 /** 200 * 201 * 202 * <pre> 203 * The timestamp when the test was completed. 204 * </pre> 205 * 206 * <code>.google.protobuf.Timestamp test_time = 3;</code> 207 */ 208 @java.lang.Override getTestTimeOrBuilder()209 public com.google.protobuf.TimestampOrBuilder getTestTimeOrBuilder() { 210 return testTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : testTime_; 211 } 212 213 private byte memoizedIsInitialized = -1; 214 215 @java.lang.Override isInitialized()216 public final boolean isInitialized() { 217 byte isInitialized = memoizedIsInitialized; 218 if (isInitialized == 1) return true; 219 if (isInitialized == 0) return false; 220 221 memoizedIsInitialized = 1; 222 return true; 223 } 224 225 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)226 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 227 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(testCase_)) { 228 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, testCase_); 229 } 230 if (status_ != null) { 231 output.writeMessage(2, getStatus()); 232 } 233 if (testTime_ != null) { 234 output.writeMessage(3, getTestTime()); 235 } 236 getUnknownFields().writeTo(output); 237 } 238 239 @java.lang.Override getSerializedSize()240 public int getSerializedSize() { 241 int size = memoizedSize; 242 if (size != -1) return size; 243 244 size = 0; 245 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(testCase_)) { 246 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, testCase_); 247 } 248 if (status_ != null) { 249 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStatus()); 250 } 251 if (testTime_ != null) { 252 size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTestTime()); 253 } 254 size += getUnknownFields().getSerializedSize(); 255 memoizedSize = size; 256 return size; 257 } 258 259 @java.lang.Override equals(final java.lang.Object obj)260 public boolean equals(final java.lang.Object obj) { 261 if (obj == this) { 262 return true; 263 } 264 if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.TestError)) { 265 return super.equals(obj); 266 } 267 com.google.cloud.dialogflow.cx.v3.TestError other = 268 (com.google.cloud.dialogflow.cx.v3.TestError) obj; 269 270 if (!getTestCase().equals(other.getTestCase())) return false; 271 if (hasStatus() != other.hasStatus()) return false; 272 if (hasStatus()) { 273 if (!getStatus().equals(other.getStatus())) return false; 274 } 275 if (hasTestTime() != other.hasTestTime()) return false; 276 if (hasTestTime()) { 277 if (!getTestTime().equals(other.getTestTime())) return false; 278 } 279 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 280 return true; 281 } 282 283 @java.lang.Override hashCode()284 public int hashCode() { 285 if (memoizedHashCode != 0) { 286 return memoizedHashCode; 287 } 288 int hash = 41; 289 hash = (19 * hash) + getDescriptor().hashCode(); 290 hash = (37 * hash) + TEST_CASE_FIELD_NUMBER; 291 hash = (53 * hash) + getTestCase().hashCode(); 292 if (hasStatus()) { 293 hash = (37 * hash) + STATUS_FIELD_NUMBER; 294 hash = (53 * hash) + getStatus().hashCode(); 295 } 296 if (hasTestTime()) { 297 hash = (37 * hash) + TEST_TIME_FIELD_NUMBER; 298 hash = (53 * hash) + getTestTime().hashCode(); 299 } 300 hash = (29 * hash) + getUnknownFields().hashCode(); 301 memoizedHashCode = hash; 302 return hash; 303 } 304 parseFrom(java.nio.ByteBuffer data)305 public static com.google.cloud.dialogflow.cx.v3.TestError parseFrom(java.nio.ByteBuffer data) 306 throws com.google.protobuf.InvalidProtocolBufferException { 307 return PARSER.parseFrom(data); 308 } 309 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)310 public static com.google.cloud.dialogflow.cx.v3.TestError parseFrom( 311 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 312 throws com.google.protobuf.InvalidProtocolBufferException { 313 return PARSER.parseFrom(data, extensionRegistry); 314 } 315 parseFrom( com.google.protobuf.ByteString data)316 public static com.google.cloud.dialogflow.cx.v3.TestError parseFrom( 317 com.google.protobuf.ByteString data) 318 throws com.google.protobuf.InvalidProtocolBufferException { 319 return PARSER.parseFrom(data); 320 } 321 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)322 public static com.google.cloud.dialogflow.cx.v3.TestError parseFrom( 323 com.google.protobuf.ByteString data, 324 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 325 throws com.google.protobuf.InvalidProtocolBufferException { 326 return PARSER.parseFrom(data, extensionRegistry); 327 } 328 parseFrom(byte[] data)329 public static com.google.cloud.dialogflow.cx.v3.TestError parseFrom(byte[] data) 330 throws com.google.protobuf.InvalidProtocolBufferException { 331 return PARSER.parseFrom(data); 332 } 333 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)334 public static com.google.cloud.dialogflow.cx.v3.TestError parseFrom( 335 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 336 throws com.google.protobuf.InvalidProtocolBufferException { 337 return PARSER.parseFrom(data, extensionRegistry); 338 } 339 parseFrom(java.io.InputStream input)340 public static com.google.cloud.dialogflow.cx.v3.TestError parseFrom(java.io.InputStream input) 341 throws java.io.IOException { 342 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 343 } 344 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)345 public static com.google.cloud.dialogflow.cx.v3.TestError parseFrom( 346 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 347 throws java.io.IOException { 348 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 349 PARSER, input, extensionRegistry); 350 } 351 parseDelimitedFrom( java.io.InputStream input)352 public static com.google.cloud.dialogflow.cx.v3.TestError parseDelimitedFrom( 353 java.io.InputStream input) throws java.io.IOException { 354 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 355 } 356 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)357 public static com.google.cloud.dialogflow.cx.v3.TestError parseDelimitedFrom( 358 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 359 throws java.io.IOException { 360 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 361 PARSER, input, extensionRegistry); 362 } 363 parseFrom( com.google.protobuf.CodedInputStream input)364 public static com.google.cloud.dialogflow.cx.v3.TestError parseFrom( 365 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 366 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 367 } 368 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)369 public static com.google.cloud.dialogflow.cx.v3.TestError parseFrom( 370 com.google.protobuf.CodedInputStream input, 371 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 372 throws java.io.IOException { 373 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 374 PARSER, input, extensionRegistry); 375 } 376 377 @java.lang.Override newBuilderForType()378 public Builder newBuilderForType() { 379 return newBuilder(); 380 } 381 newBuilder()382 public static Builder newBuilder() { 383 return DEFAULT_INSTANCE.toBuilder(); 384 } 385 newBuilder(com.google.cloud.dialogflow.cx.v3.TestError prototype)386 public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.TestError prototype) { 387 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 388 } 389 390 @java.lang.Override toBuilder()391 public Builder toBuilder() { 392 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 393 } 394 395 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)396 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 397 Builder builder = new Builder(parent); 398 return builder; 399 } 400 /** 401 * 402 * 403 * <pre> 404 * Error info for running a test. 405 * </pre> 406 * 407 * Protobuf type {@code google.cloud.dialogflow.cx.v3.TestError} 408 */ 409 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 410 implements 411 // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.TestError) 412 com.google.cloud.dialogflow.cx.v3.TestErrorOrBuilder { getDescriptor()413 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 414 return com.google.cloud.dialogflow.cx.v3.TestCaseProto 415 .internal_static_google_cloud_dialogflow_cx_v3_TestError_descriptor; 416 } 417 418 @java.lang.Override 419 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()420 internalGetFieldAccessorTable() { 421 return com.google.cloud.dialogflow.cx.v3.TestCaseProto 422 .internal_static_google_cloud_dialogflow_cx_v3_TestError_fieldAccessorTable 423 .ensureFieldAccessorsInitialized( 424 com.google.cloud.dialogflow.cx.v3.TestError.class, 425 com.google.cloud.dialogflow.cx.v3.TestError.Builder.class); 426 } 427 428 // Construct using com.google.cloud.dialogflow.cx.v3.TestError.newBuilder() Builder()429 private Builder() {} 430 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)431 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 432 super(parent); 433 } 434 435 @java.lang.Override clear()436 public Builder clear() { 437 super.clear(); 438 bitField0_ = 0; 439 testCase_ = ""; 440 status_ = null; 441 if (statusBuilder_ != null) { 442 statusBuilder_.dispose(); 443 statusBuilder_ = null; 444 } 445 testTime_ = null; 446 if (testTimeBuilder_ != null) { 447 testTimeBuilder_.dispose(); 448 testTimeBuilder_ = null; 449 } 450 return this; 451 } 452 453 @java.lang.Override getDescriptorForType()454 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 455 return com.google.cloud.dialogflow.cx.v3.TestCaseProto 456 .internal_static_google_cloud_dialogflow_cx_v3_TestError_descriptor; 457 } 458 459 @java.lang.Override getDefaultInstanceForType()460 public com.google.cloud.dialogflow.cx.v3.TestError getDefaultInstanceForType() { 461 return com.google.cloud.dialogflow.cx.v3.TestError.getDefaultInstance(); 462 } 463 464 @java.lang.Override build()465 public com.google.cloud.dialogflow.cx.v3.TestError build() { 466 com.google.cloud.dialogflow.cx.v3.TestError result = buildPartial(); 467 if (!result.isInitialized()) { 468 throw newUninitializedMessageException(result); 469 } 470 return result; 471 } 472 473 @java.lang.Override buildPartial()474 public com.google.cloud.dialogflow.cx.v3.TestError buildPartial() { 475 com.google.cloud.dialogflow.cx.v3.TestError result = 476 new com.google.cloud.dialogflow.cx.v3.TestError(this); 477 if (bitField0_ != 0) { 478 buildPartial0(result); 479 } 480 onBuilt(); 481 return result; 482 } 483 buildPartial0(com.google.cloud.dialogflow.cx.v3.TestError result)484 private void buildPartial0(com.google.cloud.dialogflow.cx.v3.TestError result) { 485 int from_bitField0_ = bitField0_; 486 if (((from_bitField0_ & 0x00000001) != 0)) { 487 result.testCase_ = testCase_; 488 } 489 if (((from_bitField0_ & 0x00000002) != 0)) { 490 result.status_ = statusBuilder_ == null ? status_ : statusBuilder_.build(); 491 } 492 if (((from_bitField0_ & 0x00000004) != 0)) { 493 result.testTime_ = testTimeBuilder_ == null ? testTime_ : testTimeBuilder_.build(); 494 } 495 } 496 497 @java.lang.Override clone()498 public Builder clone() { 499 return super.clone(); 500 } 501 502 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)503 public Builder setField( 504 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 505 return super.setField(field, value); 506 } 507 508 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)509 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 510 return super.clearField(field); 511 } 512 513 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)514 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 515 return super.clearOneof(oneof); 516 } 517 518 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)519 public Builder setRepeatedField( 520 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 521 return super.setRepeatedField(field, index, value); 522 } 523 524 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)525 public Builder addRepeatedField( 526 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 527 return super.addRepeatedField(field, value); 528 } 529 530 @java.lang.Override mergeFrom(com.google.protobuf.Message other)531 public Builder mergeFrom(com.google.protobuf.Message other) { 532 if (other instanceof com.google.cloud.dialogflow.cx.v3.TestError) { 533 return mergeFrom((com.google.cloud.dialogflow.cx.v3.TestError) other); 534 } else { 535 super.mergeFrom(other); 536 return this; 537 } 538 } 539 mergeFrom(com.google.cloud.dialogflow.cx.v3.TestError other)540 public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.TestError other) { 541 if (other == com.google.cloud.dialogflow.cx.v3.TestError.getDefaultInstance()) return this; 542 if (!other.getTestCase().isEmpty()) { 543 testCase_ = other.testCase_; 544 bitField0_ |= 0x00000001; 545 onChanged(); 546 } 547 if (other.hasStatus()) { 548 mergeStatus(other.getStatus()); 549 } 550 if (other.hasTestTime()) { 551 mergeTestTime(other.getTestTime()); 552 } 553 this.mergeUnknownFields(other.getUnknownFields()); 554 onChanged(); 555 return this; 556 } 557 558 @java.lang.Override isInitialized()559 public final boolean isInitialized() { 560 return true; 561 } 562 563 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)564 public Builder mergeFrom( 565 com.google.protobuf.CodedInputStream input, 566 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 567 throws java.io.IOException { 568 if (extensionRegistry == null) { 569 throw new java.lang.NullPointerException(); 570 } 571 try { 572 boolean done = false; 573 while (!done) { 574 int tag = input.readTag(); 575 switch (tag) { 576 case 0: 577 done = true; 578 break; 579 case 10: 580 { 581 testCase_ = input.readStringRequireUtf8(); 582 bitField0_ |= 0x00000001; 583 break; 584 } // case 10 585 case 18: 586 { 587 input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry); 588 bitField0_ |= 0x00000002; 589 break; 590 } // case 18 591 case 26: 592 { 593 input.readMessage(getTestTimeFieldBuilder().getBuilder(), extensionRegistry); 594 bitField0_ |= 0x00000004; 595 break; 596 } // case 26 597 default: 598 { 599 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 600 done = true; // was an endgroup tag 601 } 602 break; 603 } // default: 604 } // switch (tag) 605 } // while (!done) 606 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 607 throw e.unwrapIOException(); 608 } finally { 609 onChanged(); 610 } // finally 611 return this; 612 } 613 614 private int bitField0_; 615 616 private java.lang.Object testCase_ = ""; 617 /** 618 * 619 * 620 * <pre> 621 * The test case resource name. 622 * </pre> 623 * 624 * <code>string test_case = 1 [(.google.api.resource_reference) = { ... }</code> 625 * 626 * @return The testCase. 627 */ getTestCase()628 public java.lang.String getTestCase() { 629 java.lang.Object ref = testCase_; 630 if (!(ref instanceof java.lang.String)) { 631 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 632 java.lang.String s = bs.toStringUtf8(); 633 testCase_ = s; 634 return s; 635 } else { 636 return (java.lang.String) ref; 637 } 638 } 639 /** 640 * 641 * 642 * <pre> 643 * The test case resource name. 644 * </pre> 645 * 646 * <code>string test_case = 1 [(.google.api.resource_reference) = { ... }</code> 647 * 648 * @return The bytes for testCase. 649 */ getTestCaseBytes()650 public com.google.protobuf.ByteString getTestCaseBytes() { 651 java.lang.Object ref = testCase_; 652 if (ref instanceof String) { 653 com.google.protobuf.ByteString b = 654 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 655 testCase_ = b; 656 return b; 657 } else { 658 return (com.google.protobuf.ByteString) ref; 659 } 660 } 661 /** 662 * 663 * 664 * <pre> 665 * The test case resource name. 666 * </pre> 667 * 668 * <code>string test_case = 1 [(.google.api.resource_reference) = { ... }</code> 669 * 670 * @param value The testCase to set. 671 * @return This builder for chaining. 672 */ setTestCase(java.lang.String value)673 public Builder setTestCase(java.lang.String value) { 674 if (value == null) { 675 throw new NullPointerException(); 676 } 677 testCase_ = value; 678 bitField0_ |= 0x00000001; 679 onChanged(); 680 return this; 681 } 682 /** 683 * 684 * 685 * <pre> 686 * The test case resource name. 687 * </pre> 688 * 689 * <code>string test_case = 1 [(.google.api.resource_reference) = { ... }</code> 690 * 691 * @return This builder for chaining. 692 */ clearTestCase()693 public Builder clearTestCase() { 694 testCase_ = getDefaultInstance().getTestCase(); 695 bitField0_ = (bitField0_ & ~0x00000001); 696 onChanged(); 697 return this; 698 } 699 /** 700 * 701 * 702 * <pre> 703 * The test case resource name. 704 * </pre> 705 * 706 * <code>string test_case = 1 [(.google.api.resource_reference) = { ... }</code> 707 * 708 * @param value The bytes for testCase to set. 709 * @return This builder for chaining. 710 */ setTestCaseBytes(com.google.protobuf.ByteString value)711 public Builder setTestCaseBytes(com.google.protobuf.ByteString value) { 712 if (value == null) { 713 throw new NullPointerException(); 714 } 715 checkByteStringIsUtf8(value); 716 testCase_ = value; 717 bitField0_ |= 0x00000001; 718 onChanged(); 719 return this; 720 } 721 722 private com.google.rpc.Status status_; 723 private com.google.protobuf.SingleFieldBuilderV3< 724 com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> 725 statusBuilder_; 726 /** 727 * 728 * 729 * <pre> 730 * The status associated with the test. 731 * </pre> 732 * 733 * <code>.google.rpc.Status status = 2;</code> 734 * 735 * @return Whether the status field is set. 736 */ hasStatus()737 public boolean hasStatus() { 738 return ((bitField0_ & 0x00000002) != 0); 739 } 740 /** 741 * 742 * 743 * <pre> 744 * The status associated with the test. 745 * </pre> 746 * 747 * <code>.google.rpc.Status status = 2;</code> 748 * 749 * @return The status. 750 */ getStatus()751 public com.google.rpc.Status getStatus() { 752 if (statusBuilder_ == null) { 753 return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; 754 } else { 755 return statusBuilder_.getMessage(); 756 } 757 } 758 /** 759 * 760 * 761 * <pre> 762 * The status associated with the test. 763 * </pre> 764 * 765 * <code>.google.rpc.Status status = 2;</code> 766 */ setStatus(com.google.rpc.Status value)767 public Builder setStatus(com.google.rpc.Status value) { 768 if (statusBuilder_ == null) { 769 if (value == null) { 770 throw new NullPointerException(); 771 } 772 status_ = value; 773 } else { 774 statusBuilder_.setMessage(value); 775 } 776 bitField0_ |= 0x00000002; 777 onChanged(); 778 return this; 779 } 780 /** 781 * 782 * 783 * <pre> 784 * The status associated with the test. 785 * </pre> 786 * 787 * <code>.google.rpc.Status status = 2;</code> 788 */ setStatus(com.google.rpc.Status.Builder builderForValue)789 public Builder setStatus(com.google.rpc.Status.Builder builderForValue) { 790 if (statusBuilder_ == null) { 791 status_ = builderForValue.build(); 792 } else { 793 statusBuilder_.setMessage(builderForValue.build()); 794 } 795 bitField0_ |= 0x00000002; 796 onChanged(); 797 return this; 798 } 799 /** 800 * 801 * 802 * <pre> 803 * The status associated with the test. 804 * </pre> 805 * 806 * <code>.google.rpc.Status status = 2;</code> 807 */ mergeStatus(com.google.rpc.Status value)808 public Builder mergeStatus(com.google.rpc.Status value) { 809 if (statusBuilder_ == null) { 810 if (((bitField0_ & 0x00000002) != 0) 811 && status_ != null 812 && status_ != com.google.rpc.Status.getDefaultInstance()) { 813 getStatusBuilder().mergeFrom(value); 814 } else { 815 status_ = value; 816 } 817 } else { 818 statusBuilder_.mergeFrom(value); 819 } 820 bitField0_ |= 0x00000002; 821 onChanged(); 822 return this; 823 } 824 /** 825 * 826 * 827 * <pre> 828 * The status associated with the test. 829 * </pre> 830 * 831 * <code>.google.rpc.Status status = 2;</code> 832 */ clearStatus()833 public Builder clearStatus() { 834 bitField0_ = (bitField0_ & ~0x00000002); 835 status_ = null; 836 if (statusBuilder_ != null) { 837 statusBuilder_.dispose(); 838 statusBuilder_ = null; 839 } 840 onChanged(); 841 return this; 842 } 843 /** 844 * 845 * 846 * <pre> 847 * The status associated with the test. 848 * </pre> 849 * 850 * <code>.google.rpc.Status status = 2;</code> 851 */ getStatusBuilder()852 public com.google.rpc.Status.Builder getStatusBuilder() { 853 bitField0_ |= 0x00000002; 854 onChanged(); 855 return getStatusFieldBuilder().getBuilder(); 856 } 857 /** 858 * 859 * 860 * <pre> 861 * The status associated with the test. 862 * </pre> 863 * 864 * <code>.google.rpc.Status status = 2;</code> 865 */ getStatusOrBuilder()866 public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { 867 if (statusBuilder_ != null) { 868 return statusBuilder_.getMessageOrBuilder(); 869 } else { 870 return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; 871 } 872 } 873 /** 874 * 875 * 876 * <pre> 877 * The status associated with the test. 878 * </pre> 879 * 880 * <code>.google.rpc.Status status = 2;</code> 881 */ 882 private com.google.protobuf.SingleFieldBuilderV3< 883 com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> getStatusFieldBuilder()884 getStatusFieldBuilder() { 885 if (statusBuilder_ == null) { 886 statusBuilder_ = 887 new com.google.protobuf.SingleFieldBuilderV3< 888 com.google.rpc.Status, 889 com.google.rpc.Status.Builder, 890 com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean()); 891 status_ = null; 892 } 893 return statusBuilder_; 894 } 895 896 private com.google.protobuf.Timestamp testTime_; 897 private com.google.protobuf.SingleFieldBuilderV3< 898 com.google.protobuf.Timestamp, 899 com.google.protobuf.Timestamp.Builder, 900 com.google.protobuf.TimestampOrBuilder> 901 testTimeBuilder_; 902 /** 903 * 904 * 905 * <pre> 906 * The timestamp when the test was completed. 907 * </pre> 908 * 909 * <code>.google.protobuf.Timestamp test_time = 3;</code> 910 * 911 * @return Whether the testTime field is set. 912 */ hasTestTime()913 public boolean hasTestTime() { 914 return ((bitField0_ & 0x00000004) != 0); 915 } 916 /** 917 * 918 * 919 * <pre> 920 * The timestamp when the test was completed. 921 * </pre> 922 * 923 * <code>.google.protobuf.Timestamp test_time = 3;</code> 924 * 925 * @return The testTime. 926 */ getTestTime()927 public com.google.protobuf.Timestamp getTestTime() { 928 if (testTimeBuilder_ == null) { 929 return testTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : testTime_; 930 } else { 931 return testTimeBuilder_.getMessage(); 932 } 933 } 934 /** 935 * 936 * 937 * <pre> 938 * The timestamp when the test was completed. 939 * </pre> 940 * 941 * <code>.google.protobuf.Timestamp test_time = 3;</code> 942 */ setTestTime(com.google.protobuf.Timestamp value)943 public Builder setTestTime(com.google.protobuf.Timestamp value) { 944 if (testTimeBuilder_ == null) { 945 if (value == null) { 946 throw new NullPointerException(); 947 } 948 testTime_ = value; 949 } else { 950 testTimeBuilder_.setMessage(value); 951 } 952 bitField0_ |= 0x00000004; 953 onChanged(); 954 return this; 955 } 956 /** 957 * 958 * 959 * <pre> 960 * The timestamp when the test was completed. 961 * </pre> 962 * 963 * <code>.google.protobuf.Timestamp test_time = 3;</code> 964 */ setTestTime(com.google.protobuf.Timestamp.Builder builderForValue)965 public Builder setTestTime(com.google.protobuf.Timestamp.Builder builderForValue) { 966 if (testTimeBuilder_ == null) { 967 testTime_ = builderForValue.build(); 968 } else { 969 testTimeBuilder_.setMessage(builderForValue.build()); 970 } 971 bitField0_ |= 0x00000004; 972 onChanged(); 973 return this; 974 } 975 /** 976 * 977 * 978 * <pre> 979 * The timestamp when the test was completed. 980 * </pre> 981 * 982 * <code>.google.protobuf.Timestamp test_time = 3;</code> 983 */ mergeTestTime(com.google.protobuf.Timestamp value)984 public Builder mergeTestTime(com.google.protobuf.Timestamp value) { 985 if (testTimeBuilder_ == null) { 986 if (((bitField0_ & 0x00000004) != 0) 987 && testTime_ != null 988 && testTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 989 getTestTimeBuilder().mergeFrom(value); 990 } else { 991 testTime_ = value; 992 } 993 } else { 994 testTimeBuilder_.mergeFrom(value); 995 } 996 bitField0_ |= 0x00000004; 997 onChanged(); 998 return this; 999 } 1000 /** 1001 * 1002 * 1003 * <pre> 1004 * The timestamp when the test was completed. 1005 * </pre> 1006 * 1007 * <code>.google.protobuf.Timestamp test_time = 3;</code> 1008 */ clearTestTime()1009 public Builder clearTestTime() { 1010 bitField0_ = (bitField0_ & ~0x00000004); 1011 testTime_ = null; 1012 if (testTimeBuilder_ != null) { 1013 testTimeBuilder_.dispose(); 1014 testTimeBuilder_ = null; 1015 } 1016 onChanged(); 1017 return this; 1018 } 1019 /** 1020 * 1021 * 1022 * <pre> 1023 * The timestamp when the test was completed. 1024 * </pre> 1025 * 1026 * <code>.google.protobuf.Timestamp test_time = 3;</code> 1027 */ getTestTimeBuilder()1028 public com.google.protobuf.Timestamp.Builder getTestTimeBuilder() { 1029 bitField0_ |= 0x00000004; 1030 onChanged(); 1031 return getTestTimeFieldBuilder().getBuilder(); 1032 } 1033 /** 1034 * 1035 * 1036 * <pre> 1037 * The timestamp when the test was completed. 1038 * </pre> 1039 * 1040 * <code>.google.protobuf.Timestamp test_time = 3;</code> 1041 */ getTestTimeOrBuilder()1042 public com.google.protobuf.TimestampOrBuilder getTestTimeOrBuilder() { 1043 if (testTimeBuilder_ != null) { 1044 return testTimeBuilder_.getMessageOrBuilder(); 1045 } else { 1046 return testTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : testTime_; 1047 } 1048 } 1049 /** 1050 * 1051 * 1052 * <pre> 1053 * The timestamp when the test was completed. 1054 * </pre> 1055 * 1056 * <code>.google.protobuf.Timestamp test_time = 3;</code> 1057 */ 1058 private com.google.protobuf.SingleFieldBuilderV3< 1059 com.google.protobuf.Timestamp, 1060 com.google.protobuf.Timestamp.Builder, 1061 com.google.protobuf.TimestampOrBuilder> getTestTimeFieldBuilder()1062 getTestTimeFieldBuilder() { 1063 if (testTimeBuilder_ == null) { 1064 testTimeBuilder_ = 1065 new com.google.protobuf.SingleFieldBuilderV3< 1066 com.google.protobuf.Timestamp, 1067 com.google.protobuf.Timestamp.Builder, 1068 com.google.protobuf.TimestampOrBuilder>( 1069 getTestTime(), getParentForChildren(), isClean()); 1070 testTime_ = null; 1071 } 1072 return testTimeBuilder_; 1073 } 1074 1075 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1076 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1077 return super.setUnknownFields(unknownFields); 1078 } 1079 1080 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1081 public final Builder mergeUnknownFields( 1082 final com.google.protobuf.UnknownFieldSet unknownFields) { 1083 return super.mergeUnknownFields(unknownFields); 1084 } 1085 1086 // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.TestError) 1087 } 1088 1089 // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.TestError) 1090 private static final com.google.cloud.dialogflow.cx.v3.TestError DEFAULT_INSTANCE; 1091 1092 static { 1093 DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.TestError(); 1094 } 1095 getDefaultInstance()1096 public static com.google.cloud.dialogflow.cx.v3.TestError getDefaultInstance() { 1097 return DEFAULT_INSTANCE; 1098 } 1099 1100 private static final com.google.protobuf.Parser<TestError> PARSER = 1101 new com.google.protobuf.AbstractParser<TestError>() { 1102 @java.lang.Override 1103 public TestError parsePartialFrom( 1104 com.google.protobuf.CodedInputStream input, 1105 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1106 throws com.google.protobuf.InvalidProtocolBufferException { 1107 Builder builder = newBuilder(); 1108 try { 1109 builder.mergeFrom(input, extensionRegistry); 1110 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1111 throw e.setUnfinishedMessage(builder.buildPartial()); 1112 } catch (com.google.protobuf.UninitializedMessageException e) { 1113 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1114 } catch (java.io.IOException e) { 1115 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1116 .setUnfinishedMessage(builder.buildPartial()); 1117 } 1118 return builder.buildPartial(); 1119 } 1120 }; 1121 parser()1122 public static com.google.protobuf.Parser<TestError> parser() { 1123 return PARSER; 1124 } 1125 1126 @java.lang.Override getParserForType()1127 public com.google.protobuf.Parser<TestError> getParserForType() { 1128 return PARSER; 1129 } 1130 1131 @java.lang.Override getDefaultInstanceForType()1132 public com.google.cloud.dialogflow.cx.v3.TestError getDefaultInstanceForType() { 1133 return DEFAULT_INSTANCE; 1134 } 1135 } 1136