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