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/session.proto 18 19 package com.google.cloud.dialogflow.v2; 20 21 /** 22 * 23 * 24 * <pre> 25 * Represents the result of conversational query or event processing. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.dialogflow.v2.QueryResult} 29 */ 30 public final class QueryResult extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.QueryResult) 33 QueryResultOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use QueryResult.newBuilder() to construct. QueryResult(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private QueryResult(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 QueryResult()40 private QueryResult() { 41 queryText_ = ""; 42 languageCode_ = ""; 43 action_ = ""; 44 fulfillmentText_ = ""; 45 fulfillmentMessages_ = java.util.Collections.emptyList(); 46 webhookSource_ = ""; 47 outputContexts_ = java.util.Collections.emptyList(); 48 } 49 50 @java.lang.Override 51 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)52 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 53 return new QueryResult(); 54 } 55 56 @java.lang.Override getUnknownFields()57 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 58 return this.unknownFields; 59 } 60 getDescriptor()61 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 62 return com.google.cloud.dialogflow.v2.SessionProto 63 .internal_static_google_cloud_dialogflow_v2_QueryResult_descriptor; 64 } 65 66 @java.lang.Override 67 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()68 internalGetFieldAccessorTable() { 69 return com.google.cloud.dialogflow.v2.SessionProto 70 .internal_static_google_cloud_dialogflow_v2_QueryResult_fieldAccessorTable 71 .ensureFieldAccessorsInitialized( 72 com.google.cloud.dialogflow.v2.QueryResult.class, 73 com.google.cloud.dialogflow.v2.QueryResult.Builder.class); 74 } 75 76 public static final int QUERY_TEXT_FIELD_NUMBER = 1; 77 78 @SuppressWarnings("serial") 79 private volatile java.lang.Object queryText_ = ""; 80 /** 81 * 82 * 83 * <pre> 84 * The original conversational query text: 85 * - If natural language text was provided as input, `query_text` contains 86 * a copy of the input. 87 * - If natural language speech audio was provided as input, `query_text` 88 * contains the speech recognition result. If speech recognizer produced 89 * multiple alternatives, a particular one is picked. 90 * - If automatic spell correction is enabled, `query_text` will contain the 91 * corrected user input. 92 * </pre> 93 * 94 * <code>string query_text = 1;</code> 95 * 96 * @return The queryText. 97 */ 98 @java.lang.Override getQueryText()99 public java.lang.String getQueryText() { 100 java.lang.Object ref = queryText_; 101 if (ref instanceof java.lang.String) { 102 return (java.lang.String) ref; 103 } else { 104 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 105 java.lang.String s = bs.toStringUtf8(); 106 queryText_ = s; 107 return s; 108 } 109 } 110 /** 111 * 112 * 113 * <pre> 114 * The original conversational query text: 115 * - If natural language text was provided as input, `query_text` contains 116 * a copy of the input. 117 * - If natural language speech audio was provided as input, `query_text` 118 * contains the speech recognition result. If speech recognizer produced 119 * multiple alternatives, a particular one is picked. 120 * - If automatic spell correction is enabled, `query_text` will contain the 121 * corrected user input. 122 * </pre> 123 * 124 * <code>string query_text = 1;</code> 125 * 126 * @return The bytes for queryText. 127 */ 128 @java.lang.Override getQueryTextBytes()129 public com.google.protobuf.ByteString getQueryTextBytes() { 130 java.lang.Object ref = queryText_; 131 if (ref instanceof java.lang.String) { 132 com.google.protobuf.ByteString b = 133 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 134 queryText_ = b; 135 return b; 136 } else { 137 return (com.google.protobuf.ByteString) ref; 138 } 139 } 140 141 public static final int LANGUAGE_CODE_FIELD_NUMBER = 15; 142 143 @SuppressWarnings("serial") 144 private volatile java.lang.Object languageCode_ = ""; 145 /** 146 * 147 * 148 * <pre> 149 * The language that was triggered during intent detection. 150 * See [Language 151 * Support](https://cloud.google.com/dialogflow/docs/reference/language) 152 * for a list of the currently supported language codes. 153 * </pre> 154 * 155 * <code>string language_code = 15;</code> 156 * 157 * @return The languageCode. 158 */ 159 @java.lang.Override getLanguageCode()160 public java.lang.String getLanguageCode() { 161 java.lang.Object ref = languageCode_; 162 if (ref instanceof java.lang.String) { 163 return (java.lang.String) ref; 164 } else { 165 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 166 java.lang.String s = bs.toStringUtf8(); 167 languageCode_ = s; 168 return s; 169 } 170 } 171 /** 172 * 173 * 174 * <pre> 175 * The language that was triggered during intent detection. 176 * See [Language 177 * Support](https://cloud.google.com/dialogflow/docs/reference/language) 178 * for a list of the currently supported language codes. 179 * </pre> 180 * 181 * <code>string language_code = 15;</code> 182 * 183 * @return The bytes for languageCode. 184 */ 185 @java.lang.Override getLanguageCodeBytes()186 public com.google.protobuf.ByteString getLanguageCodeBytes() { 187 java.lang.Object ref = languageCode_; 188 if (ref instanceof java.lang.String) { 189 com.google.protobuf.ByteString b = 190 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 191 languageCode_ = b; 192 return b; 193 } else { 194 return (com.google.protobuf.ByteString) ref; 195 } 196 } 197 198 public static final int SPEECH_RECOGNITION_CONFIDENCE_FIELD_NUMBER = 2; 199 private float speechRecognitionConfidence_ = 0F; 200 /** 201 * 202 * 203 * <pre> 204 * The Speech recognition confidence between 0.0 and 1.0. A higher number 205 * indicates an estimated greater likelihood that the recognized words are 206 * correct. The default of 0.0 is a sentinel value indicating that confidence 207 * was not set. 208 * This field is not guaranteed to be accurate or set. In particular this 209 * field isn't set for StreamingDetectIntent since the streaming endpoint has 210 * separate confidence estimates per portion of the audio in 211 * StreamingRecognitionResult. 212 * </pre> 213 * 214 * <code>float speech_recognition_confidence = 2;</code> 215 * 216 * @return The speechRecognitionConfidence. 217 */ 218 @java.lang.Override getSpeechRecognitionConfidence()219 public float getSpeechRecognitionConfidence() { 220 return speechRecognitionConfidence_; 221 } 222 223 public static final int ACTION_FIELD_NUMBER = 3; 224 225 @SuppressWarnings("serial") 226 private volatile java.lang.Object action_ = ""; 227 /** 228 * 229 * 230 * <pre> 231 * The action name from the matched intent. 232 * </pre> 233 * 234 * <code>string action = 3;</code> 235 * 236 * @return The action. 237 */ 238 @java.lang.Override getAction()239 public java.lang.String getAction() { 240 java.lang.Object ref = action_; 241 if (ref instanceof java.lang.String) { 242 return (java.lang.String) ref; 243 } else { 244 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 245 java.lang.String s = bs.toStringUtf8(); 246 action_ = s; 247 return s; 248 } 249 } 250 /** 251 * 252 * 253 * <pre> 254 * The action name from the matched intent. 255 * </pre> 256 * 257 * <code>string action = 3;</code> 258 * 259 * @return The bytes for action. 260 */ 261 @java.lang.Override getActionBytes()262 public com.google.protobuf.ByteString getActionBytes() { 263 java.lang.Object ref = action_; 264 if (ref instanceof java.lang.String) { 265 com.google.protobuf.ByteString b = 266 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 267 action_ = b; 268 return b; 269 } else { 270 return (com.google.protobuf.ByteString) ref; 271 } 272 } 273 274 public static final int PARAMETERS_FIELD_NUMBER = 4; 275 private com.google.protobuf.Struct parameters_; 276 /** 277 * 278 * 279 * <pre> 280 * The collection of extracted parameters. 281 * Depending on your protocol or client library language, this is a 282 * map, associative array, symbol table, dictionary, or JSON object 283 * composed of a collection of (MapKey, MapValue) pairs: 284 * - MapKey type: string 285 * - MapKey value: parameter name 286 * - MapValue type: 287 * - If parameter's entity type is a composite entity: map 288 * - Else: depending on parameter value type, could be one of string, 289 * number, boolean, null, list or map 290 * - MapValue value: 291 * - If parameter's entity type is a composite entity: 292 * map from composite entity property names to property values 293 * - Else: parameter value 294 * </pre> 295 * 296 * <code>.google.protobuf.Struct parameters = 4;</code> 297 * 298 * @return Whether the parameters field is set. 299 */ 300 @java.lang.Override hasParameters()301 public boolean hasParameters() { 302 return parameters_ != null; 303 } 304 /** 305 * 306 * 307 * <pre> 308 * The collection of extracted parameters. 309 * Depending on your protocol or client library language, this is a 310 * map, associative array, symbol table, dictionary, or JSON object 311 * composed of a collection of (MapKey, MapValue) pairs: 312 * - MapKey type: string 313 * - MapKey value: parameter name 314 * - MapValue type: 315 * - If parameter's entity type is a composite entity: map 316 * - Else: depending on parameter value type, could be one of string, 317 * number, boolean, null, list or map 318 * - MapValue value: 319 * - If parameter's entity type is a composite entity: 320 * map from composite entity property names to property values 321 * - Else: parameter value 322 * </pre> 323 * 324 * <code>.google.protobuf.Struct parameters = 4;</code> 325 * 326 * @return The parameters. 327 */ 328 @java.lang.Override getParameters()329 public com.google.protobuf.Struct getParameters() { 330 return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; 331 } 332 /** 333 * 334 * 335 * <pre> 336 * The collection of extracted parameters. 337 * Depending on your protocol or client library language, this is a 338 * map, associative array, symbol table, dictionary, or JSON object 339 * composed of a collection of (MapKey, MapValue) pairs: 340 * - MapKey type: string 341 * - MapKey value: parameter name 342 * - MapValue type: 343 * - If parameter's entity type is a composite entity: map 344 * - Else: depending on parameter value type, could be one of string, 345 * number, boolean, null, list or map 346 * - MapValue value: 347 * - If parameter's entity type is a composite entity: 348 * map from composite entity property names to property values 349 * - Else: parameter value 350 * </pre> 351 * 352 * <code>.google.protobuf.Struct parameters = 4;</code> 353 */ 354 @java.lang.Override getParametersOrBuilder()355 public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { 356 return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; 357 } 358 359 public static final int ALL_REQUIRED_PARAMS_PRESENT_FIELD_NUMBER = 5; 360 private boolean allRequiredParamsPresent_ = false; 361 /** 362 * 363 * 364 * <pre> 365 * This field is set to: 366 * - `false` if the matched intent has required parameters and not all of 367 * the required parameter values have been collected. 368 * - `true` if all required parameter values have been collected, or if the 369 * matched intent doesn't contain any required parameters. 370 * </pre> 371 * 372 * <code>bool all_required_params_present = 5;</code> 373 * 374 * @return The allRequiredParamsPresent. 375 */ 376 @java.lang.Override getAllRequiredParamsPresent()377 public boolean getAllRequiredParamsPresent() { 378 return allRequiredParamsPresent_; 379 } 380 381 public static final int CANCELS_SLOT_FILLING_FIELD_NUMBER = 21; 382 private boolean cancelsSlotFilling_ = false; 383 /** 384 * 385 * 386 * <pre> 387 * Indicates whether the conversational query triggers a cancellation for slot 388 * filling. For more information, see the [cancel slot filling 389 * documentation](https://cloud.google.com/dialogflow/es/docs/intents-actions-parameters#cancel). 390 * </pre> 391 * 392 * <code>bool cancels_slot_filling = 21;</code> 393 * 394 * @return The cancelsSlotFilling. 395 */ 396 @java.lang.Override getCancelsSlotFilling()397 public boolean getCancelsSlotFilling() { 398 return cancelsSlotFilling_; 399 } 400 401 public static final int FULFILLMENT_TEXT_FIELD_NUMBER = 6; 402 403 @SuppressWarnings("serial") 404 private volatile java.lang.Object fulfillmentText_ = ""; 405 /** 406 * 407 * 408 * <pre> 409 * The text to be pronounced to the user or shown on the screen. 410 * Note: This is a legacy field, `fulfillment_messages` should be preferred. 411 * </pre> 412 * 413 * <code>string fulfillment_text = 6;</code> 414 * 415 * @return The fulfillmentText. 416 */ 417 @java.lang.Override getFulfillmentText()418 public java.lang.String getFulfillmentText() { 419 java.lang.Object ref = fulfillmentText_; 420 if (ref instanceof java.lang.String) { 421 return (java.lang.String) ref; 422 } else { 423 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 424 java.lang.String s = bs.toStringUtf8(); 425 fulfillmentText_ = s; 426 return s; 427 } 428 } 429 /** 430 * 431 * 432 * <pre> 433 * The text to be pronounced to the user or shown on the screen. 434 * Note: This is a legacy field, `fulfillment_messages` should be preferred. 435 * </pre> 436 * 437 * <code>string fulfillment_text = 6;</code> 438 * 439 * @return The bytes for fulfillmentText. 440 */ 441 @java.lang.Override getFulfillmentTextBytes()442 public com.google.protobuf.ByteString getFulfillmentTextBytes() { 443 java.lang.Object ref = fulfillmentText_; 444 if (ref instanceof java.lang.String) { 445 com.google.protobuf.ByteString b = 446 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 447 fulfillmentText_ = b; 448 return b; 449 } else { 450 return (com.google.protobuf.ByteString) ref; 451 } 452 } 453 454 public static final int FULFILLMENT_MESSAGES_FIELD_NUMBER = 7; 455 456 @SuppressWarnings("serial") 457 private java.util.List<com.google.cloud.dialogflow.v2.Intent.Message> fulfillmentMessages_; 458 /** 459 * 460 * 461 * <pre> 462 * The collection of rich messages to present to the user. 463 * </pre> 464 * 465 * <code>repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7;</code> 466 */ 467 @java.lang.Override 468 public java.util.List<com.google.cloud.dialogflow.v2.Intent.Message> getFulfillmentMessagesList()469 getFulfillmentMessagesList() { 470 return fulfillmentMessages_; 471 } 472 /** 473 * 474 * 475 * <pre> 476 * The collection of rich messages to present to the user. 477 * </pre> 478 * 479 * <code>repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7;</code> 480 */ 481 @java.lang.Override 482 public java.util.List<? extends com.google.cloud.dialogflow.v2.Intent.MessageOrBuilder> getFulfillmentMessagesOrBuilderList()483 getFulfillmentMessagesOrBuilderList() { 484 return fulfillmentMessages_; 485 } 486 /** 487 * 488 * 489 * <pre> 490 * The collection of rich messages to present to the user. 491 * </pre> 492 * 493 * <code>repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7;</code> 494 */ 495 @java.lang.Override getFulfillmentMessagesCount()496 public int getFulfillmentMessagesCount() { 497 return fulfillmentMessages_.size(); 498 } 499 /** 500 * 501 * 502 * <pre> 503 * The collection of rich messages to present to the user. 504 * </pre> 505 * 506 * <code>repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7;</code> 507 */ 508 @java.lang.Override getFulfillmentMessages(int index)509 public com.google.cloud.dialogflow.v2.Intent.Message getFulfillmentMessages(int index) { 510 return fulfillmentMessages_.get(index); 511 } 512 /** 513 * 514 * 515 * <pre> 516 * The collection of rich messages to present to the user. 517 * </pre> 518 * 519 * <code>repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7;</code> 520 */ 521 @java.lang.Override getFulfillmentMessagesOrBuilder( int index)522 public com.google.cloud.dialogflow.v2.Intent.MessageOrBuilder getFulfillmentMessagesOrBuilder( 523 int index) { 524 return fulfillmentMessages_.get(index); 525 } 526 527 public static final int WEBHOOK_SOURCE_FIELD_NUMBER = 8; 528 529 @SuppressWarnings("serial") 530 private volatile java.lang.Object webhookSource_ = ""; 531 /** 532 * 533 * 534 * <pre> 535 * If the query was fulfilled by a webhook call, this field is set to the 536 * value of the `source` field returned in the webhook response. 537 * </pre> 538 * 539 * <code>string webhook_source = 8;</code> 540 * 541 * @return The webhookSource. 542 */ 543 @java.lang.Override getWebhookSource()544 public java.lang.String getWebhookSource() { 545 java.lang.Object ref = webhookSource_; 546 if (ref instanceof java.lang.String) { 547 return (java.lang.String) ref; 548 } else { 549 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 550 java.lang.String s = bs.toStringUtf8(); 551 webhookSource_ = s; 552 return s; 553 } 554 } 555 /** 556 * 557 * 558 * <pre> 559 * If the query was fulfilled by a webhook call, this field is set to the 560 * value of the `source` field returned in the webhook response. 561 * </pre> 562 * 563 * <code>string webhook_source = 8;</code> 564 * 565 * @return The bytes for webhookSource. 566 */ 567 @java.lang.Override getWebhookSourceBytes()568 public com.google.protobuf.ByteString getWebhookSourceBytes() { 569 java.lang.Object ref = webhookSource_; 570 if (ref instanceof java.lang.String) { 571 com.google.protobuf.ByteString b = 572 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 573 webhookSource_ = b; 574 return b; 575 } else { 576 return (com.google.protobuf.ByteString) ref; 577 } 578 } 579 580 public static final int WEBHOOK_PAYLOAD_FIELD_NUMBER = 9; 581 private com.google.protobuf.Struct webhookPayload_; 582 /** 583 * 584 * 585 * <pre> 586 * If the query was fulfilled by a webhook call, this field is set to the 587 * value of the `payload` field returned in the webhook response. 588 * </pre> 589 * 590 * <code>.google.protobuf.Struct webhook_payload = 9;</code> 591 * 592 * @return Whether the webhookPayload field is set. 593 */ 594 @java.lang.Override hasWebhookPayload()595 public boolean hasWebhookPayload() { 596 return webhookPayload_ != null; 597 } 598 /** 599 * 600 * 601 * <pre> 602 * If the query was fulfilled by a webhook call, this field is set to the 603 * value of the `payload` field returned in the webhook response. 604 * </pre> 605 * 606 * <code>.google.protobuf.Struct webhook_payload = 9;</code> 607 * 608 * @return The webhookPayload. 609 */ 610 @java.lang.Override getWebhookPayload()611 public com.google.protobuf.Struct getWebhookPayload() { 612 return webhookPayload_ == null 613 ? com.google.protobuf.Struct.getDefaultInstance() 614 : webhookPayload_; 615 } 616 /** 617 * 618 * 619 * <pre> 620 * If the query was fulfilled by a webhook call, this field is set to the 621 * value of the `payload` field returned in the webhook response. 622 * </pre> 623 * 624 * <code>.google.protobuf.Struct webhook_payload = 9;</code> 625 */ 626 @java.lang.Override getWebhookPayloadOrBuilder()627 public com.google.protobuf.StructOrBuilder getWebhookPayloadOrBuilder() { 628 return webhookPayload_ == null 629 ? com.google.protobuf.Struct.getDefaultInstance() 630 : webhookPayload_; 631 } 632 633 public static final int OUTPUT_CONTEXTS_FIELD_NUMBER = 10; 634 635 @SuppressWarnings("serial") 636 private java.util.List<com.google.cloud.dialogflow.v2.Context> outputContexts_; 637 /** 638 * 639 * 640 * <pre> 641 * The collection of output contexts. If applicable, 642 * `output_contexts.parameters` contains entries with name 643 * `<parameter name>.original` containing the original parameter values 644 * before the query. 645 * </pre> 646 * 647 * <code>repeated .google.cloud.dialogflow.v2.Context output_contexts = 10;</code> 648 */ 649 @java.lang.Override getOutputContextsList()650 public java.util.List<com.google.cloud.dialogflow.v2.Context> getOutputContextsList() { 651 return outputContexts_; 652 } 653 /** 654 * 655 * 656 * <pre> 657 * The collection of output contexts. If applicable, 658 * `output_contexts.parameters` contains entries with name 659 * `<parameter name>.original` containing the original parameter values 660 * before the query. 661 * </pre> 662 * 663 * <code>repeated .google.cloud.dialogflow.v2.Context output_contexts = 10;</code> 664 */ 665 @java.lang.Override 666 public java.util.List<? extends com.google.cloud.dialogflow.v2.ContextOrBuilder> getOutputContextsOrBuilderList()667 getOutputContextsOrBuilderList() { 668 return outputContexts_; 669 } 670 /** 671 * 672 * 673 * <pre> 674 * The collection of output contexts. If applicable, 675 * `output_contexts.parameters` contains entries with name 676 * `<parameter name>.original` containing the original parameter values 677 * before the query. 678 * </pre> 679 * 680 * <code>repeated .google.cloud.dialogflow.v2.Context output_contexts = 10;</code> 681 */ 682 @java.lang.Override getOutputContextsCount()683 public int getOutputContextsCount() { 684 return outputContexts_.size(); 685 } 686 /** 687 * 688 * 689 * <pre> 690 * The collection of output contexts. If applicable, 691 * `output_contexts.parameters` contains entries with name 692 * `<parameter name>.original` containing the original parameter values 693 * before the query. 694 * </pre> 695 * 696 * <code>repeated .google.cloud.dialogflow.v2.Context output_contexts = 10;</code> 697 */ 698 @java.lang.Override getOutputContexts(int index)699 public com.google.cloud.dialogflow.v2.Context getOutputContexts(int index) { 700 return outputContexts_.get(index); 701 } 702 /** 703 * 704 * 705 * <pre> 706 * The collection of output contexts. If applicable, 707 * `output_contexts.parameters` contains entries with name 708 * `<parameter name>.original` containing the original parameter values 709 * before the query. 710 * </pre> 711 * 712 * <code>repeated .google.cloud.dialogflow.v2.Context output_contexts = 10;</code> 713 */ 714 @java.lang.Override getOutputContextsOrBuilder(int index)715 public com.google.cloud.dialogflow.v2.ContextOrBuilder getOutputContextsOrBuilder(int index) { 716 return outputContexts_.get(index); 717 } 718 719 public static final int INTENT_FIELD_NUMBER = 11; 720 private com.google.cloud.dialogflow.v2.Intent intent_; 721 /** 722 * 723 * 724 * <pre> 725 * The intent that matched the conversational query. Some, not 726 * all fields are filled in this message, including but not limited to: 727 * `name`, `display_name`, `end_interaction` and `is_fallback`. 728 * </pre> 729 * 730 * <code>.google.cloud.dialogflow.v2.Intent intent = 11;</code> 731 * 732 * @return Whether the intent field is set. 733 */ 734 @java.lang.Override hasIntent()735 public boolean hasIntent() { 736 return intent_ != null; 737 } 738 /** 739 * 740 * 741 * <pre> 742 * The intent that matched the conversational query. Some, not 743 * all fields are filled in this message, including but not limited to: 744 * `name`, `display_name`, `end_interaction` and `is_fallback`. 745 * </pre> 746 * 747 * <code>.google.cloud.dialogflow.v2.Intent intent = 11;</code> 748 * 749 * @return The intent. 750 */ 751 @java.lang.Override getIntent()752 public com.google.cloud.dialogflow.v2.Intent getIntent() { 753 return intent_ == null ? com.google.cloud.dialogflow.v2.Intent.getDefaultInstance() : intent_; 754 } 755 /** 756 * 757 * 758 * <pre> 759 * The intent that matched the conversational query. Some, not 760 * all fields are filled in this message, including but not limited to: 761 * `name`, `display_name`, `end_interaction` and `is_fallback`. 762 * </pre> 763 * 764 * <code>.google.cloud.dialogflow.v2.Intent intent = 11;</code> 765 */ 766 @java.lang.Override getIntentOrBuilder()767 public com.google.cloud.dialogflow.v2.IntentOrBuilder getIntentOrBuilder() { 768 return intent_ == null ? com.google.cloud.dialogflow.v2.Intent.getDefaultInstance() : intent_; 769 } 770 771 public static final int INTENT_DETECTION_CONFIDENCE_FIELD_NUMBER = 12; 772 private float intentDetectionConfidence_ = 0F; 773 /** 774 * 775 * 776 * <pre> 777 * The intent detection confidence. Values range from 0.0 778 * (completely uncertain) to 1.0 (completely certain). 779 * This value is for informational purpose only and is only used to 780 * help match the best intent within the classification threshold. 781 * This value may change for the same end-user expression at any time due to a 782 * model retraining or change in implementation. 783 * If there are `multiple knowledge_answers` messages, this value is set to 784 * the greatest `knowledgeAnswers.match_confidence` value in the list. 785 * </pre> 786 * 787 * <code>float intent_detection_confidence = 12;</code> 788 * 789 * @return The intentDetectionConfidence. 790 */ 791 @java.lang.Override getIntentDetectionConfidence()792 public float getIntentDetectionConfidence() { 793 return intentDetectionConfidence_; 794 } 795 796 public static final int DIAGNOSTIC_INFO_FIELD_NUMBER = 14; 797 private com.google.protobuf.Struct diagnosticInfo_; 798 /** 799 * 800 * 801 * <pre> 802 * Free-form diagnostic information for the associated detect intent request. 803 * The fields of this data can change without notice, so you should not write 804 * code that depends on its structure. 805 * The data may contain: 806 * - webhook call latency 807 * - webhook errors 808 * </pre> 809 * 810 * <code>.google.protobuf.Struct diagnostic_info = 14;</code> 811 * 812 * @return Whether the diagnosticInfo field is set. 813 */ 814 @java.lang.Override hasDiagnosticInfo()815 public boolean hasDiagnosticInfo() { 816 return diagnosticInfo_ != null; 817 } 818 /** 819 * 820 * 821 * <pre> 822 * Free-form diagnostic information for the associated detect intent request. 823 * The fields of this data can change without notice, so you should not write 824 * code that depends on its structure. 825 * The data may contain: 826 * - webhook call latency 827 * - webhook errors 828 * </pre> 829 * 830 * <code>.google.protobuf.Struct diagnostic_info = 14;</code> 831 * 832 * @return The diagnosticInfo. 833 */ 834 @java.lang.Override getDiagnosticInfo()835 public com.google.protobuf.Struct getDiagnosticInfo() { 836 return diagnosticInfo_ == null 837 ? com.google.protobuf.Struct.getDefaultInstance() 838 : diagnosticInfo_; 839 } 840 /** 841 * 842 * 843 * <pre> 844 * Free-form diagnostic information for the associated detect intent request. 845 * The fields of this data can change without notice, so you should not write 846 * code that depends on its structure. 847 * The data may contain: 848 * - webhook call latency 849 * - webhook errors 850 * </pre> 851 * 852 * <code>.google.protobuf.Struct diagnostic_info = 14;</code> 853 */ 854 @java.lang.Override getDiagnosticInfoOrBuilder()855 public com.google.protobuf.StructOrBuilder getDiagnosticInfoOrBuilder() { 856 return diagnosticInfo_ == null 857 ? com.google.protobuf.Struct.getDefaultInstance() 858 : diagnosticInfo_; 859 } 860 861 public static final int SENTIMENT_ANALYSIS_RESULT_FIELD_NUMBER = 17; 862 private com.google.cloud.dialogflow.v2.SentimentAnalysisResult sentimentAnalysisResult_; 863 /** 864 * 865 * 866 * <pre> 867 * The sentiment analysis result, which depends on the 868 * `sentiment_analysis_request_config` specified in the request. 869 * </pre> 870 * 871 * <code>.google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis_result = 17; 872 * </code> 873 * 874 * @return Whether the sentimentAnalysisResult field is set. 875 */ 876 @java.lang.Override hasSentimentAnalysisResult()877 public boolean hasSentimentAnalysisResult() { 878 return sentimentAnalysisResult_ != null; 879 } 880 /** 881 * 882 * 883 * <pre> 884 * The sentiment analysis result, which depends on the 885 * `sentiment_analysis_request_config` specified in the request. 886 * </pre> 887 * 888 * <code>.google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis_result = 17; 889 * </code> 890 * 891 * @return The sentimentAnalysisResult. 892 */ 893 @java.lang.Override getSentimentAnalysisResult()894 public com.google.cloud.dialogflow.v2.SentimentAnalysisResult getSentimentAnalysisResult() { 895 return sentimentAnalysisResult_ == null 896 ? com.google.cloud.dialogflow.v2.SentimentAnalysisResult.getDefaultInstance() 897 : sentimentAnalysisResult_; 898 } 899 /** 900 * 901 * 902 * <pre> 903 * The sentiment analysis result, which depends on the 904 * `sentiment_analysis_request_config` specified in the request. 905 * </pre> 906 * 907 * <code>.google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis_result = 17; 908 * </code> 909 */ 910 @java.lang.Override 911 public com.google.cloud.dialogflow.v2.SentimentAnalysisResultOrBuilder getSentimentAnalysisResultOrBuilder()912 getSentimentAnalysisResultOrBuilder() { 913 return sentimentAnalysisResult_ == null 914 ? com.google.cloud.dialogflow.v2.SentimentAnalysisResult.getDefaultInstance() 915 : sentimentAnalysisResult_; 916 } 917 918 private byte memoizedIsInitialized = -1; 919 920 @java.lang.Override isInitialized()921 public final boolean isInitialized() { 922 byte isInitialized = memoizedIsInitialized; 923 if (isInitialized == 1) return true; 924 if (isInitialized == 0) return false; 925 926 memoizedIsInitialized = 1; 927 return true; 928 } 929 930 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)931 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 932 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryText_)) { 933 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queryText_); 934 } 935 if (java.lang.Float.floatToRawIntBits(speechRecognitionConfidence_) != 0) { 936 output.writeFloat(2, speechRecognitionConfidence_); 937 } 938 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { 939 com.google.protobuf.GeneratedMessageV3.writeString(output, 3, action_); 940 } 941 if (parameters_ != null) { 942 output.writeMessage(4, getParameters()); 943 } 944 if (allRequiredParamsPresent_ != false) { 945 output.writeBool(5, allRequiredParamsPresent_); 946 } 947 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fulfillmentText_)) { 948 com.google.protobuf.GeneratedMessageV3.writeString(output, 6, fulfillmentText_); 949 } 950 for (int i = 0; i < fulfillmentMessages_.size(); i++) { 951 output.writeMessage(7, fulfillmentMessages_.get(i)); 952 } 953 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(webhookSource_)) { 954 com.google.protobuf.GeneratedMessageV3.writeString(output, 8, webhookSource_); 955 } 956 if (webhookPayload_ != null) { 957 output.writeMessage(9, getWebhookPayload()); 958 } 959 for (int i = 0; i < outputContexts_.size(); i++) { 960 output.writeMessage(10, outputContexts_.get(i)); 961 } 962 if (intent_ != null) { 963 output.writeMessage(11, getIntent()); 964 } 965 if (java.lang.Float.floatToRawIntBits(intentDetectionConfidence_) != 0) { 966 output.writeFloat(12, intentDetectionConfidence_); 967 } 968 if (diagnosticInfo_ != null) { 969 output.writeMessage(14, getDiagnosticInfo()); 970 } 971 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { 972 com.google.protobuf.GeneratedMessageV3.writeString(output, 15, languageCode_); 973 } 974 if (sentimentAnalysisResult_ != null) { 975 output.writeMessage(17, getSentimentAnalysisResult()); 976 } 977 if (cancelsSlotFilling_ != false) { 978 output.writeBool(21, cancelsSlotFilling_); 979 } 980 getUnknownFields().writeTo(output); 981 } 982 983 @java.lang.Override getSerializedSize()984 public int getSerializedSize() { 985 int size = memoizedSize; 986 if (size != -1) return size; 987 988 size = 0; 989 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryText_)) { 990 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queryText_); 991 } 992 if (java.lang.Float.floatToRawIntBits(speechRecognitionConfidence_) != 0) { 993 size += 994 com.google.protobuf.CodedOutputStream.computeFloatSize(2, speechRecognitionConfidence_); 995 } 996 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { 997 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, action_); 998 } 999 if (parameters_ != null) { 1000 size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getParameters()); 1001 } 1002 if (allRequiredParamsPresent_ != false) { 1003 size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, allRequiredParamsPresent_); 1004 } 1005 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fulfillmentText_)) { 1006 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, fulfillmentText_); 1007 } 1008 for (int i = 0; i < fulfillmentMessages_.size(); i++) { 1009 size += 1010 com.google.protobuf.CodedOutputStream.computeMessageSize(7, fulfillmentMessages_.get(i)); 1011 } 1012 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(webhookSource_)) { 1013 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, webhookSource_); 1014 } 1015 if (webhookPayload_ != null) { 1016 size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getWebhookPayload()); 1017 } 1018 for (int i = 0; i < outputContexts_.size(); i++) { 1019 size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, outputContexts_.get(i)); 1020 } 1021 if (intent_ != null) { 1022 size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getIntent()); 1023 } 1024 if (java.lang.Float.floatToRawIntBits(intentDetectionConfidence_) != 0) { 1025 size += 1026 com.google.protobuf.CodedOutputStream.computeFloatSize(12, intentDetectionConfidence_); 1027 } 1028 if (diagnosticInfo_ != null) { 1029 size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getDiagnosticInfo()); 1030 } 1031 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { 1032 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, languageCode_); 1033 } 1034 if (sentimentAnalysisResult_ != null) { 1035 size += 1036 com.google.protobuf.CodedOutputStream.computeMessageSize( 1037 17, getSentimentAnalysisResult()); 1038 } 1039 if (cancelsSlotFilling_ != false) { 1040 size += com.google.protobuf.CodedOutputStream.computeBoolSize(21, cancelsSlotFilling_); 1041 } 1042 size += getUnknownFields().getSerializedSize(); 1043 memoizedSize = size; 1044 return size; 1045 } 1046 1047 @java.lang.Override equals(final java.lang.Object obj)1048 public boolean equals(final java.lang.Object obj) { 1049 if (obj == this) { 1050 return true; 1051 } 1052 if (!(obj instanceof com.google.cloud.dialogflow.v2.QueryResult)) { 1053 return super.equals(obj); 1054 } 1055 com.google.cloud.dialogflow.v2.QueryResult other = 1056 (com.google.cloud.dialogflow.v2.QueryResult) obj; 1057 1058 if (!getQueryText().equals(other.getQueryText())) return false; 1059 if (!getLanguageCode().equals(other.getLanguageCode())) return false; 1060 if (java.lang.Float.floatToIntBits(getSpeechRecognitionConfidence()) 1061 != java.lang.Float.floatToIntBits(other.getSpeechRecognitionConfidence())) return false; 1062 if (!getAction().equals(other.getAction())) return false; 1063 if (hasParameters() != other.hasParameters()) return false; 1064 if (hasParameters()) { 1065 if (!getParameters().equals(other.getParameters())) return false; 1066 } 1067 if (getAllRequiredParamsPresent() != other.getAllRequiredParamsPresent()) return false; 1068 if (getCancelsSlotFilling() != other.getCancelsSlotFilling()) return false; 1069 if (!getFulfillmentText().equals(other.getFulfillmentText())) return false; 1070 if (!getFulfillmentMessagesList().equals(other.getFulfillmentMessagesList())) return false; 1071 if (!getWebhookSource().equals(other.getWebhookSource())) return false; 1072 if (hasWebhookPayload() != other.hasWebhookPayload()) return false; 1073 if (hasWebhookPayload()) { 1074 if (!getWebhookPayload().equals(other.getWebhookPayload())) return false; 1075 } 1076 if (!getOutputContextsList().equals(other.getOutputContextsList())) return false; 1077 if (hasIntent() != other.hasIntent()) return false; 1078 if (hasIntent()) { 1079 if (!getIntent().equals(other.getIntent())) return false; 1080 } 1081 if (java.lang.Float.floatToIntBits(getIntentDetectionConfidence()) 1082 != java.lang.Float.floatToIntBits(other.getIntentDetectionConfidence())) return false; 1083 if (hasDiagnosticInfo() != other.hasDiagnosticInfo()) return false; 1084 if (hasDiagnosticInfo()) { 1085 if (!getDiagnosticInfo().equals(other.getDiagnosticInfo())) return false; 1086 } 1087 if (hasSentimentAnalysisResult() != other.hasSentimentAnalysisResult()) return false; 1088 if (hasSentimentAnalysisResult()) { 1089 if (!getSentimentAnalysisResult().equals(other.getSentimentAnalysisResult())) return false; 1090 } 1091 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 1092 return true; 1093 } 1094 1095 @java.lang.Override hashCode()1096 public int hashCode() { 1097 if (memoizedHashCode != 0) { 1098 return memoizedHashCode; 1099 } 1100 int hash = 41; 1101 hash = (19 * hash) + getDescriptor().hashCode(); 1102 hash = (37 * hash) + QUERY_TEXT_FIELD_NUMBER; 1103 hash = (53 * hash) + getQueryText().hashCode(); 1104 hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; 1105 hash = (53 * hash) + getLanguageCode().hashCode(); 1106 hash = (37 * hash) + SPEECH_RECOGNITION_CONFIDENCE_FIELD_NUMBER; 1107 hash = (53 * hash) + java.lang.Float.floatToIntBits(getSpeechRecognitionConfidence()); 1108 hash = (37 * hash) + ACTION_FIELD_NUMBER; 1109 hash = (53 * hash) + getAction().hashCode(); 1110 if (hasParameters()) { 1111 hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; 1112 hash = (53 * hash) + getParameters().hashCode(); 1113 } 1114 hash = (37 * hash) + ALL_REQUIRED_PARAMS_PRESENT_FIELD_NUMBER; 1115 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllRequiredParamsPresent()); 1116 hash = (37 * hash) + CANCELS_SLOT_FILLING_FIELD_NUMBER; 1117 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCancelsSlotFilling()); 1118 hash = (37 * hash) + FULFILLMENT_TEXT_FIELD_NUMBER; 1119 hash = (53 * hash) + getFulfillmentText().hashCode(); 1120 if (getFulfillmentMessagesCount() > 0) { 1121 hash = (37 * hash) + FULFILLMENT_MESSAGES_FIELD_NUMBER; 1122 hash = (53 * hash) + getFulfillmentMessagesList().hashCode(); 1123 } 1124 hash = (37 * hash) + WEBHOOK_SOURCE_FIELD_NUMBER; 1125 hash = (53 * hash) + getWebhookSource().hashCode(); 1126 if (hasWebhookPayload()) { 1127 hash = (37 * hash) + WEBHOOK_PAYLOAD_FIELD_NUMBER; 1128 hash = (53 * hash) + getWebhookPayload().hashCode(); 1129 } 1130 if (getOutputContextsCount() > 0) { 1131 hash = (37 * hash) + OUTPUT_CONTEXTS_FIELD_NUMBER; 1132 hash = (53 * hash) + getOutputContextsList().hashCode(); 1133 } 1134 if (hasIntent()) { 1135 hash = (37 * hash) + INTENT_FIELD_NUMBER; 1136 hash = (53 * hash) + getIntent().hashCode(); 1137 } 1138 hash = (37 * hash) + INTENT_DETECTION_CONFIDENCE_FIELD_NUMBER; 1139 hash = (53 * hash) + java.lang.Float.floatToIntBits(getIntentDetectionConfidence()); 1140 if (hasDiagnosticInfo()) { 1141 hash = (37 * hash) + DIAGNOSTIC_INFO_FIELD_NUMBER; 1142 hash = (53 * hash) + getDiagnosticInfo().hashCode(); 1143 } 1144 if (hasSentimentAnalysisResult()) { 1145 hash = (37 * hash) + SENTIMENT_ANALYSIS_RESULT_FIELD_NUMBER; 1146 hash = (53 * hash) + getSentimentAnalysisResult().hashCode(); 1147 } 1148 hash = (29 * hash) + getUnknownFields().hashCode(); 1149 memoizedHashCode = hash; 1150 return hash; 1151 } 1152 parseFrom(java.nio.ByteBuffer data)1153 public static com.google.cloud.dialogflow.v2.QueryResult parseFrom(java.nio.ByteBuffer data) 1154 throws com.google.protobuf.InvalidProtocolBufferException { 1155 return PARSER.parseFrom(data); 1156 } 1157 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1158 public static com.google.cloud.dialogflow.v2.QueryResult parseFrom( 1159 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1160 throws com.google.protobuf.InvalidProtocolBufferException { 1161 return PARSER.parseFrom(data, extensionRegistry); 1162 } 1163 parseFrom( com.google.protobuf.ByteString data)1164 public static com.google.cloud.dialogflow.v2.QueryResult parseFrom( 1165 com.google.protobuf.ByteString data) 1166 throws com.google.protobuf.InvalidProtocolBufferException { 1167 return PARSER.parseFrom(data); 1168 } 1169 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1170 public static com.google.cloud.dialogflow.v2.QueryResult parseFrom( 1171 com.google.protobuf.ByteString data, 1172 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1173 throws com.google.protobuf.InvalidProtocolBufferException { 1174 return PARSER.parseFrom(data, extensionRegistry); 1175 } 1176 parseFrom(byte[] data)1177 public static com.google.cloud.dialogflow.v2.QueryResult parseFrom(byte[] data) 1178 throws com.google.protobuf.InvalidProtocolBufferException { 1179 return PARSER.parseFrom(data); 1180 } 1181 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1182 public static com.google.cloud.dialogflow.v2.QueryResult parseFrom( 1183 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1184 throws com.google.protobuf.InvalidProtocolBufferException { 1185 return PARSER.parseFrom(data, extensionRegistry); 1186 } 1187 parseFrom(java.io.InputStream input)1188 public static com.google.cloud.dialogflow.v2.QueryResult parseFrom(java.io.InputStream input) 1189 throws java.io.IOException { 1190 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1191 } 1192 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1193 public static com.google.cloud.dialogflow.v2.QueryResult parseFrom( 1194 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1195 throws java.io.IOException { 1196 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1197 PARSER, input, extensionRegistry); 1198 } 1199 parseDelimitedFrom( java.io.InputStream input)1200 public static com.google.cloud.dialogflow.v2.QueryResult parseDelimitedFrom( 1201 java.io.InputStream input) throws java.io.IOException { 1202 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 1203 } 1204 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1205 public static com.google.cloud.dialogflow.v2.QueryResult parseDelimitedFrom( 1206 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1207 throws java.io.IOException { 1208 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 1209 PARSER, input, extensionRegistry); 1210 } 1211 parseFrom( com.google.protobuf.CodedInputStream input)1212 public static com.google.cloud.dialogflow.v2.QueryResult parseFrom( 1213 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 1214 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1215 } 1216 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1217 public static com.google.cloud.dialogflow.v2.QueryResult parseFrom( 1218 com.google.protobuf.CodedInputStream input, 1219 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1220 throws java.io.IOException { 1221 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1222 PARSER, input, extensionRegistry); 1223 } 1224 1225 @java.lang.Override newBuilderForType()1226 public Builder newBuilderForType() { 1227 return newBuilder(); 1228 } 1229 newBuilder()1230 public static Builder newBuilder() { 1231 return DEFAULT_INSTANCE.toBuilder(); 1232 } 1233 newBuilder(com.google.cloud.dialogflow.v2.QueryResult prototype)1234 public static Builder newBuilder(com.google.cloud.dialogflow.v2.QueryResult prototype) { 1235 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1236 } 1237 1238 @java.lang.Override toBuilder()1239 public Builder toBuilder() { 1240 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 1241 } 1242 1243 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1244 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1245 Builder builder = new Builder(parent); 1246 return builder; 1247 } 1248 /** 1249 * 1250 * 1251 * <pre> 1252 * Represents the result of conversational query or event processing. 1253 * </pre> 1254 * 1255 * Protobuf type {@code google.cloud.dialogflow.v2.QueryResult} 1256 */ 1257 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 1258 implements 1259 // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.QueryResult) 1260 com.google.cloud.dialogflow.v2.QueryResultOrBuilder { getDescriptor()1261 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1262 return com.google.cloud.dialogflow.v2.SessionProto 1263 .internal_static_google_cloud_dialogflow_v2_QueryResult_descriptor; 1264 } 1265 1266 @java.lang.Override 1267 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1268 internalGetFieldAccessorTable() { 1269 return com.google.cloud.dialogflow.v2.SessionProto 1270 .internal_static_google_cloud_dialogflow_v2_QueryResult_fieldAccessorTable 1271 .ensureFieldAccessorsInitialized( 1272 com.google.cloud.dialogflow.v2.QueryResult.class, 1273 com.google.cloud.dialogflow.v2.QueryResult.Builder.class); 1274 } 1275 1276 // Construct using com.google.cloud.dialogflow.v2.QueryResult.newBuilder() Builder()1277 private Builder() {} 1278 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1279 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1280 super(parent); 1281 } 1282 1283 @java.lang.Override clear()1284 public Builder clear() { 1285 super.clear(); 1286 bitField0_ = 0; 1287 queryText_ = ""; 1288 languageCode_ = ""; 1289 speechRecognitionConfidence_ = 0F; 1290 action_ = ""; 1291 parameters_ = null; 1292 if (parametersBuilder_ != null) { 1293 parametersBuilder_.dispose(); 1294 parametersBuilder_ = null; 1295 } 1296 allRequiredParamsPresent_ = false; 1297 cancelsSlotFilling_ = false; 1298 fulfillmentText_ = ""; 1299 if (fulfillmentMessagesBuilder_ == null) { 1300 fulfillmentMessages_ = java.util.Collections.emptyList(); 1301 } else { 1302 fulfillmentMessages_ = null; 1303 fulfillmentMessagesBuilder_.clear(); 1304 } 1305 bitField0_ = (bitField0_ & ~0x00000100); 1306 webhookSource_ = ""; 1307 webhookPayload_ = null; 1308 if (webhookPayloadBuilder_ != null) { 1309 webhookPayloadBuilder_.dispose(); 1310 webhookPayloadBuilder_ = null; 1311 } 1312 if (outputContextsBuilder_ == null) { 1313 outputContexts_ = java.util.Collections.emptyList(); 1314 } else { 1315 outputContexts_ = null; 1316 outputContextsBuilder_.clear(); 1317 } 1318 bitField0_ = (bitField0_ & ~0x00000800); 1319 intent_ = null; 1320 if (intentBuilder_ != null) { 1321 intentBuilder_.dispose(); 1322 intentBuilder_ = null; 1323 } 1324 intentDetectionConfidence_ = 0F; 1325 diagnosticInfo_ = null; 1326 if (diagnosticInfoBuilder_ != null) { 1327 diagnosticInfoBuilder_.dispose(); 1328 diagnosticInfoBuilder_ = null; 1329 } 1330 sentimentAnalysisResult_ = null; 1331 if (sentimentAnalysisResultBuilder_ != null) { 1332 sentimentAnalysisResultBuilder_.dispose(); 1333 sentimentAnalysisResultBuilder_ = null; 1334 } 1335 return this; 1336 } 1337 1338 @java.lang.Override getDescriptorForType()1339 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1340 return com.google.cloud.dialogflow.v2.SessionProto 1341 .internal_static_google_cloud_dialogflow_v2_QueryResult_descriptor; 1342 } 1343 1344 @java.lang.Override getDefaultInstanceForType()1345 public com.google.cloud.dialogflow.v2.QueryResult getDefaultInstanceForType() { 1346 return com.google.cloud.dialogflow.v2.QueryResult.getDefaultInstance(); 1347 } 1348 1349 @java.lang.Override build()1350 public com.google.cloud.dialogflow.v2.QueryResult build() { 1351 com.google.cloud.dialogflow.v2.QueryResult result = buildPartial(); 1352 if (!result.isInitialized()) { 1353 throw newUninitializedMessageException(result); 1354 } 1355 return result; 1356 } 1357 1358 @java.lang.Override buildPartial()1359 public com.google.cloud.dialogflow.v2.QueryResult buildPartial() { 1360 com.google.cloud.dialogflow.v2.QueryResult result = 1361 new com.google.cloud.dialogflow.v2.QueryResult(this); 1362 buildPartialRepeatedFields(result); 1363 if (bitField0_ != 0) { 1364 buildPartial0(result); 1365 } 1366 onBuilt(); 1367 return result; 1368 } 1369 buildPartialRepeatedFields(com.google.cloud.dialogflow.v2.QueryResult result)1370 private void buildPartialRepeatedFields(com.google.cloud.dialogflow.v2.QueryResult result) { 1371 if (fulfillmentMessagesBuilder_ == null) { 1372 if (((bitField0_ & 0x00000100) != 0)) { 1373 fulfillmentMessages_ = java.util.Collections.unmodifiableList(fulfillmentMessages_); 1374 bitField0_ = (bitField0_ & ~0x00000100); 1375 } 1376 result.fulfillmentMessages_ = fulfillmentMessages_; 1377 } else { 1378 result.fulfillmentMessages_ = fulfillmentMessagesBuilder_.build(); 1379 } 1380 if (outputContextsBuilder_ == null) { 1381 if (((bitField0_ & 0x00000800) != 0)) { 1382 outputContexts_ = java.util.Collections.unmodifiableList(outputContexts_); 1383 bitField0_ = (bitField0_ & ~0x00000800); 1384 } 1385 result.outputContexts_ = outputContexts_; 1386 } else { 1387 result.outputContexts_ = outputContextsBuilder_.build(); 1388 } 1389 } 1390 buildPartial0(com.google.cloud.dialogflow.v2.QueryResult result)1391 private void buildPartial0(com.google.cloud.dialogflow.v2.QueryResult result) { 1392 int from_bitField0_ = bitField0_; 1393 if (((from_bitField0_ & 0x00000001) != 0)) { 1394 result.queryText_ = queryText_; 1395 } 1396 if (((from_bitField0_ & 0x00000002) != 0)) { 1397 result.languageCode_ = languageCode_; 1398 } 1399 if (((from_bitField0_ & 0x00000004) != 0)) { 1400 result.speechRecognitionConfidence_ = speechRecognitionConfidence_; 1401 } 1402 if (((from_bitField0_ & 0x00000008) != 0)) { 1403 result.action_ = action_; 1404 } 1405 if (((from_bitField0_ & 0x00000010) != 0)) { 1406 result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); 1407 } 1408 if (((from_bitField0_ & 0x00000020) != 0)) { 1409 result.allRequiredParamsPresent_ = allRequiredParamsPresent_; 1410 } 1411 if (((from_bitField0_ & 0x00000040) != 0)) { 1412 result.cancelsSlotFilling_ = cancelsSlotFilling_; 1413 } 1414 if (((from_bitField0_ & 0x00000080) != 0)) { 1415 result.fulfillmentText_ = fulfillmentText_; 1416 } 1417 if (((from_bitField0_ & 0x00000200) != 0)) { 1418 result.webhookSource_ = webhookSource_; 1419 } 1420 if (((from_bitField0_ & 0x00000400) != 0)) { 1421 result.webhookPayload_ = 1422 webhookPayloadBuilder_ == null ? webhookPayload_ : webhookPayloadBuilder_.build(); 1423 } 1424 if (((from_bitField0_ & 0x00001000) != 0)) { 1425 result.intent_ = intentBuilder_ == null ? intent_ : intentBuilder_.build(); 1426 } 1427 if (((from_bitField0_ & 0x00002000) != 0)) { 1428 result.intentDetectionConfidence_ = intentDetectionConfidence_; 1429 } 1430 if (((from_bitField0_ & 0x00004000) != 0)) { 1431 result.diagnosticInfo_ = 1432 diagnosticInfoBuilder_ == null ? diagnosticInfo_ : diagnosticInfoBuilder_.build(); 1433 } 1434 if (((from_bitField0_ & 0x00008000) != 0)) { 1435 result.sentimentAnalysisResult_ = 1436 sentimentAnalysisResultBuilder_ == null 1437 ? sentimentAnalysisResult_ 1438 : sentimentAnalysisResultBuilder_.build(); 1439 } 1440 } 1441 1442 @java.lang.Override clone()1443 public Builder clone() { 1444 return super.clone(); 1445 } 1446 1447 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1448 public Builder setField( 1449 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1450 return super.setField(field, value); 1451 } 1452 1453 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1454 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1455 return super.clearField(field); 1456 } 1457 1458 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1459 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1460 return super.clearOneof(oneof); 1461 } 1462 1463 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1464 public Builder setRepeatedField( 1465 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 1466 return super.setRepeatedField(field, index, value); 1467 } 1468 1469 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1470 public Builder addRepeatedField( 1471 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1472 return super.addRepeatedField(field, value); 1473 } 1474 1475 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1476 public Builder mergeFrom(com.google.protobuf.Message other) { 1477 if (other instanceof com.google.cloud.dialogflow.v2.QueryResult) { 1478 return mergeFrom((com.google.cloud.dialogflow.v2.QueryResult) other); 1479 } else { 1480 super.mergeFrom(other); 1481 return this; 1482 } 1483 } 1484 mergeFrom(com.google.cloud.dialogflow.v2.QueryResult other)1485 public Builder mergeFrom(com.google.cloud.dialogflow.v2.QueryResult other) { 1486 if (other == com.google.cloud.dialogflow.v2.QueryResult.getDefaultInstance()) return this; 1487 if (!other.getQueryText().isEmpty()) { 1488 queryText_ = other.queryText_; 1489 bitField0_ |= 0x00000001; 1490 onChanged(); 1491 } 1492 if (!other.getLanguageCode().isEmpty()) { 1493 languageCode_ = other.languageCode_; 1494 bitField0_ |= 0x00000002; 1495 onChanged(); 1496 } 1497 if (other.getSpeechRecognitionConfidence() != 0F) { 1498 setSpeechRecognitionConfidence(other.getSpeechRecognitionConfidence()); 1499 } 1500 if (!other.getAction().isEmpty()) { 1501 action_ = other.action_; 1502 bitField0_ |= 0x00000008; 1503 onChanged(); 1504 } 1505 if (other.hasParameters()) { 1506 mergeParameters(other.getParameters()); 1507 } 1508 if (other.getAllRequiredParamsPresent() != false) { 1509 setAllRequiredParamsPresent(other.getAllRequiredParamsPresent()); 1510 } 1511 if (other.getCancelsSlotFilling() != false) { 1512 setCancelsSlotFilling(other.getCancelsSlotFilling()); 1513 } 1514 if (!other.getFulfillmentText().isEmpty()) { 1515 fulfillmentText_ = other.fulfillmentText_; 1516 bitField0_ |= 0x00000080; 1517 onChanged(); 1518 } 1519 if (fulfillmentMessagesBuilder_ == null) { 1520 if (!other.fulfillmentMessages_.isEmpty()) { 1521 if (fulfillmentMessages_.isEmpty()) { 1522 fulfillmentMessages_ = other.fulfillmentMessages_; 1523 bitField0_ = (bitField0_ & ~0x00000100); 1524 } else { 1525 ensureFulfillmentMessagesIsMutable(); 1526 fulfillmentMessages_.addAll(other.fulfillmentMessages_); 1527 } 1528 onChanged(); 1529 } 1530 } else { 1531 if (!other.fulfillmentMessages_.isEmpty()) { 1532 if (fulfillmentMessagesBuilder_.isEmpty()) { 1533 fulfillmentMessagesBuilder_.dispose(); 1534 fulfillmentMessagesBuilder_ = null; 1535 fulfillmentMessages_ = other.fulfillmentMessages_; 1536 bitField0_ = (bitField0_ & ~0x00000100); 1537 fulfillmentMessagesBuilder_ = 1538 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 1539 ? getFulfillmentMessagesFieldBuilder() 1540 : null; 1541 } else { 1542 fulfillmentMessagesBuilder_.addAllMessages(other.fulfillmentMessages_); 1543 } 1544 } 1545 } 1546 if (!other.getWebhookSource().isEmpty()) { 1547 webhookSource_ = other.webhookSource_; 1548 bitField0_ |= 0x00000200; 1549 onChanged(); 1550 } 1551 if (other.hasWebhookPayload()) { 1552 mergeWebhookPayload(other.getWebhookPayload()); 1553 } 1554 if (outputContextsBuilder_ == null) { 1555 if (!other.outputContexts_.isEmpty()) { 1556 if (outputContexts_.isEmpty()) { 1557 outputContexts_ = other.outputContexts_; 1558 bitField0_ = (bitField0_ & ~0x00000800); 1559 } else { 1560 ensureOutputContextsIsMutable(); 1561 outputContexts_.addAll(other.outputContexts_); 1562 } 1563 onChanged(); 1564 } 1565 } else { 1566 if (!other.outputContexts_.isEmpty()) { 1567 if (outputContextsBuilder_.isEmpty()) { 1568 outputContextsBuilder_.dispose(); 1569 outputContextsBuilder_ = null; 1570 outputContexts_ = other.outputContexts_; 1571 bitField0_ = (bitField0_ & ~0x00000800); 1572 outputContextsBuilder_ = 1573 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 1574 ? getOutputContextsFieldBuilder() 1575 : null; 1576 } else { 1577 outputContextsBuilder_.addAllMessages(other.outputContexts_); 1578 } 1579 } 1580 } 1581 if (other.hasIntent()) { 1582 mergeIntent(other.getIntent()); 1583 } 1584 if (other.getIntentDetectionConfidence() != 0F) { 1585 setIntentDetectionConfidence(other.getIntentDetectionConfidence()); 1586 } 1587 if (other.hasDiagnosticInfo()) { 1588 mergeDiagnosticInfo(other.getDiagnosticInfo()); 1589 } 1590 if (other.hasSentimentAnalysisResult()) { 1591 mergeSentimentAnalysisResult(other.getSentimentAnalysisResult()); 1592 } 1593 this.mergeUnknownFields(other.getUnknownFields()); 1594 onChanged(); 1595 return this; 1596 } 1597 1598 @java.lang.Override isInitialized()1599 public final boolean isInitialized() { 1600 return true; 1601 } 1602 1603 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1604 public Builder mergeFrom( 1605 com.google.protobuf.CodedInputStream input, 1606 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1607 throws java.io.IOException { 1608 if (extensionRegistry == null) { 1609 throw new java.lang.NullPointerException(); 1610 } 1611 try { 1612 boolean done = false; 1613 while (!done) { 1614 int tag = input.readTag(); 1615 switch (tag) { 1616 case 0: 1617 done = true; 1618 break; 1619 case 10: 1620 { 1621 queryText_ = input.readStringRequireUtf8(); 1622 bitField0_ |= 0x00000001; 1623 break; 1624 } // case 10 1625 case 21: 1626 { 1627 speechRecognitionConfidence_ = input.readFloat(); 1628 bitField0_ |= 0x00000004; 1629 break; 1630 } // case 21 1631 case 26: 1632 { 1633 action_ = input.readStringRequireUtf8(); 1634 bitField0_ |= 0x00000008; 1635 break; 1636 } // case 26 1637 case 34: 1638 { 1639 input.readMessage(getParametersFieldBuilder().getBuilder(), extensionRegistry); 1640 bitField0_ |= 0x00000010; 1641 break; 1642 } // case 34 1643 case 40: 1644 { 1645 allRequiredParamsPresent_ = input.readBool(); 1646 bitField0_ |= 0x00000020; 1647 break; 1648 } // case 40 1649 case 50: 1650 { 1651 fulfillmentText_ = input.readStringRequireUtf8(); 1652 bitField0_ |= 0x00000080; 1653 break; 1654 } // case 50 1655 case 58: 1656 { 1657 com.google.cloud.dialogflow.v2.Intent.Message m = 1658 input.readMessage( 1659 com.google.cloud.dialogflow.v2.Intent.Message.parser(), extensionRegistry); 1660 if (fulfillmentMessagesBuilder_ == null) { 1661 ensureFulfillmentMessagesIsMutable(); 1662 fulfillmentMessages_.add(m); 1663 } else { 1664 fulfillmentMessagesBuilder_.addMessage(m); 1665 } 1666 break; 1667 } // case 58 1668 case 66: 1669 { 1670 webhookSource_ = input.readStringRequireUtf8(); 1671 bitField0_ |= 0x00000200; 1672 break; 1673 } // case 66 1674 case 74: 1675 { 1676 input.readMessage(getWebhookPayloadFieldBuilder().getBuilder(), extensionRegistry); 1677 bitField0_ |= 0x00000400; 1678 break; 1679 } // case 74 1680 case 82: 1681 { 1682 com.google.cloud.dialogflow.v2.Context m = 1683 input.readMessage( 1684 com.google.cloud.dialogflow.v2.Context.parser(), extensionRegistry); 1685 if (outputContextsBuilder_ == null) { 1686 ensureOutputContextsIsMutable(); 1687 outputContexts_.add(m); 1688 } else { 1689 outputContextsBuilder_.addMessage(m); 1690 } 1691 break; 1692 } // case 82 1693 case 90: 1694 { 1695 input.readMessage(getIntentFieldBuilder().getBuilder(), extensionRegistry); 1696 bitField0_ |= 0x00001000; 1697 break; 1698 } // case 90 1699 case 101: 1700 { 1701 intentDetectionConfidence_ = input.readFloat(); 1702 bitField0_ |= 0x00002000; 1703 break; 1704 } // case 101 1705 case 114: 1706 { 1707 input.readMessage(getDiagnosticInfoFieldBuilder().getBuilder(), extensionRegistry); 1708 bitField0_ |= 0x00004000; 1709 break; 1710 } // case 114 1711 case 122: 1712 { 1713 languageCode_ = input.readStringRequireUtf8(); 1714 bitField0_ |= 0x00000002; 1715 break; 1716 } // case 122 1717 case 138: 1718 { 1719 input.readMessage( 1720 getSentimentAnalysisResultFieldBuilder().getBuilder(), extensionRegistry); 1721 bitField0_ |= 0x00008000; 1722 break; 1723 } // case 138 1724 case 168: 1725 { 1726 cancelsSlotFilling_ = input.readBool(); 1727 bitField0_ |= 0x00000040; 1728 break; 1729 } // case 168 1730 default: 1731 { 1732 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1733 done = true; // was an endgroup tag 1734 } 1735 break; 1736 } // default: 1737 } // switch (tag) 1738 } // while (!done) 1739 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1740 throw e.unwrapIOException(); 1741 } finally { 1742 onChanged(); 1743 } // finally 1744 return this; 1745 } 1746 1747 private int bitField0_; 1748 1749 private java.lang.Object queryText_ = ""; 1750 /** 1751 * 1752 * 1753 * <pre> 1754 * The original conversational query text: 1755 * - If natural language text was provided as input, `query_text` contains 1756 * a copy of the input. 1757 * - If natural language speech audio was provided as input, `query_text` 1758 * contains the speech recognition result. If speech recognizer produced 1759 * multiple alternatives, a particular one is picked. 1760 * - If automatic spell correction is enabled, `query_text` will contain the 1761 * corrected user input. 1762 * </pre> 1763 * 1764 * <code>string query_text = 1;</code> 1765 * 1766 * @return The queryText. 1767 */ getQueryText()1768 public java.lang.String getQueryText() { 1769 java.lang.Object ref = queryText_; 1770 if (!(ref instanceof java.lang.String)) { 1771 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1772 java.lang.String s = bs.toStringUtf8(); 1773 queryText_ = s; 1774 return s; 1775 } else { 1776 return (java.lang.String) ref; 1777 } 1778 } 1779 /** 1780 * 1781 * 1782 * <pre> 1783 * The original conversational query text: 1784 * - If natural language text was provided as input, `query_text` contains 1785 * a copy of the input. 1786 * - If natural language speech audio was provided as input, `query_text` 1787 * contains the speech recognition result. If speech recognizer produced 1788 * multiple alternatives, a particular one is picked. 1789 * - If automatic spell correction is enabled, `query_text` will contain the 1790 * corrected user input. 1791 * </pre> 1792 * 1793 * <code>string query_text = 1;</code> 1794 * 1795 * @return The bytes for queryText. 1796 */ getQueryTextBytes()1797 public com.google.protobuf.ByteString getQueryTextBytes() { 1798 java.lang.Object ref = queryText_; 1799 if (ref instanceof String) { 1800 com.google.protobuf.ByteString b = 1801 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1802 queryText_ = b; 1803 return b; 1804 } else { 1805 return (com.google.protobuf.ByteString) ref; 1806 } 1807 } 1808 /** 1809 * 1810 * 1811 * <pre> 1812 * The original conversational query text: 1813 * - If natural language text was provided as input, `query_text` contains 1814 * a copy of the input. 1815 * - If natural language speech audio was provided as input, `query_text` 1816 * contains the speech recognition result. If speech recognizer produced 1817 * multiple alternatives, a particular one is picked. 1818 * - If automatic spell correction is enabled, `query_text` will contain the 1819 * corrected user input. 1820 * </pre> 1821 * 1822 * <code>string query_text = 1;</code> 1823 * 1824 * @param value The queryText to set. 1825 * @return This builder for chaining. 1826 */ setQueryText(java.lang.String value)1827 public Builder setQueryText(java.lang.String value) { 1828 if (value == null) { 1829 throw new NullPointerException(); 1830 } 1831 queryText_ = value; 1832 bitField0_ |= 0x00000001; 1833 onChanged(); 1834 return this; 1835 } 1836 /** 1837 * 1838 * 1839 * <pre> 1840 * The original conversational query text: 1841 * - If natural language text was provided as input, `query_text` contains 1842 * a copy of the input. 1843 * - If natural language speech audio was provided as input, `query_text` 1844 * contains the speech recognition result. If speech recognizer produced 1845 * multiple alternatives, a particular one is picked. 1846 * - If automatic spell correction is enabled, `query_text` will contain the 1847 * corrected user input. 1848 * </pre> 1849 * 1850 * <code>string query_text = 1;</code> 1851 * 1852 * @return This builder for chaining. 1853 */ clearQueryText()1854 public Builder clearQueryText() { 1855 queryText_ = getDefaultInstance().getQueryText(); 1856 bitField0_ = (bitField0_ & ~0x00000001); 1857 onChanged(); 1858 return this; 1859 } 1860 /** 1861 * 1862 * 1863 * <pre> 1864 * The original conversational query text: 1865 * - If natural language text was provided as input, `query_text` contains 1866 * a copy of the input. 1867 * - If natural language speech audio was provided as input, `query_text` 1868 * contains the speech recognition result. If speech recognizer produced 1869 * multiple alternatives, a particular one is picked. 1870 * - If automatic spell correction is enabled, `query_text` will contain the 1871 * corrected user input. 1872 * </pre> 1873 * 1874 * <code>string query_text = 1;</code> 1875 * 1876 * @param value The bytes for queryText to set. 1877 * @return This builder for chaining. 1878 */ setQueryTextBytes(com.google.protobuf.ByteString value)1879 public Builder setQueryTextBytes(com.google.protobuf.ByteString value) { 1880 if (value == null) { 1881 throw new NullPointerException(); 1882 } 1883 checkByteStringIsUtf8(value); 1884 queryText_ = value; 1885 bitField0_ |= 0x00000001; 1886 onChanged(); 1887 return this; 1888 } 1889 1890 private java.lang.Object languageCode_ = ""; 1891 /** 1892 * 1893 * 1894 * <pre> 1895 * The language that was triggered during intent detection. 1896 * See [Language 1897 * Support](https://cloud.google.com/dialogflow/docs/reference/language) 1898 * for a list of the currently supported language codes. 1899 * </pre> 1900 * 1901 * <code>string language_code = 15;</code> 1902 * 1903 * @return The languageCode. 1904 */ getLanguageCode()1905 public java.lang.String getLanguageCode() { 1906 java.lang.Object ref = languageCode_; 1907 if (!(ref instanceof java.lang.String)) { 1908 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1909 java.lang.String s = bs.toStringUtf8(); 1910 languageCode_ = s; 1911 return s; 1912 } else { 1913 return (java.lang.String) ref; 1914 } 1915 } 1916 /** 1917 * 1918 * 1919 * <pre> 1920 * The language that was triggered during intent detection. 1921 * See [Language 1922 * Support](https://cloud.google.com/dialogflow/docs/reference/language) 1923 * for a list of the currently supported language codes. 1924 * </pre> 1925 * 1926 * <code>string language_code = 15;</code> 1927 * 1928 * @return The bytes for languageCode. 1929 */ getLanguageCodeBytes()1930 public com.google.protobuf.ByteString getLanguageCodeBytes() { 1931 java.lang.Object ref = languageCode_; 1932 if (ref instanceof String) { 1933 com.google.protobuf.ByteString b = 1934 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1935 languageCode_ = b; 1936 return b; 1937 } else { 1938 return (com.google.protobuf.ByteString) ref; 1939 } 1940 } 1941 /** 1942 * 1943 * 1944 * <pre> 1945 * The language that was triggered during intent detection. 1946 * See [Language 1947 * Support](https://cloud.google.com/dialogflow/docs/reference/language) 1948 * for a list of the currently supported language codes. 1949 * </pre> 1950 * 1951 * <code>string language_code = 15;</code> 1952 * 1953 * @param value The languageCode to set. 1954 * @return This builder for chaining. 1955 */ setLanguageCode(java.lang.String value)1956 public Builder setLanguageCode(java.lang.String value) { 1957 if (value == null) { 1958 throw new NullPointerException(); 1959 } 1960 languageCode_ = value; 1961 bitField0_ |= 0x00000002; 1962 onChanged(); 1963 return this; 1964 } 1965 /** 1966 * 1967 * 1968 * <pre> 1969 * The language that was triggered during intent detection. 1970 * See [Language 1971 * Support](https://cloud.google.com/dialogflow/docs/reference/language) 1972 * for a list of the currently supported language codes. 1973 * </pre> 1974 * 1975 * <code>string language_code = 15;</code> 1976 * 1977 * @return This builder for chaining. 1978 */ clearLanguageCode()1979 public Builder clearLanguageCode() { 1980 languageCode_ = getDefaultInstance().getLanguageCode(); 1981 bitField0_ = (bitField0_ & ~0x00000002); 1982 onChanged(); 1983 return this; 1984 } 1985 /** 1986 * 1987 * 1988 * <pre> 1989 * The language that was triggered during intent detection. 1990 * See [Language 1991 * Support](https://cloud.google.com/dialogflow/docs/reference/language) 1992 * for a list of the currently supported language codes. 1993 * </pre> 1994 * 1995 * <code>string language_code = 15;</code> 1996 * 1997 * @param value The bytes for languageCode to set. 1998 * @return This builder for chaining. 1999 */ setLanguageCodeBytes(com.google.protobuf.ByteString value)2000 public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { 2001 if (value == null) { 2002 throw new NullPointerException(); 2003 } 2004 checkByteStringIsUtf8(value); 2005 languageCode_ = value; 2006 bitField0_ |= 0x00000002; 2007 onChanged(); 2008 return this; 2009 } 2010 2011 private float speechRecognitionConfidence_; 2012 /** 2013 * 2014 * 2015 * <pre> 2016 * The Speech recognition confidence between 0.0 and 1.0. A higher number 2017 * indicates an estimated greater likelihood that the recognized words are 2018 * correct. The default of 0.0 is a sentinel value indicating that confidence 2019 * was not set. 2020 * This field is not guaranteed to be accurate or set. In particular this 2021 * field isn't set for StreamingDetectIntent since the streaming endpoint has 2022 * separate confidence estimates per portion of the audio in 2023 * StreamingRecognitionResult. 2024 * </pre> 2025 * 2026 * <code>float speech_recognition_confidence = 2;</code> 2027 * 2028 * @return The speechRecognitionConfidence. 2029 */ 2030 @java.lang.Override getSpeechRecognitionConfidence()2031 public float getSpeechRecognitionConfidence() { 2032 return speechRecognitionConfidence_; 2033 } 2034 /** 2035 * 2036 * 2037 * <pre> 2038 * The Speech recognition confidence between 0.0 and 1.0. A higher number 2039 * indicates an estimated greater likelihood that the recognized words are 2040 * correct. The default of 0.0 is a sentinel value indicating that confidence 2041 * was not set. 2042 * This field is not guaranteed to be accurate or set. In particular this 2043 * field isn't set for StreamingDetectIntent since the streaming endpoint has 2044 * separate confidence estimates per portion of the audio in 2045 * StreamingRecognitionResult. 2046 * </pre> 2047 * 2048 * <code>float speech_recognition_confidence = 2;</code> 2049 * 2050 * @param value The speechRecognitionConfidence to set. 2051 * @return This builder for chaining. 2052 */ setSpeechRecognitionConfidence(float value)2053 public Builder setSpeechRecognitionConfidence(float value) { 2054 2055 speechRecognitionConfidence_ = value; 2056 bitField0_ |= 0x00000004; 2057 onChanged(); 2058 return this; 2059 } 2060 /** 2061 * 2062 * 2063 * <pre> 2064 * The Speech recognition confidence between 0.0 and 1.0. A higher number 2065 * indicates an estimated greater likelihood that the recognized words are 2066 * correct. The default of 0.0 is a sentinel value indicating that confidence 2067 * was not set. 2068 * This field is not guaranteed to be accurate or set. In particular this 2069 * field isn't set for StreamingDetectIntent since the streaming endpoint has 2070 * separate confidence estimates per portion of the audio in 2071 * StreamingRecognitionResult. 2072 * </pre> 2073 * 2074 * <code>float speech_recognition_confidence = 2;</code> 2075 * 2076 * @return This builder for chaining. 2077 */ clearSpeechRecognitionConfidence()2078 public Builder clearSpeechRecognitionConfidence() { 2079 bitField0_ = (bitField0_ & ~0x00000004); 2080 speechRecognitionConfidence_ = 0F; 2081 onChanged(); 2082 return this; 2083 } 2084 2085 private java.lang.Object action_ = ""; 2086 /** 2087 * 2088 * 2089 * <pre> 2090 * The action name from the matched intent. 2091 * </pre> 2092 * 2093 * <code>string action = 3;</code> 2094 * 2095 * @return The action. 2096 */ getAction()2097 public java.lang.String getAction() { 2098 java.lang.Object ref = action_; 2099 if (!(ref instanceof java.lang.String)) { 2100 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2101 java.lang.String s = bs.toStringUtf8(); 2102 action_ = s; 2103 return s; 2104 } else { 2105 return (java.lang.String) ref; 2106 } 2107 } 2108 /** 2109 * 2110 * 2111 * <pre> 2112 * The action name from the matched intent. 2113 * </pre> 2114 * 2115 * <code>string action = 3;</code> 2116 * 2117 * @return The bytes for action. 2118 */ getActionBytes()2119 public com.google.protobuf.ByteString getActionBytes() { 2120 java.lang.Object ref = action_; 2121 if (ref instanceof String) { 2122 com.google.protobuf.ByteString b = 2123 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2124 action_ = b; 2125 return b; 2126 } else { 2127 return (com.google.protobuf.ByteString) ref; 2128 } 2129 } 2130 /** 2131 * 2132 * 2133 * <pre> 2134 * The action name from the matched intent. 2135 * </pre> 2136 * 2137 * <code>string action = 3;</code> 2138 * 2139 * @param value The action to set. 2140 * @return This builder for chaining. 2141 */ setAction(java.lang.String value)2142 public Builder setAction(java.lang.String value) { 2143 if (value == null) { 2144 throw new NullPointerException(); 2145 } 2146 action_ = value; 2147 bitField0_ |= 0x00000008; 2148 onChanged(); 2149 return this; 2150 } 2151 /** 2152 * 2153 * 2154 * <pre> 2155 * The action name from the matched intent. 2156 * </pre> 2157 * 2158 * <code>string action = 3;</code> 2159 * 2160 * @return This builder for chaining. 2161 */ clearAction()2162 public Builder clearAction() { 2163 action_ = getDefaultInstance().getAction(); 2164 bitField0_ = (bitField0_ & ~0x00000008); 2165 onChanged(); 2166 return this; 2167 } 2168 /** 2169 * 2170 * 2171 * <pre> 2172 * The action name from the matched intent. 2173 * </pre> 2174 * 2175 * <code>string action = 3;</code> 2176 * 2177 * @param value The bytes for action to set. 2178 * @return This builder for chaining. 2179 */ setActionBytes(com.google.protobuf.ByteString value)2180 public Builder setActionBytes(com.google.protobuf.ByteString value) { 2181 if (value == null) { 2182 throw new NullPointerException(); 2183 } 2184 checkByteStringIsUtf8(value); 2185 action_ = value; 2186 bitField0_ |= 0x00000008; 2187 onChanged(); 2188 return this; 2189 } 2190 2191 private com.google.protobuf.Struct parameters_; 2192 private com.google.protobuf.SingleFieldBuilderV3< 2193 com.google.protobuf.Struct, 2194 com.google.protobuf.Struct.Builder, 2195 com.google.protobuf.StructOrBuilder> 2196 parametersBuilder_; 2197 /** 2198 * 2199 * 2200 * <pre> 2201 * The collection of extracted parameters. 2202 * Depending on your protocol or client library language, this is a 2203 * map, associative array, symbol table, dictionary, or JSON object 2204 * composed of a collection of (MapKey, MapValue) pairs: 2205 * - MapKey type: string 2206 * - MapKey value: parameter name 2207 * - MapValue type: 2208 * - If parameter's entity type is a composite entity: map 2209 * - Else: depending on parameter value type, could be one of string, 2210 * number, boolean, null, list or map 2211 * - MapValue value: 2212 * - If parameter's entity type is a composite entity: 2213 * map from composite entity property names to property values 2214 * - Else: parameter value 2215 * </pre> 2216 * 2217 * <code>.google.protobuf.Struct parameters = 4;</code> 2218 * 2219 * @return Whether the parameters field is set. 2220 */ hasParameters()2221 public boolean hasParameters() { 2222 return ((bitField0_ & 0x00000010) != 0); 2223 } 2224 /** 2225 * 2226 * 2227 * <pre> 2228 * The collection of extracted parameters. 2229 * Depending on your protocol or client library language, this is a 2230 * map, associative array, symbol table, dictionary, or JSON object 2231 * composed of a collection of (MapKey, MapValue) pairs: 2232 * - MapKey type: string 2233 * - MapKey value: parameter name 2234 * - MapValue type: 2235 * - If parameter's entity type is a composite entity: map 2236 * - Else: depending on parameter value type, could be one of string, 2237 * number, boolean, null, list or map 2238 * - MapValue value: 2239 * - If parameter's entity type is a composite entity: 2240 * map from composite entity property names to property values 2241 * - Else: parameter value 2242 * </pre> 2243 * 2244 * <code>.google.protobuf.Struct parameters = 4;</code> 2245 * 2246 * @return The parameters. 2247 */ getParameters()2248 public com.google.protobuf.Struct getParameters() { 2249 if (parametersBuilder_ == null) { 2250 return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; 2251 } else { 2252 return parametersBuilder_.getMessage(); 2253 } 2254 } 2255 /** 2256 * 2257 * 2258 * <pre> 2259 * The collection of extracted parameters. 2260 * Depending on your protocol or client library language, this is a 2261 * map, associative array, symbol table, dictionary, or JSON object 2262 * composed of a collection of (MapKey, MapValue) pairs: 2263 * - MapKey type: string 2264 * - MapKey value: parameter name 2265 * - MapValue type: 2266 * - If parameter's entity type is a composite entity: map 2267 * - Else: depending on parameter value type, could be one of string, 2268 * number, boolean, null, list or map 2269 * - MapValue value: 2270 * - If parameter's entity type is a composite entity: 2271 * map from composite entity property names to property values 2272 * - Else: parameter value 2273 * </pre> 2274 * 2275 * <code>.google.protobuf.Struct parameters = 4;</code> 2276 */ setParameters(com.google.protobuf.Struct value)2277 public Builder setParameters(com.google.protobuf.Struct value) { 2278 if (parametersBuilder_ == null) { 2279 if (value == null) { 2280 throw new NullPointerException(); 2281 } 2282 parameters_ = value; 2283 } else { 2284 parametersBuilder_.setMessage(value); 2285 } 2286 bitField0_ |= 0x00000010; 2287 onChanged(); 2288 return this; 2289 } 2290 /** 2291 * 2292 * 2293 * <pre> 2294 * The collection of extracted parameters. 2295 * Depending on your protocol or client library language, this is a 2296 * map, associative array, symbol table, dictionary, or JSON object 2297 * composed of a collection of (MapKey, MapValue) pairs: 2298 * - MapKey type: string 2299 * - MapKey value: parameter name 2300 * - MapValue type: 2301 * - If parameter's entity type is a composite entity: map 2302 * - Else: depending on parameter value type, could be one of string, 2303 * number, boolean, null, list or map 2304 * - MapValue value: 2305 * - If parameter's entity type is a composite entity: 2306 * map from composite entity property names to property values 2307 * - Else: parameter value 2308 * </pre> 2309 * 2310 * <code>.google.protobuf.Struct parameters = 4;</code> 2311 */ setParameters(com.google.protobuf.Struct.Builder builderForValue)2312 public Builder setParameters(com.google.protobuf.Struct.Builder builderForValue) { 2313 if (parametersBuilder_ == null) { 2314 parameters_ = builderForValue.build(); 2315 } else { 2316 parametersBuilder_.setMessage(builderForValue.build()); 2317 } 2318 bitField0_ |= 0x00000010; 2319 onChanged(); 2320 return this; 2321 } 2322 /** 2323 * 2324 * 2325 * <pre> 2326 * The collection of extracted parameters. 2327 * Depending on your protocol or client library language, this is a 2328 * map, associative array, symbol table, dictionary, or JSON object 2329 * composed of a collection of (MapKey, MapValue) pairs: 2330 * - MapKey type: string 2331 * - MapKey value: parameter name 2332 * - MapValue type: 2333 * - If parameter's entity type is a composite entity: map 2334 * - Else: depending on parameter value type, could be one of string, 2335 * number, boolean, null, list or map 2336 * - MapValue value: 2337 * - If parameter's entity type is a composite entity: 2338 * map from composite entity property names to property values 2339 * - Else: parameter value 2340 * </pre> 2341 * 2342 * <code>.google.protobuf.Struct parameters = 4;</code> 2343 */ mergeParameters(com.google.protobuf.Struct value)2344 public Builder mergeParameters(com.google.protobuf.Struct value) { 2345 if (parametersBuilder_ == null) { 2346 if (((bitField0_ & 0x00000010) != 0) 2347 && parameters_ != null 2348 && parameters_ != com.google.protobuf.Struct.getDefaultInstance()) { 2349 getParametersBuilder().mergeFrom(value); 2350 } else { 2351 parameters_ = value; 2352 } 2353 } else { 2354 parametersBuilder_.mergeFrom(value); 2355 } 2356 bitField0_ |= 0x00000010; 2357 onChanged(); 2358 return this; 2359 } 2360 /** 2361 * 2362 * 2363 * <pre> 2364 * The collection of extracted parameters. 2365 * Depending on your protocol or client library language, this is a 2366 * map, associative array, symbol table, dictionary, or JSON object 2367 * composed of a collection of (MapKey, MapValue) pairs: 2368 * - MapKey type: string 2369 * - MapKey value: parameter name 2370 * - MapValue type: 2371 * - If parameter's entity type is a composite entity: map 2372 * - Else: depending on parameter value type, could be one of string, 2373 * number, boolean, null, list or map 2374 * - MapValue value: 2375 * - If parameter's entity type is a composite entity: 2376 * map from composite entity property names to property values 2377 * - Else: parameter value 2378 * </pre> 2379 * 2380 * <code>.google.protobuf.Struct parameters = 4;</code> 2381 */ clearParameters()2382 public Builder clearParameters() { 2383 bitField0_ = (bitField0_ & ~0x00000010); 2384 parameters_ = null; 2385 if (parametersBuilder_ != null) { 2386 parametersBuilder_.dispose(); 2387 parametersBuilder_ = null; 2388 } 2389 onChanged(); 2390 return this; 2391 } 2392 /** 2393 * 2394 * 2395 * <pre> 2396 * The collection of extracted parameters. 2397 * Depending on your protocol or client library language, this is a 2398 * map, associative array, symbol table, dictionary, or JSON object 2399 * composed of a collection of (MapKey, MapValue) pairs: 2400 * - MapKey type: string 2401 * - MapKey value: parameter name 2402 * - MapValue type: 2403 * - If parameter's entity type is a composite entity: map 2404 * - Else: depending on parameter value type, could be one of string, 2405 * number, boolean, null, list or map 2406 * - MapValue value: 2407 * - If parameter's entity type is a composite entity: 2408 * map from composite entity property names to property values 2409 * - Else: parameter value 2410 * </pre> 2411 * 2412 * <code>.google.protobuf.Struct parameters = 4;</code> 2413 */ getParametersBuilder()2414 public com.google.protobuf.Struct.Builder getParametersBuilder() { 2415 bitField0_ |= 0x00000010; 2416 onChanged(); 2417 return getParametersFieldBuilder().getBuilder(); 2418 } 2419 /** 2420 * 2421 * 2422 * <pre> 2423 * The collection of extracted parameters. 2424 * Depending on your protocol or client library language, this is a 2425 * map, associative array, symbol table, dictionary, or JSON object 2426 * composed of a collection of (MapKey, MapValue) pairs: 2427 * - MapKey type: string 2428 * - MapKey value: parameter name 2429 * - MapValue type: 2430 * - If parameter's entity type is a composite entity: map 2431 * - Else: depending on parameter value type, could be one of string, 2432 * number, boolean, null, list or map 2433 * - MapValue value: 2434 * - If parameter's entity type is a composite entity: 2435 * map from composite entity property names to property values 2436 * - Else: parameter value 2437 * </pre> 2438 * 2439 * <code>.google.protobuf.Struct parameters = 4;</code> 2440 */ getParametersOrBuilder()2441 public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { 2442 if (parametersBuilder_ != null) { 2443 return parametersBuilder_.getMessageOrBuilder(); 2444 } else { 2445 return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; 2446 } 2447 } 2448 /** 2449 * 2450 * 2451 * <pre> 2452 * The collection of extracted parameters. 2453 * Depending on your protocol or client library language, this is a 2454 * map, associative array, symbol table, dictionary, or JSON object 2455 * composed of a collection of (MapKey, MapValue) pairs: 2456 * - MapKey type: string 2457 * - MapKey value: parameter name 2458 * - MapValue type: 2459 * - If parameter's entity type is a composite entity: map 2460 * - Else: depending on parameter value type, could be one of string, 2461 * number, boolean, null, list or map 2462 * - MapValue value: 2463 * - If parameter's entity type is a composite entity: 2464 * map from composite entity property names to property values 2465 * - Else: parameter value 2466 * </pre> 2467 * 2468 * <code>.google.protobuf.Struct parameters = 4;</code> 2469 */ 2470 private com.google.protobuf.SingleFieldBuilderV3< 2471 com.google.protobuf.Struct, 2472 com.google.protobuf.Struct.Builder, 2473 com.google.protobuf.StructOrBuilder> getParametersFieldBuilder()2474 getParametersFieldBuilder() { 2475 if (parametersBuilder_ == null) { 2476 parametersBuilder_ = 2477 new com.google.protobuf.SingleFieldBuilderV3< 2478 com.google.protobuf.Struct, 2479 com.google.protobuf.Struct.Builder, 2480 com.google.protobuf.StructOrBuilder>( 2481 getParameters(), getParentForChildren(), isClean()); 2482 parameters_ = null; 2483 } 2484 return parametersBuilder_; 2485 } 2486 2487 private boolean allRequiredParamsPresent_; 2488 /** 2489 * 2490 * 2491 * <pre> 2492 * This field is set to: 2493 * - `false` if the matched intent has required parameters and not all of 2494 * the required parameter values have been collected. 2495 * - `true` if all required parameter values have been collected, or if the 2496 * matched intent doesn't contain any required parameters. 2497 * </pre> 2498 * 2499 * <code>bool all_required_params_present = 5;</code> 2500 * 2501 * @return The allRequiredParamsPresent. 2502 */ 2503 @java.lang.Override getAllRequiredParamsPresent()2504 public boolean getAllRequiredParamsPresent() { 2505 return allRequiredParamsPresent_; 2506 } 2507 /** 2508 * 2509 * 2510 * <pre> 2511 * This field is set to: 2512 * - `false` if the matched intent has required parameters and not all of 2513 * the required parameter values have been collected. 2514 * - `true` if all required parameter values have been collected, or if the 2515 * matched intent doesn't contain any required parameters. 2516 * </pre> 2517 * 2518 * <code>bool all_required_params_present = 5;</code> 2519 * 2520 * @param value The allRequiredParamsPresent to set. 2521 * @return This builder for chaining. 2522 */ setAllRequiredParamsPresent(boolean value)2523 public Builder setAllRequiredParamsPresent(boolean value) { 2524 2525 allRequiredParamsPresent_ = value; 2526 bitField0_ |= 0x00000020; 2527 onChanged(); 2528 return this; 2529 } 2530 /** 2531 * 2532 * 2533 * <pre> 2534 * This field is set to: 2535 * - `false` if the matched intent has required parameters and not all of 2536 * the required parameter values have been collected. 2537 * - `true` if all required parameter values have been collected, or if the 2538 * matched intent doesn't contain any required parameters. 2539 * </pre> 2540 * 2541 * <code>bool all_required_params_present = 5;</code> 2542 * 2543 * @return This builder for chaining. 2544 */ clearAllRequiredParamsPresent()2545 public Builder clearAllRequiredParamsPresent() { 2546 bitField0_ = (bitField0_ & ~0x00000020); 2547 allRequiredParamsPresent_ = false; 2548 onChanged(); 2549 return this; 2550 } 2551 2552 private boolean cancelsSlotFilling_; 2553 /** 2554 * 2555 * 2556 * <pre> 2557 * Indicates whether the conversational query triggers a cancellation for slot 2558 * filling. For more information, see the [cancel slot filling 2559 * documentation](https://cloud.google.com/dialogflow/es/docs/intents-actions-parameters#cancel). 2560 * </pre> 2561 * 2562 * <code>bool cancels_slot_filling = 21;</code> 2563 * 2564 * @return The cancelsSlotFilling. 2565 */ 2566 @java.lang.Override getCancelsSlotFilling()2567 public boolean getCancelsSlotFilling() { 2568 return cancelsSlotFilling_; 2569 } 2570 /** 2571 * 2572 * 2573 * <pre> 2574 * Indicates whether the conversational query triggers a cancellation for slot 2575 * filling. For more information, see the [cancel slot filling 2576 * documentation](https://cloud.google.com/dialogflow/es/docs/intents-actions-parameters#cancel). 2577 * </pre> 2578 * 2579 * <code>bool cancels_slot_filling = 21;</code> 2580 * 2581 * @param value The cancelsSlotFilling to set. 2582 * @return This builder for chaining. 2583 */ setCancelsSlotFilling(boolean value)2584 public Builder setCancelsSlotFilling(boolean value) { 2585 2586 cancelsSlotFilling_ = value; 2587 bitField0_ |= 0x00000040; 2588 onChanged(); 2589 return this; 2590 } 2591 /** 2592 * 2593 * 2594 * <pre> 2595 * Indicates whether the conversational query triggers a cancellation for slot 2596 * filling. For more information, see the [cancel slot filling 2597 * documentation](https://cloud.google.com/dialogflow/es/docs/intents-actions-parameters#cancel). 2598 * </pre> 2599 * 2600 * <code>bool cancels_slot_filling = 21;</code> 2601 * 2602 * @return This builder for chaining. 2603 */ clearCancelsSlotFilling()2604 public Builder clearCancelsSlotFilling() { 2605 bitField0_ = (bitField0_ & ~0x00000040); 2606 cancelsSlotFilling_ = false; 2607 onChanged(); 2608 return this; 2609 } 2610 2611 private java.lang.Object fulfillmentText_ = ""; 2612 /** 2613 * 2614 * 2615 * <pre> 2616 * The text to be pronounced to the user or shown on the screen. 2617 * Note: This is a legacy field, `fulfillment_messages` should be preferred. 2618 * </pre> 2619 * 2620 * <code>string fulfillment_text = 6;</code> 2621 * 2622 * @return The fulfillmentText. 2623 */ getFulfillmentText()2624 public java.lang.String getFulfillmentText() { 2625 java.lang.Object ref = fulfillmentText_; 2626 if (!(ref instanceof java.lang.String)) { 2627 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2628 java.lang.String s = bs.toStringUtf8(); 2629 fulfillmentText_ = s; 2630 return s; 2631 } else { 2632 return (java.lang.String) ref; 2633 } 2634 } 2635 /** 2636 * 2637 * 2638 * <pre> 2639 * The text to be pronounced to the user or shown on the screen. 2640 * Note: This is a legacy field, `fulfillment_messages` should be preferred. 2641 * </pre> 2642 * 2643 * <code>string fulfillment_text = 6;</code> 2644 * 2645 * @return The bytes for fulfillmentText. 2646 */ getFulfillmentTextBytes()2647 public com.google.protobuf.ByteString getFulfillmentTextBytes() { 2648 java.lang.Object ref = fulfillmentText_; 2649 if (ref instanceof String) { 2650 com.google.protobuf.ByteString b = 2651 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2652 fulfillmentText_ = b; 2653 return b; 2654 } else { 2655 return (com.google.protobuf.ByteString) ref; 2656 } 2657 } 2658 /** 2659 * 2660 * 2661 * <pre> 2662 * The text to be pronounced to the user or shown on the screen. 2663 * Note: This is a legacy field, `fulfillment_messages` should be preferred. 2664 * </pre> 2665 * 2666 * <code>string fulfillment_text = 6;</code> 2667 * 2668 * @param value The fulfillmentText to set. 2669 * @return This builder for chaining. 2670 */ setFulfillmentText(java.lang.String value)2671 public Builder setFulfillmentText(java.lang.String value) { 2672 if (value == null) { 2673 throw new NullPointerException(); 2674 } 2675 fulfillmentText_ = value; 2676 bitField0_ |= 0x00000080; 2677 onChanged(); 2678 return this; 2679 } 2680 /** 2681 * 2682 * 2683 * <pre> 2684 * The text to be pronounced to the user or shown on the screen. 2685 * Note: This is a legacy field, `fulfillment_messages` should be preferred. 2686 * </pre> 2687 * 2688 * <code>string fulfillment_text = 6;</code> 2689 * 2690 * @return This builder for chaining. 2691 */ clearFulfillmentText()2692 public Builder clearFulfillmentText() { 2693 fulfillmentText_ = getDefaultInstance().getFulfillmentText(); 2694 bitField0_ = (bitField0_ & ~0x00000080); 2695 onChanged(); 2696 return this; 2697 } 2698 /** 2699 * 2700 * 2701 * <pre> 2702 * The text to be pronounced to the user or shown on the screen. 2703 * Note: This is a legacy field, `fulfillment_messages` should be preferred. 2704 * </pre> 2705 * 2706 * <code>string fulfillment_text = 6;</code> 2707 * 2708 * @param value The bytes for fulfillmentText to set. 2709 * @return This builder for chaining. 2710 */ setFulfillmentTextBytes(com.google.protobuf.ByteString value)2711 public Builder setFulfillmentTextBytes(com.google.protobuf.ByteString value) { 2712 if (value == null) { 2713 throw new NullPointerException(); 2714 } 2715 checkByteStringIsUtf8(value); 2716 fulfillmentText_ = value; 2717 bitField0_ |= 0x00000080; 2718 onChanged(); 2719 return this; 2720 } 2721 2722 private java.util.List<com.google.cloud.dialogflow.v2.Intent.Message> fulfillmentMessages_ = 2723 java.util.Collections.emptyList(); 2724 ensureFulfillmentMessagesIsMutable()2725 private void ensureFulfillmentMessagesIsMutable() { 2726 if (!((bitField0_ & 0x00000100) != 0)) { 2727 fulfillmentMessages_ = 2728 new java.util.ArrayList<com.google.cloud.dialogflow.v2.Intent.Message>( 2729 fulfillmentMessages_); 2730 bitField0_ |= 0x00000100; 2731 } 2732 } 2733 2734 private com.google.protobuf.RepeatedFieldBuilderV3< 2735 com.google.cloud.dialogflow.v2.Intent.Message, 2736 com.google.cloud.dialogflow.v2.Intent.Message.Builder, 2737 com.google.cloud.dialogflow.v2.Intent.MessageOrBuilder> 2738 fulfillmentMessagesBuilder_; 2739 2740 /** 2741 * 2742 * 2743 * <pre> 2744 * The collection of rich messages to present to the user. 2745 * </pre> 2746 * 2747 * <code>repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7;</code> 2748 */ 2749 public java.util.List<com.google.cloud.dialogflow.v2.Intent.Message> getFulfillmentMessagesList()2750 getFulfillmentMessagesList() { 2751 if (fulfillmentMessagesBuilder_ == null) { 2752 return java.util.Collections.unmodifiableList(fulfillmentMessages_); 2753 } else { 2754 return fulfillmentMessagesBuilder_.getMessageList(); 2755 } 2756 } 2757 /** 2758 * 2759 * 2760 * <pre> 2761 * The collection of rich messages to present to the user. 2762 * </pre> 2763 * 2764 * <code>repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7;</code> 2765 */ getFulfillmentMessagesCount()2766 public int getFulfillmentMessagesCount() { 2767 if (fulfillmentMessagesBuilder_ == null) { 2768 return fulfillmentMessages_.size(); 2769 } else { 2770 return fulfillmentMessagesBuilder_.getCount(); 2771 } 2772 } 2773 /** 2774 * 2775 * 2776 * <pre> 2777 * The collection of rich messages to present to the user. 2778 * </pre> 2779 * 2780 * <code>repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7;</code> 2781 */ getFulfillmentMessages(int index)2782 public com.google.cloud.dialogflow.v2.Intent.Message getFulfillmentMessages(int index) { 2783 if (fulfillmentMessagesBuilder_ == null) { 2784 return fulfillmentMessages_.get(index); 2785 } else { 2786 return fulfillmentMessagesBuilder_.getMessage(index); 2787 } 2788 } 2789 /** 2790 * 2791 * 2792 * <pre> 2793 * The collection of rich messages to present to the user. 2794 * </pre> 2795 * 2796 * <code>repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7;</code> 2797 */ setFulfillmentMessages( int index, com.google.cloud.dialogflow.v2.Intent.Message value)2798 public Builder setFulfillmentMessages( 2799 int index, com.google.cloud.dialogflow.v2.Intent.Message value) { 2800 if (fulfillmentMessagesBuilder_ == null) { 2801 if (value == null) { 2802 throw new NullPointerException(); 2803 } 2804 ensureFulfillmentMessagesIsMutable(); 2805 fulfillmentMessages_.set(index, value); 2806 onChanged(); 2807 } else { 2808 fulfillmentMessagesBuilder_.setMessage(index, value); 2809 } 2810 return this; 2811 } 2812 /** 2813 * 2814 * 2815 * <pre> 2816 * The collection of rich messages to present to the user. 2817 * </pre> 2818 * 2819 * <code>repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7;</code> 2820 */ setFulfillmentMessages( int index, com.google.cloud.dialogflow.v2.Intent.Message.Builder builderForValue)2821 public Builder setFulfillmentMessages( 2822 int index, com.google.cloud.dialogflow.v2.Intent.Message.Builder builderForValue) { 2823 if (fulfillmentMessagesBuilder_ == null) { 2824 ensureFulfillmentMessagesIsMutable(); 2825 fulfillmentMessages_.set(index, builderForValue.build()); 2826 onChanged(); 2827 } else { 2828 fulfillmentMessagesBuilder_.setMessage(index, builderForValue.build()); 2829 } 2830 return this; 2831 } 2832 /** 2833 * 2834 * 2835 * <pre> 2836 * The collection of rich messages to present to the user. 2837 * </pre> 2838 * 2839 * <code>repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7;</code> 2840 */ addFulfillmentMessages(com.google.cloud.dialogflow.v2.Intent.Message value)2841 public Builder addFulfillmentMessages(com.google.cloud.dialogflow.v2.Intent.Message value) { 2842 if (fulfillmentMessagesBuilder_ == null) { 2843 if (value == null) { 2844 throw new NullPointerException(); 2845 } 2846 ensureFulfillmentMessagesIsMutable(); 2847 fulfillmentMessages_.add(value); 2848 onChanged(); 2849 } else { 2850 fulfillmentMessagesBuilder_.addMessage(value); 2851 } 2852 return this; 2853 } 2854 /** 2855 * 2856 * 2857 * <pre> 2858 * The collection of rich messages to present to the user. 2859 * </pre> 2860 * 2861 * <code>repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7;</code> 2862 */ addFulfillmentMessages( int index, com.google.cloud.dialogflow.v2.Intent.Message value)2863 public Builder addFulfillmentMessages( 2864 int index, com.google.cloud.dialogflow.v2.Intent.Message value) { 2865 if (fulfillmentMessagesBuilder_ == null) { 2866 if (value == null) { 2867 throw new NullPointerException(); 2868 } 2869 ensureFulfillmentMessagesIsMutable(); 2870 fulfillmentMessages_.add(index, value); 2871 onChanged(); 2872 } else { 2873 fulfillmentMessagesBuilder_.addMessage(index, value); 2874 } 2875 return this; 2876 } 2877 /** 2878 * 2879 * 2880 * <pre> 2881 * The collection of rich messages to present to the user. 2882 * </pre> 2883 * 2884 * <code>repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7;</code> 2885 */ addFulfillmentMessages( com.google.cloud.dialogflow.v2.Intent.Message.Builder builderForValue)2886 public Builder addFulfillmentMessages( 2887 com.google.cloud.dialogflow.v2.Intent.Message.Builder builderForValue) { 2888 if (fulfillmentMessagesBuilder_ == null) { 2889 ensureFulfillmentMessagesIsMutable(); 2890 fulfillmentMessages_.add(builderForValue.build()); 2891 onChanged(); 2892 } else { 2893 fulfillmentMessagesBuilder_.addMessage(builderForValue.build()); 2894 } 2895 return this; 2896 } 2897 /** 2898 * 2899 * 2900 * <pre> 2901 * The collection of rich messages to present to the user. 2902 * </pre> 2903 * 2904 * <code>repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7;</code> 2905 */ addFulfillmentMessages( int index, com.google.cloud.dialogflow.v2.Intent.Message.Builder builderForValue)2906 public Builder addFulfillmentMessages( 2907 int index, com.google.cloud.dialogflow.v2.Intent.Message.Builder builderForValue) { 2908 if (fulfillmentMessagesBuilder_ == null) { 2909 ensureFulfillmentMessagesIsMutable(); 2910 fulfillmentMessages_.add(index, builderForValue.build()); 2911 onChanged(); 2912 } else { 2913 fulfillmentMessagesBuilder_.addMessage(index, builderForValue.build()); 2914 } 2915 return this; 2916 } 2917 /** 2918 * 2919 * 2920 * <pre> 2921 * The collection of rich messages to present to the user. 2922 * </pre> 2923 * 2924 * <code>repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7;</code> 2925 */ addAllFulfillmentMessages( java.lang.Iterable<? extends com.google.cloud.dialogflow.v2.Intent.Message> values)2926 public Builder addAllFulfillmentMessages( 2927 java.lang.Iterable<? extends com.google.cloud.dialogflow.v2.Intent.Message> values) { 2928 if (fulfillmentMessagesBuilder_ == null) { 2929 ensureFulfillmentMessagesIsMutable(); 2930 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fulfillmentMessages_); 2931 onChanged(); 2932 } else { 2933 fulfillmentMessagesBuilder_.addAllMessages(values); 2934 } 2935 return this; 2936 } 2937 /** 2938 * 2939 * 2940 * <pre> 2941 * The collection of rich messages to present to the user. 2942 * </pre> 2943 * 2944 * <code>repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7;</code> 2945 */ clearFulfillmentMessages()2946 public Builder clearFulfillmentMessages() { 2947 if (fulfillmentMessagesBuilder_ == null) { 2948 fulfillmentMessages_ = java.util.Collections.emptyList(); 2949 bitField0_ = (bitField0_ & ~0x00000100); 2950 onChanged(); 2951 } else { 2952 fulfillmentMessagesBuilder_.clear(); 2953 } 2954 return this; 2955 } 2956 /** 2957 * 2958 * 2959 * <pre> 2960 * The collection of rich messages to present to the user. 2961 * </pre> 2962 * 2963 * <code>repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7;</code> 2964 */ removeFulfillmentMessages(int index)2965 public Builder removeFulfillmentMessages(int index) { 2966 if (fulfillmentMessagesBuilder_ == null) { 2967 ensureFulfillmentMessagesIsMutable(); 2968 fulfillmentMessages_.remove(index); 2969 onChanged(); 2970 } else { 2971 fulfillmentMessagesBuilder_.remove(index); 2972 } 2973 return this; 2974 } 2975 /** 2976 * 2977 * 2978 * <pre> 2979 * The collection of rich messages to present to the user. 2980 * </pre> 2981 * 2982 * <code>repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7;</code> 2983 */ getFulfillmentMessagesBuilder( int index)2984 public com.google.cloud.dialogflow.v2.Intent.Message.Builder getFulfillmentMessagesBuilder( 2985 int index) { 2986 return getFulfillmentMessagesFieldBuilder().getBuilder(index); 2987 } 2988 /** 2989 * 2990 * 2991 * <pre> 2992 * The collection of rich messages to present to the user. 2993 * </pre> 2994 * 2995 * <code>repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7;</code> 2996 */ getFulfillmentMessagesOrBuilder( int index)2997 public com.google.cloud.dialogflow.v2.Intent.MessageOrBuilder getFulfillmentMessagesOrBuilder( 2998 int index) { 2999 if (fulfillmentMessagesBuilder_ == null) { 3000 return fulfillmentMessages_.get(index); 3001 } else { 3002 return fulfillmentMessagesBuilder_.getMessageOrBuilder(index); 3003 } 3004 } 3005 /** 3006 * 3007 * 3008 * <pre> 3009 * The collection of rich messages to present to the user. 3010 * </pre> 3011 * 3012 * <code>repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7;</code> 3013 */ 3014 public java.util.List<? extends com.google.cloud.dialogflow.v2.Intent.MessageOrBuilder> getFulfillmentMessagesOrBuilderList()3015 getFulfillmentMessagesOrBuilderList() { 3016 if (fulfillmentMessagesBuilder_ != null) { 3017 return fulfillmentMessagesBuilder_.getMessageOrBuilderList(); 3018 } else { 3019 return java.util.Collections.unmodifiableList(fulfillmentMessages_); 3020 } 3021 } 3022 /** 3023 * 3024 * 3025 * <pre> 3026 * The collection of rich messages to present to the user. 3027 * </pre> 3028 * 3029 * <code>repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7;</code> 3030 */ addFulfillmentMessagesBuilder()3031 public com.google.cloud.dialogflow.v2.Intent.Message.Builder addFulfillmentMessagesBuilder() { 3032 return getFulfillmentMessagesFieldBuilder() 3033 .addBuilder(com.google.cloud.dialogflow.v2.Intent.Message.getDefaultInstance()); 3034 } 3035 /** 3036 * 3037 * 3038 * <pre> 3039 * The collection of rich messages to present to the user. 3040 * </pre> 3041 * 3042 * <code>repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7;</code> 3043 */ addFulfillmentMessagesBuilder( int index)3044 public com.google.cloud.dialogflow.v2.Intent.Message.Builder addFulfillmentMessagesBuilder( 3045 int index) { 3046 return getFulfillmentMessagesFieldBuilder() 3047 .addBuilder(index, com.google.cloud.dialogflow.v2.Intent.Message.getDefaultInstance()); 3048 } 3049 /** 3050 * 3051 * 3052 * <pre> 3053 * The collection of rich messages to present to the user. 3054 * </pre> 3055 * 3056 * <code>repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 7;</code> 3057 */ 3058 public java.util.List<com.google.cloud.dialogflow.v2.Intent.Message.Builder> getFulfillmentMessagesBuilderList()3059 getFulfillmentMessagesBuilderList() { 3060 return getFulfillmentMessagesFieldBuilder().getBuilderList(); 3061 } 3062 3063 private com.google.protobuf.RepeatedFieldBuilderV3< 3064 com.google.cloud.dialogflow.v2.Intent.Message, 3065 com.google.cloud.dialogflow.v2.Intent.Message.Builder, 3066 com.google.cloud.dialogflow.v2.Intent.MessageOrBuilder> getFulfillmentMessagesFieldBuilder()3067 getFulfillmentMessagesFieldBuilder() { 3068 if (fulfillmentMessagesBuilder_ == null) { 3069 fulfillmentMessagesBuilder_ = 3070 new com.google.protobuf.RepeatedFieldBuilderV3< 3071 com.google.cloud.dialogflow.v2.Intent.Message, 3072 com.google.cloud.dialogflow.v2.Intent.Message.Builder, 3073 com.google.cloud.dialogflow.v2.Intent.MessageOrBuilder>( 3074 fulfillmentMessages_, 3075 ((bitField0_ & 0x00000100) != 0), 3076 getParentForChildren(), 3077 isClean()); 3078 fulfillmentMessages_ = null; 3079 } 3080 return fulfillmentMessagesBuilder_; 3081 } 3082 3083 private java.lang.Object webhookSource_ = ""; 3084 /** 3085 * 3086 * 3087 * <pre> 3088 * If the query was fulfilled by a webhook call, this field is set to the 3089 * value of the `source` field returned in the webhook response. 3090 * </pre> 3091 * 3092 * <code>string webhook_source = 8;</code> 3093 * 3094 * @return The webhookSource. 3095 */ getWebhookSource()3096 public java.lang.String getWebhookSource() { 3097 java.lang.Object ref = webhookSource_; 3098 if (!(ref instanceof java.lang.String)) { 3099 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 3100 java.lang.String s = bs.toStringUtf8(); 3101 webhookSource_ = s; 3102 return s; 3103 } else { 3104 return (java.lang.String) ref; 3105 } 3106 } 3107 /** 3108 * 3109 * 3110 * <pre> 3111 * If the query was fulfilled by a webhook call, this field is set to the 3112 * value of the `source` field returned in the webhook response. 3113 * </pre> 3114 * 3115 * <code>string webhook_source = 8;</code> 3116 * 3117 * @return The bytes for webhookSource. 3118 */ getWebhookSourceBytes()3119 public com.google.protobuf.ByteString getWebhookSourceBytes() { 3120 java.lang.Object ref = webhookSource_; 3121 if (ref instanceof String) { 3122 com.google.protobuf.ByteString b = 3123 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 3124 webhookSource_ = b; 3125 return b; 3126 } else { 3127 return (com.google.protobuf.ByteString) ref; 3128 } 3129 } 3130 /** 3131 * 3132 * 3133 * <pre> 3134 * If the query was fulfilled by a webhook call, this field is set to the 3135 * value of the `source` field returned in the webhook response. 3136 * </pre> 3137 * 3138 * <code>string webhook_source = 8;</code> 3139 * 3140 * @param value The webhookSource to set. 3141 * @return This builder for chaining. 3142 */ setWebhookSource(java.lang.String value)3143 public Builder setWebhookSource(java.lang.String value) { 3144 if (value == null) { 3145 throw new NullPointerException(); 3146 } 3147 webhookSource_ = value; 3148 bitField0_ |= 0x00000200; 3149 onChanged(); 3150 return this; 3151 } 3152 /** 3153 * 3154 * 3155 * <pre> 3156 * If the query was fulfilled by a webhook call, this field is set to the 3157 * value of the `source` field returned in the webhook response. 3158 * </pre> 3159 * 3160 * <code>string webhook_source = 8;</code> 3161 * 3162 * @return This builder for chaining. 3163 */ clearWebhookSource()3164 public Builder clearWebhookSource() { 3165 webhookSource_ = getDefaultInstance().getWebhookSource(); 3166 bitField0_ = (bitField0_ & ~0x00000200); 3167 onChanged(); 3168 return this; 3169 } 3170 /** 3171 * 3172 * 3173 * <pre> 3174 * If the query was fulfilled by a webhook call, this field is set to the 3175 * value of the `source` field returned in the webhook response. 3176 * </pre> 3177 * 3178 * <code>string webhook_source = 8;</code> 3179 * 3180 * @param value The bytes for webhookSource to set. 3181 * @return This builder for chaining. 3182 */ setWebhookSourceBytes(com.google.protobuf.ByteString value)3183 public Builder setWebhookSourceBytes(com.google.protobuf.ByteString value) { 3184 if (value == null) { 3185 throw new NullPointerException(); 3186 } 3187 checkByteStringIsUtf8(value); 3188 webhookSource_ = value; 3189 bitField0_ |= 0x00000200; 3190 onChanged(); 3191 return this; 3192 } 3193 3194 private com.google.protobuf.Struct webhookPayload_; 3195 private com.google.protobuf.SingleFieldBuilderV3< 3196 com.google.protobuf.Struct, 3197 com.google.protobuf.Struct.Builder, 3198 com.google.protobuf.StructOrBuilder> 3199 webhookPayloadBuilder_; 3200 /** 3201 * 3202 * 3203 * <pre> 3204 * If the query was fulfilled by a webhook call, this field is set to the 3205 * value of the `payload` field returned in the webhook response. 3206 * </pre> 3207 * 3208 * <code>.google.protobuf.Struct webhook_payload = 9;</code> 3209 * 3210 * @return Whether the webhookPayload field is set. 3211 */ hasWebhookPayload()3212 public boolean hasWebhookPayload() { 3213 return ((bitField0_ & 0x00000400) != 0); 3214 } 3215 /** 3216 * 3217 * 3218 * <pre> 3219 * If the query was fulfilled by a webhook call, this field is set to the 3220 * value of the `payload` field returned in the webhook response. 3221 * </pre> 3222 * 3223 * <code>.google.protobuf.Struct webhook_payload = 9;</code> 3224 * 3225 * @return The webhookPayload. 3226 */ getWebhookPayload()3227 public com.google.protobuf.Struct getWebhookPayload() { 3228 if (webhookPayloadBuilder_ == null) { 3229 return webhookPayload_ == null 3230 ? com.google.protobuf.Struct.getDefaultInstance() 3231 : webhookPayload_; 3232 } else { 3233 return webhookPayloadBuilder_.getMessage(); 3234 } 3235 } 3236 /** 3237 * 3238 * 3239 * <pre> 3240 * If the query was fulfilled by a webhook call, this field is set to the 3241 * value of the `payload` field returned in the webhook response. 3242 * </pre> 3243 * 3244 * <code>.google.protobuf.Struct webhook_payload = 9;</code> 3245 */ setWebhookPayload(com.google.protobuf.Struct value)3246 public Builder setWebhookPayload(com.google.protobuf.Struct value) { 3247 if (webhookPayloadBuilder_ == null) { 3248 if (value == null) { 3249 throw new NullPointerException(); 3250 } 3251 webhookPayload_ = value; 3252 } else { 3253 webhookPayloadBuilder_.setMessage(value); 3254 } 3255 bitField0_ |= 0x00000400; 3256 onChanged(); 3257 return this; 3258 } 3259 /** 3260 * 3261 * 3262 * <pre> 3263 * If the query was fulfilled by a webhook call, this field is set to the 3264 * value of the `payload` field returned in the webhook response. 3265 * </pre> 3266 * 3267 * <code>.google.protobuf.Struct webhook_payload = 9;</code> 3268 */ setWebhookPayload(com.google.protobuf.Struct.Builder builderForValue)3269 public Builder setWebhookPayload(com.google.protobuf.Struct.Builder builderForValue) { 3270 if (webhookPayloadBuilder_ == null) { 3271 webhookPayload_ = builderForValue.build(); 3272 } else { 3273 webhookPayloadBuilder_.setMessage(builderForValue.build()); 3274 } 3275 bitField0_ |= 0x00000400; 3276 onChanged(); 3277 return this; 3278 } 3279 /** 3280 * 3281 * 3282 * <pre> 3283 * If the query was fulfilled by a webhook call, this field is set to the 3284 * value of the `payload` field returned in the webhook response. 3285 * </pre> 3286 * 3287 * <code>.google.protobuf.Struct webhook_payload = 9;</code> 3288 */ mergeWebhookPayload(com.google.protobuf.Struct value)3289 public Builder mergeWebhookPayload(com.google.protobuf.Struct value) { 3290 if (webhookPayloadBuilder_ == null) { 3291 if (((bitField0_ & 0x00000400) != 0) 3292 && webhookPayload_ != null 3293 && webhookPayload_ != com.google.protobuf.Struct.getDefaultInstance()) { 3294 getWebhookPayloadBuilder().mergeFrom(value); 3295 } else { 3296 webhookPayload_ = value; 3297 } 3298 } else { 3299 webhookPayloadBuilder_.mergeFrom(value); 3300 } 3301 bitField0_ |= 0x00000400; 3302 onChanged(); 3303 return this; 3304 } 3305 /** 3306 * 3307 * 3308 * <pre> 3309 * If the query was fulfilled by a webhook call, this field is set to the 3310 * value of the `payload` field returned in the webhook response. 3311 * </pre> 3312 * 3313 * <code>.google.protobuf.Struct webhook_payload = 9;</code> 3314 */ clearWebhookPayload()3315 public Builder clearWebhookPayload() { 3316 bitField0_ = (bitField0_ & ~0x00000400); 3317 webhookPayload_ = null; 3318 if (webhookPayloadBuilder_ != null) { 3319 webhookPayloadBuilder_.dispose(); 3320 webhookPayloadBuilder_ = null; 3321 } 3322 onChanged(); 3323 return this; 3324 } 3325 /** 3326 * 3327 * 3328 * <pre> 3329 * If the query was fulfilled by a webhook call, this field is set to the 3330 * value of the `payload` field returned in the webhook response. 3331 * </pre> 3332 * 3333 * <code>.google.protobuf.Struct webhook_payload = 9;</code> 3334 */ getWebhookPayloadBuilder()3335 public com.google.protobuf.Struct.Builder getWebhookPayloadBuilder() { 3336 bitField0_ |= 0x00000400; 3337 onChanged(); 3338 return getWebhookPayloadFieldBuilder().getBuilder(); 3339 } 3340 /** 3341 * 3342 * 3343 * <pre> 3344 * If the query was fulfilled by a webhook call, this field is set to the 3345 * value of the `payload` field returned in the webhook response. 3346 * </pre> 3347 * 3348 * <code>.google.protobuf.Struct webhook_payload = 9;</code> 3349 */ getWebhookPayloadOrBuilder()3350 public com.google.protobuf.StructOrBuilder getWebhookPayloadOrBuilder() { 3351 if (webhookPayloadBuilder_ != null) { 3352 return webhookPayloadBuilder_.getMessageOrBuilder(); 3353 } else { 3354 return webhookPayload_ == null 3355 ? com.google.protobuf.Struct.getDefaultInstance() 3356 : webhookPayload_; 3357 } 3358 } 3359 /** 3360 * 3361 * 3362 * <pre> 3363 * If the query was fulfilled by a webhook call, this field is set to the 3364 * value of the `payload` field returned in the webhook response. 3365 * </pre> 3366 * 3367 * <code>.google.protobuf.Struct webhook_payload = 9;</code> 3368 */ 3369 private com.google.protobuf.SingleFieldBuilderV3< 3370 com.google.protobuf.Struct, 3371 com.google.protobuf.Struct.Builder, 3372 com.google.protobuf.StructOrBuilder> getWebhookPayloadFieldBuilder()3373 getWebhookPayloadFieldBuilder() { 3374 if (webhookPayloadBuilder_ == null) { 3375 webhookPayloadBuilder_ = 3376 new com.google.protobuf.SingleFieldBuilderV3< 3377 com.google.protobuf.Struct, 3378 com.google.protobuf.Struct.Builder, 3379 com.google.protobuf.StructOrBuilder>( 3380 getWebhookPayload(), getParentForChildren(), isClean()); 3381 webhookPayload_ = null; 3382 } 3383 return webhookPayloadBuilder_; 3384 } 3385 3386 private java.util.List<com.google.cloud.dialogflow.v2.Context> outputContexts_ = 3387 java.util.Collections.emptyList(); 3388 ensureOutputContextsIsMutable()3389 private void ensureOutputContextsIsMutable() { 3390 if (!((bitField0_ & 0x00000800) != 0)) { 3391 outputContexts_ = 3392 new java.util.ArrayList<com.google.cloud.dialogflow.v2.Context>(outputContexts_); 3393 bitField0_ |= 0x00000800; 3394 } 3395 } 3396 3397 private com.google.protobuf.RepeatedFieldBuilderV3< 3398 com.google.cloud.dialogflow.v2.Context, 3399 com.google.cloud.dialogflow.v2.Context.Builder, 3400 com.google.cloud.dialogflow.v2.ContextOrBuilder> 3401 outputContextsBuilder_; 3402 3403 /** 3404 * 3405 * 3406 * <pre> 3407 * The collection of output contexts. If applicable, 3408 * `output_contexts.parameters` contains entries with name 3409 * `<parameter name>.original` containing the original parameter values 3410 * before the query. 3411 * </pre> 3412 * 3413 * <code>repeated .google.cloud.dialogflow.v2.Context output_contexts = 10;</code> 3414 */ getOutputContextsList()3415 public java.util.List<com.google.cloud.dialogflow.v2.Context> getOutputContextsList() { 3416 if (outputContextsBuilder_ == null) { 3417 return java.util.Collections.unmodifiableList(outputContexts_); 3418 } else { 3419 return outputContextsBuilder_.getMessageList(); 3420 } 3421 } 3422 /** 3423 * 3424 * 3425 * <pre> 3426 * The collection of output contexts. If applicable, 3427 * `output_contexts.parameters` contains entries with name 3428 * `<parameter name>.original` containing the original parameter values 3429 * before the query. 3430 * </pre> 3431 * 3432 * <code>repeated .google.cloud.dialogflow.v2.Context output_contexts = 10;</code> 3433 */ getOutputContextsCount()3434 public int getOutputContextsCount() { 3435 if (outputContextsBuilder_ == null) { 3436 return outputContexts_.size(); 3437 } else { 3438 return outputContextsBuilder_.getCount(); 3439 } 3440 } 3441 /** 3442 * 3443 * 3444 * <pre> 3445 * The collection of output contexts. If applicable, 3446 * `output_contexts.parameters` contains entries with name 3447 * `<parameter name>.original` containing the original parameter values 3448 * before the query. 3449 * </pre> 3450 * 3451 * <code>repeated .google.cloud.dialogflow.v2.Context output_contexts = 10;</code> 3452 */ getOutputContexts(int index)3453 public com.google.cloud.dialogflow.v2.Context getOutputContexts(int index) { 3454 if (outputContextsBuilder_ == null) { 3455 return outputContexts_.get(index); 3456 } else { 3457 return outputContextsBuilder_.getMessage(index); 3458 } 3459 } 3460 /** 3461 * 3462 * 3463 * <pre> 3464 * The collection of output contexts. If applicable, 3465 * `output_contexts.parameters` contains entries with name 3466 * `<parameter name>.original` containing the original parameter values 3467 * before the query. 3468 * </pre> 3469 * 3470 * <code>repeated .google.cloud.dialogflow.v2.Context output_contexts = 10;</code> 3471 */ setOutputContexts(int index, com.google.cloud.dialogflow.v2.Context value)3472 public Builder setOutputContexts(int index, com.google.cloud.dialogflow.v2.Context value) { 3473 if (outputContextsBuilder_ == null) { 3474 if (value == null) { 3475 throw new NullPointerException(); 3476 } 3477 ensureOutputContextsIsMutable(); 3478 outputContexts_.set(index, value); 3479 onChanged(); 3480 } else { 3481 outputContextsBuilder_.setMessage(index, value); 3482 } 3483 return this; 3484 } 3485 /** 3486 * 3487 * 3488 * <pre> 3489 * The collection of output contexts. If applicable, 3490 * `output_contexts.parameters` contains entries with name 3491 * `<parameter name>.original` containing the original parameter values 3492 * before the query. 3493 * </pre> 3494 * 3495 * <code>repeated .google.cloud.dialogflow.v2.Context output_contexts = 10;</code> 3496 */ setOutputContexts( int index, com.google.cloud.dialogflow.v2.Context.Builder builderForValue)3497 public Builder setOutputContexts( 3498 int index, com.google.cloud.dialogflow.v2.Context.Builder builderForValue) { 3499 if (outputContextsBuilder_ == null) { 3500 ensureOutputContextsIsMutable(); 3501 outputContexts_.set(index, builderForValue.build()); 3502 onChanged(); 3503 } else { 3504 outputContextsBuilder_.setMessage(index, builderForValue.build()); 3505 } 3506 return this; 3507 } 3508 /** 3509 * 3510 * 3511 * <pre> 3512 * The collection of output contexts. If applicable, 3513 * `output_contexts.parameters` contains entries with name 3514 * `<parameter name>.original` containing the original parameter values 3515 * before the query. 3516 * </pre> 3517 * 3518 * <code>repeated .google.cloud.dialogflow.v2.Context output_contexts = 10;</code> 3519 */ addOutputContexts(com.google.cloud.dialogflow.v2.Context value)3520 public Builder addOutputContexts(com.google.cloud.dialogflow.v2.Context value) { 3521 if (outputContextsBuilder_ == null) { 3522 if (value == null) { 3523 throw new NullPointerException(); 3524 } 3525 ensureOutputContextsIsMutable(); 3526 outputContexts_.add(value); 3527 onChanged(); 3528 } else { 3529 outputContextsBuilder_.addMessage(value); 3530 } 3531 return this; 3532 } 3533 /** 3534 * 3535 * 3536 * <pre> 3537 * The collection of output contexts. If applicable, 3538 * `output_contexts.parameters` contains entries with name 3539 * `<parameter name>.original` containing the original parameter values 3540 * before the query. 3541 * </pre> 3542 * 3543 * <code>repeated .google.cloud.dialogflow.v2.Context output_contexts = 10;</code> 3544 */ addOutputContexts(int index, com.google.cloud.dialogflow.v2.Context value)3545 public Builder addOutputContexts(int index, com.google.cloud.dialogflow.v2.Context value) { 3546 if (outputContextsBuilder_ == null) { 3547 if (value == null) { 3548 throw new NullPointerException(); 3549 } 3550 ensureOutputContextsIsMutable(); 3551 outputContexts_.add(index, value); 3552 onChanged(); 3553 } else { 3554 outputContextsBuilder_.addMessage(index, value); 3555 } 3556 return this; 3557 } 3558 /** 3559 * 3560 * 3561 * <pre> 3562 * The collection of output contexts. If applicable, 3563 * `output_contexts.parameters` contains entries with name 3564 * `<parameter name>.original` containing the original parameter values 3565 * before the query. 3566 * </pre> 3567 * 3568 * <code>repeated .google.cloud.dialogflow.v2.Context output_contexts = 10;</code> 3569 */ addOutputContexts( com.google.cloud.dialogflow.v2.Context.Builder builderForValue)3570 public Builder addOutputContexts( 3571 com.google.cloud.dialogflow.v2.Context.Builder builderForValue) { 3572 if (outputContextsBuilder_ == null) { 3573 ensureOutputContextsIsMutable(); 3574 outputContexts_.add(builderForValue.build()); 3575 onChanged(); 3576 } else { 3577 outputContextsBuilder_.addMessage(builderForValue.build()); 3578 } 3579 return this; 3580 } 3581 /** 3582 * 3583 * 3584 * <pre> 3585 * The collection of output contexts. If applicable, 3586 * `output_contexts.parameters` contains entries with name 3587 * `<parameter name>.original` containing the original parameter values 3588 * before the query. 3589 * </pre> 3590 * 3591 * <code>repeated .google.cloud.dialogflow.v2.Context output_contexts = 10;</code> 3592 */ addOutputContexts( int index, com.google.cloud.dialogflow.v2.Context.Builder builderForValue)3593 public Builder addOutputContexts( 3594 int index, com.google.cloud.dialogflow.v2.Context.Builder builderForValue) { 3595 if (outputContextsBuilder_ == null) { 3596 ensureOutputContextsIsMutable(); 3597 outputContexts_.add(index, builderForValue.build()); 3598 onChanged(); 3599 } else { 3600 outputContextsBuilder_.addMessage(index, builderForValue.build()); 3601 } 3602 return this; 3603 } 3604 /** 3605 * 3606 * 3607 * <pre> 3608 * The collection of output contexts. If applicable, 3609 * `output_contexts.parameters` contains entries with name 3610 * `<parameter name>.original` containing the original parameter values 3611 * before the query. 3612 * </pre> 3613 * 3614 * <code>repeated .google.cloud.dialogflow.v2.Context output_contexts = 10;</code> 3615 */ addAllOutputContexts( java.lang.Iterable<? extends com.google.cloud.dialogflow.v2.Context> values)3616 public Builder addAllOutputContexts( 3617 java.lang.Iterable<? extends com.google.cloud.dialogflow.v2.Context> values) { 3618 if (outputContextsBuilder_ == null) { 3619 ensureOutputContextsIsMutable(); 3620 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, outputContexts_); 3621 onChanged(); 3622 } else { 3623 outputContextsBuilder_.addAllMessages(values); 3624 } 3625 return this; 3626 } 3627 /** 3628 * 3629 * 3630 * <pre> 3631 * The collection of output contexts. If applicable, 3632 * `output_contexts.parameters` contains entries with name 3633 * `<parameter name>.original` containing the original parameter values 3634 * before the query. 3635 * </pre> 3636 * 3637 * <code>repeated .google.cloud.dialogflow.v2.Context output_contexts = 10;</code> 3638 */ clearOutputContexts()3639 public Builder clearOutputContexts() { 3640 if (outputContextsBuilder_ == null) { 3641 outputContexts_ = java.util.Collections.emptyList(); 3642 bitField0_ = (bitField0_ & ~0x00000800); 3643 onChanged(); 3644 } else { 3645 outputContextsBuilder_.clear(); 3646 } 3647 return this; 3648 } 3649 /** 3650 * 3651 * 3652 * <pre> 3653 * The collection of output contexts. If applicable, 3654 * `output_contexts.parameters` contains entries with name 3655 * `<parameter name>.original` containing the original parameter values 3656 * before the query. 3657 * </pre> 3658 * 3659 * <code>repeated .google.cloud.dialogflow.v2.Context output_contexts = 10;</code> 3660 */ removeOutputContexts(int index)3661 public Builder removeOutputContexts(int index) { 3662 if (outputContextsBuilder_ == null) { 3663 ensureOutputContextsIsMutable(); 3664 outputContexts_.remove(index); 3665 onChanged(); 3666 } else { 3667 outputContextsBuilder_.remove(index); 3668 } 3669 return this; 3670 } 3671 /** 3672 * 3673 * 3674 * <pre> 3675 * The collection of output contexts. If applicable, 3676 * `output_contexts.parameters` contains entries with name 3677 * `<parameter name>.original` containing the original parameter values 3678 * before the query. 3679 * </pre> 3680 * 3681 * <code>repeated .google.cloud.dialogflow.v2.Context output_contexts = 10;</code> 3682 */ getOutputContextsBuilder(int index)3683 public com.google.cloud.dialogflow.v2.Context.Builder getOutputContextsBuilder(int index) { 3684 return getOutputContextsFieldBuilder().getBuilder(index); 3685 } 3686 /** 3687 * 3688 * 3689 * <pre> 3690 * The collection of output contexts. If applicable, 3691 * `output_contexts.parameters` contains entries with name 3692 * `<parameter name>.original` containing the original parameter values 3693 * before the query. 3694 * </pre> 3695 * 3696 * <code>repeated .google.cloud.dialogflow.v2.Context output_contexts = 10;</code> 3697 */ getOutputContextsOrBuilder(int index)3698 public com.google.cloud.dialogflow.v2.ContextOrBuilder getOutputContextsOrBuilder(int index) { 3699 if (outputContextsBuilder_ == null) { 3700 return outputContexts_.get(index); 3701 } else { 3702 return outputContextsBuilder_.getMessageOrBuilder(index); 3703 } 3704 } 3705 /** 3706 * 3707 * 3708 * <pre> 3709 * The collection of output contexts. If applicable, 3710 * `output_contexts.parameters` contains entries with name 3711 * `<parameter name>.original` containing the original parameter values 3712 * before the query. 3713 * </pre> 3714 * 3715 * <code>repeated .google.cloud.dialogflow.v2.Context output_contexts = 10;</code> 3716 */ 3717 public java.util.List<? extends com.google.cloud.dialogflow.v2.ContextOrBuilder> getOutputContextsOrBuilderList()3718 getOutputContextsOrBuilderList() { 3719 if (outputContextsBuilder_ != null) { 3720 return outputContextsBuilder_.getMessageOrBuilderList(); 3721 } else { 3722 return java.util.Collections.unmodifiableList(outputContexts_); 3723 } 3724 } 3725 /** 3726 * 3727 * 3728 * <pre> 3729 * The collection of output contexts. If applicable, 3730 * `output_contexts.parameters` contains entries with name 3731 * `<parameter name>.original` containing the original parameter values 3732 * before the query. 3733 * </pre> 3734 * 3735 * <code>repeated .google.cloud.dialogflow.v2.Context output_contexts = 10;</code> 3736 */ addOutputContextsBuilder()3737 public com.google.cloud.dialogflow.v2.Context.Builder addOutputContextsBuilder() { 3738 return getOutputContextsFieldBuilder() 3739 .addBuilder(com.google.cloud.dialogflow.v2.Context.getDefaultInstance()); 3740 } 3741 /** 3742 * 3743 * 3744 * <pre> 3745 * The collection of output contexts. If applicable, 3746 * `output_contexts.parameters` contains entries with name 3747 * `<parameter name>.original` containing the original parameter values 3748 * before the query. 3749 * </pre> 3750 * 3751 * <code>repeated .google.cloud.dialogflow.v2.Context output_contexts = 10;</code> 3752 */ addOutputContextsBuilder(int index)3753 public com.google.cloud.dialogflow.v2.Context.Builder addOutputContextsBuilder(int index) { 3754 return getOutputContextsFieldBuilder() 3755 .addBuilder(index, com.google.cloud.dialogflow.v2.Context.getDefaultInstance()); 3756 } 3757 /** 3758 * 3759 * 3760 * <pre> 3761 * The collection of output contexts. If applicable, 3762 * `output_contexts.parameters` contains entries with name 3763 * `<parameter name>.original` containing the original parameter values 3764 * before the query. 3765 * </pre> 3766 * 3767 * <code>repeated .google.cloud.dialogflow.v2.Context output_contexts = 10;</code> 3768 */ 3769 public java.util.List<com.google.cloud.dialogflow.v2.Context.Builder> getOutputContextsBuilderList()3770 getOutputContextsBuilderList() { 3771 return getOutputContextsFieldBuilder().getBuilderList(); 3772 } 3773 3774 private com.google.protobuf.RepeatedFieldBuilderV3< 3775 com.google.cloud.dialogflow.v2.Context, 3776 com.google.cloud.dialogflow.v2.Context.Builder, 3777 com.google.cloud.dialogflow.v2.ContextOrBuilder> getOutputContextsFieldBuilder()3778 getOutputContextsFieldBuilder() { 3779 if (outputContextsBuilder_ == null) { 3780 outputContextsBuilder_ = 3781 new com.google.protobuf.RepeatedFieldBuilderV3< 3782 com.google.cloud.dialogflow.v2.Context, 3783 com.google.cloud.dialogflow.v2.Context.Builder, 3784 com.google.cloud.dialogflow.v2.ContextOrBuilder>( 3785 outputContexts_, 3786 ((bitField0_ & 0x00000800) != 0), 3787 getParentForChildren(), 3788 isClean()); 3789 outputContexts_ = null; 3790 } 3791 return outputContextsBuilder_; 3792 } 3793 3794 private com.google.cloud.dialogflow.v2.Intent intent_; 3795 private com.google.protobuf.SingleFieldBuilderV3< 3796 com.google.cloud.dialogflow.v2.Intent, 3797 com.google.cloud.dialogflow.v2.Intent.Builder, 3798 com.google.cloud.dialogflow.v2.IntentOrBuilder> 3799 intentBuilder_; 3800 /** 3801 * 3802 * 3803 * <pre> 3804 * The intent that matched the conversational query. Some, not 3805 * all fields are filled in this message, including but not limited to: 3806 * `name`, `display_name`, `end_interaction` and `is_fallback`. 3807 * </pre> 3808 * 3809 * <code>.google.cloud.dialogflow.v2.Intent intent = 11;</code> 3810 * 3811 * @return Whether the intent field is set. 3812 */ hasIntent()3813 public boolean hasIntent() { 3814 return ((bitField0_ & 0x00001000) != 0); 3815 } 3816 /** 3817 * 3818 * 3819 * <pre> 3820 * The intent that matched the conversational query. Some, not 3821 * all fields are filled in this message, including but not limited to: 3822 * `name`, `display_name`, `end_interaction` and `is_fallback`. 3823 * </pre> 3824 * 3825 * <code>.google.cloud.dialogflow.v2.Intent intent = 11;</code> 3826 * 3827 * @return The intent. 3828 */ getIntent()3829 public com.google.cloud.dialogflow.v2.Intent getIntent() { 3830 if (intentBuilder_ == null) { 3831 return intent_ == null 3832 ? com.google.cloud.dialogflow.v2.Intent.getDefaultInstance() 3833 : intent_; 3834 } else { 3835 return intentBuilder_.getMessage(); 3836 } 3837 } 3838 /** 3839 * 3840 * 3841 * <pre> 3842 * The intent that matched the conversational query. Some, not 3843 * all fields are filled in this message, including but not limited to: 3844 * `name`, `display_name`, `end_interaction` and `is_fallback`. 3845 * </pre> 3846 * 3847 * <code>.google.cloud.dialogflow.v2.Intent intent = 11;</code> 3848 */ setIntent(com.google.cloud.dialogflow.v2.Intent value)3849 public Builder setIntent(com.google.cloud.dialogflow.v2.Intent value) { 3850 if (intentBuilder_ == null) { 3851 if (value == null) { 3852 throw new NullPointerException(); 3853 } 3854 intent_ = value; 3855 } else { 3856 intentBuilder_.setMessage(value); 3857 } 3858 bitField0_ |= 0x00001000; 3859 onChanged(); 3860 return this; 3861 } 3862 /** 3863 * 3864 * 3865 * <pre> 3866 * The intent that matched the conversational query. Some, not 3867 * all fields are filled in this message, including but not limited to: 3868 * `name`, `display_name`, `end_interaction` and `is_fallback`. 3869 * </pre> 3870 * 3871 * <code>.google.cloud.dialogflow.v2.Intent intent = 11;</code> 3872 */ setIntent(com.google.cloud.dialogflow.v2.Intent.Builder builderForValue)3873 public Builder setIntent(com.google.cloud.dialogflow.v2.Intent.Builder builderForValue) { 3874 if (intentBuilder_ == null) { 3875 intent_ = builderForValue.build(); 3876 } else { 3877 intentBuilder_.setMessage(builderForValue.build()); 3878 } 3879 bitField0_ |= 0x00001000; 3880 onChanged(); 3881 return this; 3882 } 3883 /** 3884 * 3885 * 3886 * <pre> 3887 * The intent that matched the conversational query. Some, not 3888 * all fields are filled in this message, including but not limited to: 3889 * `name`, `display_name`, `end_interaction` and `is_fallback`. 3890 * </pre> 3891 * 3892 * <code>.google.cloud.dialogflow.v2.Intent intent = 11;</code> 3893 */ mergeIntent(com.google.cloud.dialogflow.v2.Intent value)3894 public Builder mergeIntent(com.google.cloud.dialogflow.v2.Intent value) { 3895 if (intentBuilder_ == null) { 3896 if (((bitField0_ & 0x00001000) != 0) 3897 && intent_ != null 3898 && intent_ != com.google.cloud.dialogflow.v2.Intent.getDefaultInstance()) { 3899 getIntentBuilder().mergeFrom(value); 3900 } else { 3901 intent_ = value; 3902 } 3903 } else { 3904 intentBuilder_.mergeFrom(value); 3905 } 3906 bitField0_ |= 0x00001000; 3907 onChanged(); 3908 return this; 3909 } 3910 /** 3911 * 3912 * 3913 * <pre> 3914 * The intent that matched the conversational query. Some, not 3915 * all fields are filled in this message, including but not limited to: 3916 * `name`, `display_name`, `end_interaction` and `is_fallback`. 3917 * </pre> 3918 * 3919 * <code>.google.cloud.dialogflow.v2.Intent intent = 11;</code> 3920 */ clearIntent()3921 public Builder clearIntent() { 3922 bitField0_ = (bitField0_ & ~0x00001000); 3923 intent_ = null; 3924 if (intentBuilder_ != null) { 3925 intentBuilder_.dispose(); 3926 intentBuilder_ = null; 3927 } 3928 onChanged(); 3929 return this; 3930 } 3931 /** 3932 * 3933 * 3934 * <pre> 3935 * The intent that matched the conversational query. Some, not 3936 * all fields are filled in this message, including but not limited to: 3937 * `name`, `display_name`, `end_interaction` and `is_fallback`. 3938 * </pre> 3939 * 3940 * <code>.google.cloud.dialogflow.v2.Intent intent = 11;</code> 3941 */ getIntentBuilder()3942 public com.google.cloud.dialogflow.v2.Intent.Builder getIntentBuilder() { 3943 bitField0_ |= 0x00001000; 3944 onChanged(); 3945 return getIntentFieldBuilder().getBuilder(); 3946 } 3947 /** 3948 * 3949 * 3950 * <pre> 3951 * The intent that matched the conversational query. Some, not 3952 * all fields are filled in this message, including but not limited to: 3953 * `name`, `display_name`, `end_interaction` and `is_fallback`. 3954 * </pre> 3955 * 3956 * <code>.google.cloud.dialogflow.v2.Intent intent = 11;</code> 3957 */ getIntentOrBuilder()3958 public com.google.cloud.dialogflow.v2.IntentOrBuilder getIntentOrBuilder() { 3959 if (intentBuilder_ != null) { 3960 return intentBuilder_.getMessageOrBuilder(); 3961 } else { 3962 return intent_ == null 3963 ? com.google.cloud.dialogflow.v2.Intent.getDefaultInstance() 3964 : intent_; 3965 } 3966 } 3967 /** 3968 * 3969 * 3970 * <pre> 3971 * The intent that matched the conversational query. Some, not 3972 * all fields are filled in this message, including but not limited to: 3973 * `name`, `display_name`, `end_interaction` and `is_fallback`. 3974 * </pre> 3975 * 3976 * <code>.google.cloud.dialogflow.v2.Intent intent = 11;</code> 3977 */ 3978 private com.google.protobuf.SingleFieldBuilderV3< 3979 com.google.cloud.dialogflow.v2.Intent, 3980 com.google.cloud.dialogflow.v2.Intent.Builder, 3981 com.google.cloud.dialogflow.v2.IntentOrBuilder> getIntentFieldBuilder()3982 getIntentFieldBuilder() { 3983 if (intentBuilder_ == null) { 3984 intentBuilder_ = 3985 new com.google.protobuf.SingleFieldBuilderV3< 3986 com.google.cloud.dialogflow.v2.Intent, 3987 com.google.cloud.dialogflow.v2.Intent.Builder, 3988 com.google.cloud.dialogflow.v2.IntentOrBuilder>( 3989 getIntent(), getParentForChildren(), isClean()); 3990 intent_ = null; 3991 } 3992 return intentBuilder_; 3993 } 3994 3995 private float intentDetectionConfidence_; 3996 /** 3997 * 3998 * 3999 * <pre> 4000 * The intent detection confidence. Values range from 0.0 4001 * (completely uncertain) to 1.0 (completely certain). 4002 * This value is for informational purpose only and is only used to 4003 * help match the best intent within the classification threshold. 4004 * This value may change for the same end-user expression at any time due to a 4005 * model retraining or change in implementation. 4006 * If there are `multiple knowledge_answers` messages, this value is set to 4007 * the greatest `knowledgeAnswers.match_confidence` value in the list. 4008 * </pre> 4009 * 4010 * <code>float intent_detection_confidence = 12;</code> 4011 * 4012 * @return The intentDetectionConfidence. 4013 */ 4014 @java.lang.Override getIntentDetectionConfidence()4015 public float getIntentDetectionConfidence() { 4016 return intentDetectionConfidence_; 4017 } 4018 /** 4019 * 4020 * 4021 * <pre> 4022 * The intent detection confidence. Values range from 0.0 4023 * (completely uncertain) to 1.0 (completely certain). 4024 * This value is for informational purpose only and is only used to 4025 * help match the best intent within the classification threshold. 4026 * This value may change for the same end-user expression at any time due to a 4027 * model retraining or change in implementation. 4028 * If there are `multiple knowledge_answers` messages, this value is set to 4029 * the greatest `knowledgeAnswers.match_confidence` value in the list. 4030 * </pre> 4031 * 4032 * <code>float intent_detection_confidence = 12;</code> 4033 * 4034 * @param value The intentDetectionConfidence to set. 4035 * @return This builder for chaining. 4036 */ setIntentDetectionConfidence(float value)4037 public Builder setIntentDetectionConfidence(float value) { 4038 4039 intentDetectionConfidence_ = value; 4040 bitField0_ |= 0x00002000; 4041 onChanged(); 4042 return this; 4043 } 4044 /** 4045 * 4046 * 4047 * <pre> 4048 * The intent detection confidence. Values range from 0.0 4049 * (completely uncertain) to 1.0 (completely certain). 4050 * This value is for informational purpose only and is only used to 4051 * help match the best intent within the classification threshold. 4052 * This value may change for the same end-user expression at any time due to a 4053 * model retraining or change in implementation. 4054 * If there are `multiple knowledge_answers` messages, this value is set to 4055 * the greatest `knowledgeAnswers.match_confidence` value in the list. 4056 * </pre> 4057 * 4058 * <code>float intent_detection_confidence = 12;</code> 4059 * 4060 * @return This builder for chaining. 4061 */ clearIntentDetectionConfidence()4062 public Builder clearIntentDetectionConfidence() { 4063 bitField0_ = (bitField0_ & ~0x00002000); 4064 intentDetectionConfidence_ = 0F; 4065 onChanged(); 4066 return this; 4067 } 4068 4069 private com.google.protobuf.Struct diagnosticInfo_; 4070 private com.google.protobuf.SingleFieldBuilderV3< 4071 com.google.protobuf.Struct, 4072 com.google.protobuf.Struct.Builder, 4073 com.google.protobuf.StructOrBuilder> 4074 diagnosticInfoBuilder_; 4075 /** 4076 * 4077 * 4078 * <pre> 4079 * Free-form diagnostic information for the associated detect intent request. 4080 * The fields of this data can change without notice, so you should not write 4081 * code that depends on its structure. 4082 * The data may contain: 4083 * - webhook call latency 4084 * - webhook errors 4085 * </pre> 4086 * 4087 * <code>.google.protobuf.Struct diagnostic_info = 14;</code> 4088 * 4089 * @return Whether the diagnosticInfo field is set. 4090 */ hasDiagnosticInfo()4091 public boolean hasDiagnosticInfo() { 4092 return ((bitField0_ & 0x00004000) != 0); 4093 } 4094 /** 4095 * 4096 * 4097 * <pre> 4098 * Free-form diagnostic information for the associated detect intent request. 4099 * The fields of this data can change without notice, so you should not write 4100 * code that depends on its structure. 4101 * The data may contain: 4102 * - webhook call latency 4103 * - webhook errors 4104 * </pre> 4105 * 4106 * <code>.google.protobuf.Struct diagnostic_info = 14;</code> 4107 * 4108 * @return The diagnosticInfo. 4109 */ getDiagnosticInfo()4110 public com.google.protobuf.Struct getDiagnosticInfo() { 4111 if (diagnosticInfoBuilder_ == null) { 4112 return diagnosticInfo_ == null 4113 ? com.google.protobuf.Struct.getDefaultInstance() 4114 : diagnosticInfo_; 4115 } else { 4116 return diagnosticInfoBuilder_.getMessage(); 4117 } 4118 } 4119 /** 4120 * 4121 * 4122 * <pre> 4123 * Free-form diagnostic information for the associated detect intent request. 4124 * The fields of this data can change without notice, so you should not write 4125 * code that depends on its structure. 4126 * The data may contain: 4127 * - webhook call latency 4128 * - webhook errors 4129 * </pre> 4130 * 4131 * <code>.google.protobuf.Struct diagnostic_info = 14;</code> 4132 */ setDiagnosticInfo(com.google.protobuf.Struct value)4133 public Builder setDiagnosticInfo(com.google.protobuf.Struct value) { 4134 if (diagnosticInfoBuilder_ == null) { 4135 if (value == null) { 4136 throw new NullPointerException(); 4137 } 4138 diagnosticInfo_ = value; 4139 } else { 4140 diagnosticInfoBuilder_.setMessage(value); 4141 } 4142 bitField0_ |= 0x00004000; 4143 onChanged(); 4144 return this; 4145 } 4146 /** 4147 * 4148 * 4149 * <pre> 4150 * Free-form diagnostic information for the associated detect intent request. 4151 * The fields of this data can change without notice, so you should not write 4152 * code that depends on its structure. 4153 * The data may contain: 4154 * - webhook call latency 4155 * - webhook errors 4156 * </pre> 4157 * 4158 * <code>.google.protobuf.Struct diagnostic_info = 14;</code> 4159 */ setDiagnosticInfo(com.google.protobuf.Struct.Builder builderForValue)4160 public Builder setDiagnosticInfo(com.google.protobuf.Struct.Builder builderForValue) { 4161 if (diagnosticInfoBuilder_ == null) { 4162 diagnosticInfo_ = builderForValue.build(); 4163 } else { 4164 diagnosticInfoBuilder_.setMessage(builderForValue.build()); 4165 } 4166 bitField0_ |= 0x00004000; 4167 onChanged(); 4168 return this; 4169 } 4170 /** 4171 * 4172 * 4173 * <pre> 4174 * Free-form diagnostic information for the associated detect intent request. 4175 * The fields of this data can change without notice, so you should not write 4176 * code that depends on its structure. 4177 * The data may contain: 4178 * - webhook call latency 4179 * - webhook errors 4180 * </pre> 4181 * 4182 * <code>.google.protobuf.Struct diagnostic_info = 14;</code> 4183 */ mergeDiagnosticInfo(com.google.protobuf.Struct value)4184 public Builder mergeDiagnosticInfo(com.google.protobuf.Struct value) { 4185 if (diagnosticInfoBuilder_ == null) { 4186 if (((bitField0_ & 0x00004000) != 0) 4187 && diagnosticInfo_ != null 4188 && diagnosticInfo_ != com.google.protobuf.Struct.getDefaultInstance()) { 4189 getDiagnosticInfoBuilder().mergeFrom(value); 4190 } else { 4191 diagnosticInfo_ = value; 4192 } 4193 } else { 4194 diagnosticInfoBuilder_.mergeFrom(value); 4195 } 4196 bitField0_ |= 0x00004000; 4197 onChanged(); 4198 return this; 4199 } 4200 /** 4201 * 4202 * 4203 * <pre> 4204 * Free-form diagnostic information for the associated detect intent request. 4205 * The fields of this data can change without notice, so you should not write 4206 * code that depends on its structure. 4207 * The data may contain: 4208 * - webhook call latency 4209 * - webhook errors 4210 * </pre> 4211 * 4212 * <code>.google.protobuf.Struct diagnostic_info = 14;</code> 4213 */ clearDiagnosticInfo()4214 public Builder clearDiagnosticInfo() { 4215 bitField0_ = (bitField0_ & ~0x00004000); 4216 diagnosticInfo_ = null; 4217 if (diagnosticInfoBuilder_ != null) { 4218 diagnosticInfoBuilder_.dispose(); 4219 diagnosticInfoBuilder_ = null; 4220 } 4221 onChanged(); 4222 return this; 4223 } 4224 /** 4225 * 4226 * 4227 * <pre> 4228 * Free-form diagnostic information for the associated detect intent request. 4229 * The fields of this data can change without notice, so you should not write 4230 * code that depends on its structure. 4231 * The data may contain: 4232 * - webhook call latency 4233 * - webhook errors 4234 * </pre> 4235 * 4236 * <code>.google.protobuf.Struct diagnostic_info = 14;</code> 4237 */ getDiagnosticInfoBuilder()4238 public com.google.protobuf.Struct.Builder getDiagnosticInfoBuilder() { 4239 bitField0_ |= 0x00004000; 4240 onChanged(); 4241 return getDiagnosticInfoFieldBuilder().getBuilder(); 4242 } 4243 /** 4244 * 4245 * 4246 * <pre> 4247 * Free-form diagnostic information for the associated detect intent request. 4248 * The fields of this data can change without notice, so you should not write 4249 * code that depends on its structure. 4250 * The data may contain: 4251 * - webhook call latency 4252 * - webhook errors 4253 * </pre> 4254 * 4255 * <code>.google.protobuf.Struct diagnostic_info = 14;</code> 4256 */ getDiagnosticInfoOrBuilder()4257 public com.google.protobuf.StructOrBuilder getDiagnosticInfoOrBuilder() { 4258 if (diagnosticInfoBuilder_ != null) { 4259 return diagnosticInfoBuilder_.getMessageOrBuilder(); 4260 } else { 4261 return diagnosticInfo_ == null 4262 ? com.google.protobuf.Struct.getDefaultInstance() 4263 : diagnosticInfo_; 4264 } 4265 } 4266 /** 4267 * 4268 * 4269 * <pre> 4270 * Free-form diagnostic information for the associated detect intent request. 4271 * The fields of this data can change without notice, so you should not write 4272 * code that depends on its structure. 4273 * The data may contain: 4274 * - webhook call latency 4275 * - webhook errors 4276 * </pre> 4277 * 4278 * <code>.google.protobuf.Struct diagnostic_info = 14;</code> 4279 */ 4280 private com.google.protobuf.SingleFieldBuilderV3< 4281 com.google.protobuf.Struct, 4282 com.google.protobuf.Struct.Builder, 4283 com.google.protobuf.StructOrBuilder> getDiagnosticInfoFieldBuilder()4284 getDiagnosticInfoFieldBuilder() { 4285 if (diagnosticInfoBuilder_ == null) { 4286 diagnosticInfoBuilder_ = 4287 new com.google.protobuf.SingleFieldBuilderV3< 4288 com.google.protobuf.Struct, 4289 com.google.protobuf.Struct.Builder, 4290 com.google.protobuf.StructOrBuilder>( 4291 getDiagnosticInfo(), getParentForChildren(), isClean()); 4292 diagnosticInfo_ = null; 4293 } 4294 return diagnosticInfoBuilder_; 4295 } 4296 4297 private com.google.cloud.dialogflow.v2.SentimentAnalysisResult sentimentAnalysisResult_; 4298 private com.google.protobuf.SingleFieldBuilderV3< 4299 com.google.cloud.dialogflow.v2.SentimentAnalysisResult, 4300 com.google.cloud.dialogflow.v2.SentimentAnalysisResult.Builder, 4301 com.google.cloud.dialogflow.v2.SentimentAnalysisResultOrBuilder> 4302 sentimentAnalysisResultBuilder_; 4303 /** 4304 * 4305 * 4306 * <pre> 4307 * The sentiment analysis result, which depends on the 4308 * `sentiment_analysis_request_config` specified in the request. 4309 * </pre> 4310 * 4311 * <code>.google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis_result = 17; 4312 * </code> 4313 * 4314 * @return Whether the sentimentAnalysisResult field is set. 4315 */ hasSentimentAnalysisResult()4316 public boolean hasSentimentAnalysisResult() { 4317 return ((bitField0_ & 0x00008000) != 0); 4318 } 4319 /** 4320 * 4321 * 4322 * <pre> 4323 * The sentiment analysis result, which depends on the 4324 * `sentiment_analysis_request_config` specified in the request. 4325 * </pre> 4326 * 4327 * <code>.google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis_result = 17; 4328 * </code> 4329 * 4330 * @return The sentimentAnalysisResult. 4331 */ getSentimentAnalysisResult()4332 public com.google.cloud.dialogflow.v2.SentimentAnalysisResult getSentimentAnalysisResult() { 4333 if (sentimentAnalysisResultBuilder_ == null) { 4334 return sentimentAnalysisResult_ == null 4335 ? com.google.cloud.dialogflow.v2.SentimentAnalysisResult.getDefaultInstance() 4336 : sentimentAnalysisResult_; 4337 } else { 4338 return sentimentAnalysisResultBuilder_.getMessage(); 4339 } 4340 } 4341 /** 4342 * 4343 * 4344 * <pre> 4345 * The sentiment analysis result, which depends on the 4346 * `sentiment_analysis_request_config` specified in the request. 4347 * </pre> 4348 * 4349 * <code>.google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis_result = 17; 4350 * </code> 4351 */ setSentimentAnalysisResult( com.google.cloud.dialogflow.v2.SentimentAnalysisResult value)4352 public Builder setSentimentAnalysisResult( 4353 com.google.cloud.dialogflow.v2.SentimentAnalysisResult value) { 4354 if (sentimentAnalysisResultBuilder_ == null) { 4355 if (value == null) { 4356 throw new NullPointerException(); 4357 } 4358 sentimentAnalysisResult_ = value; 4359 } else { 4360 sentimentAnalysisResultBuilder_.setMessage(value); 4361 } 4362 bitField0_ |= 0x00008000; 4363 onChanged(); 4364 return this; 4365 } 4366 /** 4367 * 4368 * 4369 * <pre> 4370 * The sentiment analysis result, which depends on the 4371 * `sentiment_analysis_request_config` specified in the request. 4372 * </pre> 4373 * 4374 * <code>.google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis_result = 17; 4375 * </code> 4376 */ setSentimentAnalysisResult( com.google.cloud.dialogflow.v2.SentimentAnalysisResult.Builder builderForValue)4377 public Builder setSentimentAnalysisResult( 4378 com.google.cloud.dialogflow.v2.SentimentAnalysisResult.Builder builderForValue) { 4379 if (sentimentAnalysisResultBuilder_ == null) { 4380 sentimentAnalysisResult_ = builderForValue.build(); 4381 } else { 4382 sentimentAnalysisResultBuilder_.setMessage(builderForValue.build()); 4383 } 4384 bitField0_ |= 0x00008000; 4385 onChanged(); 4386 return this; 4387 } 4388 /** 4389 * 4390 * 4391 * <pre> 4392 * The sentiment analysis result, which depends on the 4393 * `sentiment_analysis_request_config` specified in the request. 4394 * </pre> 4395 * 4396 * <code>.google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis_result = 17; 4397 * </code> 4398 */ mergeSentimentAnalysisResult( com.google.cloud.dialogflow.v2.SentimentAnalysisResult value)4399 public Builder mergeSentimentAnalysisResult( 4400 com.google.cloud.dialogflow.v2.SentimentAnalysisResult value) { 4401 if (sentimentAnalysisResultBuilder_ == null) { 4402 if (((bitField0_ & 0x00008000) != 0) 4403 && sentimentAnalysisResult_ != null 4404 && sentimentAnalysisResult_ 4405 != com.google.cloud.dialogflow.v2.SentimentAnalysisResult.getDefaultInstance()) { 4406 getSentimentAnalysisResultBuilder().mergeFrom(value); 4407 } else { 4408 sentimentAnalysisResult_ = value; 4409 } 4410 } else { 4411 sentimentAnalysisResultBuilder_.mergeFrom(value); 4412 } 4413 bitField0_ |= 0x00008000; 4414 onChanged(); 4415 return this; 4416 } 4417 /** 4418 * 4419 * 4420 * <pre> 4421 * The sentiment analysis result, which depends on the 4422 * `sentiment_analysis_request_config` specified in the request. 4423 * </pre> 4424 * 4425 * <code>.google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis_result = 17; 4426 * </code> 4427 */ clearSentimentAnalysisResult()4428 public Builder clearSentimentAnalysisResult() { 4429 bitField0_ = (bitField0_ & ~0x00008000); 4430 sentimentAnalysisResult_ = null; 4431 if (sentimentAnalysisResultBuilder_ != null) { 4432 sentimentAnalysisResultBuilder_.dispose(); 4433 sentimentAnalysisResultBuilder_ = null; 4434 } 4435 onChanged(); 4436 return this; 4437 } 4438 /** 4439 * 4440 * 4441 * <pre> 4442 * The sentiment analysis result, which depends on the 4443 * `sentiment_analysis_request_config` specified in the request. 4444 * </pre> 4445 * 4446 * <code>.google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis_result = 17; 4447 * </code> 4448 */ 4449 public com.google.cloud.dialogflow.v2.SentimentAnalysisResult.Builder getSentimentAnalysisResultBuilder()4450 getSentimentAnalysisResultBuilder() { 4451 bitField0_ |= 0x00008000; 4452 onChanged(); 4453 return getSentimentAnalysisResultFieldBuilder().getBuilder(); 4454 } 4455 /** 4456 * 4457 * 4458 * <pre> 4459 * The sentiment analysis result, which depends on the 4460 * `sentiment_analysis_request_config` specified in the request. 4461 * </pre> 4462 * 4463 * <code>.google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis_result = 17; 4464 * </code> 4465 */ 4466 public com.google.cloud.dialogflow.v2.SentimentAnalysisResultOrBuilder getSentimentAnalysisResultOrBuilder()4467 getSentimentAnalysisResultOrBuilder() { 4468 if (sentimentAnalysisResultBuilder_ != null) { 4469 return sentimentAnalysisResultBuilder_.getMessageOrBuilder(); 4470 } else { 4471 return sentimentAnalysisResult_ == null 4472 ? com.google.cloud.dialogflow.v2.SentimentAnalysisResult.getDefaultInstance() 4473 : sentimentAnalysisResult_; 4474 } 4475 } 4476 /** 4477 * 4478 * 4479 * <pre> 4480 * The sentiment analysis result, which depends on the 4481 * `sentiment_analysis_request_config` specified in the request. 4482 * </pre> 4483 * 4484 * <code>.google.cloud.dialogflow.v2.SentimentAnalysisResult sentiment_analysis_result = 17; 4485 * </code> 4486 */ 4487 private com.google.protobuf.SingleFieldBuilderV3< 4488 com.google.cloud.dialogflow.v2.SentimentAnalysisResult, 4489 com.google.cloud.dialogflow.v2.SentimentAnalysisResult.Builder, 4490 com.google.cloud.dialogflow.v2.SentimentAnalysisResultOrBuilder> getSentimentAnalysisResultFieldBuilder()4491 getSentimentAnalysisResultFieldBuilder() { 4492 if (sentimentAnalysisResultBuilder_ == null) { 4493 sentimentAnalysisResultBuilder_ = 4494 new com.google.protobuf.SingleFieldBuilderV3< 4495 com.google.cloud.dialogflow.v2.SentimentAnalysisResult, 4496 com.google.cloud.dialogflow.v2.SentimentAnalysisResult.Builder, 4497 com.google.cloud.dialogflow.v2.SentimentAnalysisResultOrBuilder>( 4498 getSentimentAnalysisResult(), getParentForChildren(), isClean()); 4499 sentimentAnalysisResult_ = null; 4500 } 4501 return sentimentAnalysisResultBuilder_; 4502 } 4503 4504 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)4505 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 4506 return super.setUnknownFields(unknownFields); 4507 } 4508 4509 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)4510 public final Builder mergeUnknownFields( 4511 final com.google.protobuf.UnknownFieldSet unknownFields) { 4512 return super.mergeUnknownFields(unknownFields); 4513 } 4514 4515 // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.QueryResult) 4516 } 4517 4518 // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.QueryResult) 4519 private static final com.google.cloud.dialogflow.v2.QueryResult DEFAULT_INSTANCE; 4520 4521 static { 4522 DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.QueryResult(); 4523 } 4524 getDefaultInstance()4525 public static com.google.cloud.dialogflow.v2.QueryResult getDefaultInstance() { 4526 return DEFAULT_INSTANCE; 4527 } 4528 4529 private static final com.google.protobuf.Parser<QueryResult> PARSER = 4530 new com.google.protobuf.AbstractParser<QueryResult>() { 4531 @java.lang.Override 4532 public QueryResult parsePartialFrom( 4533 com.google.protobuf.CodedInputStream input, 4534 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4535 throws com.google.protobuf.InvalidProtocolBufferException { 4536 Builder builder = newBuilder(); 4537 try { 4538 builder.mergeFrom(input, extensionRegistry); 4539 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 4540 throw e.setUnfinishedMessage(builder.buildPartial()); 4541 } catch (com.google.protobuf.UninitializedMessageException e) { 4542 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 4543 } catch (java.io.IOException e) { 4544 throw new com.google.protobuf.InvalidProtocolBufferException(e) 4545 .setUnfinishedMessage(builder.buildPartial()); 4546 } 4547 return builder.buildPartial(); 4548 } 4549 }; 4550 parser()4551 public static com.google.protobuf.Parser<QueryResult> parser() { 4552 return PARSER; 4553 } 4554 4555 @java.lang.Override getParserForType()4556 public com.google.protobuf.Parser<QueryResult> getParserForType() { 4557 return PARSER; 4558 } 4559 4560 @java.lang.Override getDefaultInstanceForType()4561 public com.google.cloud.dialogflow.v2.QueryResult getDefaultInstanceForType() { 4562 return DEFAULT_INSTANCE; 4563 } 4564 } 4565