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