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 response message for 26 * [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3beta1.TestCases.ExportTestCases]. 27 * </pre> 28 * 29 * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse} 30 */ 31 public final class ExportTestCasesResponse extends com.google.protobuf.GeneratedMessageV3 32 implements 33 // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCaseProto 56 .internal_static_google_cloud_dialogflow_cx_v3beta1_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.v3beta1.TestCaseProto 63 .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesResponse_fieldAccessorTable 64 .ensureFieldAccessorsInitialized( 65 com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse.class, 66 com.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.ExportTestCasesResponse)) { 275 return super.equals(obj); 276 } 277 com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse other = 278 (com.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.ExportTestCasesResponse parseFrom( 344 byte[] data) 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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.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.v3beta1.ExportTestCasesResponse prototype)400 public static Builder newBuilder( 401 com.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCases.ExportTestCases]. 421 * </pre> 422 * 423 * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.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.v3beta1.ExportTestCasesResponse) 428 com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponseOrBuilder { getDescriptor()429 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 430 return com.google.cloud.dialogflow.cx.v3beta1.TestCaseProto 431 .internal_static_google_cloud_dialogflow_cx_v3beta1_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.v3beta1.TestCaseProto 438 .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesResponse_fieldAccessorTable 439 .ensureFieldAccessorsInitialized( 440 com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse.class, 441 com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse.Builder.class); 442 } 443 444 // Construct using com.google.cloud.dialogflow.cx.v3beta1.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.v3beta1.TestCaseProto 463 .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportTestCasesResponse_descriptor; 464 } 465 466 @java.lang.Override 467 public com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse getDefaultInstanceForType()468 getDefaultInstanceForType() { 469 return com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse.getDefaultInstance(); 470 } 471 472 @java.lang.Override build()473 public com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse build() { 474 com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse result = buildPartial(); 475 if (!result.isInitialized()) { 476 throw newUninitializedMessageException(result); 477 } 478 return result; 479 } 480 481 @java.lang.Override buildPartial()482 public com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse buildPartial() { 483 com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse result = 484 new com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse(this); 485 if (bitField0_ != 0) { 486 buildPartial0(result); 487 } 488 buildPartialOneofs(result); 489 onBuilt(); 490 return result; 491 } 492 buildPartial0( com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse result)493 private void buildPartial0( 494 com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse result) { 495 int from_bitField0_ = bitField0_; 496 } 497 buildPartialOneofs( com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse result)498 private void buildPartialOneofs( 499 com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse result) { 500 result.destinationCase_ = destinationCase_; 501 result.destination_ = this.destination_; 502 } 503 504 @java.lang.Override clone()505 public Builder clone() { 506 return super.clone(); 507 } 508 509 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)510 public Builder setField( 511 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 512 return super.setField(field, value); 513 } 514 515 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)516 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 517 return super.clearField(field); 518 } 519 520 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)521 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 522 return super.clearOneof(oneof); 523 } 524 525 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)526 public Builder setRepeatedField( 527 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 528 return super.setRepeatedField(field, index, value); 529 } 530 531 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)532 public Builder addRepeatedField( 533 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 534 return super.addRepeatedField(field, value); 535 } 536 537 @java.lang.Override mergeFrom(com.google.protobuf.Message other)538 public Builder mergeFrom(com.google.protobuf.Message other) { 539 if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse) { 540 return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse) other); 541 } else { 542 super.mergeFrom(other); 543 return this; 544 } 545 } 546 mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse other)547 public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse other) { 548 if (other 549 == com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse.getDefaultInstance()) 550 return this; 551 switch (other.getDestinationCase()) { 552 case GCS_URI: 553 { 554 destinationCase_ = 1; 555 destination_ = other.destination_; 556 onChanged(); 557 break; 558 } 559 case CONTENT: 560 { 561 setContent(other.getContent()); 562 break; 563 } 564 case DESTINATION_NOT_SET: 565 { 566 break; 567 } 568 } 569 this.mergeUnknownFields(other.getUnknownFields()); 570 onChanged(); 571 return this; 572 } 573 574 @java.lang.Override isInitialized()575 public final boolean isInitialized() { 576 return true; 577 } 578 579 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)580 public Builder mergeFrom( 581 com.google.protobuf.CodedInputStream input, 582 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 583 throws java.io.IOException { 584 if (extensionRegistry == null) { 585 throw new java.lang.NullPointerException(); 586 } 587 try { 588 boolean done = false; 589 while (!done) { 590 int tag = input.readTag(); 591 switch (tag) { 592 case 0: 593 done = true; 594 break; 595 case 10: 596 { 597 java.lang.String s = input.readStringRequireUtf8(); 598 destinationCase_ = 1; 599 destination_ = s; 600 break; 601 } // case 10 602 case 18: 603 { 604 destination_ = input.readBytes(); 605 destinationCase_ = 2; 606 break; 607 } // case 18 608 default: 609 { 610 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 611 done = true; // was an endgroup tag 612 } 613 break; 614 } // default: 615 } // switch (tag) 616 } // while (!done) 617 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 618 throw e.unwrapIOException(); 619 } finally { 620 onChanged(); 621 } // finally 622 return this; 623 } 624 625 private int destinationCase_ = 0; 626 private java.lang.Object destination_; 627 getDestinationCase()628 public DestinationCase getDestinationCase() { 629 return DestinationCase.forNumber(destinationCase_); 630 } 631 clearDestination()632 public Builder clearDestination() { 633 destinationCase_ = 0; 634 destination_ = null; 635 onChanged(); 636 return this; 637 } 638 639 private int bitField0_; 640 641 /** 642 * 643 * 644 * <pre> 645 * The URI to a file containing the exported test cases. This field is 646 * populated only if `gcs_uri` is specified in 647 * [ExportTestCasesRequest][google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest]. 648 * </pre> 649 * 650 * <code>string gcs_uri = 1;</code> 651 * 652 * @return Whether the gcsUri field is set. 653 */ 654 @java.lang.Override hasGcsUri()655 public boolean hasGcsUri() { 656 return destinationCase_ == 1; 657 } 658 /** 659 * 660 * 661 * <pre> 662 * The URI to a file containing the exported test cases. This field is 663 * populated only if `gcs_uri` is specified in 664 * [ExportTestCasesRequest][google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest]. 665 * </pre> 666 * 667 * <code>string gcs_uri = 1;</code> 668 * 669 * @return The gcsUri. 670 */ 671 @java.lang.Override getGcsUri()672 public java.lang.String getGcsUri() { 673 java.lang.Object ref = ""; 674 if (destinationCase_ == 1) { 675 ref = destination_; 676 } 677 if (!(ref instanceof java.lang.String)) { 678 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 679 java.lang.String s = bs.toStringUtf8(); 680 if (destinationCase_ == 1) { 681 destination_ = s; 682 } 683 return s; 684 } else { 685 return (java.lang.String) ref; 686 } 687 } 688 /** 689 * 690 * 691 * <pre> 692 * The URI to a file containing the exported test cases. This field is 693 * populated only if `gcs_uri` is specified in 694 * [ExportTestCasesRequest][google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest]. 695 * </pre> 696 * 697 * <code>string gcs_uri = 1;</code> 698 * 699 * @return The bytes for gcsUri. 700 */ 701 @java.lang.Override getGcsUriBytes()702 public com.google.protobuf.ByteString getGcsUriBytes() { 703 java.lang.Object ref = ""; 704 if (destinationCase_ == 1) { 705 ref = destination_; 706 } 707 if (ref instanceof String) { 708 com.google.protobuf.ByteString b = 709 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 710 if (destinationCase_ == 1) { 711 destination_ = b; 712 } 713 return b; 714 } else { 715 return (com.google.protobuf.ByteString) ref; 716 } 717 } 718 /** 719 * 720 * 721 * <pre> 722 * The URI to a file containing the exported test cases. This field is 723 * populated only if `gcs_uri` is specified in 724 * [ExportTestCasesRequest][google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest]. 725 * </pre> 726 * 727 * <code>string gcs_uri = 1;</code> 728 * 729 * @param value The gcsUri to set. 730 * @return This builder for chaining. 731 */ setGcsUri(java.lang.String value)732 public Builder setGcsUri(java.lang.String value) { 733 if (value == null) { 734 throw new NullPointerException(); 735 } 736 destinationCase_ = 1; 737 destination_ = value; 738 onChanged(); 739 return this; 740 } 741 /** 742 * 743 * 744 * <pre> 745 * The URI to a file containing the exported test cases. This field is 746 * populated only if `gcs_uri` is specified in 747 * [ExportTestCasesRequest][google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest]. 748 * </pre> 749 * 750 * <code>string gcs_uri = 1;</code> 751 * 752 * @return This builder for chaining. 753 */ clearGcsUri()754 public Builder clearGcsUri() { 755 if (destinationCase_ == 1) { 756 destinationCase_ = 0; 757 destination_ = null; 758 onChanged(); 759 } 760 return this; 761 } 762 /** 763 * 764 * 765 * <pre> 766 * The URI to a file containing the exported test cases. This field is 767 * populated only if `gcs_uri` is specified in 768 * [ExportTestCasesRequest][google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest]. 769 * </pre> 770 * 771 * <code>string gcs_uri = 1;</code> 772 * 773 * @param value The bytes for gcsUri to set. 774 * @return This builder for chaining. 775 */ setGcsUriBytes(com.google.protobuf.ByteString value)776 public Builder setGcsUriBytes(com.google.protobuf.ByteString value) { 777 if (value == null) { 778 throw new NullPointerException(); 779 } 780 checkByteStringIsUtf8(value); 781 destinationCase_ = 1; 782 destination_ = value; 783 onChanged(); 784 return this; 785 } 786 787 /** 788 * 789 * 790 * <pre> 791 * Uncompressed raw byte content for test cases. 792 * </pre> 793 * 794 * <code>bytes content = 2;</code> 795 * 796 * @return Whether the content field is set. 797 */ hasContent()798 public boolean hasContent() { 799 return destinationCase_ == 2; 800 } 801 /** 802 * 803 * 804 * <pre> 805 * Uncompressed raw byte content for test cases. 806 * </pre> 807 * 808 * <code>bytes content = 2;</code> 809 * 810 * @return The content. 811 */ getContent()812 public com.google.protobuf.ByteString getContent() { 813 if (destinationCase_ == 2) { 814 return (com.google.protobuf.ByteString) destination_; 815 } 816 return com.google.protobuf.ByteString.EMPTY; 817 } 818 /** 819 * 820 * 821 * <pre> 822 * Uncompressed raw byte content for test cases. 823 * </pre> 824 * 825 * <code>bytes content = 2;</code> 826 * 827 * @param value The content to set. 828 * @return This builder for chaining. 829 */ setContent(com.google.protobuf.ByteString value)830 public Builder setContent(com.google.protobuf.ByteString value) { 831 if (value == null) { 832 throw new NullPointerException(); 833 } 834 destinationCase_ = 2; 835 destination_ = value; 836 onChanged(); 837 return this; 838 } 839 /** 840 * 841 * 842 * <pre> 843 * Uncompressed raw byte content for test cases. 844 * </pre> 845 * 846 * <code>bytes content = 2;</code> 847 * 848 * @return This builder for chaining. 849 */ clearContent()850 public Builder clearContent() { 851 if (destinationCase_ == 2) { 852 destinationCase_ = 0; 853 destination_ = null; 854 onChanged(); 855 } 856 return this; 857 } 858 859 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)860 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 861 return super.setUnknownFields(unknownFields); 862 } 863 864 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)865 public final Builder mergeUnknownFields( 866 final com.google.protobuf.UnknownFieldSet unknownFields) { 867 return super.mergeUnknownFields(unknownFields); 868 } 869 870 // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse) 871 } 872 873 // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse) 874 private static final com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse 875 DEFAULT_INSTANCE; 876 877 static { 878 DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse(); 879 } 880 881 public static com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse getDefaultInstance()882 getDefaultInstance() { 883 return DEFAULT_INSTANCE; 884 } 885 886 private static final com.google.protobuf.Parser<ExportTestCasesResponse> PARSER = 887 new com.google.protobuf.AbstractParser<ExportTestCasesResponse>() { 888 @java.lang.Override 889 public ExportTestCasesResponse parsePartialFrom( 890 com.google.protobuf.CodedInputStream input, 891 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 892 throws com.google.protobuf.InvalidProtocolBufferException { 893 Builder builder = newBuilder(); 894 try { 895 builder.mergeFrom(input, extensionRegistry); 896 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 897 throw e.setUnfinishedMessage(builder.buildPartial()); 898 } catch (com.google.protobuf.UninitializedMessageException e) { 899 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 900 } catch (java.io.IOException e) { 901 throw new com.google.protobuf.InvalidProtocolBufferException(e) 902 .setUnfinishedMessage(builder.buildPartial()); 903 } 904 return builder.buildPartial(); 905 } 906 }; 907 parser()908 public static com.google.protobuf.Parser<ExportTestCasesResponse> parser() { 909 return PARSER; 910 } 911 912 @java.lang.Override getParserForType()913 public com.google.protobuf.Parser<ExportTestCasesResponse> getParserForType() { 914 return PARSER; 915 } 916 917 @java.lang.Override 918 public com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse getDefaultInstanceForType()919 getDefaultInstanceForType() { 920 return DEFAULT_INSTANCE; 921 } 922 } 923