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 * The response message for 26 * [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ExportTestCases]. 27 * </pre> 28 * 29 * Protobuf type {@code google.cloud.dialogflow.cx.v3.ExportTestCasesResponse} 30 */ 31 public final class ExportTestCasesResponse extends com.google.protobuf.GeneratedMessageV3 32 implements 33 // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ExportTestCasesResponse) 34 ExportTestCasesResponseOrBuilder { 35 private static final long serialVersionUID = 0L; 36 // Use ExportTestCasesResponse.newBuilder() to construct. ExportTestCasesResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37 private ExportTestCasesResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 38 super(builder); 39 } 40 ExportTestCasesResponse()41 private ExportTestCasesResponse() {} 42 43 @java.lang.Override 44 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)45 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 46 return new ExportTestCasesResponse(); 47 } 48 49 @java.lang.Override getUnknownFields()50 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 51 return this.unknownFields; 52 } 53 getDescriptor()54 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 55 return com.google.cloud.dialogflow.cx.v3.TestCaseProto 56 .internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesResponse_descriptor; 57 } 58 59 @java.lang.Override 60 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()61 internalGetFieldAccessorTable() { 62 return com.google.cloud.dialogflow.cx.v3.TestCaseProto 63 .internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesResponse_fieldAccessorTable 64 .ensureFieldAccessorsInitialized( 65 com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse.class, 66 com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse.Builder.class); 67 } 68 69 private int destinationCase_ = 0; 70 private java.lang.Object destination_; 71 72 public enum DestinationCase 73 implements 74 com.google.protobuf.Internal.EnumLite, 75 com.google.protobuf.AbstractMessage.InternalOneOfEnum { 76 GCS_URI(1), 77 CONTENT(2), 78 DESTINATION_NOT_SET(0); 79 private final int value; 80 DestinationCase(int value)81 private DestinationCase(int value) { 82 this.value = value; 83 } 84 /** 85 * @param value The number of the enum to look for. 86 * @return The enum associated with the given number. 87 * @deprecated Use {@link #forNumber(int)} instead. 88 */ 89 @java.lang.Deprecated valueOf(int value)90 public static DestinationCase valueOf(int value) { 91 return forNumber(value); 92 } 93 forNumber(int value)94 public static DestinationCase forNumber(int value) { 95 switch (value) { 96 case 1: 97 return GCS_URI; 98 case 2: 99 return CONTENT; 100 case 0: 101 return DESTINATION_NOT_SET; 102 default: 103 return null; 104 } 105 } 106 getNumber()107 public int getNumber() { 108 return this.value; 109 } 110 }; 111 getDestinationCase()112 public DestinationCase getDestinationCase() { 113 return DestinationCase.forNumber(destinationCase_); 114 } 115 116 public static final int GCS_URI_FIELD_NUMBER = 1; 117 /** 118 * 119 * 120 * <pre> 121 * The URI to a file containing the exported test cases. This field is 122 * populated only if `gcs_uri` is specified in 123 * [ExportTestCasesRequest][google.cloud.dialogflow.cx.v3.ExportTestCasesRequest]. 124 * </pre> 125 * 126 * <code>string gcs_uri = 1;</code> 127 * 128 * @return Whether the gcsUri field is set. 129 */ hasGcsUri()130 public boolean hasGcsUri() { 131 return destinationCase_ == 1; 132 } 133 /** 134 * 135 * 136 * <pre> 137 * The URI to a file containing the exported test cases. This field is 138 * populated only if `gcs_uri` is specified in 139 * [ExportTestCasesRequest][google.cloud.dialogflow.cx.v3.ExportTestCasesRequest]. 140 * </pre> 141 * 142 * <code>string gcs_uri = 1;</code> 143 * 144 * @return The gcsUri. 145 */ getGcsUri()146 public java.lang.String getGcsUri() { 147 java.lang.Object ref = ""; 148 if (destinationCase_ == 1) { 149 ref = destination_; 150 } 151 if (ref instanceof java.lang.String) { 152 return (java.lang.String) ref; 153 } else { 154 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 155 java.lang.String s = bs.toStringUtf8(); 156 if (destinationCase_ == 1) { 157 destination_ = s; 158 } 159 return s; 160 } 161 } 162 /** 163 * 164 * 165 * <pre> 166 * The URI to a file containing the exported test cases. This field is 167 * populated only if `gcs_uri` is specified in 168 * [ExportTestCasesRequest][google.cloud.dialogflow.cx.v3.ExportTestCasesRequest]. 169 * </pre> 170 * 171 * <code>string gcs_uri = 1;</code> 172 * 173 * @return The bytes for gcsUri. 174 */ getGcsUriBytes()175 public com.google.protobuf.ByteString getGcsUriBytes() { 176 java.lang.Object ref = ""; 177 if (destinationCase_ == 1) { 178 ref = destination_; 179 } 180 if (ref instanceof java.lang.String) { 181 com.google.protobuf.ByteString b = 182 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 183 if (destinationCase_ == 1) { 184 destination_ = b; 185 } 186 return b; 187 } else { 188 return (com.google.protobuf.ByteString) ref; 189 } 190 } 191 192 public static final int CONTENT_FIELD_NUMBER = 2; 193 /** 194 * 195 * 196 * <pre> 197 * Uncompressed raw byte content for test cases. 198 * </pre> 199 * 200 * <code>bytes content = 2;</code> 201 * 202 * @return Whether the content field is set. 203 */ 204 @java.lang.Override hasContent()205 public boolean hasContent() { 206 return destinationCase_ == 2; 207 } 208 /** 209 * 210 * 211 * <pre> 212 * Uncompressed raw byte content for test cases. 213 * </pre> 214 * 215 * <code>bytes content = 2;</code> 216 * 217 * @return The content. 218 */ 219 @java.lang.Override getContent()220 public com.google.protobuf.ByteString getContent() { 221 if (destinationCase_ == 2) { 222 return (com.google.protobuf.ByteString) destination_; 223 } 224 return com.google.protobuf.ByteString.EMPTY; 225 } 226 227 private byte memoizedIsInitialized = -1; 228 229 @java.lang.Override isInitialized()230 public final boolean isInitialized() { 231 byte isInitialized = memoizedIsInitialized; 232 if (isInitialized == 1) return true; 233 if (isInitialized == 0) return false; 234 235 memoizedIsInitialized = 1; 236 return true; 237 } 238 239 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)240 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 241 if (destinationCase_ == 1) { 242 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destination_); 243 } 244 if (destinationCase_ == 2) { 245 output.writeBytes(2, (com.google.protobuf.ByteString) destination_); 246 } 247 getUnknownFields().writeTo(output); 248 } 249 250 @java.lang.Override getSerializedSize()251 public int getSerializedSize() { 252 int size = memoizedSize; 253 if (size != -1) return size; 254 255 size = 0; 256 if (destinationCase_ == 1) { 257 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destination_); 258 } 259 if (destinationCase_ == 2) { 260 size += 261 com.google.protobuf.CodedOutputStream.computeBytesSize( 262 2, (com.google.protobuf.ByteString) destination_); 263 } 264 size += getUnknownFields().getSerializedSize(); 265 memoizedSize = size; 266 return size; 267 } 268 269 @java.lang.Override equals(final java.lang.Object obj)270 public boolean equals(final java.lang.Object obj) { 271 if (obj == this) { 272 return true; 273 } 274 if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse)) { 275 return super.equals(obj); 276 } 277 com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse other = 278 (com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse) obj; 279 280 if (!getDestinationCase().equals(other.getDestinationCase())) return false; 281 switch (destinationCase_) { 282 case 1: 283 if (!getGcsUri().equals(other.getGcsUri())) return false; 284 break; 285 case 2: 286 if (!getContent().equals(other.getContent())) return false; 287 break; 288 case 0: 289 default: 290 } 291 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 292 return true; 293 } 294 295 @java.lang.Override hashCode()296 public int hashCode() { 297 if (memoizedHashCode != 0) { 298 return memoizedHashCode; 299 } 300 int hash = 41; 301 hash = (19 * hash) + getDescriptor().hashCode(); 302 switch (destinationCase_) { 303 case 1: 304 hash = (37 * hash) + GCS_URI_FIELD_NUMBER; 305 hash = (53 * hash) + getGcsUri().hashCode(); 306 break; 307 case 2: 308 hash = (37 * hash) + CONTENT_FIELD_NUMBER; 309 hash = (53 * hash) + getContent().hashCode(); 310 break; 311 case 0: 312 default: 313 } 314 hash = (29 * hash) + getUnknownFields().hashCode(); 315 memoizedHashCode = hash; 316 return hash; 317 } 318 parseFrom( java.nio.ByteBuffer data)319 public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseFrom( 320 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 321 return PARSER.parseFrom(data); 322 } 323 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)324 public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseFrom( 325 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 326 throws com.google.protobuf.InvalidProtocolBufferException { 327 return PARSER.parseFrom(data, extensionRegistry); 328 } 329 parseFrom( com.google.protobuf.ByteString data)330 public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseFrom( 331 com.google.protobuf.ByteString data) 332 throws com.google.protobuf.InvalidProtocolBufferException { 333 return PARSER.parseFrom(data); 334 } 335 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)336 public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseFrom( 337 com.google.protobuf.ByteString data, 338 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 339 throws com.google.protobuf.InvalidProtocolBufferException { 340 return PARSER.parseFrom(data, extensionRegistry); 341 } 342 parseFrom(byte[] data)343 public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseFrom(byte[] data) 344 throws com.google.protobuf.InvalidProtocolBufferException { 345 return PARSER.parseFrom(data); 346 } 347 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)348 public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseFrom( 349 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 350 throws com.google.protobuf.InvalidProtocolBufferException { 351 return PARSER.parseFrom(data, extensionRegistry); 352 } 353 parseFrom( java.io.InputStream input)354 public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseFrom( 355 java.io.InputStream input) throws java.io.IOException { 356 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 357 } 358 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)359 public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseFrom( 360 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 361 throws java.io.IOException { 362 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 363 PARSER, input, extensionRegistry); 364 } 365 parseDelimitedFrom( java.io.InputStream input)366 public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseDelimitedFrom( 367 java.io.InputStream input) throws java.io.IOException { 368 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 369 } 370 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)371 public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseDelimitedFrom( 372 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 373 throws java.io.IOException { 374 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 375 PARSER, input, extensionRegistry); 376 } 377 parseFrom( com.google.protobuf.CodedInputStream input)378 public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseFrom( 379 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 380 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 381 } 382 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)383 public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse parseFrom( 384 com.google.protobuf.CodedInputStream input, 385 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 386 throws java.io.IOException { 387 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 388 PARSER, input, extensionRegistry); 389 } 390 391 @java.lang.Override newBuilderForType()392 public Builder newBuilderForType() { 393 return newBuilder(); 394 } 395 newBuilder()396 public static Builder newBuilder() { 397 return DEFAULT_INSTANCE.toBuilder(); 398 } 399 newBuilder( com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse prototype)400 public static Builder newBuilder( 401 com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse prototype) { 402 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 403 } 404 405 @java.lang.Override toBuilder()406 public Builder toBuilder() { 407 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 408 } 409 410 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)411 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 412 Builder builder = new Builder(parent); 413 return builder; 414 } 415 /** 416 * 417 * 418 * <pre> 419 * The response message for 420 * [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ExportTestCases]. 421 * </pre> 422 * 423 * Protobuf type {@code google.cloud.dialogflow.cx.v3.ExportTestCasesResponse} 424 */ 425 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 426 implements 427 // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ExportTestCasesResponse) 428 com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponseOrBuilder { getDescriptor()429 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 430 return com.google.cloud.dialogflow.cx.v3.TestCaseProto 431 .internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesResponse_descriptor; 432 } 433 434 @java.lang.Override 435 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()436 internalGetFieldAccessorTable() { 437 return com.google.cloud.dialogflow.cx.v3.TestCaseProto 438 .internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesResponse_fieldAccessorTable 439 .ensureFieldAccessorsInitialized( 440 com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse.class, 441 com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse.Builder.class); 442 } 443 444 // Construct using com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse.newBuilder() Builder()445 private Builder() {} 446 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)447 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 448 super(parent); 449 } 450 451 @java.lang.Override clear()452 public Builder clear() { 453 super.clear(); 454 bitField0_ = 0; 455 destinationCase_ = 0; 456 destination_ = null; 457 return this; 458 } 459 460 @java.lang.Override getDescriptorForType()461 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 462 return com.google.cloud.dialogflow.cx.v3.TestCaseProto 463 .internal_static_google_cloud_dialogflow_cx_v3_ExportTestCasesResponse_descriptor; 464 } 465 466 @java.lang.Override getDefaultInstanceForType()467 public com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse getDefaultInstanceForType() { 468 return com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse.getDefaultInstance(); 469 } 470 471 @java.lang.Override build()472 public com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse build() { 473 com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse result = buildPartial(); 474 if (!result.isInitialized()) { 475 throw newUninitializedMessageException(result); 476 } 477 return result; 478 } 479 480 @java.lang.Override buildPartial()481 public com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse buildPartial() { 482 com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse result = 483 new com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse(this); 484 if (bitField0_ != 0) { 485 buildPartial0(result); 486 } 487 buildPartialOneofs(result); 488 onBuilt(); 489 return result; 490 } 491 buildPartial0(com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse result)492 private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse result) { 493 int from_bitField0_ = bitField0_; 494 } 495 buildPartialOneofs( com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse result)496 private void buildPartialOneofs( 497 com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse result) { 498 result.destinationCase_ = destinationCase_; 499 result.destination_ = this.destination_; 500 } 501 502 @java.lang.Override clone()503 public Builder clone() { 504 return super.clone(); 505 } 506 507 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)508 public Builder setField( 509 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 510 return super.setField(field, value); 511 } 512 513 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)514 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 515 return super.clearField(field); 516 } 517 518 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)519 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 520 return super.clearOneof(oneof); 521 } 522 523 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)524 public Builder setRepeatedField( 525 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 526 return super.setRepeatedField(field, index, value); 527 } 528 529 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)530 public Builder addRepeatedField( 531 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 532 return super.addRepeatedField(field, value); 533 } 534 535 @java.lang.Override mergeFrom(com.google.protobuf.Message other)536 public Builder mergeFrom(com.google.protobuf.Message other) { 537 if (other instanceof com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse) { 538 return mergeFrom((com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse) other); 539 } else { 540 super.mergeFrom(other); 541 return this; 542 } 543 } 544 mergeFrom(com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse other)545 public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse other) { 546 if (other == com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse.getDefaultInstance()) 547 return this; 548 switch (other.getDestinationCase()) { 549 case GCS_URI: 550 { 551 destinationCase_ = 1; 552 destination_ = other.destination_; 553 onChanged(); 554 break; 555 } 556 case CONTENT: 557 { 558 setContent(other.getContent()); 559 break; 560 } 561 case DESTINATION_NOT_SET: 562 { 563 break; 564 } 565 } 566 this.mergeUnknownFields(other.getUnknownFields()); 567 onChanged(); 568 return this; 569 } 570 571 @java.lang.Override isInitialized()572 public final boolean isInitialized() { 573 return true; 574 } 575 576 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)577 public Builder mergeFrom( 578 com.google.protobuf.CodedInputStream input, 579 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 580 throws java.io.IOException { 581 if (extensionRegistry == null) { 582 throw new java.lang.NullPointerException(); 583 } 584 try { 585 boolean done = false; 586 while (!done) { 587 int tag = input.readTag(); 588 switch (tag) { 589 case 0: 590 done = true; 591 break; 592 case 10: 593 { 594 java.lang.String s = input.readStringRequireUtf8(); 595 destinationCase_ = 1; 596 destination_ = s; 597 break; 598 } // case 10 599 case 18: 600 { 601 destination_ = input.readBytes(); 602 destinationCase_ = 2; 603 break; 604 } // case 18 605 default: 606 { 607 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 608 done = true; // was an endgroup tag 609 } 610 break; 611 } // default: 612 } // switch (tag) 613 } // while (!done) 614 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 615 throw e.unwrapIOException(); 616 } finally { 617 onChanged(); 618 } // finally 619 return this; 620 } 621 622 private int destinationCase_ = 0; 623 private java.lang.Object destination_; 624 getDestinationCase()625 public DestinationCase getDestinationCase() { 626 return DestinationCase.forNumber(destinationCase_); 627 } 628 clearDestination()629 public Builder clearDestination() { 630 destinationCase_ = 0; 631 destination_ = null; 632 onChanged(); 633 return this; 634 } 635 636 private int bitField0_; 637 638 /** 639 * 640 * 641 * <pre> 642 * The URI to a file containing the exported test cases. This field is 643 * populated only if `gcs_uri` is specified in 644 * [ExportTestCasesRequest][google.cloud.dialogflow.cx.v3.ExportTestCasesRequest]. 645 * </pre> 646 * 647 * <code>string gcs_uri = 1;</code> 648 * 649 * @return Whether the gcsUri field is set. 650 */ 651 @java.lang.Override hasGcsUri()652 public boolean hasGcsUri() { 653 return destinationCase_ == 1; 654 } 655 /** 656 * 657 * 658 * <pre> 659 * The URI to a file containing the exported test cases. This field is 660 * populated only if `gcs_uri` is specified in 661 * [ExportTestCasesRequest][google.cloud.dialogflow.cx.v3.ExportTestCasesRequest]. 662 * </pre> 663 * 664 * <code>string gcs_uri = 1;</code> 665 * 666 * @return The gcsUri. 667 */ 668 @java.lang.Override getGcsUri()669 public java.lang.String getGcsUri() { 670 java.lang.Object ref = ""; 671 if (destinationCase_ == 1) { 672 ref = destination_; 673 } 674 if (!(ref instanceof java.lang.String)) { 675 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 676 java.lang.String s = bs.toStringUtf8(); 677 if (destinationCase_ == 1) { 678 destination_ = s; 679 } 680 return s; 681 } else { 682 return (java.lang.String) ref; 683 } 684 } 685 /** 686 * 687 * 688 * <pre> 689 * The URI to a file containing the exported test cases. This field is 690 * populated only if `gcs_uri` is specified in 691 * [ExportTestCasesRequest][google.cloud.dialogflow.cx.v3.ExportTestCasesRequest]. 692 * </pre> 693 * 694 * <code>string gcs_uri = 1;</code> 695 * 696 * @return The bytes for gcsUri. 697 */ 698 @java.lang.Override getGcsUriBytes()699 public com.google.protobuf.ByteString getGcsUriBytes() { 700 java.lang.Object ref = ""; 701 if (destinationCase_ == 1) { 702 ref = destination_; 703 } 704 if (ref instanceof String) { 705 com.google.protobuf.ByteString b = 706 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 707 if (destinationCase_ == 1) { 708 destination_ = b; 709 } 710 return b; 711 } else { 712 return (com.google.protobuf.ByteString) ref; 713 } 714 } 715 /** 716 * 717 * 718 * <pre> 719 * The URI to a file containing the exported test cases. This field is 720 * populated only if `gcs_uri` is specified in 721 * [ExportTestCasesRequest][google.cloud.dialogflow.cx.v3.ExportTestCasesRequest]. 722 * </pre> 723 * 724 * <code>string gcs_uri = 1;</code> 725 * 726 * @param value The gcsUri to set. 727 * @return This builder for chaining. 728 */ setGcsUri(java.lang.String value)729 public Builder setGcsUri(java.lang.String value) { 730 if (value == null) { 731 throw new NullPointerException(); 732 } 733 destinationCase_ = 1; 734 destination_ = value; 735 onChanged(); 736 return this; 737 } 738 /** 739 * 740 * 741 * <pre> 742 * The URI to a file containing the exported test cases. This field is 743 * populated only if `gcs_uri` is specified in 744 * [ExportTestCasesRequest][google.cloud.dialogflow.cx.v3.ExportTestCasesRequest]. 745 * </pre> 746 * 747 * <code>string gcs_uri = 1;</code> 748 * 749 * @return This builder for chaining. 750 */ clearGcsUri()751 public Builder clearGcsUri() { 752 if (destinationCase_ == 1) { 753 destinationCase_ = 0; 754 destination_ = null; 755 onChanged(); 756 } 757 return this; 758 } 759 /** 760 * 761 * 762 * <pre> 763 * The URI to a file containing the exported test cases. This field is 764 * populated only if `gcs_uri` is specified in 765 * [ExportTestCasesRequest][google.cloud.dialogflow.cx.v3.ExportTestCasesRequest]. 766 * </pre> 767 * 768 * <code>string gcs_uri = 1;</code> 769 * 770 * @param value The bytes for gcsUri to set. 771 * @return This builder for chaining. 772 */ setGcsUriBytes(com.google.protobuf.ByteString value)773 public Builder setGcsUriBytes(com.google.protobuf.ByteString value) { 774 if (value == null) { 775 throw new NullPointerException(); 776 } 777 checkByteStringIsUtf8(value); 778 destinationCase_ = 1; 779 destination_ = value; 780 onChanged(); 781 return this; 782 } 783 784 /** 785 * 786 * 787 * <pre> 788 * Uncompressed raw byte content for test cases. 789 * </pre> 790 * 791 * <code>bytes content = 2;</code> 792 * 793 * @return Whether the content field is set. 794 */ hasContent()795 public boolean hasContent() { 796 return destinationCase_ == 2; 797 } 798 /** 799 * 800 * 801 * <pre> 802 * Uncompressed raw byte content for test cases. 803 * </pre> 804 * 805 * <code>bytes content = 2;</code> 806 * 807 * @return The content. 808 */ getContent()809 public com.google.protobuf.ByteString getContent() { 810 if (destinationCase_ == 2) { 811 return (com.google.protobuf.ByteString) destination_; 812 } 813 return com.google.protobuf.ByteString.EMPTY; 814 } 815 /** 816 * 817 * 818 * <pre> 819 * Uncompressed raw byte content for test cases. 820 * </pre> 821 * 822 * <code>bytes content = 2;</code> 823 * 824 * @param value The content to set. 825 * @return This builder for chaining. 826 */ setContent(com.google.protobuf.ByteString value)827 public Builder setContent(com.google.protobuf.ByteString value) { 828 if (value == null) { 829 throw new NullPointerException(); 830 } 831 destinationCase_ = 2; 832 destination_ = value; 833 onChanged(); 834 return this; 835 } 836 /** 837 * 838 * 839 * <pre> 840 * Uncompressed raw byte content for test cases. 841 * </pre> 842 * 843 * <code>bytes content = 2;</code> 844 * 845 * @return This builder for chaining. 846 */ clearContent()847 public Builder clearContent() { 848 if (destinationCase_ == 2) { 849 destinationCase_ = 0; 850 destination_ = null; 851 onChanged(); 852 } 853 return this; 854 } 855 856 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)857 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 858 return super.setUnknownFields(unknownFields); 859 } 860 861 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)862 public final Builder mergeUnknownFields( 863 final com.google.protobuf.UnknownFieldSet unknownFields) { 864 return super.mergeUnknownFields(unknownFields); 865 } 866 867 // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ExportTestCasesResponse) 868 } 869 870 // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ExportTestCasesResponse) 871 private static final com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse DEFAULT_INSTANCE; 872 873 static { 874 DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse(); 875 } 876 getDefaultInstance()877 public static com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse getDefaultInstance() { 878 return DEFAULT_INSTANCE; 879 } 880 881 private static final com.google.protobuf.Parser<ExportTestCasesResponse> PARSER = 882 new com.google.protobuf.AbstractParser<ExportTestCasesResponse>() { 883 @java.lang.Override 884 public ExportTestCasesResponse parsePartialFrom( 885 com.google.protobuf.CodedInputStream input, 886 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 887 throws com.google.protobuf.InvalidProtocolBufferException { 888 Builder builder = newBuilder(); 889 try { 890 builder.mergeFrom(input, extensionRegistry); 891 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 892 throw e.setUnfinishedMessage(builder.buildPartial()); 893 } catch (com.google.protobuf.UninitializedMessageException e) { 894 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 895 } catch (java.io.IOException e) { 896 throw new com.google.protobuf.InvalidProtocolBufferException(e) 897 .setUnfinishedMessage(builder.buildPartial()); 898 } 899 return builder.buildPartial(); 900 } 901 }; 902 parser()903 public static com.google.protobuf.Parser<ExportTestCasesResponse> parser() { 904 return PARSER; 905 } 906 907 @java.lang.Override getParserForType()908 public com.google.protobuf.Parser<ExportTestCasesResponse> getParserForType() { 909 return PARSER; 910 } 911 912 @java.lang.Override getDefaultInstanceForType()913 public com.google.cloud.dialogflow.cx.v3.ExportTestCasesResponse getDefaultInstanceForType() { 914 return DEFAULT_INSTANCE; 915 } 916 } 917