1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/cloud/dialogflow/cx/v3/session.proto 18 19 package com.google.cloud.dialogflow.cx.v3; 20 21 /** 22 * 23 * 24 * <pre> 25 * Represents one match result of [MatchIntent][]. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.dialogflow.cx.v3.Match} 29 */ 30 public final class Match extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.Match) 33 MatchOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use Match.newBuilder() to construct. Match(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private Match(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 Match()40 private Match() { 41 event_ = ""; 42 resolvedInput_ = ""; 43 matchType_ = 0; 44 } 45 46 @java.lang.Override 47 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)48 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 49 return new Match(); 50 } 51 52 @java.lang.Override getUnknownFields()53 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 54 return this.unknownFields; 55 } 56 getDescriptor()57 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 58 return com.google.cloud.dialogflow.cx.v3.SessionProto 59 .internal_static_google_cloud_dialogflow_cx_v3_Match_descriptor; 60 } 61 62 @java.lang.Override 63 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()64 internalGetFieldAccessorTable() { 65 return com.google.cloud.dialogflow.cx.v3.SessionProto 66 .internal_static_google_cloud_dialogflow_cx_v3_Match_fieldAccessorTable 67 .ensureFieldAccessorsInitialized( 68 com.google.cloud.dialogflow.cx.v3.Match.class, 69 com.google.cloud.dialogflow.cx.v3.Match.Builder.class); 70 } 71 72 /** 73 * 74 * 75 * <pre> 76 * Type of a Match. 77 * </pre> 78 * 79 * Protobuf enum {@code google.cloud.dialogflow.cx.v3.Match.MatchType} 80 */ 81 public enum MatchType implements com.google.protobuf.ProtocolMessageEnum { 82 /** 83 * 84 * 85 * <pre> 86 * Not specified. Should never be used. 87 * </pre> 88 * 89 * <code>MATCH_TYPE_UNSPECIFIED = 0;</code> 90 */ 91 MATCH_TYPE_UNSPECIFIED(0), 92 /** 93 * 94 * 95 * <pre> 96 * The query was matched to an intent. 97 * </pre> 98 * 99 * <code>INTENT = 1;</code> 100 */ 101 INTENT(1), 102 /** 103 * 104 * 105 * <pre> 106 * The query directly triggered an intent. 107 * </pre> 108 * 109 * <code>DIRECT_INTENT = 2;</code> 110 */ 111 DIRECT_INTENT(2), 112 /** 113 * 114 * 115 * <pre> 116 * The query was used for parameter filling. 117 * </pre> 118 * 119 * <code>PARAMETER_FILLING = 3;</code> 120 */ 121 PARAMETER_FILLING(3), 122 /** 123 * 124 * 125 * <pre> 126 * No match was found for the query. 127 * </pre> 128 * 129 * <code>NO_MATCH = 4;</code> 130 */ 131 NO_MATCH(4), 132 /** 133 * 134 * 135 * <pre> 136 * Indicates an empty query. 137 * </pre> 138 * 139 * <code>NO_INPUT = 5;</code> 140 */ 141 NO_INPUT(5), 142 /** 143 * 144 * 145 * <pre> 146 * The query directly triggered an event. 147 * </pre> 148 * 149 * <code>EVENT = 6;</code> 150 */ 151 EVENT(6), 152 UNRECOGNIZED(-1), 153 ; 154 155 /** 156 * 157 * 158 * <pre> 159 * Not specified. Should never be used. 160 * </pre> 161 * 162 * <code>MATCH_TYPE_UNSPECIFIED = 0;</code> 163 */ 164 public static final int MATCH_TYPE_UNSPECIFIED_VALUE = 0; 165 /** 166 * 167 * 168 * <pre> 169 * The query was matched to an intent. 170 * </pre> 171 * 172 * <code>INTENT = 1;</code> 173 */ 174 public static final int INTENT_VALUE = 1; 175 /** 176 * 177 * 178 * <pre> 179 * The query directly triggered an intent. 180 * </pre> 181 * 182 * <code>DIRECT_INTENT = 2;</code> 183 */ 184 public static final int DIRECT_INTENT_VALUE = 2; 185 /** 186 * 187 * 188 * <pre> 189 * The query was used for parameter filling. 190 * </pre> 191 * 192 * <code>PARAMETER_FILLING = 3;</code> 193 */ 194 public static final int PARAMETER_FILLING_VALUE = 3; 195 /** 196 * 197 * 198 * <pre> 199 * No match was found for the query. 200 * </pre> 201 * 202 * <code>NO_MATCH = 4;</code> 203 */ 204 public static final int NO_MATCH_VALUE = 4; 205 /** 206 * 207 * 208 * <pre> 209 * Indicates an empty query. 210 * </pre> 211 * 212 * <code>NO_INPUT = 5;</code> 213 */ 214 public static final int NO_INPUT_VALUE = 5; 215 /** 216 * 217 * 218 * <pre> 219 * The query directly triggered an event. 220 * </pre> 221 * 222 * <code>EVENT = 6;</code> 223 */ 224 public static final int EVENT_VALUE = 6; 225 getNumber()226 public final int getNumber() { 227 if (this == UNRECOGNIZED) { 228 throw new java.lang.IllegalArgumentException( 229 "Can't get the number of an unknown enum value."); 230 } 231 return value; 232 } 233 234 /** 235 * @param value The numeric wire value of the corresponding enum entry. 236 * @return The enum associated with the given numeric wire value. 237 * @deprecated Use {@link #forNumber(int)} instead. 238 */ 239 @java.lang.Deprecated valueOf(int value)240 public static MatchType valueOf(int value) { 241 return forNumber(value); 242 } 243 244 /** 245 * @param value The numeric wire value of the corresponding enum entry. 246 * @return The enum associated with the given numeric wire value. 247 */ forNumber(int value)248 public static MatchType forNumber(int value) { 249 switch (value) { 250 case 0: 251 return MATCH_TYPE_UNSPECIFIED; 252 case 1: 253 return INTENT; 254 case 2: 255 return DIRECT_INTENT; 256 case 3: 257 return PARAMETER_FILLING; 258 case 4: 259 return NO_MATCH; 260 case 5: 261 return NO_INPUT; 262 case 6: 263 return EVENT; 264 default: 265 return null; 266 } 267 } 268 internalGetValueMap()269 public static com.google.protobuf.Internal.EnumLiteMap<MatchType> internalGetValueMap() { 270 return internalValueMap; 271 } 272 273 private static final com.google.protobuf.Internal.EnumLiteMap<MatchType> internalValueMap = 274 new com.google.protobuf.Internal.EnumLiteMap<MatchType>() { 275 public MatchType findValueByNumber(int number) { 276 return MatchType.forNumber(number); 277 } 278 }; 279 getValueDescriptor()280 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 281 if (this == UNRECOGNIZED) { 282 throw new java.lang.IllegalStateException( 283 "Can't get the descriptor of an unrecognized enum value."); 284 } 285 return getDescriptor().getValues().get(ordinal()); 286 } 287 getDescriptorForType()288 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 289 return getDescriptor(); 290 } 291 getDescriptor()292 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 293 return com.google.cloud.dialogflow.cx.v3.Match.getDescriptor().getEnumTypes().get(0); 294 } 295 296 private static final MatchType[] VALUES = values(); 297 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)298 public static MatchType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 299 if (desc.getType() != getDescriptor()) { 300 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 301 } 302 if (desc.getIndex() == -1) { 303 return UNRECOGNIZED; 304 } 305 return VALUES[desc.getIndex()]; 306 } 307 308 private final int value; 309 MatchType(int value)310 private MatchType(int value) { 311 this.value = value; 312 } 313 314 // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.Match.MatchType) 315 } 316 317 public static final int INTENT_FIELD_NUMBER = 1; 318 private com.google.cloud.dialogflow.cx.v3.Intent intent_; 319 /** 320 * 321 * 322 * <pre> 323 * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the query. 324 * Some, not all fields are filled in this message, including but not limited 325 * to: `name` and `display_name`. Only filled for 326 * [`INTENT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match type. 327 * </pre> 328 * 329 * <code>.google.cloud.dialogflow.cx.v3.Intent intent = 1;</code> 330 * 331 * @return Whether the intent field is set. 332 */ 333 @java.lang.Override hasIntent()334 public boolean hasIntent() { 335 return intent_ != null; 336 } 337 /** 338 * 339 * 340 * <pre> 341 * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the query. 342 * Some, not all fields are filled in this message, including but not limited 343 * to: `name` and `display_name`. Only filled for 344 * [`INTENT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match type. 345 * </pre> 346 * 347 * <code>.google.cloud.dialogflow.cx.v3.Intent intent = 1;</code> 348 * 349 * @return The intent. 350 */ 351 @java.lang.Override getIntent()352 public com.google.cloud.dialogflow.cx.v3.Intent getIntent() { 353 return intent_ == null 354 ? com.google.cloud.dialogflow.cx.v3.Intent.getDefaultInstance() 355 : intent_; 356 } 357 /** 358 * 359 * 360 * <pre> 361 * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the query. 362 * Some, not all fields are filled in this message, including but not limited 363 * to: `name` and `display_name`. Only filled for 364 * [`INTENT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match type. 365 * </pre> 366 * 367 * <code>.google.cloud.dialogflow.cx.v3.Intent intent = 1;</code> 368 */ 369 @java.lang.Override getIntentOrBuilder()370 public com.google.cloud.dialogflow.cx.v3.IntentOrBuilder getIntentOrBuilder() { 371 return intent_ == null 372 ? com.google.cloud.dialogflow.cx.v3.Intent.getDefaultInstance() 373 : intent_; 374 } 375 376 public static final int EVENT_FIELD_NUMBER = 6; 377 378 @SuppressWarnings("serial") 379 private volatile java.lang.Object event_ = ""; 380 /** 381 * 382 * 383 * <pre> 384 * The event that matched the query. Filled for 385 * [`EVENT`][google.cloud.dialogflow.cx.v3.Match.MatchType], 386 * [`NO_MATCH`][google.cloud.dialogflow.cx.v3.Match.MatchType] and 387 * [`NO_INPUT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match types. 388 * </pre> 389 * 390 * <code>string event = 6;</code> 391 * 392 * @return The event. 393 */ 394 @java.lang.Override getEvent()395 public java.lang.String getEvent() { 396 java.lang.Object ref = event_; 397 if (ref instanceof java.lang.String) { 398 return (java.lang.String) ref; 399 } else { 400 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 401 java.lang.String s = bs.toStringUtf8(); 402 event_ = s; 403 return s; 404 } 405 } 406 /** 407 * 408 * 409 * <pre> 410 * The event that matched the query. Filled for 411 * [`EVENT`][google.cloud.dialogflow.cx.v3.Match.MatchType], 412 * [`NO_MATCH`][google.cloud.dialogflow.cx.v3.Match.MatchType] and 413 * [`NO_INPUT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match types. 414 * </pre> 415 * 416 * <code>string event = 6;</code> 417 * 418 * @return The bytes for event. 419 */ 420 @java.lang.Override getEventBytes()421 public com.google.protobuf.ByteString getEventBytes() { 422 java.lang.Object ref = event_; 423 if (ref instanceof java.lang.String) { 424 com.google.protobuf.ByteString b = 425 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 426 event_ = b; 427 return b; 428 } else { 429 return (com.google.protobuf.ByteString) ref; 430 } 431 } 432 433 public static final int PARAMETERS_FIELD_NUMBER = 2; 434 private com.google.protobuf.Struct parameters_; 435 /** 436 * 437 * 438 * <pre> 439 * The collection of parameters extracted from the query. 440 * Depending on your protocol or client library language, this is a 441 * map, associative array, symbol table, dictionary, or JSON object 442 * composed of a collection of (MapKey, MapValue) pairs: 443 * * MapKey type: string 444 * * MapKey value: parameter name 445 * * MapValue type: If parameter's entity type is a composite entity then use 446 * map, otherwise, depending on the parameter value type, it could be one of 447 * string, number, boolean, null, list or map. 448 * * MapValue value: If parameter's entity type is a composite entity then use 449 * map from composite entity property names to property values, otherwise, 450 * use parameter value. 451 * </pre> 452 * 453 * <code>.google.protobuf.Struct parameters = 2;</code> 454 * 455 * @return Whether the parameters field is set. 456 */ 457 @java.lang.Override hasParameters()458 public boolean hasParameters() { 459 return parameters_ != null; 460 } 461 /** 462 * 463 * 464 * <pre> 465 * The collection of parameters extracted from the query. 466 * Depending on your protocol or client library language, this is a 467 * map, associative array, symbol table, dictionary, or JSON object 468 * composed of a collection of (MapKey, MapValue) pairs: 469 * * MapKey type: string 470 * * MapKey value: parameter name 471 * * MapValue type: If parameter's entity type is a composite entity then use 472 * map, otherwise, depending on the parameter value type, it could be one of 473 * string, number, boolean, null, list or map. 474 * * MapValue value: If parameter's entity type is a composite entity then use 475 * map from composite entity property names to property values, otherwise, 476 * use parameter value. 477 * </pre> 478 * 479 * <code>.google.protobuf.Struct parameters = 2;</code> 480 * 481 * @return The parameters. 482 */ 483 @java.lang.Override getParameters()484 public com.google.protobuf.Struct getParameters() { 485 return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; 486 } 487 /** 488 * 489 * 490 * <pre> 491 * The collection of parameters extracted from the query. 492 * Depending on your protocol or client library language, this is a 493 * map, associative array, symbol table, dictionary, or JSON object 494 * composed of a collection of (MapKey, MapValue) pairs: 495 * * MapKey type: string 496 * * MapKey value: parameter name 497 * * MapValue type: If parameter's entity type is a composite entity then use 498 * map, otherwise, depending on the parameter value type, it could be one of 499 * string, number, boolean, null, list or map. 500 * * MapValue value: If parameter's entity type is a composite entity then use 501 * map from composite entity property names to property values, otherwise, 502 * use parameter value. 503 * </pre> 504 * 505 * <code>.google.protobuf.Struct parameters = 2;</code> 506 */ 507 @java.lang.Override getParametersOrBuilder()508 public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { 509 return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; 510 } 511 512 public static final int RESOLVED_INPUT_FIELD_NUMBER = 3; 513 514 @SuppressWarnings("serial") 515 private volatile java.lang.Object resolvedInput_ = ""; 516 /** 517 * 518 * 519 * <pre> 520 * Final text input which was matched during MatchIntent. This value can be 521 * different from original input sent in request because of spelling 522 * correction or other processing. 523 * </pre> 524 * 525 * <code>string resolved_input = 3;</code> 526 * 527 * @return The resolvedInput. 528 */ 529 @java.lang.Override getResolvedInput()530 public java.lang.String getResolvedInput() { 531 java.lang.Object ref = resolvedInput_; 532 if (ref instanceof java.lang.String) { 533 return (java.lang.String) ref; 534 } else { 535 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 536 java.lang.String s = bs.toStringUtf8(); 537 resolvedInput_ = s; 538 return s; 539 } 540 } 541 /** 542 * 543 * 544 * <pre> 545 * Final text input which was matched during MatchIntent. This value can be 546 * different from original input sent in request because of spelling 547 * correction or other processing. 548 * </pre> 549 * 550 * <code>string resolved_input = 3;</code> 551 * 552 * @return The bytes for resolvedInput. 553 */ 554 @java.lang.Override getResolvedInputBytes()555 public com.google.protobuf.ByteString getResolvedInputBytes() { 556 java.lang.Object ref = resolvedInput_; 557 if (ref instanceof java.lang.String) { 558 com.google.protobuf.ByteString b = 559 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 560 resolvedInput_ = b; 561 return b; 562 } else { 563 return (com.google.protobuf.ByteString) ref; 564 } 565 } 566 567 public static final int MATCH_TYPE_FIELD_NUMBER = 4; 568 private int matchType_ = 0; 569 /** 570 * 571 * 572 * <pre> 573 * Type of this [Match][google.cloud.dialogflow.cx.v3.Match]. 574 * </pre> 575 * 576 * <code>.google.cloud.dialogflow.cx.v3.Match.MatchType match_type = 4;</code> 577 * 578 * @return The enum numeric value on the wire for matchType. 579 */ 580 @java.lang.Override getMatchTypeValue()581 public int getMatchTypeValue() { 582 return matchType_; 583 } 584 /** 585 * 586 * 587 * <pre> 588 * Type of this [Match][google.cloud.dialogflow.cx.v3.Match]. 589 * </pre> 590 * 591 * <code>.google.cloud.dialogflow.cx.v3.Match.MatchType match_type = 4;</code> 592 * 593 * @return The matchType. 594 */ 595 @java.lang.Override getMatchType()596 public com.google.cloud.dialogflow.cx.v3.Match.MatchType getMatchType() { 597 com.google.cloud.dialogflow.cx.v3.Match.MatchType result = 598 com.google.cloud.dialogflow.cx.v3.Match.MatchType.forNumber(matchType_); 599 return result == null ? com.google.cloud.dialogflow.cx.v3.Match.MatchType.UNRECOGNIZED : result; 600 } 601 602 public static final int CONFIDENCE_FIELD_NUMBER = 5; 603 private float confidence_ = 0F; 604 /** 605 * 606 * 607 * <pre> 608 * The confidence of this match. Values range from 0.0 (completely uncertain) 609 * to 1.0 (completely certain). 610 * This value is for informational purpose only and is only used to help match 611 * the best intent within the classification threshold. This value may change 612 * for the same end-user expression at any time due to a model retraining or 613 * change in implementation. 614 * </pre> 615 * 616 * <code>float confidence = 5;</code> 617 * 618 * @return The confidence. 619 */ 620 @java.lang.Override getConfidence()621 public float getConfidence() { 622 return confidence_; 623 } 624 625 private byte memoizedIsInitialized = -1; 626 627 @java.lang.Override isInitialized()628 public final boolean isInitialized() { 629 byte isInitialized = memoizedIsInitialized; 630 if (isInitialized == 1) return true; 631 if (isInitialized == 0) return false; 632 633 memoizedIsInitialized = 1; 634 return true; 635 } 636 637 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)638 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 639 if (intent_ != null) { 640 output.writeMessage(1, getIntent()); 641 } 642 if (parameters_ != null) { 643 output.writeMessage(2, getParameters()); 644 } 645 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resolvedInput_)) { 646 com.google.protobuf.GeneratedMessageV3.writeString(output, 3, resolvedInput_); 647 } 648 if (matchType_ 649 != com.google.cloud.dialogflow.cx.v3.Match.MatchType.MATCH_TYPE_UNSPECIFIED.getNumber()) { 650 output.writeEnum(4, matchType_); 651 } 652 if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { 653 output.writeFloat(5, confidence_); 654 } 655 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(event_)) { 656 com.google.protobuf.GeneratedMessageV3.writeString(output, 6, event_); 657 } 658 getUnknownFields().writeTo(output); 659 } 660 661 @java.lang.Override getSerializedSize()662 public int getSerializedSize() { 663 int size = memoizedSize; 664 if (size != -1) return size; 665 666 size = 0; 667 if (intent_ != null) { 668 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getIntent()); 669 } 670 if (parameters_ != null) { 671 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getParameters()); 672 } 673 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resolvedInput_)) { 674 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, resolvedInput_); 675 } 676 if (matchType_ 677 != com.google.cloud.dialogflow.cx.v3.Match.MatchType.MATCH_TYPE_UNSPECIFIED.getNumber()) { 678 size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, matchType_); 679 } 680 if (java.lang.Float.floatToRawIntBits(confidence_) != 0) { 681 size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, confidence_); 682 } 683 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(event_)) { 684 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, event_); 685 } 686 size += getUnknownFields().getSerializedSize(); 687 memoizedSize = size; 688 return size; 689 } 690 691 @java.lang.Override equals(final java.lang.Object obj)692 public boolean equals(final java.lang.Object obj) { 693 if (obj == this) { 694 return true; 695 } 696 if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.Match)) { 697 return super.equals(obj); 698 } 699 com.google.cloud.dialogflow.cx.v3.Match other = (com.google.cloud.dialogflow.cx.v3.Match) obj; 700 701 if (hasIntent() != other.hasIntent()) return false; 702 if (hasIntent()) { 703 if (!getIntent().equals(other.getIntent())) return false; 704 } 705 if (!getEvent().equals(other.getEvent())) return false; 706 if (hasParameters() != other.hasParameters()) return false; 707 if (hasParameters()) { 708 if (!getParameters().equals(other.getParameters())) return false; 709 } 710 if (!getResolvedInput().equals(other.getResolvedInput())) return false; 711 if (matchType_ != other.matchType_) return false; 712 if (java.lang.Float.floatToIntBits(getConfidence()) 713 != java.lang.Float.floatToIntBits(other.getConfidence())) return false; 714 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 715 return true; 716 } 717 718 @java.lang.Override hashCode()719 public int hashCode() { 720 if (memoizedHashCode != 0) { 721 return memoizedHashCode; 722 } 723 int hash = 41; 724 hash = (19 * hash) + getDescriptor().hashCode(); 725 if (hasIntent()) { 726 hash = (37 * hash) + INTENT_FIELD_NUMBER; 727 hash = (53 * hash) + getIntent().hashCode(); 728 } 729 hash = (37 * hash) + EVENT_FIELD_NUMBER; 730 hash = (53 * hash) + getEvent().hashCode(); 731 if (hasParameters()) { 732 hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; 733 hash = (53 * hash) + getParameters().hashCode(); 734 } 735 hash = (37 * hash) + RESOLVED_INPUT_FIELD_NUMBER; 736 hash = (53 * hash) + getResolvedInput().hashCode(); 737 hash = (37 * hash) + MATCH_TYPE_FIELD_NUMBER; 738 hash = (53 * hash) + matchType_; 739 hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER; 740 hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidence()); 741 hash = (29 * hash) + getUnknownFields().hashCode(); 742 memoizedHashCode = hash; 743 return hash; 744 } 745 parseFrom(java.nio.ByteBuffer data)746 public static com.google.cloud.dialogflow.cx.v3.Match parseFrom(java.nio.ByteBuffer data) 747 throws com.google.protobuf.InvalidProtocolBufferException { 748 return PARSER.parseFrom(data); 749 } 750 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)751 public static com.google.cloud.dialogflow.cx.v3.Match parseFrom( 752 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 753 throws com.google.protobuf.InvalidProtocolBufferException { 754 return PARSER.parseFrom(data, extensionRegistry); 755 } 756 parseFrom( com.google.protobuf.ByteString data)757 public static com.google.cloud.dialogflow.cx.v3.Match parseFrom( 758 com.google.protobuf.ByteString data) 759 throws com.google.protobuf.InvalidProtocolBufferException { 760 return PARSER.parseFrom(data); 761 } 762 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)763 public static com.google.cloud.dialogflow.cx.v3.Match parseFrom( 764 com.google.protobuf.ByteString data, 765 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 766 throws com.google.protobuf.InvalidProtocolBufferException { 767 return PARSER.parseFrom(data, extensionRegistry); 768 } 769 parseFrom(byte[] data)770 public static com.google.cloud.dialogflow.cx.v3.Match parseFrom(byte[] data) 771 throws com.google.protobuf.InvalidProtocolBufferException { 772 return PARSER.parseFrom(data); 773 } 774 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)775 public static com.google.cloud.dialogflow.cx.v3.Match parseFrom( 776 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 777 throws com.google.protobuf.InvalidProtocolBufferException { 778 return PARSER.parseFrom(data, extensionRegistry); 779 } 780 parseFrom(java.io.InputStream input)781 public static com.google.cloud.dialogflow.cx.v3.Match parseFrom(java.io.InputStream input) 782 throws java.io.IOException { 783 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 784 } 785 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)786 public static com.google.cloud.dialogflow.cx.v3.Match parseFrom( 787 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 788 throws java.io.IOException { 789 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 790 PARSER, input, extensionRegistry); 791 } 792 parseDelimitedFrom( java.io.InputStream input)793 public static com.google.cloud.dialogflow.cx.v3.Match parseDelimitedFrom( 794 java.io.InputStream input) throws java.io.IOException { 795 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 796 } 797 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)798 public static com.google.cloud.dialogflow.cx.v3.Match parseDelimitedFrom( 799 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 800 throws java.io.IOException { 801 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 802 PARSER, input, extensionRegistry); 803 } 804 parseFrom( com.google.protobuf.CodedInputStream input)805 public static com.google.cloud.dialogflow.cx.v3.Match parseFrom( 806 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 807 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 808 } 809 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)810 public static com.google.cloud.dialogflow.cx.v3.Match parseFrom( 811 com.google.protobuf.CodedInputStream input, 812 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 813 throws java.io.IOException { 814 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 815 PARSER, input, extensionRegistry); 816 } 817 818 @java.lang.Override newBuilderForType()819 public Builder newBuilderForType() { 820 return newBuilder(); 821 } 822 newBuilder()823 public static Builder newBuilder() { 824 return DEFAULT_INSTANCE.toBuilder(); 825 } 826 newBuilder(com.google.cloud.dialogflow.cx.v3.Match prototype)827 public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3.Match prototype) { 828 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 829 } 830 831 @java.lang.Override toBuilder()832 public Builder toBuilder() { 833 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 834 } 835 836 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)837 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 838 Builder builder = new Builder(parent); 839 return builder; 840 } 841 /** 842 * 843 * 844 * <pre> 845 * Represents one match result of [MatchIntent][]. 846 * </pre> 847 * 848 * Protobuf type {@code google.cloud.dialogflow.cx.v3.Match} 849 */ 850 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 851 implements 852 // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.Match) 853 com.google.cloud.dialogflow.cx.v3.MatchOrBuilder { getDescriptor()854 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 855 return com.google.cloud.dialogflow.cx.v3.SessionProto 856 .internal_static_google_cloud_dialogflow_cx_v3_Match_descriptor; 857 } 858 859 @java.lang.Override 860 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()861 internalGetFieldAccessorTable() { 862 return com.google.cloud.dialogflow.cx.v3.SessionProto 863 .internal_static_google_cloud_dialogflow_cx_v3_Match_fieldAccessorTable 864 .ensureFieldAccessorsInitialized( 865 com.google.cloud.dialogflow.cx.v3.Match.class, 866 com.google.cloud.dialogflow.cx.v3.Match.Builder.class); 867 } 868 869 // Construct using com.google.cloud.dialogflow.cx.v3.Match.newBuilder() Builder()870 private Builder() {} 871 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)872 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 873 super(parent); 874 } 875 876 @java.lang.Override clear()877 public Builder clear() { 878 super.clear(); 879 bitField0_ = 0; 880 intent_ = null; 881 if (intentBuilder_ != null) { 882 intentBuilder_.dispose(); 883 intentBuilder_ = null; 884 } 885 event_ = ""; 886 parameters_ = null; 887 if (parametersBuilder_ != null) { 888 parametersBuilder_.dispose(); 889 parametersBuilder_ = null; 890 } 891 resolvedInput_ = ""; 892 matchType_ = 0; 893 confidence_ = 0F; 894 return this; 895 } 896 897 @java.lang.Override getDescriptorForType()898 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 899 return com.google.cloud.dialogflow.cx.v3.SessionProto 900 .internal_static_google_cloud_dialogflow_cx_v3_Match_descriptor; 901 } 902 903 @java.lang.Override getDefaultInstanceForType()904 public com.google.cloud.dialogflow.cx.v3.Match getDefaultInstanceForType() { 905 return com.google.cloud.dialogflow.cx.v3.Match.getDefaultInstance(); 906 } 907 908 @java.lang.Override build()909 public com.google.cloud.dialogflow.cx.v3.Match build() { 910 com.google.cloud.dialogflow.cx.v3.Match result = buildPartial(); 911 if (!result.isInitialized()) { 912 throw newUninitializedMessageException(result); 913 } 914 return result; 915 } 916 917 @java.lang.Override buildPartial()918 public com.google.cloud.dialogflow.cx.v3.Match buildPartial() { 919 com.google.cloud.dialogflow.cx.v3.Match result = 920 new com.google.cloud.dialogflow.cx.v3.Match(this); 921 if (bitField0_ != 0) { 922 buildPartial0(result); 923 } 924 onBuilt(); 925 return result; 926 } 927 buildPartial0(com.google.cloud.dialogflow.cx.v3.Match result)928 private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Match result) { 929 int from_bitField0_ = bitField0_; 930 if (((from_bitField0_ & 0x00000001) != 0)) { 931 result.intent_ = intentBuilder_ == null ? intent_ : intentBuilder_.build(); 932 } 933 if (((from_bitField0_ & 0x00000002) != 0)) { 934 result.event_ = event_; 935 } 936 if (((from_bitField0_ & 0x00000004) != 0)) { 937 result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); 938 } 939 if (((from_bitField0_ & 0x00000008) != 0)) { 940 result.resolvedInput_ = resolvedInput_; 941 } 942 if (((from_bitField0_ & 0x00000010) != 0)) { 943 result.matchType_ = matchType_; 944 } 945 if (((from_bitField0_ & 0x00000020) != 0)) { 946 result.confidence_ = confidence_; 947 } 948 } 949 950 @java.lang.Override clone()951 public Builder clone() { 952 return super.clone(); 953 } 954 955 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)956 public Builder setField( 957 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 958 return super.setField(field, value); 959 } 960 961 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)962 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 963 return super.clearField(field); 964 } 965 966 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)967 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 968 return super.clearOneof(oneof); 969 } 970 971 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)972 public Builder setRepeatedField( 973 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 974 return super.setRepeatedField(field, index, value); 975 } 976 977 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)978 public Builder addRepeatedField( 979 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 980 return super.addRepeatedField(field, value); 981 } 982 983 @java.lang.Override mergeFrom(com.google.protobuf.Message other)984 public Builder mergeFrom(com.google.protobuf.Message other) { 985 if (other instanceof com.google.cloud.dialogflow.cx.v3.Match) { 986 return mergeFrom((com.google.cloud.dialogflow.cx.v3.Match) other); 987 } else { 988 super.mergeFrom(other); 989 return this; 990 } 991 } 992 mergeFrom(com.google.cloud.dialogflow.cx.v3.Match other)993 public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Match other) { 994 if (other == com.google.cloud.dialogflow.cx.v3.Match.getDefaultInstance()) return this; 995 if (other.hasIntent()) { 996 mergeIntent(other.getIntent()); 997 } 998 if (!other.getEvent().isEmpty()) { 999 event_ = other.event_; 1000 bitField0_ |= 0x00000002; 1001 onChanged(); 1002 } 1003 if (other.hasParameters()) { 1004 mergeParameters(other.getParameters()); 1005 } 1006 if (!other.getResolvedInput().isEmpty()) { 1007 resolvedInput_ = other.resolvedInput_; 1008 bitField0_ |= 0x00000008; 1009 onChanged(); 1010 } 1011 if (other.matchType_ != 0) { 1012 setMatchTypeValue(other.getMatchTypeValue()); 1013 } 1014 if (other.getConfidence() != 0F) { 1015 setConfidence(other.getConfidence()); 1016 } 1017 this.mergeUnknownFields(other.getUnknownFields()); 1018 onChanged(); 1019 return this; 1020 } 1021 1022 @java.lang.Override isInitialized()1023 public final boolean isInitialized() { 1024 return true; 1025 } 1026 1027 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1028 public Builder mergeFrom( 1029 com.google.protobuf.CodedInputStream input, 1030 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1031 throws java.io.IOException { 1032 if (extensionRegistry == null) { 1033 throw new java.lang.NullPointerException(); 1034 } 1035 try { 1036 boolean done = false; 1037 while (!done) { 1038 int tag = input.readTag(); 1039 switch (tag) { 1040 case 0: 1041 done = true; 1042 break; 1043 case 10: 1044 { 1045 input.readMessage(getIntentFieldBuilder().getBuilder(), extensionRegistry); 1046 bitField0_ |= 0x00000001; 1047 break; 1048 } // case 10 1049 case 18: 1050 { 1051 input.readMessage(getParametersFieldBuilder().getBuilder(), extensionRegistry); 1052 bitField0_ |= 0x00000004; 1053 break; 1054 } // case 18 1055 case 26: 1056 { 1057 resolvedInput_ = input.readStringRequireUtf8(); 1058 bitField0_ |= 0x00000008; 1059 break; 1060 } // case 26 1061 case 32: 1062 { 1063 matchType_ = input.readEnum(); 1064 bitField0_ |= 0x00000010; 1065 break; 1066 } // case 32 1067 case 45: 1068 { 1069 confidence_ = input.readFloat(); 1070 bitField0_ |= 0x00000020; 1071 break; 1072 } // case 45 1073 case 50: 1074 { 1075 event_ = input.readStringRequireUtf8(); 1076 bitField0_ |= 0x00000002; 1077 break; 1078 } // case 50 1079 default: 1080 { 1081 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1082 done = true; // was an endgroup tag 1083 } 1084 break; 1085 } // default: 1086 } // switch (tag) 1087 } // while (!done) 1088 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1089 throw e.unwrapIOException(); 1090 } finally { 1091 onChanged(); 1092 } // finally 1093 return this; 1094 } 1095 1096 private int bitField0_; 1097 1098 private com.google.cloud.dialogflow.cx.v3.Intent intent_; 1099 private com.google.protobuf.SingleFieldBuilderV3< 1100 com.google.cloud.dialogflow.cx.v3.Intent, 1101 com.google.cloud.dialogflow.cx.v3.Intent.Builder, 1102 com.google.cloud.dialogflow.cx.v3.IntentOrBuilder> 1103 intentBuilder_; 1104 /** 1105 * 1106 * 1107 * <pre> 1108 * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the query. 1109 * Some, not all fields are filled in this message, including but not limited 1110 * to: `name` and `display_name`. Only filled for 1111 * [`INTENT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match type. 1112 * </pre> 1113 * 1114 * <code>.google.cloud.dialogflow.cx.v3.Intent intent = 1;</code> 1115 * 1116 * @return Whether the intent field is set. 1117 */ hasIntent()1118 public boolean hasIntent() { 1119 return ((bitField0_ & 0x00000001) != 0); 1120 } 1121 /** 1122 * 1123 * 1124 * <pre> 1125 * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the query. 1126 * Some, not all fields are filled in this message, including but not limited 1127 * to: `name` and `display_name`. Only filled for 1128 * [`INTENT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match type. 1129 * </pre> 1130 * 1131 * <code>.google.cloud.dialogflow.cx.v3.Intent intent = 1;</code> 1132 * 1133 * @return The intent. 1134 */ getIntent()1135 public com.google.cloud.dialogflow.cx.v3.Intent getIntent() { 1136 if (intentBuilder_ == null) { 1137 return intent_ == null 1138 ? com.google.cloud.dialogflow.cx.v3.Intent.getDefaultInstance() 1139 : intent_; 1140 } else { 1141 return intentBuilder_.getMessage(); 1142 } 1143 } 1144 /** 1145 * 1146 * 1147 * <pre> 1148 * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the query. 1149 * Some, not all fields are filled in this message, including but not limited 1150 * to: `name` and `display_name`. Only filled for 1151 * [`INTENT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match type. 1152 * </pre> 1153 * 1154 * <code>.google.cloud.dialogflow.cx.v3.Intent intent = 1;</code> 1155 */ setIntent(com.google.cloud.dialogflow.cx.v3.Intent value)1156 public Builder setIntent(com.google.cloud.dialogflow.cx.v3.Intent value) { 1157 if (intentBuilder_ == null) { 1158 if (value == null) { 1159 throw new NullPointerException(); 1160 } 1161 intent_ = value; 1162 } else { 1163 intentBuilder_.setMessage(value); 1164 } 1165 bitField0_ |= 0x00000001; 1166 onChanged(); 1167 return this; 1168 } 1169 /** 1170 * 1171 * 1172 * <pre> 1173 * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the query. 1174 * Some, not all fields are filled in this message, including but not limited 1175 * to: `name` and `display_name`. Only filled for 1176 * [`INTENT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match type. 1177 * </pre> 1178 * 1179 * <code>.google.cloud.dialogflow.cx.v3.Intent intent = 1;</code> 1180 */ setIntent(com.google.cloud.dialogflow.cx.v3.Intent.Builder builderForValue)1181 public Builder setIntent(com.google.cloud.dialogflow.cx.v3.Intent.Builder builderForValue) { 1182 if (intentBuilder_ == null) { 1183 intent_ = builderForValue.build(); 1184 } else { 1185 intentBuilder_.setMessage(builderForValue.build()); 1186 } 1187 bitField0_ |= 0x00000001; 1188 onChanged(); 1189 return this; 1190 } 1191 /** 1192 * 1193 * 1194 * <pre> 1195 * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the query. 1196 * Some, not all fields are filled in this message, including but not limited 1197 * to: `name` and `display_name`. Only filled for 1198 * [`INTENT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match type. 1199 * </pre> 1200 * 1201 * <code>.google.cloud.dialogflow.cx.v3.Intent intent = 1;</code> 1202 */ mergeIntent(com.google.cloud.dialogflow.cx.v3.Intent value)1203 public Builder mergeIntent(com.google.cloud.dialogflow.cx.v3.Intent value) { 1204 if (intentBuilder_ == null) { 1205 if (((bitField0_ & 0x00000001) != 0) 1206 && intent_ != null 1207 && intent_ != com.google.cloud.dialogflow.cx.v3.Intent.getDefaultInstance()) { 1208 getIntentBuilder().mergeFrom(value); 1209 } else { 1210 intent_ = value; 1211 } 1212 } else { 1213 intentBuilder_.mergeFrom(value); 1214 } 1215 bitField0_ |= 0x00000001; 1216 onChanged(); 1217 return this; 1218 } 1219 /** 1220 * 1221 * 1222 * <pre> 1223 * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the query. 1224 * Some, not all fields are filled in this message, including but not limited 1225 * to: `name` and `display_name`. Only filled for 1226 * [`INTENT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match type. 1227 * </pre> 1228 * 1229 * <code>.google.cloud.dialogflow.cx.v3.Intent intent = 1;</code> 1230 */ clearIntent()1231 public Builder clearIntent() { 1232 bitField0_ = (bitField0_ & ~0x00000001); 1233 intent_ = null; 1234 if (intentBuilder_ != null) { 1235 intentBuilder_.dispose(); 1236 intentBuilder_ = null; 1237 } 1238 onChanged(); 1239 return this; 1240 } 1241 /** 1242 * 1243 * 1244 * <pre> 1245 * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the query. 1246 * Some, not all fields are filled in this message, including but not limited 1247 * to: `name` and `display_name`. Only filled for 1248 * [`INTENT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match type. 1249 * </pre> 1250 * 1251 * <code>.google.cloud.dialogflow.cx.v3.Intent intent = 1;</code> 1252 */ getIntentBuilder()1253 public com.google.cloud.dialogflow.cx.v3.Intent.Builder getIntentBuilder() { 1254 bitField0_ |= 0x00000001; 1255 onChanged(); 1256 return getIntentFieldBuilder().getBuilder(); 1257 } 1258 /** 1259 * 1260 * 1261 * <pre> 1262 * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the query. 1263 * Some, not all fields are filled in this message, including but not limited 1264 * to: `name` and `display_name`. Only filled for 1265 * [`INTENT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match type. 1266 * </pre> 1267 * 1268 * <code>.google.cloud.dialogflow.cx.v3.Intent intent = 1;</code> 1269 */ getIntentOrBuilder()1270 public com.google.cloud.dialogflow.cx.v3.IntentOrBuilder getIntentOrBuilder() { 1271 if (intentBuilder_ != null) { 1272 return intentBuilder_.getMessageOrBuilder(); 1273 } else { 1274 return intent_ == null 1275 ? com.google.cloud.dialogflow.cx.v3.Intent.getDefaultInstance() 1276 : intent_; 1277 } 1278 } 1279 /** 1280 * 1281 * 1282 * <pre> 1283 * The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the query. 1284 * Some, not all fields are filled in this message, including but not limited 1285 * to: `name` and `display_name`. Only filled for 1286 * [`INTENT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match type. 1287 * </pre> 1288 * 1289 * <code>.google.cloud.dialogflow.cx.v3.Intent intent = 1;</code> 1290 */ 1291 private com.google.protobuf.SingleFieldBuilderV3< 1292 com.google.cloud.dialogflow.cx.v3.Intent, 1293 com.google.cloud.dialogflow.cx.v3.Intent.Builder, 1294 com.google.cloud.dialogflow.cx.v3.IntentOrBuilder> getIntentFieldBuilder()1295 getIntentFieldBuilder() { 1296 if (intentBuilder_ == null) { 1297 intentBuilder_ = 1298 new com.google.protobuf.SingleFieldBuilderV3< 1299 com.google.cloud.dialogflow.cx.v3.Intent, 1300 com.google.cloud.dialogflow.cx.v3.Intent.Builder, 1301 com.google.cloud.dialogflow.cx.v3.IntentOrBuilder>( 1302 getIntent(), getParentForChildren(), isClean()); 1303 intent_ = null; 1304 } 1305 return intentBuilder_; 1306 } 1307 1308 private java.lang.Object event_ = ""; 1309 /** 1310 * 1311 * 1312 * <pre> 1313 * The event that matched the query. Filled for 1314 * [`EVENT`][google.cloud.dialogflow.cx.v3.Match.MatchType], 1315 * [`NO_MATCH`][google.cloud.dialogflow.cx.v3.Match.MatchType] and 1316 * [`NO_INPUT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match types. 1317 * </pre> 1318 * 1319 * <code>string event = 6;</code> 1320 * 1321 * @return The event. 1322 */ getEvent()1323 public java.lang.String getEvent() { 1324 java.lang.Object ref = event_; 1325 if (!(ref instanceof java.lang.String)) { 1326 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1327 java.lang.String s = bs.toStringUtf8(); 1328 event_ = s; 1329 return s; 1330 } else { 1331 return (java.lang.String) ref; 1332 } 1333 } 1334 /** 1335 * 1336 * 1337 * <pre> 1338 * The event that matched the query. Filled for 1339 * [`EVENT`][google.cloud.dialogflow.cx.v3.Match.MatchType], 1340 * [`NO_MATCH`][google.cloud.dialogflow.cx.v3.Match.MatchType] and 1341 * [`NO_INPUT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match types. 1342 * </pre> 1343 * 1344 * <code>string event = 6;</code> 1345 * 1346 * @return The bytes for event. 1347 */ getEventBytes()1348 public com.google.protobuf.ByteString getEventBytes() { 1349 java.lang.Object ref = event_; 1350 if (ref instanceof String) { 1351 com.google.protobuf.ByteString b = 1352 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1353 event_ = b; 1354 return b; 1355 } else { 1356 return (com.google.protobuf.ByteString) ref; 1357 } 1358 } 1359 /** 1360 * 1361 * 1362 * <pre> 1363 * The event that matched the query. Filled for 1364 * [`EVENT`][google.cloud.dialogflow.cx.v3.Match.MatchType], 1365 * [`NO_MATCH`][google.cloud.dialogflow.cx.v3.Match.MatchType] and 1366 * [`NO_INPUT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match types. 1367 * </pre> 1368 * 1369 * <code>string event = 6;</code> 1370 * 1371 * @param value The event to set. 1372 * @return This builder for chaining. 1373 */ setEvent(java.lang.String value)1374 public Builder setEvent(java.lang.String value) { 1375 if (value == null) { 1376 throw new NullPointerException(); 1377 } 1378 event_ = value; 1379 bitField0_ |= 0x00000002; 1380 onChanged(); 1381 return this; 1382 } 1383 /** 1384 * 1385 * 1386 * <pre> 1387 * The event that matched the query. Filled for 1388 * [`EVENT`][google.cloud.dialogflow.cx.v3.Match.MatchType], 1389 * [`NO_MATCH`][google.cloud.dialogflow.cx.v3.Match.MatchType] and 1390 * [`NO_INPUT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match types. 1391 * </pre> 1392 * 1393 * <code>string event = 6;</code> 1394 * 1395 * @return This builder for chaining. 1396 */ clearEvent()1397 public Builder clearEvent() { 1398 event_ = getDefaultInstance().getEvent(); 1399 bitField0_ = (bitField0_ & ~0x00000002); 1400 onChanged(); 1401 return this; 1402 } 1403 /** 1404 * 1405 * 1406 * <pre> 1407 * The event that matched the query. Filled for 1408 * [`EVENT`][google.cloud.dialogflow.cx.v3.Match.MatchType], 1409 * [`NO_MATCH`][google.cloud.dialogflow.cx.v3.Match.MatchType] and 1410 * [`NO_INPUT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match types. 1411 * </pre> 1412 * 1413 * <code>string event = 6;</code> 1414 * 1415 * @param value The bytes for event to set. 1416 * @return This builder for chaining. 1417 */ setEventBytes(com.google.protobuf.ByteString value)1418 public Builder setEventBytes(com.google.protobuf.ByteString value) { 1419 if (value == null) { 1420 throw new NullPointerException(); 1421 } 1422 checkByteStringIsUtf8(value); 1423 event_ = value; 1424 bitField0_ |= 0x00000002; 1425 onChanged(); 1426 return this; 1427 } 1428 1429 private com.google.protobuf.Struct parameters_; 1430 private com.google.protobuf.SingleFieldBuilderV3< 1431 com.google.protobuf.Struct, 1432 com.google.protobuf.Struct.Builder, 1433 com.google.protobuf.StructOrBuilder> 1434 parametersBuilder_; 1435 /** 1436 * 1437 * 1438 * <pre> 1439 * The collection of parameters extracted from the query. 1440 * Depending on your protocol or client library language, this is a 1441 * map, associative array, symbol table, dictionary, or JSON object 1442 * composed of a collection of (MapKey, MapValue) pairs: 1443 * * MapKey type: string 1444 * * MapKey value: parameter name 1445 * * MapValue type: If parameter's entity type is a composite entity then use 1446 * map, otherwise, depending on the parameter value type, it could be one of 1447 * string, number, boolean, null, list or map. 1448 * * MapValue value: If parameter's entity type is a composite entity then use 1449 * map from composite entity property names to property values, otherwise, 1450 * use parameter value. 1451 * </pre> 1452 * 1453 * <code>.google.protobuf.Struct parameters = 2;</code> 1454 * 1455 * @return Whether the parameters field is set. 1456 */ hasParameters()1457 public boolean hasParameters() { 1458 return ((bitField0_ & 0x00000004) != 0); 1459 } 1460 /** 1461 * 1462 * 1463 * <pre> 1464 * The collection of parameters extracted from the query. 1465 * Depending on your protocol or client library language, this is a 1466 * map, associative array, symbol table, dictionary, or JSON object 1467 * composed of a collection of (MapKey, MapValue) pairs: 1468 * * MapKey type: string 1469 * * MapKey value: parameter name 1470 * * MapValue type: If parameter's entity type is a composite entity then use 1471 * map, otherwise, depending on the parameter value type, it could be one of 1472 * string, number, boolean, null, list or map. 1473 * * MapValue value: If parameter's entity type is a composite entity then use 1474 * map from composite entity property names to property values, otherwise, 1475 * use parameter value. 1476 * </pre> 1477 * 1478 * <code>.google.protobuf.Struct parameters = 2;</code> 1479 * 1480 * @return The parameters. 1481 */ getParameters()1482 public com.google.protobuf.Struct getParameters() { 1483 if (parametersBuilder_ == null) { 1484 return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; 1485 } else { 1486 return parametersBuilder_.getMessage(); 1487 } 1488 } 1489 /** 1490 * 1491 * 1492 * <pre> 1493 * The collection of parameters extracted from the query. 1494 * Depending on your protocol or client library language, this is a 1495 * map, associative array, symbol table, dictionary, or JSON object 1496 * composed of a collection of (MapKey, MapValue) pairs: 1497 * * MapKey type: string 1498 * * MapKey value: parameter name 1499 * * MapValue type: If parameter's entity type is a composite entity then use 1500 * map, otherwise, depending on the parameter value type, it could be one of 1501 * string, number, boolean, null, list or map. 1502 * * MapValue value: If parameter's entity type is a composite entity then use 1503 * map from composite entity property names to property values, otherwise, 1504 * use parameter value. 1505 * </pre> 1506 * 1507 * <code>.google.protobuf.Struct parameters = 2;</code> 1508 */ setParameters(com.google.protobuf.Struct value)1509 public Builder setParameters(com.google.protobuf.Struct value) { 1510 if (parametersBuilder_ == null) { 1511 if (value == null) { 1512 throw new NullPointerException(); 1513 } 1514 parameters_ = value; 1515 } else { 1516 parametersBuilder_.setMessage(value); 1517 } 1518 bitField0_ |= 0x00000004; 1519 onChanged(); 1520 return this; 1521 } 1522 /** 1523 * 1524 * 1525 * <pre> 1526 * The collection of parameters extracted from the query. 1527 * Depending on your protocol or client library language, this is a 1528 * map, associative array, symbol table, dictionary, or JSON object 1529 * composed of a collection of (MapKey, MapValue) pairs: 1530 * * MapKey type: string 1531 * * MapKey value: parameter name 1532 * * MapValue type: If parameter's entity type is a composite entity then use 1533 * map, otherwise, depending on the parameter value type, it could be one of 1534 * string, number, boolean, null, list or map. 1535 * * MapValue value: If parameter's entity type is a composite entity then use 1536 * map from composite entity property names to property values, otherwise, 1537 * use parameter value. 1538 * </pre> 1539 * 1540 * <code>.google.protobuf.Struct parameters = 2;</code> 1541 */ setParameters(com.google.protobuf.Struct.Builder builderForValue)1542 public Builder setParameters(com.google.protobuf.Struct.Builder builderForValue) { 1543 if (parametersBuilder_ == null) { 1544 parameters_ = builderForValue.build(); 1545 } else { 1546 parametersBuilder_.setMessage(builderForValue.build()); 1547 } 1548 bitField0_ |= 0x00000004; 1549 onChanged(); 1550 return this; 1551 } 1552 /** 1553 * 1554 * 1555 * <pre> 1556 * The collection of parameters extracted from the query. 1557 * Depending on your protocol or client library language, this is a 1558 * map, associative array, symbol table, dictionary, or JSON object 1559 * composed of a collection of (MapKey, MapValue) pairs: 1560 * * MapKey type: string 1561 * * MapKey value: parameter name 1562 * * MapValue type: If parameter's entity type is a composite entity then use 1563 * map, otherwise, depending on the parameter value type, it could be one of 1564 * string, number, boolean, null, list or map. 1565 * * MapValue value: If parameter's entity type is a composite entity then use 1566 * map from composite entity property names to property values, otherwise, 1567 * use parameter value. 1568 * </pre> 1569 * 1570 * <code>.google.protobuf.Struct parameters = 2;</code> 1571 */ mergeParameters(com.google.protobuf.Struct value)1572 public Builder mergeParameters(com.google.protobuf.Struct value) { 1573 if (parametersBuilder_ == null) { 1574 if (((bitField0_ & 0x00000004) != 0) 1575 && parameters_ != null 1576 && parameters_ != com.google.protobuf.Struct.getDefaultInstance()) { 1577 getParametersBuilder().mergeFrom(value); 1578 } else { 1579 parameters_ = value; 1580 } 1581 } else { 1582 parametersBuilder_.mergeFrom(value); 1583 } 1584 bitField0_ |= 0x00000004; 1585 onChanged(); 1586 return this; 1587 } 1588 /** 1589 * 1590 * 1591 * <pre> 1592 * The collection of parameters extracted from the query. 1593 * Depending on your protocol or client library language, this is a 1594 * map, associative array, symbol table, dictionary, or JSON object 1595 * composed of a collection of (MapKey, MapValue) pairs: 1596 * * MapKey type: string 1597 * * MapKey value: parameter name 1598 * * MapValue type: If parameter's entity type is a composite entity then use 1599 * map, otherwise, depending on the parameter value type, it could be one of 1600 * string, number, boolean, null, list or map. 1601 * * MapValue value: If parameter's entity type is a composite entity then use 1602 * map from composite entity property names to property values, otherwise, 1603 * use parameter value. 1604 * </pre> 1605 * 1606 * <code>.google.protobuf.Struct parameters = 2;</code> 1607 */ clearParameters()1608 public Builder clearParameters() { 1609 bitField0_ = (bitField0_ & ~0x00000004); 1610 parameters_ = null; 1611 if (parametersBuilder_ != null) { 1612 parametersBuilder_.dispose(); 1613 parametersBuilder_ = null; 1614 } 1615 onChanged(); 1616 return this; 1617 } 1618 /** 1619 * 1620 * 1621 * <pre> 1622 * The collection of parameters extracted from the query. 1623 * Depending on your protocol or client library language, this is a 1624 * map, associative array, symbol table, dictionary, or JSON object 1625 * composed of a collection of (MapKey, MapValue) pairs: 1626 * * MapKey type: string 1627 * * MapKey value: parameter name 1628 * * MapValue type: If parameter's entity type is a composite entity then use 1629 * map, otherwise, depending on the parameter value type, it could be one of 1630 * string, number, boolean, null, list or map. 1631 * * MapValue value: If parameter's entity type is a composite entity then use 1632 * map from composite entity property names to property values, otherwise, 1633 * use parameter value. 1634 * </pre> 1635 * 1636 * <code>.google.protobuf.Struct parameters = 2;</code> 1637 */ getParametersBuilder()1638 public com.google.protobuf.Struct.Builder getParametersBuilder() { 1639 bitField0_ |= 0x00000004; 1640 onChanged(); 1641 return getParametersFieldBuilder().getBuilder(); 1642 } 1643 /** 1644 * 1645 * 1646 * <pre> 1647 * The collection of parameters extracted from the query. 1648 * Depending on your protocol or client library language, this is a 1649 * map, associative array, symbol table, dictionary, or JSON object 1650 * composed of a collection of (MapKey, MapValue) pairs: 1651 * * MapKey type: string 1652 * * MapKey value: parameter name 1653 * * MapValue type: If parameter's entity type is a composite entity then use 1654 * map, otherwise, depending on the parameter value type, it could be one of 1655 * string, number, boolean, null, list or map. 1656 * * MapValue value: If parameter's entity type is a composite entity then use 1657 * map from composite entity property names to property values, otherwise, 1658 * use parameter value. 1659 * </pre> 1660 * 1661 * <code>.google.protobuf.Struct parameters = 2;</code> 1662 */ getParametersOrBuilder()1663 public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { 1664 if (parametersBuilder_ != null) { 1665 return parametersBuilder_.getMessageOrBuilder(); 1666 } else { 1667 return parameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : parameters_; 1668 } 1669 } 1670 /** 1671 * 1672 * 1673 * <pre> 1674 * The collection of parameters extracted from the query. 1675 * Depending on your protocol or client library language, this is a 1676 * map, associative array, symbol table, dictionary, or JSON object 1677 * composed of a collection of (MapKey, MapValue) pairs: 1678 * * MapKey type: string 1679 * * MapKey value: parameter name 1680 * * MapValue type: If parameter's entity type is a composite entity then use 1681 * map, otherwise, depending on the parameter value type, it could be one of 1682 * string, number, boolean, null, list or map. 1683 * * MapValue value: If parameter's entity type is a composite entity then use 1684 * map from composite entity property names to property values, otherwise, 1685 * use parameter value. 1686 * </pre> 1687 * 1688 * <code>.google.protobuf.Struct parameters = 2;</code> 1689 */ 1690 private com.google.protobuf.SingleFieldBuilderV3< 1691 com.google.protobuf.Struct, 1692 com.google.protobuf.Struct.Builder, 1693 com.google.protobuf.StructOrBuilder> getParametersFieldBuilder()1694 getParametersFieldBuilder() { 1695 if (parametersBuilder_ == null) { 1696 parametersBuilder_ = 1697 new com.google.protobuf.SingleFieldBuilderV3< 1698 com.google.protobuf.Struct, 1699 com.google.protobuf.Struct.Builder, 1700 com.google.protobuf.StructOrBuilder>( 1701 getParameters(), getParentForChildren(), isClean()); 1702 parameters_ = null; 1703 } 1704 return parametersBuilder_; 1705 } 1706 1707 private java.lang.Object resolvedInput_ = ""; 1708 /** 1709 * 1710 * 1711 * <pre> 1712 * Final text input which was matched during MatchIntent. This value can be 1713 * different from original input sent in request because of spelling 1714 * correction or other processing. 1715 * </pre> 1716 * 1717 * <code>string resolved_input = 3;</code> 1718 * 1719 * @return The resolvedInput. 1720 */ getResolvedInput()1721 public java.lang.String getResolvedInput() { 1722 java.lang.Object ref = resolvedInput_; 1723 if (!(ref instanceof java.lang.String)) { 1724 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1725 java.lang.String s = bs.toStringUtf8(); 1726 resolvedInput_ = s; 1727 return s; 1728 } else { 1729 return (java.lang.String) ref; 1730 } 1731 } 1732 /** 1733 * 1734 * 1735 * <pre> 1736 * Final text input which was matched during MatchIntent. This value can be 1737 * different from original input sent in request because of spelling 1738 * correction or other processing. 1739 * </pre> 1740 * 1741 * <code>string resolved_input = 3;</code> 1742 * 1743 * @return The bytes for resolvedInput. 1744 */ getResolvedInputBytes()1745 public com.google.protobuf.ByteString getResolvedInputBytes() { 1746 java.lang.Object ref = resolvedInput_; 1747 if (ref instanceof String) { 1748 com.google.protobuf.ByteString b = 1749 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1750 resolvedInput_ = b; 1751 return b; 1752 } else { 1753 return (com.google.protobuf.ByteString) ref; 1754 } 1755 } 1756 /** 1757 * 1758 * 1759 * <pre> 1760 * Final text input which was matched during MatchIntent. This value can be 1761 * different from original input sent in request because of spelling 1762 * correction or other processing. 1763 * </pre> 1764 * 1765 * <code>string resolved_input = 3;</code> 1766 * 1767 * @param value The resolvedInput to set. 1768 * @return This builder for chaining. 1769 */ setResolvedInput(java.lang.String value)1770 public Builder setResolvedInput(java.lang.String value) { 1771 if (value == null) { 1772 throw new NullPointerException(); 1773 } 1774 resolvedInput_ = value; 1775 bitField0_ |= 0x00000008; 1776 onChanged(); 1777 return this; 1778 } 1779 /** 1780 * 1781 * 1782 * <pre> 1783 * Final text input which was matched during MatchIntent. This value can be 1784 * different from original input sent in request because of spelling 1785 * correction or other processing. 1786 * </pre> 1787 * 1788 * <code>string resolved_input = 3;</code> 1789 * 1790 * @return This builder for chaining. 1791 */ clearResolvedInput()1792 public Builder clearResolvedInput() { 1793 resolvedInput_ = getDefaultInstance().getResolvedInput(); 1794 bitField0_ = (bitField0_ & ~0x00000008); 1795 onChanged(); 1796 return this; 1797 } 1798 /** 1799 * 1800 * 1801 * <pre> 1802 * Final text input which was matched during MatchIntent. This value can be 1803 * different from original input sent in request because of spelling 1804 * correction or other processing. 1805 * </pre> 1806 * 1807 * <code>string resolved_input = 3;</code> 1808 * 1809 * @param value The bytes for resolvedInput to set. 1810 * @return This builder for chaining. 1811 */ setResolvedInputBytes(com.google.protobuf.ByteString value)1812 public Builder setResolvedInputBytes(com.google.protobuf.ByteString value) { 1813 if (value == null) { 1814 throw new NullPointerException(); 1815 } 1816 checkByteStringIsUtf8(value); 1817 resolvedInput_ = value; 1818 bitField0_ |= 0x00000008; 1819 onChanged(); 1820 return this; 1821 } 1822 1823 private int matchType_ = 0; 1824 /** 1825 * 1826 * 1827 * <pre> 1828 * Type of this [Match][google.cloud.dialogflow.cx.v3.Match]. 1829 * </pre> 1830 * 1831 * <code>.google.cloud.dialogflow.cx.v3.Match.MatchType match_type = 4;</code> 1832 * 1833 * @return The enum numeric value on the wire for matchType. 1834 */ 1835 @java.lang.Override getMatchTypeValue()1836 public int getMatchTypeValue() { 1837 return matchType_; 1838 } 1839 /** 1840 * 1841 * 1842 * <pre> 1843 * Type of this [Match][google.cloud.dialogflow.cx.v3.Match]. 1844 * </pre> 1845 * 1846 * <code>.google.cloud.dialogflow.cx.v3.Match.MatchType match_type = 4;</code> 1847 * 1848 * @param value The enum numeric value on the wire for matchType to set. 1849 * @return This builder for chaining. 1850 */ setMatchTypeValue(int value)1851 public Builder setMatchTypeValue(int value) { 1852 matchType_ = value; 1853 bitField0_ |= 0x00000010; 1854 onChanged(); 1855 return this; 1856 } 1857 /** 1858 * 1859 * 1860 * <pre> 1861 * Type of this [Match][google.cloud.dialogflow.cx.v3.Match]. 1862 * </pre> 1863 * 1864 * <code>.google.cloud.dialogflow.cx.v3.Match.MatchType match_type = 4;</code> 1865 * 1866 * @return The matchType. 1867 */ 1868 @java.lang.Override getMatchType()1869 public com.google.cloud.dialogflow.cx.v3.Match.MatchType getMatchType() { 1870 com.google.cloud.dialogflow.cx.v3.Match.MatchType result = 1871 com.google.cloud.dialogflow.cx.v3.Match.MatchType.forNumber(matchType_); 1872 return result == null 1873 ? com.google.cloud.dialogflow.cx.v3.Match.MatchType.UNRECOGNIZED 1874 : result; 1875 } 1876 /** 1877 * 1878 * 1879 * <pre> 1880 * Type of this [Match][google.cloud.dialogflow.cx.v3.Match]. 1881 * </pre> 1882 * 1883 * <code>.google.cloud.dialogflow.cx.v3.Match.MatchType match_type = 4;</code> 1884 * 1885 * @param value The matchType to set. 1886 * @return This builder for chaining. 1887 */ setMatchType(com.google.cloud.dialogflow.cx.v3.Match.MatchType value)1888 public Builder setMatchType(com.google.cloud.dialogflow.cx.v3.Match.MatchType value) { 1889 if (value == null) { 1890 throw new NullPointerException(); 1891 } 1892 bitField0_ |= 0x00000010; 1893 matchType_ = value.getNumber(); 1894 onChanged(); 1895 return this; 1896 } 1897 /** 1898 * 1899 * 1900 * <pre> 1901 * Type of this [Match][google.cloud.dialogflow.cx.v3.Match]. 1902 * </pre> 1903 * 1904 * <code>.google.cloud.dialogflow.cx.v3.Match.MatchType match_type = 4;</code> 1905 * 1906 * @return This builder for chaining. 1907 */ clearMatchType()1908 public Builder clearMatchType() { 1909 bitField0_ = (bitField0_ & ~0x00000010); 1910 matchType_ = 0; 1911 onChanged(); 1912 return this; 1913 } 1914 1915 private float confidence_; 1916 /** 1917 * 1918 * 1919 * <pre> 1920 * The confidence of this match. Values range from 0.0 (completely uncertain) 1921 * to 1.0 (completely certain). 1922 * This value is for informational purpose only and is only used to help match 1923 * the best intent within the classification threshold. This value may change 1924 * for the same end-user expression at any time due to a model retraining or 1925 * change in implementation. 1926 * </pre> 1927 * 1928 * <code>float confidence = 5;</code> 1929 * 1930 * @return The confidence. 1931 */ 1932 @java.lang.Override getConfidence()1933 public float getConfidence() { 1934 return confidence_; 1935 } 1936 /** 1937 * 1938 * 1939 * <pre> 1940 * The confidence of this match. Values range from 0.0 (completely uncertain) 1941 * to 1.0 (completely certain). 1942 * This value is for informational purpose only and is only used to help match 1943 * the best intent within the classification threshold. This value may change 1944 * for the same end-user expression at any time due to a model retraining or 1945 * change in implementation. 1946 * </pre> 1947 * 1948 * <code>float confidence = 5;</code> 1949 * 1950 * @param value The confidence to set. 1951 * @return This builder for chaining. 1952 */ setConfidence(float value)1953 public Builder setConfidence(float value) { 1954 1955 confidence_ = value; 1956 bitField0_ |= 0x00000020; 1957 onChanged(); 1958 return this; 1959 } 1960 /** 1961 * 1962 * 1963 * <pre> 1964 * The confidence of this match. Values range from 0.0 (completely uncertain) 1965 * to 1.0 (completely certain). 1966 * This value is for informational purpose only and is only used to help match 1967 * the best intent within the classification threshold. This value may change 1968 * for the same end-user expression at any time due to a model retraining or 1969 * change in implementation. 1970 * </pre> 1971 * 1972 * <code>float confidence = 5;</code> 1973 * 1974 * @return This builder for chaining. 1975 */ clearConfidence()1976 public Builder clearConfidence() { 1977 bitField0_ = (bitField0_ & ~0x00000020); 1978 confidence_ = 0F; 1979 onChanged(); 1980 return this; 1981 } 1982 1983 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1984 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1985 return super.setUnknownFields(unknownFields); 1986 } 1987 1988 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1989 public final Builder mergeUnknownFields( 1990 final com.google.protobuf.UnknownFieldSet unknownFields) { 1991 return super.mergeUnknownFields(unknownFields); 1992 } 1993 1994 // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.Match) 1995 } 1996 1997 // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.Match) 1998 private static final com.google.cloud.dialogflow.cx.v3.Match DEFAULT_INSTANCE; 1999 2000 static { 2001 DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.Match(); 2002 } 2003 getDefaultInstance()2004 public static com.google.cloud.dialogflow.cx.v3.Match getDefaultInstance() { 2005 return DEFAULT_INSTANCE; 2006 } 2007 2008 private static final com.google.protobuf.Parser<Match> PARSER = 2009 new com.google.protobuf.AbstractParser<Match>() { 2010 @java.lang.Override 2011 public Match parsePartialFrom( 2012 com.google.protobuf.CodedInputStream input, 2013 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2014 throws com.google.protobuf.InvalidProtocolBufferException { 2015 Builder builder = newBuilder(); 2016 try { 2017 builder.mergeFrom(input, extensionRegistry); 2018 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2019 throw e.setUnfinishedMessage(builder.buildPartial()); 2020 } catch (com.google.protobuf.UninitializedMessageException e) { 2021 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 2022 } catch (java.io.IOException e) { 2023 throw new com.google.protobuf.InvalidProtocolBufferException(e) 2024 .setUnfinishedMessage(builder.buildPartial()); 2025 } 2026 return builder.buildPartial(); 2027 } 2028 }; 2029 parser()2030 public static com.google.protobuf.Parser<Match> parser() { 2031 return PARSER; 2032 } 2033 2034 @java.lang.Override getParserForType()2035 public com.google.protobuf.Parser<Match> getParserForType() { 2036 return PARSER; 2037 } 2038 2039 @java.lang.Override getDefaultInstanceForType()2040 public com.google.cloud.dialogflow.cx.v3.Match getDefaultInstanceForType() { 2041 return DEFAULT_INSTANCE; 2042 } 2043 } 2044