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