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