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