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/retail/v2beta/catalog.proto 18 19 package com.google.cloud.retail.v2beta; 20 21 /** 22 * 23 * 24 * <pre> 25 * Catalog level attribute config for an attribute. For example, if customers 26 * want to enable/disable facet for a specific attribute. 27 * </pre> 28 * 29 * Protobuf type {@code google.cloud.retail.v2beta.CatalogAttribute} 30 */ 31 public final class CatalogAttribute extends com.google.protobuf.GeneratedMessageV3 32 implements 33 // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.CatalogAttribute) 34 CatalogAttributeOrBuilder { 35 private static final long serialVersionUID = 0L; 36 // Use CatalogAttribute.newBuilder() to construct. CatalogAttribute(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37 private CatalogAttribute(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 38 super(builder); 39 } 40 CatalogAttribute()41 private CatalogAttribute() { 42 key_ = ""; 43 type_ = 0; 44 indexableOption_ = 0; 45 dynamicFacetableOption_ = 0; 46 searchableOption_ = 0; 47 recommendationsFilteringOption_ = 0; 48 exactSearchableOption_ = 0; 49 retrievableOption_ = 0; 50 } 51 52 @java.lang.Override 53 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)54 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 55 return new CatalogAttribute(); 56 } 57 58 @java.lang.Override getUnknownFields()59 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 60 return this.unknownFields; 61 } 62 getDescriptor()63 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 64 return com.google.cloud.retail.v2beta.CatalogProto 65 .internal_static_google_cloud_retail_v2beta_CatalogAttribute_descriptor; 66 } 67 68 @java.lang.Override 69 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()70 internalGetFieldAccessorTable() { 71 return com.google.cloud.retail.v2beta.CatalogProto 72 .internal_static_google_cloud_retail_v2beta_CatalogAttribute_fieldAccessorTable 73 .ensureFieldAccessorsInitialized( 74 com.google.cloud.retail.v2beta.CatalogAttribute.class, 75 com.google.cloud.retail.v2beta.CatalogAttribute.Builder.class); 76 } 77 78 /** 79 * 80 * 81 * <pre> 82 * The type of an attribute. 83 * </pre> 84 * 85 * Protobuf enum {@code google.cloud.retail.v2beta.CatalogAttribute.AttributeType} 86 */ 87 public enum AttributeType implements com.google.protobuf.ProtocolMessageEnum { 88 /** 89 * 90 * 91 * <pre> 92 * The type of the attribute is unknown. 93 * Used when type cannot be derived from attribute that is not 94 * [in_use][google.cloud.retail.v2beta.CatalogAttribute.in_use]. 95 * </pre> 96 * 97 * <code>UNKNOWN = 0;</code> 98 */ 99 UNKNOWN(0), 100 /** 101 * 102 * 103 * <pre> 104 * Textual attribute. 105 * </pre> 106 * 107 * <code>TEXTUAL = 1;</code> 108 */ 109 TEXTUAL(1), 110 /** 111 * 112 * 113 * <pre> 114 * Numerical attribute. 115 * </pre> 116 * 117 * <code>NUMERICAL = 2;</code> 118 */ 119 NUMERICAL(2), 120 UNRECOGNIZED(-1), 121 ; 122 123 /** 124 * 125 * 126 * <pre> 127 * The type of the attribute is unknown. 128 * Used when type cannot be derived from attribute that is not 129 * [in_use][google.cloud.retail.v2beta.CatalogAttribute.in_use]. 130 * </pre> 131 * 132 * <code>UNKNOWN = 0;</code> 133 */ 134 public static final int UNKNOWN_VALUE = 0; 135 /** 136 * 137 * 138 * <pre> 139 * Textual attribute. 140 * </pre> 141 * 142 * <code>TEXTUAL = 1;</code> 143 */ 144 public static final int TEXTUAL_VALUE = 1; 145 /** 146 * 147 * 148 * <pre> 149 * Numerical attribute. 150 * </pre> 151 * 152 * <code>NUMERICAL = 2;</code> 153 */ 154 public static final int NUMERICAL_VALUE = 2; 155 getNumber()156 public final int getNumber() { 157 if (this == UNRECOGNIZED) { 158 throw new java.lang.IllegalArgumentException( 159 "Can't get the number of an unknown enum value."); 160 } 161 return value; 162 } 163 164 /** 165 * @param value The numeric wire value of the corresponding enum entry. 166 * @return The enum associated with the given numeric wire value. 167 * @deprecated Use {@link #forNumber(int)} instead. 168 */ 169 @java.lang.Deprecated valueOf(int value)170 public static AttributeType valueOf(int value) { 171 return forNumber(value); 172 } 173 174 /** 175 * @param value The numeric wire value of the corresponding enum entry. 176 * @return The enum associated with the given numeric wire value. 177 */ forNumber(int value)178 public static AttributeType forNumber(int value) { 179 switch (value) { 180 case 0: 181 return UNKNOWN; 182 case 1: 183 return TEXTUAL; 184 case 2: 185 return NUMERICAL; 186 default: 187 return null; 188 } 189 } 190 internalGetValueMap()191 public static com.google.protobuf.Internal.EnumLiteMap<AttributeType> internalGetValueMap() { 192 return internalValueMap; 193 } 194 195 private static final com.google.protobuf.Internal.EnumLiteMap<AttributeType> internalValueMap = 196 new com.google.protobuf.Internal.EnumLiteMap<AttributeType>() { 197 public AttributeType findValueByNumber(int number) { 198 return AttributeType.forNumber(number); 199 } 200 }; 201 getValueDescriptor()202 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 203 if (this == UNRECOGNIZED) { 204 throw new java.lang.IllegalStateException( 205 "Can't get the descriptor of an unrecognized enum value."); 206 } 207 return getDescriptor().getValues().get(ordinal()); 208 } 209 getDescriptorForType()210 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 211 return getDescriptor(); 212 } 213 getDescriptor()214 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 215 return com.google.cloud.retail.v2beta.CatalogAttribute.getDescriptor().getEnumTypes().get(0); 216 } 217 218 private static final AttributeType[] VALUES = values(); 219 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)220 public static AttributeType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 221 if (desc.getType() != getDescriptor()) { 222 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 223 } 224 if (desc.getIndex() == -1) { 225 return UNRECOGNIZED; 226 } 227 return VALUES[desc.getIndex()]; 228 } 229 230 private final int value; 231 AttributeType(int value)232 private AttributeType(int value) { 233 this.value = value; 234 } 235 236 // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2beta.CatalogAttribute.AttributeType) 237 } 238 239 /** 240 * 241 * 242 * <pre> 243 * The status of the indexable option of a catalog attribute. 244 * </pre> 245 * 246 * Protobuf enum {@code google.cloud.retail.v2beta.CatalogAttribute.IndexableOption} 247 */ 248 public enum IndexableOption implements com.google.protobuf.ProtocolMessageEnum { 249 /** 250 * 251 * 252 * <pre> 253 * Value used when unset. 254 * </pre> 255 * 256 * <code>INDEXABLE_OPTION_UNSPECIFIED = 0;</code> 257 */ 258 INDEXABLE_OPTION_UNSPECIFIED(0), 259 /** 260 * 261 * 262 * <pre> 263 * Indexable option enabled for an attribute. 264 * </pre> 265 * 266 * <code>INDEXABLE_ENABLED = 1;</code> 267 */ 268 INDEXABLE_ENABLED(1), 269 /** 270 * 271 * 272 * <pre> 273 * Indexable option disabled for an attribute. 274 * </pre> 275 * 276 * <code>INDEXABLE_DISABLED = 2;</code> 277 */ 278 INDEXABLE_DISABLED(2), 279 UNRECOGNIZED(-1), 280 ; 281 282 /** 283 * 284 * 285 * <pre> 286 * Value used when unset. 287 * </pre> 288 * 289 * <code>INDEXABLE_OPTION_UNSPECIFIED = 0;</code> 290 */ 291 public static final int INDEXABLE_OPTION_UNSPECIFIED_VALUE = 0; 292 /** 293 * 294 * 295 * <pre> 296 * Indexable option enabled for an attribute. 297 * </pre> 298 * 299 * <code>INDEXABLE_ENABLED = 1;</code> 300 */ 301 public static final int INDEXABLE_ENABLED_VALUE = 1; 302 /** 303 * 304 * 305 * <pre> 306 * Indexable option disabled for an attribute. 307 * </pre> 308 * 309 * <code>INDEXABLE_DISABLED = 2;</code> 310 */ 311 public static final int INDEXABLE_DISABLED_VALUE = 2; 312 getNumber()313 public final int getNumber() { 314 if (this == UNRECOGNIZED) { 315 throw new java.lang.IllegalArgumentException( 316 "Can't get the number of an unknown enum value."); 317 } 318 return value; 319 } 320 321 /** 322 * @param value The numeric wire value of the corresponding enum entry. 323 * @return The enum associated with the given numeric wire value. 324 * @deprecated Use {@link #forNumber(int)} instead. 325 */ 326 @java.lang.Deprecated valueOf(int value)327 public static IndexableOption valueOf(int value) { 328 return forNumber(value); 329 } 330 331 /** 332 * @param value The numeric wire value of the corresponding enum entry. 333 * @return The enum associated with the given numeric wire value. 334 */ forNumber(int value)335 public static IndexableOption forNumber(int value) { 336 switch (value) { 337 case 0: 338 return INDEXABLE_OPTION_UNSPECIFIED; 339 case 1: 340 return INDEXABLE_ENABLED; 341 case 2: 342 return INDEXABLE_DISABLED; 343 default: 344 return null; 345 } 346 } 347 internalGetValueMap()348 public static com.google.protobuf.Internal.EnumLiteMap<IndexableOption> internalGetValueMap() { 349 return internalValueMap; 350 } 351 352 private static final com.google.protobuf.Internal.EnumLiteMap<IndexableOption> 353 internalValueMap = 354 new com.google.protobuf.Internal.EnumLiteMap<IndexableOption>() { 355 public IndexableOption findValueByNumber(int number) { 356 return IndexableOption.forNumber(number); 357 } 358 }; 359 getValueDescriptor()360 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 361 if (this == UNRECOGNIZED) { 362 throw new java.lang.IllegalStateException( 363 "Can't get the descriptor of an unrecognized enum value."); 364 } 365 return getDescriptor().getValues().get(ordinal()); 366 } 367 getDescriptorForType()368 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 369 return getDescriptor(); 370 } 371 getDescriptor()372 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 373 return com.google.cloud.retail.v2beta.CatalogAttribute.getDescriptor().getEnumTypes().get(1); 374 } 375 376 private static final IndexableOption[] VALUES = values(); 377 valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)378 public static IndexableOption valueOf( 379 com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 380 if (desc.getType() != getDescriptor()) { 381 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 382 } 383 if (desc.getIndex() == -1) { 384 return UNRECOGNIZED; 385 } 386 return VALUES[desc.getIndex()]; 387 } 388 389 private final int value; 390 IndexableOption(int value)391 private IndexableOption(int value) { 392 this.value = value; 393 } 394 395 // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2beta.CatalogAttribute.IndexableOption) 396 } 397 398 /** 399 * 400 * 401 * <pre> 402 * The status of the dynamic facetable option of a catalog attribute. 403 * </pre> 404 * 405 * Protobuf enum {@code google.cloud.retail.v2beta.CatalogAttribute.DynamicFacetableOption} 406 */ 407 public enum DynamicFacetableOption implements com.google.protobuf.ProtocolMessageEnum { 408 /** 409 * 410 * 411 * <pre> 412 * Value used when unset. 413 * </pre> 414 * 415 * <code>DYNAMIC_FACETABLE_OPTION_UNSPECIFIED = 0;</code> 416 */ 417 DYNAMIC_FACETABLE_OPTION_UNSPECIFIED(0), 418 /** 419 * 420 * 421 * <pre> 422 * Dynamic facetable option enabled for an attribute. 423 * </pre> 424 * 425 * <code>DYNAMIC_FACETABLE_ENABLED = 1;</code> 426 */ 427 DYNAMIC_FACETABLE_ENABLED(1), 428 /** 429 * 430 * 431 * <pre> 432 * Dynamic facetable option disabled for an attribute. 433 * </pre> 434 * 435 * <code>DYNAMIC_FACETABLE_DISABLED = 2;</code> 436 */ 437 DYNAMIC_FACETABLE_DISABLED(2), 438 UNRECOGNIZED(-1), 439 ; 440 441 /** 442 * 443 * 444 * <pre> 445 * Value used when unset. 446 * </pre> 447 * 448 * <code>DYNAMIC_FACETABLE_OPTION_UNSPECIFIED = 0;</code> 449 */ 450 public static final int DYNAMIC_FACETABLE_OPTION_UNSPECIFIED_VALUE = 0; 451 /** 452 * 453 * 454 * <pre> 455 * Dynamic facetable option enabled for an attribute. 456 * </pre> 457 * 458 * <code>DYNAMIC_FACETABLE_ENABLED = 1;</code> 459 */ 460 public static final int DYNAMIC_FACETABLE_ENABLED_VALUE = 1; 461 /** 462 * 463 * 464 * <pre> 465 * Dynamic facetable option disabled for an attribute. 466 * </pre> 467 * 468 * <code>DYNAMIC_FACETABLE_DISABLED = 2;</code> 469 */ 470 public static final int DYNAMIC_FACETABLE_DISABLED_VALUE = 2; 471 getNumber()472 public final int getNumber() { 473 if (this == UNRECOGNIZED) { 474 throw new java.lang.IllegalArgumentException( 475 "Can't get the number of an unknown enum value."); 476 } 477 return value; 478 } 479 480 /** 481 * @param value The numeric wire value of the corresponding enum entry. 482 * @return The enum associated with the given numeric wire value. 483 * @deprecated Use {@link #forNumber(int)} instead. 484 */ 485 @java.lang.Deprecated valueOf(int value)486 public static DynamicFacetableOption valueOf(int value) { 487 return forNumber(value); 488 } 489 490 /** 491 * @param value The numeric wire value of the corresponding enum entry. 492 * @return The enum associated with the given numeric wire value. 493 */ forNumber(int value)494 public static DynamicFacetableOption forNumber(int value) { 495 switch (value) { 496 case 0: 497 return DYNAMIC_FACETABLE_OPTION_UNSPECIFIED; 498 case 1: 499 return DYNAMIC_FACETABLE_ENABLED; 500 case 2: 501 return DYNAMIC_FACETABLE_DISABLED; 502 default: 503 return null; 504 } 505 } 506 507 public static com.google.protobuf.Internal.EnumLiteMap<DynamicFacetableOption> internalGetValueMap()508 internalGetValueMap() { 509 return internalValueMap; 510 } 511 512 private static final com.google.protobuf.Internal.EnumLiteMap<DynamicFacetableOption> 513 internalValueMap = 514 new com.google.protobuf.Internal.EnumLiteMap<DynamicFacetableOption>() { 515 public DynamicFacetableOption findValueByNumber(int number) { 516 return DynamicFacetableOption.forNumber(number); 517 } 518 }; 519 getValueDescriptor()520 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 521 if (this == UNRECOGNIZED) { 522 throw new java.lang.IllegalStateException( 523 "Can't get the descriptor of an unrecognized enum value."); 524 } 525 return getDescriptor().getValues().get(ordinal()); 526 } 527 getDescriptorForType()528 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 529 return getDescriptor(); 530 } 531 getDescriptor()532 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 533 return com.google.cloud.retail.v2beta.CatalogAttribute.getDescriptor().getEnumTypes().get(2); 534 } 535 536 private static final DynamicFacetableOption[] VALUES = values(); 537 valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)538 public static DynamicFacetableOption valueOf( 539 com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 540 if (desc.getType() != getDescriptor()) { 541 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 542 } 543 if (desc.getIndex() == -1) { 544 return UNRECOGNIZED; 545 } 546 return VALUES[desc.getIndex()]; 547 } 548 549 private final int value; 550 DynamicFacetableOption(int value)551 private DynamicFacetableOption(int value) { 552 this.value = value; 553 } 554 555 // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2beta.CatalogAttribute.DynamicFacetableOption) 556 } 557 558 /** 559 * 560 * 561 * <pre> 562 * The status of the searchable option of a catalog attribute. 563 * </pre> 564 * 565 * Protobuf enum {@code google.cloud.retail.v2beta.CatalogAttribute.SearchableOption} 566 */ 567 public enum SearchableOption implements com.google.protobuf.ProtocolMessageEnum { 568 /** 569 * 570 * 571 * <pre> 572 * Value used when unset. 573 * </pre> 574 * 575 * <code>SEARCHABLE_OPTION_UNSPECIFIED = 0;</code> 576 */ 577 SEARCHABLE_OPTION_UNSPECIFIED(0), 578 /** 579 * 580 * 581 * <pre> 582 * Searchable option enabled for an attribute. 583 * </pre> 584 * 585 * <code>SEARCHABLE_ENABLED = 1;</code> 586 */ 587 SEARCHABLE_ENABLED(1), 588 /** 589 * 590 * 591 * <pre> 592 * Searchable option disabled for an attribute. 593 * </pre> 594 * 595 * <code>SEARCHABLE_DISABLED = 2;</code> 596 */ 597 SEARCHABLE_DISABLED(2), 598 UNRECOGNIZED(-1), 599 ; 600 601 /** 602 * 603 * 604 * <pre> 605 * Value used when unset. 606 * </pre> 607 * 608 * <code>SEARCHABLE_OPTION_UNSPECIFIED = 0;</code> 609 */ 610 public static final int SEARCHABLE_OPTION_UNSPECIFIED_VALUE = 0; 611 /** 612 * 613 * 614 * <pre> 615 * Searchable option enabled for an attribute. 616 * </pre> 617 * 618 * <code>SEARCHABLE_ENABLED = 1;</code> 619 */ 620 public static final int SEARCHABLE_ENABLED_VALUE = 1; 621 /** 622 * 623 * 624 * <pre> 625 * Searchable option disabled for an attribute. 626 * </pre> 627 * 628 * <code>SEARCHABLE_DISABLED = 2;</code> 629 */ 630 public static final int SEARCHABLE_DISABLED_VALUE = 2; 631 getNumber()632 public final int getNumber() { 633 if (this == UNRECOGNIZED) { 634 throw new java.lang.IllegalArgumentException( 635 "Can't get the number of an unknown enum value."); 636 } 637 return value; 638 } 639 640 /** 641 * @param value The numeric wire value of the corresponding enum entry. 642 * @return The enum associated with the given numeric wire value. 643 * @deprecated Use {@link #forNumber(int)} instead. 644 */ 645 @java.lang.Deprecated valueOf(int value)646 public static SearchableOption valueOf(int value) { 647 return forNumber(value); 648 } 649 650 /** 651 * @param value The numeric wire value of the corresponding enum entry. 652 * @return The enum associated with the given numeric wire value. 653 */ forNumber(int value)654 public static SearchableOption forNumber(int value) { 655 switch (value) { 656 case 0: 657 return SEARCHABLE_OPTION_UNSPECIFIED; 658 case 1: 659 return SEARCHABLE_ENABLED; 660 case 2: 661 return SEARCHABLE_DISABLED; 662 default: 663 return null; 664 } 665 } 666 internalGetValueMap()667 public static com.google.protobuf.Internal.EnumLiteMap<SearchableOption> internalGetValueMap() { 668 return internalValueMap; 669 } 670 671 private static final com.google.protobuf.Internal.EnumLiteMap<SearchableOption> 672 internalValueMap = 673 new com.google.protobuf.Internal.EnumLiteMap<SearchableOption>() { 674 public SearchableOption findValueByNumber(int number) { 675 return SearchableOption.forNumber(number); 676 } 677 }; 678 getValueDescriptor()679 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 680 if (this == UNRECOGNIZED) { 681 throw new java.lang.IllegalStateException( 682 "Can't get the descriptor of an unrecognized enum value."); 683 } 684 return getDescriptor().getValues().get(ordinal()); 685 } 686 getDescriptorForType()687 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 688 return getDescriptor(); 689 } 690 getDescriptor()691 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 692 return com.google.cloud.retail.v2beta.CatalogAttribute.getDescriptor().getEnumTypes().get(3); 693 } 694 695 private static final SearchableOption[] VALUES = values(); 696 valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)697 public static SearchableOption valueOf( 698 com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 699 if (desc.getType() != getDescriptor()) { 700 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 701 } 702 if (desc.getIndex() == -1) { 703 return UNRECOGNIZED; 704 } 705 return VALUES[desc.getIndex()]; 706 } 707 708 private final int value; 709 SearchableOption(int value)710 private SearchableOption(int value) { 711 this.value = value; 712 } 713 714 // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2beta.CatalogAttribute.SearchableOption) 715 } 716 717 /** 718 * 719 * 720 * <pre> 721 * The status of the exact-searchable option of a catalog attribute. 722 * </pre> 723 * 724 * Protobuf enum {@code google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption} 725 */ 726 public enum ExactSearchableOption implements com.google.protobuf.ProtocolMessageEnum { 727 /** 728 * 729 * 730 * <pre> 731 * Value used when unset. 732 * </pre> 733 * 734 * <code>EXACT_SEARCHABLE_OPTION_UNSPECIFIED = 0;</code> 735 */ 736 EXACT_SEARCHABLE_OPTION_UNSPECIFIED(0), 737 /** 738 * 739 * 740 * <pre> 741 * Exact searchable option enabled for an attribute. 742 * </pre> 743 * 744 * <code>EXACT_SEARCHABLE_ENABLED = 1;</code> 745 */ 746 EXACT_SEARCHABLE_ENABLED(1), 747 /** 748 * 749 * 750 * <pre> 751 * Exact searchable option disabled for an attribute. 752 * </pre> 753 * 754 * <code>EXACT_SEARCHABLE_DISABLED = 2;</code> 755 */ 756 EXACT_SEARCHABLE_DISABLED(2), 757 UNRECOGNIZED(-1), 758 ; 759 760 /** 761 * 762 * 763 * <pre> 764 * Value used when unset. 765 * </pre> 766 * 767 * <code>EXACT_SEARCHABLE_OPTION_UNSPECIFIED = 0;</code> 768 */ 769 public static final int EXACT_SEARCHABLE_OPTION_UNSPECIFIED_VALUE = 0; 770 /** 771 * 772 * 773 * <pre> 774 * Exact searchable option enabled for an attribute. 775 * </pre> 776 * 777 * <code>EXACT_SEARCHABLE_ENABLED = 1;</code> 778 */ 779 public static final int EXACT_SEARCHABLE_ENABLED_VALUE = 1; 780 /** 781 * 782 * 783 * <pre> 784 * Exact searchable option disabled for an attribute. 785 * </pre> 786 * 787 * <code>EXACT_SEARCHABLE_DISABLED = 2;</code> 788 */ 789 public static final int EXACT_SEARCHABLE_DISABLED_VALUE = 2; 790 getNumber()791 public final int getNumber() { 792 if (this == UNRECOGNIZED) { 793 throw new java.lang.IllegalArgumentException( 794 "Can't get the number of an unknown enum value."); 795 } 796 return value; 797 } 798 799 /** 800 * @param value The numeric wire value of the corresponding enum entry. 801 * @return The enum associated with the given numeric wire value. 802 * @deprecated Use {@link #forNumber(int)} instead. 803 */ 804 @java.lang.Deprecated valueOf(int value)805 public static ExactSearchableOption valueOf(int value) { 806 return forNumber(value); 807 } 808 809 /** 810 * @param value The numeric wire value of the corresponding enum entry. 811 * @return The enum associated with the given numeric wire value. 812 */ forNumber(int value)813 public static ExactSearchableOption forNumber(int value) { 814 switch (value) { 815 case 0: 816 return EXACT_SEARCHABLE_OPTION_UNSPECIFIED; 817 case 1: 818 return EXACT_SEARCHABLE_ENABLED; 819 case 2: 820 return EXACT_SEARCHABLE_DISABLED; 821 default: 822 return null; 823 } 824 } 825 826 public static com.google.protobuf.Internal.EnumLiteMap<ExactSearchableOption> internalGetValueMap()827 internalGetValueMap() { 828 return internalValueMap; 829 } 830 831 private static final com.google.protobuf.Internal.EnumLiteMap<ExactSearchableOption> 832 internalValueMap = 833 new com.google.protobuf.Internal.EnumLiteMap<ExactSearchableOption>() { 834 public ExactSearchableOption findValueByNumber(int number) { 835 return ExactSearchableOption.forNumber(number); 836 } 837 }; 838 getValueDescriptor()839 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 840 if (this == UNRECOGNIZED) { 841 throw new java.lang.IllegalStateException( 842 "Can't get the descriptor of an unrecognized enum value."); 843 } 844 return getDescriptor().getValues().get(ordinal()); 845 } 846 getDescriptorForType()847 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 848 return getDescriptor(); 849 } 850 getDescriptor()851 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 852 return com.google.cloud.retail.v2beta.CatalogAttribute.getDescriptor().getEnumTypes().get(4); 853 } 854 855 private static final ExactSearchableOption[] VALUES = values(); 856 valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)857 public static ExactSearchableOption valueOf( 858 com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 859 if (desc.getType() != getDescriptor()) { 860 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 861 } 862 if (desc.getIndex() == -1) { 863 return UNRECOGNIZED; 864 } 865 return VALUES[desc.getIndex()]; 866 } 867 868 private final int value; 869 ExactSearchableOption(int value)870 private ExactSearchableOption(int value) { 871 this.value = value; 872 } 873 874 // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption) 875 } 876 877 /** 878 * 879 * 880 * <pre> 881 * The status of the retrievable option of a catalog attribute. 882 * </pre> 883 * 884 * Protobuf enum {@code google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption} 885 */ 886 public enum RetrievableOption implements com.google.protobuf.ProtocolMessageEnum { 887 /** 888 * 889 * 890 * <pre> 891 * Value used when unset. 892 * </pre> 893 * 894 * <code>RETRIEVABLE_OPTION_UNSPECIFIED = 0;</code> 895 */ 896 RETRIEVABLE_OPTION_UNSPECIFIED(0), 897 /** 898 * 899 * 900 * <pre> 901 * Retrievable option enabled for an attribute. 902 * </pre> 903 * 904 * <code>RETRIEVABLE_ENABLED = 1;</code> 905 */ 906 RETRIEVABLE_ENABLED(1), 907 /** 908 * 909 * 910 * <pre> 911 * Retrievable option disabled for an attribute. 912 * </pre> 913 * 914 * <code>RETRIEVABLE_DISABLED = 2;</code> 915 */ 916 RETRIEVABLE_DISABLED(2), 917 UNRECOGNIZED(-1), 918 ; 919 920 /** 921 * 922 * 923 * <pre> 924 * Value used when unset. 925 * </pre> 926 * 927 * <code>RETRIEVABLE_OPTION_UNSPECIFIED = 0;</code> 928 */ 929 public static final int RETRIEVABLE_OPTION_UNSPECIFIED_VALUE = 0; 930 /** 931 * 932 * 933 * <pre> 934 * Retrievable option enabled for an attribute. 935 * </pre> 936 * 937 * <code>RETRIEVABLE_ENABLED = 1;</code> 938 */ 939 public static final int RETRIEVABLE_ENABLED_VALUE = 1; 940 /** 941 * 942 * 943 * <pre> 944 * Retrievable option disabled for an attribute. 945 * </pre> 946 * 947 * <code>RETRIEVABLE_DISABLED = 2;</code> 948 */ 949 public static final int RETRIEVABLE_DISABLED_VALUE = 2; 950 getNumber()951 public final int getNumber() { 952 if (this == UNRECOGNIZED) { 953 throw new java.lang.IllegalArgumentException( 954 "Can't get the number of an unknown enum value."); 955 } 956 return value; 957 } 958 959 /** 960 * @param value The numeric wire value of the corresponding enum entry. 961 * @return The enum associated with the given numeric wire value. 962 * @deprecated Use {@link #forNumber(int)} instead. 963 */ 964 @java.lang.Deprecated valueOf(int value)965 public static RetrievableOption valueOf(int value) { 966 return forNumber(value); 967 } 968 969 /** 970 * @param value The numeric wire value of the corresponding enum entry. 971 * @return The enum associated with the given numeric wire value. 972 */ forNumber(int value)973 public static RetrievableOption forNumber(int value) { 974 switch (value) { 975 case 0: 976 return RETRIEVABLE_OPTION_UNSPECIFIED; 977 case 1: 978 return RETRIEVABLE_ENABLED; 979 case 2: 980 return RETRIEVABLE_DISABLED; 981 default: 982 return null; 983 } 984 } 985 986 public static com.google.protobuf.Internal.EnumLiteMap<RetrievableOption> internalGetValueMap()987 internalGetValueMap() { 988 return internalValueMap; 989 } 990 991 private static final com.google.protobuf.Internal.EnumLiteMap<RetrievableOption> 992 internalValueMap = 993 new com.google.protobuf.Internal.EnumLiteMap<RetrievableOption>() { 994 public RetrievableOption findValueByNumber(int number) { 995 return RetrievableOption.forNumber(number); 996 } 997 }; 998 getValueDescriptor()999 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 1000 if (this == UNRECOGNIZED) { 1001 throw new java.lang.IllegalStateException( 1002 "Can't get the descriptor of an unrecognized enum value."); 1003 } 1004 return getDescriptor().getValues().get(ordinal()); 1005 } 1006 getDescriptorForType()1007 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 1008 return getDescriptor(); 1009 } 1010 getDescriptor()1011 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 1012 return com.google.cloud.retail.v2beta.CatalogAttribute.getDescriptor().getEnumTypes().get(5); 1013 } 1014 1015 private static final RetrievableOption[] VALUES = values(); 1016 valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)1017 public static RetrievableOption valueOf( 1018 com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 1019 if (desc.getType() != getDescriptor()) { 1020 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 1021 } 1022 if (desc.getIndex() == -1) { 1023 return UNRECOGNIZED; 1024 } 1025 return VALUES[desc.getIndex()]; 1026 } 1027 1028 private final int value; 1029 RetrievableOption(int value)1030 private RetrievableOption(int value) { 1031 this.value = value; 1032 } 1033 1034 // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption) 1035 } 1036 1037 public static final int KEY_FIELD_NUMBER = 1; 1038 1039 @SuppressWarnings("serial") 1040 private volatile java.lang.Object key_ = ""; 1041 /** 1042 * 1043 * 1044 * <pre> 1045 * Required. Attribute name. 1046 * For example: `color`, `brands`, `attributes.custom_attribute`, such as 1047 * `attributes.xyz`. 1048 * To be indexable, the attribute name can contain only alpha-numeric 1049 * characters and underscores. For example, an attribute named 1050 * `attributes.abc_xyz` can be indexed, but an attribute named 1051 * `attributes.abc-xyz` cannot be indexed. 1052 * If the attribute key starts with `attributes.`, then the attribute is a 1053 * custom attribute. Attributes such as `brands`, `patterns`, and `title` are 1054 * built-in and called system attributes. 1055 * </pre> 1056 * 1057 * <code>string key = 1 [(.google.api.field_behavior) = REQUIRED];</code> 1058 * 1059 * @return The key. 1060 */ 1061 @java.lang.Override getKey()1062 public java.lang.String getKey() { 1063 java.lang.Object ref = key_; 1064 if (ref instanceof java.lang.String) { 1065 return (java.lang.String) ref; 1066 } else { 1067 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1068 java.lang.String s = bs.toStringUtf8(); 1069 key_ = s; 1070 return s; 1071 } 1072 } 1073 /** 1074 * 1075 * 1076 * <pre> 1077 * Required. Attribute name. 1078 * For example: `color`, `brands`, `attributes.custom_attribute`, such as 1079 * `attributes.xyz`. 1080 * To be indexable, the attribute name can contain only alpha-numeric 1081 * characters and underscores. For example, an attribute named 1082 * `attributes.abc_xyz` can be indexed, but an attribute named 1083 * `attributes.abc-xyz` cannot be indexed. 1084 * If the attribute key starts with `attributes.`, then the attribute is a 1085 * custom attribute. Attributes such as `brands`, `patterns`, and `title` are 1086 * built-in and called system attributes. 1087 * </pre> 1088 * 1089 * <code>string key = 1 [(.google.api.field_behavior) = REQUIRED];</code> 1090 * 1091 * @return The bytes for key. 1092 */ 1093 @java.lang.Override getKeyBytes()1094 public com.google.protobuf.ByteString getKeyBytes() { 1095 java.lang.Object ref = key_; 1096 if (ref instanceof java.lang.String) { 1097 com.google.protobuf.ByteString b = 1098 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1099 key_ = b; 1100 return b; 1101 } else { 1102 return (com.google.protobuf.ByteString) ref; 1103 } 1104 } 1105 1106 public static final int IN_USE_FIELD_NUMBER = 9; 1107 private boolean inUse_ = false; 1108 /** 1109 * 1110 * 1111 * <pre> 1112 * Output only. Indicates whether this attribute has been used by any 1113 * products. `True` if at least one 1114 * [Product][google.cloud.retail.v2beta.Product] is using this attribute in 1115 * [Product.attributes][google.cloud.retail.v2beta.Product.attributes]. 1116 * Otherwise, this field is `False`. 1117 * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] can be 1118 * pre-loaded by using 1119 * [CatalogService.AddCatalogAttribute][google.cloud.retail.v2beta.CatalogService.AddCatalogAttribute], 1120 * [CatalogService.ImportCatalogAttributes][], or 1121 * [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2beta.CatalogService.UpdateAttributesConfig] 1122 * APIs. This field is `False` for pre-loaded 1123 * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s. 1124 * Only pre-loaded [catalog 1125 * attributes][google.cloud.retail.v2beta.CatalogAttribute] that are neither 1126 * in use by products nor predefined can be deleted. [Catalog 1127 * attributes][google.cloud.retail.v2beta.CatalogAttribute] that are 1128 * either in use by products or are predefined attributes cannot be deleted; 1129 * however, their configuration properties will reset to default values upon 1130 * removal request. 1131 * After catalog changes, it takes about 10 minutes for this field to update. 1132 * </pre> 1133 * 1134 * <code>bool in_use = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 1135 * 1136 * @return The inUse. 1137 */ 1138 @java.lang.Override getInUse()1139 public boolean getInUse() { 1140 return inUse_; 1141 } 1142 1143 public static final int TYPE_FIELD_NUMBER = 10; 1144 private int type_ = 0; 1145 /** 1146 * 1147 * 1148 * <pre> 1149 * Output only. The type of this attribute. This is derived from the attribute 1150 * in [Product.attributes][google.cloud.retail.v2beta.Product.attributes]. 1151 * </pre> 1152 * 1153 * <code> 1154 * .google.cloud.retail.v2beta.CatalogAttribute.AttributeType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1155 * </code> 1156 * 1157 * @return The enum numeric value on the wire for type. 1158 */ 1159 @java.lang.Override getTypeValue()1160 public int getTypeValue() { 1161 return type_; 1162 } 1163 /** 1164 * 1165 * 1166 * <pre> 1167 * Output only. The type of this attribute. This is derived from the attribute 1168 * in [Product.attributes][google.cloud.retail.v2beta.Product.attributes]. 1169 * </pre> 1170 * 1171 * <code> 1172 * .google.cloud.retail.v2beta.CatalogAttribute.AttributeType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1173 * </code> 1174 * 1175 * @return The type. 1176 */ 1177 @java.lang.Override getType()1178 public com.google.cloud.retail.v2beta.CatalogAttribute.AttributeType getType() { 1179 com.google.cloud.retail.v2beta.CatalogAttribute.AttributeType result = 1180 com.google.cloud.retail.v2beta.CatalogAttribute.AttributeType.forNumber(type_); 1181 return result == null 1182 ? com.google.cloud.retail.v2beta.CatalogAttribute.AttributeType.UNRECOGNIZED 1183 : result; 1184 } 1185 1186 public static final int INDEXABLE_OPTION_FIELD_NUMBER = 5; 1187 private int indexableOption_ = 0; 1188 /** 1189 * 1190 * 1191 * <pre> 1192 * When 1193 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] 1194 * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values 1195 * are indexed so that it can be filtered, faceted, or boosted in 1196 * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. 1197 * Must be specified, otherwise throws INVALID_FORMAT error. 1198 * </pre> 1199 * 1200 * <code>.google.cloud.retail.v2beta.CatalogAttribute.IndexableOption indexable_option = 5;</code> 1201 * 1202 * @return The enum numeric value on the wire for indexableOption. 1203 */ 1204 @java.lang.Override getIndexableOptionValue()1205 public int getIndexableOptionValue() { 1206 return indexableOption_; 1207 } 1208 /** 1209 * 1210 * 1211 * <pre> 1212 * When 1213 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] 1214 * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values 1215 * are indexed so that it can be filtered, faceted, or boosted in 1216 * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. 1217 * Must be specified, otherwise throws INVALID_FORMAT error. 1218 * </pre> 1219 * 1220 * <code>.google.cloud.retail.v2beta.CatalogAttribute.IndexableOption indexable_option = 5;</code> 1221 * 1222 * @return The indexableOption. 1223 */ 1224 @java.lang.Override getIndexableOption()1225 public com.google.cloud.retail.v2beta.CatalogAttribute.IndexableOption getIndexableOption() { 1226 com.google.cloud.retail.v2beta.CatalogAttribute.IndexableOption result = 1227 com.google.cloud.retail.v2beta.CatalogAttribute.IndexableOption.forNumber(indexableOption_); 1228 return result == null 1229 ? com.google.cloud.retail.v2beta.CatalogAttribute.IndexableOption.UNRECOGNIZED 1230 : result; 1231 } 1232 1233 public static final int DYNAMIC_FACETABLE_OPTION_FIELD_NUMBER = 6; 1234 private int dynamicFacetableOption_ = 0; 1235 /** 1236 * 1237 * 1238 * <pre> 1239 * If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic 1240 * facet. Could only be DYNAMIC_FACETABLE_DISABLED if 1241 * [CatalogAttribute.indexable_option][google.cloud.retail.v2beta.CatalogAttribute.indexable_option] 1242 * is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned. 1243 * Must be specified, otherwise throws INVALID_FORMAT error. 1244 * </pre> 1245 * 1246 * <code> 1247 * .google.cloud.retail.v2beta.CatalogAttribute.DynamicFacetableOption dynamic_facetable_option = 6; 1248 * </code> 1249 * 1250 * @return The enum numeric value on the wire for dynamicFacetableOption. 1251 */ 1252 @java.lang.Override getDynamicFacetableOptionValue()1253 public int getDynamicFacetableOptionValue() { 1254 return dynamicFacetableOption_; 1255 } 1256 /** 1257 * 1258 * 1259 * <pre> 1260 * If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic 1261 * facet. Could only be DYNAMIC_FACETABLE_DISABLED if 1262 * [CatalogAttribute.indexable_option][google.cloud.retail.v2beta.CatalogAttribute.indexable_option] 1263 * is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned. 1264 * Must be specified, otherwise throws INVALID_FORMAT error. 1265 * </pre> 1266 * 1267 * <code> 1268 * .google.cloud.retail.v2beta.CatalogAttribute.DynamicFacetableOption dynamic_facetable_option = 6; 1269 * </code> 1270 * 1271 * @return The dynamicFacetableOption. 1272 */ 1273 @java.lang.Override 1274 public com.google.cloud.retail.v2beta.CatalogAttribute.DynamicFacetableOption getDynamicFacetableOption()1275 getDynamicFacetableOption() { 1276 com.google.cloud.retail.v2beta.CatalogAttribute.DynamicFacetableOption result = 1277 com.google.cloud.retail.v2beta.CatalogAttribute.DynamicFacetableOption.forNumber( 1278 dynamicFacetableOption_); 1279 return result == null 1280 ? com.google.cloud.retail.v2beta.CatalogAttribute.DynamicFacetableOption.UNRECOGNIZED 1281 : result; 1282 } 1283 1284 public static final int SEARCHABLE_OPTION_FIELD_NUMBER = 7; 1285 private int searchableOption_ = 0; 1286 /** 1287 * 1288 * 1289 * <pre> 1290 * When 1291 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] 1292 * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values 1293 * are searchable by text queries in 1294 * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. 1295 * If SEARCHABLE_ENABLED but attribute type is numerical, attribute values 1296 * will not be searchable by text queries in 1297 * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], as 1298 * there are no text values associated to numerical attributes. 1299 * Must be specified, otherwise throws INVALID_FORMAT error. 1300 * </pre> 1301 * 1302 * <code>.google.cloud.retail.v2beta.CatalogAttribute.SearchableOption searchable_option = 7; 1303 * </code> 1304 * 1305 * @return The enum numeric value on the wire for searchableOption. 1306 */ 1307 @java.lang.Override getSearchableOptionValue()1308 public int getSearchableOptionValue() { 1309 return searchableOption_; 1310 } 1311 /** 1312 * 1313 * 1314 * <pre> 1315 * When 1316 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] 1317 * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values 1318 * are searchable by text queries in 1319 * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. 1320 * If SEARCHABLE_ENABLED but attribute type is numerical, attribute values 1321 * will not be searchable by text queries in 1322 * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], as 1323 * there are no text values associated to numerical attributes. 1324 * Must be specified, otherwise throws INVALID_FORMAT error. 1325 * </pre> 1326 * 1327 * <code>.google.cloud.retail.v2beta.CatalogAttribute.SearchableOption searchable_option = 7; 1328 * </code> 1329 * 1330 * @return The searchableOption. 1331 */ 1332 @java.lang.Override getSearchableOption()1333 public com.google.cloud.retail.v2beta.CatalogAttribute.SearchableOption getSearchableOption() { 1334 com.google.cloud.retail.v2beta.CatalogAttribute.SearchableOption result = 1335 com.google.cloud.retail.v2beta.CatalogAttribute.SearchableOption.forNumber( 1336 searchableOption_); 1337 return result == null 1338 ? com.google.cloud.retail.v2beta.CatalogAttribute.SearchableOption.UNRECOGNIZED 1339 : result; 1340 } 1341 1342 public static final int RECOMMENDATIONS_FILTERING_OPTION_FIELD_NUMBER = 8; 1343 private int recommendationsFilteringOption_ = 0; 1344 /** 1345 * 1346 * 1347 * <pre> 1348 * When 1349 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] 1350 * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED, 1351 * attribute values are filterable for recommendations. 1352 * This option works for categorical features only, 1353 * does not work for numerical features, inventory filtering. 1354 * </pre> 1355 * 1356 * <code> 1357 * .google.cloud.retail.v2beta.RecommendationsFilteringOption recommendations_filtering_option = 8; 1358 * </code> 1359 * 1360 * @return The enum numeric value on the wire for recommendationsFilteringOption. 1361 */ 1362 @java.lang.Override getRecommendationsFilteringOptionValue()1363 public int getRecommendationsFilteringOptionValue() { 1364 return recommendationsFilteringOption_; 1365 } 1366 /** 1367 * 1368 * 1369 * <pre> 1370 * When 1371 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] 1372 * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED, 1373 * attribute values are filterable for recommendations. 1374 * This option works for categorical features only, 1375 * does not work for numerical features, inventory filtering. 1376 * </pre> 1377 * 1378 * <code> 1379 * .google.cloud.retail.v2beta.RecommendationsFilteringOption recommendations_filtering_option = 8; 1380 * </code> 1381 * 1382 * @return The recommendationsFilteringOption. 1383 */ 1384 @java.lang.Override 1385 public com.google.cloud.retail.v2beta.RecommendationsFilteringOption getRecommendationsFilteringOption()1386 getRecommendationsFilteringOption() { 1387 com.google.cloud.retail.v2beta.RecommendationsFilteringOption result = 1388 com.google.cloud.retail.v2beta.RecommendationsFilteringOption.forNumber( 1389 recommendationsFilteringOption_); 1390 return result == null 1391 ? com.google.cloud.retail.v2beta.RecommendationsFilteringOption.UNRECOGNIZED 1392 : result; 1393 } 1394 1395 public static final int EXACT_SEARCHABLE_OPTION_FIELD_NUMBER = 11; 1396 private int exactSearchableOption_ = 0; 1397 /** 1398 * 1399 * 1400 * <pre> 1401 * If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. 1402 * This property only applies to textual custom attributes and requires 1403 * indexable set to enabled to enable exact-searchable. If unset, the server 1404 * behavior defaults to 1405 * [EXACT_SEARCHABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption.EXACT_SEARCHABLE_DISABLED]. 1406 * </pre> 1407 * 1408 * <code> 1409 * .google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption exact_searchable_option = 11; 1410 * </code> 1411 * 1412 * @return The enum numeric value on the wire for exactSearchableOption. 1413 */ 1414 @java.lang.Override getExactSearchableOptionValue()1415 public int getExactSearchableOptionValue() { 1416 return exactSearchableOption_; 1417 } 1418 /** 1419 * 1420 * 1421 * <pre> 1422 * If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. 1423 * This property only applies to textual custom attributes and requires 1424 * indexable set to enabled to enable exact-searchable. If unset, the server 1425 * behavior defaults to 1426 * [EXACT_SEARCHABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption.EXACT_SEARCHABLE_DISABLED]. 1427 * </pre> 1428 * 1429 * <code> 1430 * .google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption exact_searchable_option = 11; 1431 * </code> 1432 * 1433 * @return The exactSearchableOption. 1434 */ 1435 @java.lang.Override 1436 public com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption getExactSearchableOption()1437 getExactSearchableOption() { 1438 com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption result = 1439 com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption.forNumber( 1440 exactSearchableOption_); 1441 return result == null 1442 ? com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption.UNRECOGNIZED 1443 : result; 1444 } 1445 1446 public static final int RETRIEVABLE_OPTION_FIELD_NUMBER = 12; 1447 private int retrievableOption_ = 0; 1448 /** 1449 * 1450 * 1451 * <pre> 1452 * If RETRIEVABLE_ENABLED, attribute values are retrievable in the search 1453 * results. If unset, the server behavior defaults to 1454 * [RETRIEVABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption.RETRIEVABLE_DISABLED]. 1455 * </pre> 1456 * 1457 * <code>.google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption retrievable_option = 12; 1458 * </code> 1459 * 1460 * @return The enum numeric value on the wire for retrievableOption. 1461 */ 1462 @java.lang.Override getRetrievableOptionValue()1463 public int getRetrievableOptionValue() { 1464 return retrievableOption_; 1465 } 1466 /** 1467 * 1468 * 1469 * <pre> 1470 * If RETRIEVABLE_ENABLED, attribute values are retrievable in the search 1471 * results. If unset, the server behavior defaults to 1472 * [RETRIEVABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption.RETRIEVABLE_DISABLED]. 1473 * </pre> 1474 * 1475 * <code>.google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption retrievable_option = 12; 1476 * </code> 1477 * 1478 * @return The retrievableOption. 1479 */ 1480 @java.lang.Override getRetrievableOption()1481 public com.google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption getRetrievableOption() { 1482 com.google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption result = 1483 com.google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption.forNumber( 1484 retrievableOption_); 1485 return result == null 1486 ? com.google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption.UNRECOGNIZED 1487 : result; 1488 } 1489 1490 private byte memoizedIsInitialized = -1; 1491 1492 @java.lang.Override isInitialized()1493 public final boolean isInitialized() { 1494 byte isInitialized = memoizedIsInitialized; 1495 if (isInitialized == 1) return true; 1496 if (isInitialized == 0) return false; 1497 1498 memoizedIsInitialized = 1; 1499 return true; 1500 } 1501 1502 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)1503 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 1504 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { 1505 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); 1506 } 1507 if (indexableOption_ 1508 != com.google.cloud.retail.v2beta.CatalogAttribute.IndexableOption 1509 .INDEXABLE_OPTION_UNSPECIFIED 1510 .getNumber()) { 1511 output.writeEnum(5, indexableOption_); 1512 } 1513 if (dynamicFacetableOption_ 1514 != com.google.cloud.retail.v2beta.CatalogAttribute.DynamicFacetableOption 1515 .DYNAMIC_FACETABLE_OPTION_UNSPECIFIED 1516 .getNumber()) { 1517 output.writeEnum(6, dynamicFacetableOption_); 1518 } 1519 if (searchableOption_ 1520 != com.google.cloud.retail.v2beta.CatalogAttribute.SearchableOption 1521 .SEARCHABLE_OPTION_UNSPECIFIED 1522 .getNumber()) { 1523 output.writeEnum(7, searchableOption_); 1524 } 1525 if (recommendationsFilteringOption_ 1526 != com.google.cloud.retail.v2beta.RecommendationsFilteringOption 1527 .RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED 1528 .getNumber()) { 1529 output.writeEnum(8, recommendationsFilteringOption_); 1530 } 1531 if (inUse_ != false) { 1532 output.writeBool(9, inUse_); 1533 } 1534 if (type_ 1535 != com.google.cloud.retail.v2beta.CatalogAttribute.AttributeType.UNKNOWN.getNumber()) { 1536 output.writeEnum(10, type_); 1537 } 1538 if (exactSearchableOption_ 1539 != com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption 1540 .EXACT_SEARCHABLE_OPTION_UNSPECIFIED 1541 .getNumber()) { 1542 output.writeEnum(11, exactSearchableOption_); 1543 } 1544 if (retrievableOption_ 1545 != com.google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption 1546 .RETRIEVABLE_OPTION_UNSPECIFIED 1547 .getNumber()) { 1548 output.writeEnum(12, retrievableOption_); 1549 } 1550 getUnknownFields().writeTo(output); 1551 } 1552 1553 @java.lang.Override getSerializedSize()1554 public int getSerializedSize() { 1555 int size = memoizedSize; 1556 if (size != -1) return size; 1557 1558 size = 0; 1559 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { 1560 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); 1561 } 1562 if (indexableOption_ 1563 != com.google.cloud.retail.v2beta.CatalogAttribute.IndexableOption 1564 .INDEXABLE_OPTION_UNSPECIFIED 1565 .getNumber()) { 1566 size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, indexableOption_); 1567 } 1568 if (dynamicFacetableOption_ 1569 != com.google.cloud.retail.v2beta.CatalogAttribute.DynamicFacetableOption 1570 .DYNAMIC_FACETABLE_OPTION_UNSPECIFIED 1571 .getNumber()) { 1572 size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, dynamicFacetableOption_); 1573 } 1574 if (searchableOption_ 1575 != com.google.cloud.retail.v2beta.CatalogAttribute.SearchableOption 1576 .SEARCHABLE_OPTION_UNSPECIFIED 1577 .getNumber()) { 1578 size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, searchableOption_); 1579 } 1580 if (recommendationsFilteringOption_ 1581 != com.google.cloud.retail.v2beta.RecommendationsFilteringOption 1582 .RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED 1583 .getNumber()) { 1584 size += 1585 com.google.protobuf.CodedOutputStream.computeEnumSize(8, recommendationsFilteringOption_); 1586 } 1587 if (inUse_ != false) { 1588 size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, inUse_); 1589 } 1590 if (type_ 1591 != com.google.cloud.retail.v2beta.CatalogAttribute.AttributeType.UNKNOWN.getNumber()) { 1592 size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, type_); 1593 } 1594 if (exactSearchableOption_ 1595 != com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption 1596 .EXACT_SEARCHABLE_OPTION_UNSPECIFIED 1597 .getNumber()) { 1598 size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, exactSearchableOption_); 1599 } 1600 if (retrievableOption_ 1601 != com.google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption 1602 .RETRIEVABLE_OPTION_UNSPECIFIED 1603 .getNumber()) { 1604 size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, retrievableOption_); 1605 } 1606 size += getUnknownFields().getSerializedSize(); 1607 memoizedSize = size; 1608 return size; 1609 } 1610 1611 @java.lang.Override equals(final java.lang.Object obj)1612 public boolean equals(final java.lang.Object obj) { 1613 if (obj == this) { 1614 return true; 1615 } 1616 if (!(obj instanceof com.google.cloud.retail.v2beta.CatalogAttribute)) { 1617 return super.equals(obj); 1618 } 1619 com.google.cloud.retail.v2beta.CatalogAttribute other = 1620 (com.google.cloud.retail.v2beta.CatalogAttribute) obj; 1621 1622 if (!getKey().equals(other.getKey())) return false; 1623 if (getInUse() != other.getInUse()) return false; 1624 if (type_ != other.type_) return false; 1625 if (indexableOption_ != other.indexableOption_) return false; 1626 if (dynamicFacetableOption_ != other.dynamicFacetableOption_) return false; 1627 if (searchableOption_ != other.searchableOption_) return false; 1628 if (recommendationsFilteringOption_ != other.recommendationsFilteringOption_) return false; 1629 if (exactSearchableOption_ != other.exactSearchableOption_) return false; 1630 if (retrievableOption_ != other.retrievableOption_) return false; 1631 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 1632 return true; 1633 } 1634 1635 @java.lang.Override hashCode()1636 public int hashCode() { 1637 if (memoizedHashCode != 0) { 1638 return memoizedHashCode; 1639 } 1640 int hash = 41; 1641 hash = (19 * hash) + getDescriptor().hashCode(); 1642 hash = (37 * hash) + KEY_FIELD_NUMBER; 1643 hash = (53 * hash) + getKey().hashCode(); 1644 hash = (37 * hash) + IN_USE_FIELD_NUMBER; 1645 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInUse()); 1646 hash = (37 * hash) + TYPE_FIELD_NUMBER; 1647 hash = (53 * hash) + type_; 1648 hash = (37 * hash) + INDEXABLE_OPTION_FIELD_NUMBER; 1649 hash = (53 * hash) + indexableOption_; 1650 hash = (37 * hash) + DYNAMIC_FACETABLE_OPTION_FIELD_NUMBER; 1651 hash = (53 * hash) + dynamicFacetableOption_; 1652 hash = (37 * hash) + SEARCHABLE_OPTION_FIELD_NUMBER; 1653 hash = (53 * hash) + searchableOption_; 1654 hash = (37 * hash) + RECOMMENDATIONS_FILTERING_OPTION_FIELD_NUMBER; 1655 hash = (53 * hash) + recommendationsFilteringOption_; 1656 hash = (37 * hash) + EXACT_SEARCHABLE_OPTION_FIELD_NUMBER; 1657 hash = (53 * hash) + exactSearchableOption_; 1658 hash = (37 * hash) + RETRIEVABLE_OPTION_FIELD_NUMBER; 1659 hash = (53 * hash) + retrievableOption_; 1660 hash = (29 * hash) + getUnknownFields().hashCode(); 1661 memoizedHashCode = hash; 1662 return hash; 1663 } 1664 parseFrom(java.nio.ByteBuffer data)1665 public static com.google.cloud.retail.v2beta.CatalogAttribute parseFrom(java.nio.ByteBuffer data) 1666 throws com.google.protobuf.InvalidProtocolBufferException { 1667 return PARSER.parseFrom(data); 1668 } 1669 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1670 public static com.google.cloud.retail.v2beta.CatalogAttribute parseFrom( 1671 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1672 throws com.google.protobuf.InvalidProtocolBufferException { 1673 return PARSER.parseFrom(data, extensionRegistry); 1674 } 1675 parseFrom( com.google.protobuf.ByteString data)1676 public static com.google.cloud.retail.v2beta.CatalogAttribute parseFrom( 1677 com.google.protobuf.ByteString data) 1678 throws com.google.protobuf.InvalidProtocolBufferException { 1679 return PARSER.parseFrom(data); 1680 } 1681 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1682 public static com.google.cloud.retail.v2beta.CatalogAttribute parseFrom( 1683 com.google.protobuf.ByteString data, 1684 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1685 throws com.google.protobuf.InvalidProtocolBufferException { 1686 return PARSER.parseFrom(data, extensionRegistry); 1687 } 1688 parseFrom(byte[] data)1689 public static com.google.cloud.retail.v2beta.CatalogAttribute parseFrom(byte[] data) 1690 throws com.google.protobuf.InvalidProtocolBufferException { 1691 return PARSER.parseFrom(data); 1692 } 1693 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1694 public static com.google.cloud.retail.v2beta.CatalogAttribute parseFrom( 1695 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1696 throws com.google.protobuf.InvalidProtocolBufferException { 1697 return PARSER.parseFrom(data, extensionRegistry); 1698 } 1699 parseFrom(java.io.InputStream input)1700 public static com.google.cloud.retail.v2beta.CatalogAttribute parseFrom(java.io.InputStream input) 1701 throws java.io.IOException { 1702 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1703 } 1704 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1705 public static com.google.cloud.retail.v2beta.CatalogAttribute parseFrom( 1706 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1707 throws java.io.IOException { 1708 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1709 PARSER, input, extensionRegistry); 1710 } 1711 parseDelimitedFrom( java.io.InputStream input)1712 public static com.google.cloud.retail.v2beta.CatalogAttribute parseDelimitedFrom( 1713 java.io.InputStream input) throws java.io.IOException { 1714 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 1715 } 1716 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1717 public static com.google.cloud.retail.v2beta.CatalogAttribute parseDelimitedFrom( 1718 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1719 throws java.io.IOException { 1720 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 1721 PARSER, input, extensionRegistry); 1722 } 1723 parseFrom( com.google.protobuf.CodedInputStream input)1724 public static com.google.cloud.retail.v2beta.CatalogAttribute parseFrom( 1725 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 1726 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1727 } 1728 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1729 public static com.google.cloud.retail.v2beta.CatalogAttribute parseFrom( 1730 com.google.protobuf.CodedInputStream input, 1731 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1732 throws java.io.IOException { 1733 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1734 PARSER, input, extensionRegistry); 1735 } 1736 1737 @java.lang.Override newBuilderForType()1738 public Builder newBuilderForType() { 1739 return newBuilder(); 1740 } 1741 newBuilder()1742 public static Builder newBuilder() { 1743 return DEFAULT_INSTANCE.toBuilder(); 1744 } 1745 newBuilder(com.google.cloud.retail.v2beta.CatalogAttribute prototype)1746 public static Builder newBuilder(com.google.cloud.retail.v2beta.CatalogAttribute prototype) { 1747 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1748 } 1749 1750 @java.lang.Override toBuilder()1751 public Builder toBuilder() { 1752 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 1753 } 1754 1755 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1756 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1757 Builder builder = new Builder(parent); 1758 return builder; 1759 } 1760 /** 1761 * 1762 * 1763 * <pre> 1764 * Catalog level attribute config for an attribute. For example, if customers 1765 * want to enable/disable facet for a specific attribute. 1766 * </pre> 1767 * 1768 * Protobuf type {@code google.cloud.retail.v2beta.CatalogAttribute} 1769 */ 1770 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 1771 implements 1772 // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.CatalogAttribute) 1773 com.google.cloud.retail.v2beta.CatalogAttributeOrBuilder { getDescriptor()1774 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1775 return com.google.cloud.retail.v2beta.CatalogProto 1776 .internal_static_google_cloud_retail_v2beta_CatalogAttribute_descriptor; 1777 } 1778 1779 @java.lang.Override 1780 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1781 internalGetFieldAccessorTable() { 1782 return com.google.cloud.retail.v2beta.CatalogProto 1783 .internal_static_google_cloud_retail_v2beta_CatalogAttribute_fieldAccessorTable 1784 .ensureFieldAccessorsInitialized( 1785 com.google.cloud.retail.v2beta.CatalogAttribute.class, 1786 com.google.cloud.retail.v2beta.CatalogAttribute.Builder.class); 1787 } 1788 1789 // Construct using com.google.cloud.retail.v2beta.CatalogAttribute.newBuilder() Builder()1790 private Builder() {} 1791 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1792 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1793 super(parent); 1794 } 1795 1796 @java.lang.Override clear()1797 public Builder clear() { 1798 super.clear(); 1799 bitField0_ = 0; 1800 key_ = ""; 1801 inUse_ = false; 1802 type_ = 0; 1803 indexableOption_ = 0; 1804 dynamicFacetableOption_ = 0; 1805 searchableOption_ = 0; 1806 recommendationsFilteringOption_ = 0; 1807 exactSearchableOption_ = 0; 1808 retrievableOption_ = 0; 1809 return this; 1810 } 1811 1812 @java.lang.Override getDescriptorForType()1813 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1814 return com.google.cloud.retail.v2beta.CatalogProto 1815 .internal_static_google_cloud_retail_v2beta_CatalogAttribute_descriptor; 1816 } 1817 1818 @java.lang.Override getDefaultInstanceForType()1819 public com.google.cloud.retail.v2beta.CatalogAttribute getDefaultInstanceForType() { 1820 return com.google.cloud.retail.v2beta.CatalogAttribute.getDefaultInstance(); 1821 } 1822 1823 @java.lang.Override build()1824 public com.google.cloud.retail.v2beta.CatalogAttribute build() { 1825 com.google.cloud.retail.v2beta.CatalogAttribute result = buildPartial(); 1826 if (!result.isInitialized()) { 1827 throw newUninitializedMessageException(result); 1828 } 1829 return result; 1830 } 1831 1832 @java.lang.Override buildPartial()1833 public com.google.cloud.retail.v2beta.CatalogAttribute buildPartial() { 1834 com.google.cloud.retail.v2beta.CatalogAttribute result = 1835 new com.google.cloud.retail.v2beta.CatalogAttribute(this); 1836 if (bitField0_ != 0) { 1837 buildPartial0(result); 1838 } 1839 onBuilt(); 1840 return result; 1841 } 1842 buildPartial0(com.google.cloud.retail.v2beta.CatalogAttribute result)1843 private void buildPartial0(com.google.cloud.retail.v2beta.CatalogAttribute result) { 1844 int from_bitField0_ = bitField0_; 1845 if (((from_bitField0_ & 0x00000001) != 0)) { 1846 result.key_ = key_; 1847 } 1848 if (((from_bitField0_ & 0x00000002) != 0)) { 1849 result.inUse_ = inUse_; 1850 } 1851 if (((from_bitField0_ & 0x00000004) != 0)) { 1852 result.type_ = type_; 1853 } 1854 if (((from_bitField0_ & 0x00000008) != 0)) { 1855 result.indexableOption_ = indexableOption_; 1856 } 1857 if (((from_bitField0_ & 0x00000010) != 0)) { 1858 result.dynamicFacetableOption_ = dynamicFacetableOption_; 1859 } 1860 if (((from_bitField0_ & 0x00000020) != 0)) { 1861 result.searchableOption_ = searchableOption_; 1862 } 1863 if (((from_bitField0_ & 0x00000040) != 0)) { 1864 result.recommendationsFilteringOption_ = recommendationsFilteringOption_; 1865 } 1866 if (((from_bitField0_ & 0x00000080) != 0)) { 1867 result.exactSearchableOption_ = exactSearchableOption_; 1868 } 1869 if (((from_bitField0_ & 0x00000100) != 0)) { 1870 result.retrievableOption_ = retrievableOption_; 1871 } 1872 } 1873 1874 @java.lang.Override clone()1875 public Builder clone() { 1876 return super.clone(); 1877 } 1878 1879 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1880 public Builder setField( 1881 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1882 return super.setField(field, value); 1883 } 1884 1885 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1886 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1887 return super.clearField(field); 1888 } 1889 1890 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1891 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1892 return super.clearOneof(oneof); 1893 } 1894 1895 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1896 public Builder setRepeatedField( 1897 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 1898 return super.setRepeatedField(field, index, value); 1899 } 1900 1901 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1902 public Builder addRepeatedField( 1903 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1904 return super.addRepeatedField(field, value); 1905 } 1906 1907 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1908 public Builder mergeFrom(com.google.protobuf.Message other) { 1909 if (other instanceof com.google.cloud.retail.v2beta.CatalogAttribute) { 1910 return mergeFrom((com.google.cloud.retail.v2beta.CatalogAttribute) other); 1911 } else { 1912 super.mergeFrom(other); 1913 return this; 1914 } 1915 } 1916 mergeFrom(com.google.cloud.retail.v2beta.CatalogAttribute other)1917 public Builder mergeFrom(com.google.cloud.retail.v2beta.CatalogAttribute other) { 1918 if (other == com.google.cloud.retail.v2beta.CatalogAttribute.getDefaultInstance()) 1919 return this; 1920 if (!other.getKey().isEmpty()) { 1921 key_ = other.key_; 1922 bitField0_ |= 0x00000001; 1923 onChanged(); 1924 } 1925 if (other.getInUse() != false) { 1926 setInUse(other.getInUse()); 1927 } 1928 if (other.type_ != 0) { 1929 setTypeValue(other.getTypeValue()); 1930 } 1931 if (other.indexableOption_ != 0) { 1932 setIndexableOptionValue(other.getIndexableOptionValue()); 1933 } 1934 if (other.dynamicFacetableOption_ != 0) { 1935 setDynamicFacetableOptionValue(other.getDynamicFacetableOptionValue()); 1936 } 1937 if (other.searchableOption_ != 0) { 1938 setSearchableOptionValue(other.getSearchableOptionValue()); 1939 } 1940 if (other.recommendationsFilteringOption_ != 0) { 1941 setRecommendationsFilteringOptionValue(other.getRecommendationsFilteringOptionValue()); 1942 } 1943 if (other.exactSearchableOption_ != 0) { 1944 setExactSearchableOptionValue(other.getExactSearchableOptionValue()); 1945 } 1946 if (other.retrievableOption_ != 0) { 1947 setRetrievableOptionValue(other.getRetrievableOptionValue()); 1948 } 1949 this.mergeUnknownFields(other.getUnknownFields()); 1950 onChanged(); 1951 return this; 1952 } 1953 1954 @java.lang.Override isInitialized()1955 public final boolean isInitialized() { 1956 return true; 1957 } 1958 1959 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1960 public Builder mergeFrom( 1961 com.google.protobuf.CodedInputStream input, 1962 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1963 throws java.io.IOException { 1964 if (extensionRegistry == null) { 1965 throw new java.lang.NullPointerException(); 1966 } 1967 try { 1968 boolean done = false; 1969 while (!done) { 1970 int tag = input.readTag(); 1971 switch (tag) { 1972 case 0: 1973 done = true; 1974 break; 1975 case 10: 1976 { 1977 key_ = input.readStringRequireUtf8(); 1978 bitField0_ |= 0x00000001; 1979 break; 1980 } // case 10 1981 case 40: 1982 { 1983 indexableOption_ = input.readEnum(); 1984 bitField0_ |= 0x00000008; 1985 break; 1986 } // case 40 1987 case 48: 1988 { 1989 dynamicFacetableOption_ = input.readEnum(); 1990 bitField0_ |= 0x00000010; 1991 break; 1992 } // case 48 1993 case 56: 1994 { 1995 searchableOption_ = input.readEnum(); 1996 bitField0_ |= 0x00000020; 1997 break; 1998 } // case 56 1999 case 64: 2000 { 2001 recommendationsFilteringOption_ = input.readEnum(); 2002 bitField0_ |= 0x00000040; 2003 break; 2004 } // case 64 2005 case 72: 2006 { 2007 inUse_ = input.readBool(); 2008 bitField0_ |= 0x00000002; 2009 break; 2010 } // case 72 2011 case 80: 2012 { 2013 type_ = input.readEnum(); 2014 bitField0_ |= 0x00000004; 2015 break; 2016 } // case 80 2017 case 88: 2018 { 2019 exactSearchableOption_ = input.readEnum(); 2020 bitField0_ |= 0x00000080; 2021 break; 2022 } // case 88 2023 case 96: 2024 { 2025 retrievableOption_ = input.readEnum(); 2026 bitField0_ |= 0x00000100; 2027 break; 2028 } // case 96 2029 default: 2030 { 2031 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 2032 done = true; // was an endgroup tag 2033 } 2034 break; 2035 } // default: 2036 } // switch (tag) 2037 } // while (!done) 2038 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2039 throw e.unwrapIOException(); 2040 } finally { 2041 onChanged(); 2042 } // finally 2043 return this; 2044 } 2045 2046 private int bitField0_; 2047 2048 private java.lang.Object key_ = ""; 2049 /** 2050 * 2051 * 2052 * <pre> 2053 * Required. Attribute name. 2054 * For example: `color`, `brands`, `attributes.custom_attribute`, such as 2055 * `attributes.xyz`. 2056 * To be indexable, the attribute name can contain only alpha-numeric 2057 * characters and underscores. For example, an attribute named 2058 * `attributes.abc_xyz` can be indexed, but an attribute named 2059 * `attributes.abc-xyz` cannot be indexed. 2060 * If the attribute key starts with `attributes.`, then the attribute is a 2061 * custom attribute. Attributes such as `brands`, `patterns`, and `title` are 2062 * built-in and called system attributes. 2063 * </pre> 2064 * 2065 * <code>string key = 1 [(.google.api.field_behavior) = REQUIRED];</code> 2066 * 2067 * @return The key. 2068 */ getKey()2069 public java.lang.String getKey() { 2070 java.lang.Object ref = key_; 2071 if (!(ref instanceof java.lang.String)) { 2072 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2073 java.lang.String s = bs.toStringUtf8(); 2074 key_ = s; 2075 return s; 2076 } else { 2077 return (java.lang.String) ref; 2078 } 2079 } 2080 /** 2081 * 2082 * 2083 * <pre> 2084 * Required. Attribute name. 2085 * For example: `color`, `brands`, `attributes.custom_attribute`, such as 2086 * `attributes.xyz`. 2087 * To be indexable, the attribute name can contain only alpha-numeric 2088 * characters and underscores. For example, an attribute named 2089 * `attributes.abc_xyz` can be indexed, but an attribute named 2090 * `attributes.abc-xyz` cannot be indexed. 2091 * If the attribute key starts with `attributes.`, then the attribute is a 2092 * custom attribute. Attributes such as `brands`, `patterns`, and `title` are 2093 * built-in and called system attributes. 2094 * </pre> 2095 * 2096 * <code>string key = 1 [(.google.api.field_behavior) = REQUIRED];</code> 2097 * 2098 * @return The bytes for key. 2099 */ getKeyBytes()2100 public com.google.protobuf.ByteString getKeyBytes() { 2101 java.lang.Object ref = key_; 2102 if (ref instanceof String) { 2103 com.google.protobuf.ByteString b = 2104 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2105 key_ = b; 2106 return b; 2107 } else { 2108 return (com.google.protobuf.ByteString) ref; 2109 } 2110 } 2111 /** 2112 * 2113 * 2114 * <pre> 2115 * Required. Attribute name. 2116 * For example: `color`, `brands`, `attributes.custom_attribute`, such as 2117 * `attributes.xyz`. 2118 * To be indexable, the attribute name can contain only alpha-numeric 2119 * characters and underscores. For example, an attribute named 2120 * `attributes.abc_xyz` can be indexed, but an attribute named 2121 * `attributes.abc-xyz` cannot be indexed. 2122 * If the attribute key starts with `attributes.`, then the attribute is a 2123 * custom attribute. Attributes such as `brands`, `patterns`, and `title` are 2124 * built-in and called system attributes. 2125 * </pre> 2126 * 2127 * <code>string key = 1 [(.google.api.field_behavior) = REQUIRED];</code> 2128 * 2129 * @param value The key to set. 2130 * @return This builder for chaining. 2131 */ setKey(java.lang.String value)2132 public Builder setKey(java.lang.String value) { 2133 if (value == null) { 2134 throw new NullPointerException(); 2135 } 2136 key_ = value; 2137 bitField0_ |= 0x00000001; 2138 onChanged(); 2139 return this; 2140 } 2141 /** 2142 * 2143 * 2144 * <pre> 2145 * Required. Attribute name. 2146 * For example: `color`, `brands`, `attributes.custom_attribute`, such as 2147 * `attributes.xyz`. 2148 * To be indexable, the attribute name can contain only alpha-numeric 2149 * characters and underscores. For example, an attribute named 2150 * `attributes.abc_xyz` can be indexed, but an attribute named 2151 * `attributes.abc-xyz` cannot be indexed. 2152 * If the attribute key starts with `attributes.`, then the attribute is a 2153 * custom attribute. Attributes such as `brands`, `patterns`, and `title` are 2154 * built-in and called system attributes. 2155 * </pre> 2156 * 2157 * <code>string key = 1 [(.google.api.field_behavior) = REQUIRED];</code> 2158 * 2159 * @return This builder for chaining. 2160 */ clearKey()2161 public Builder clearKey() { 2162 key_ = getDefaultInstance().getKey(); 2163 bitField0_ = (bitField0_ & ~0x00000001); 2164 onChanged(); 2165 return this; 2166 } 2167 /** 2168 * 2169 * 2170 * <pre> 2171 * Required. Attribute name. 2172 * For example: `color`, `brands`, `attributes.custom_attribute`, such as 2173 * `attributes.xyz`. 2174 * To be indexable, the attribute name can contain only alpha-numeric 2175 * characters and underscores. For example, an attribute named 2176 * `attributes.abc_xyz` can be indexed, but an attribute named 2177 * `attributes.abc-xyz` cannot be indexed. 2178 * If the attribute key starts with `attributes.`, then the attribute is a 2179 * custom attribute. Attributes such as `brands`, `patterns`, and `title` are 2180 * built-in and called system attributes. 2181 * </pre> 2182 * 2183 * <code>string key = 1 [(.google.api.field_behavior) = REQUIRED];</code> 2184 * 2185 * @param value The bytes for key to set. 2186 * @return This builder for chaining. 2187 */ setKeyBytes(com.google.protobuf.ByteString value)2188 public Builder setKeyBytes(com.google.protobuf.ByteString value) { 2189 if (value == null) { 2190 throw new NullPointerException(); 2191 } 2192 checkByteStringIsUtf8(value); 2193 key_ = value; 2194 bitField0_ |= 0x00000001; 2195 onChanged(); 2196 return this; 2197 } 2198 2199 private boolean inUse_; 2200 /** 2201 * 2202 * 2203 * <pre> 2204 * Output only. Indicates whether this attribute has been used by any 2205 * products. `True` if at least one 2206 * [Product][google.cloud.retail.v2beta.Product] is using this attribute in 2207 * [Product.attributes][google.cloud.retail.v2beta.Product.attributes]. 2208 * Otherwise, this field is `False`. 2209 * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] can be 2210 * pre-loaded by using 2211 * [CatalogService.AddCatalogAttribute][google.cloud.retail.v2beta.CatalogService.AddCatalogAttribute], 2212 * [CatalogService.ImportCatalogAttributes][], or 2213 * [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2beta.CatalogService.UpdateAttributesConfig] 2214 * APIs. This field is `False` for pre-loaded 2215 * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s. 2216 * Only pre-loaded [catalog 2217 * attributes][google.cloud.retail.v2beta.CatalogAttribute] that are neither 2218 * in use by products nor predefined can be deleted. [Catalog 2219 * attributes][google.cloud.retail.v2beta.CatalogAttribute] that are 2220 * either in use by products or are predefined attributes cannot be deleted; 2221 * however, their configuration properties will reset to default values upon 2222 * removal request. 2223 * After catalog changes, it takes about 10 minutes for this field to update. 2224 * </pre> 2225 * 2226 * <code>bool in_use = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 2227 * 2228 * @return The inUse. 2229 */ 2230 @java.lang.Override getInUse()2231 public boolean getInUse() { 2232 return inUse_; 2233 } 2234 /** 2235 * 2236 * 2237 * <pre> 2238 * Output only. Indicates whether this attribute has been used by any 2239 * products. `True` if at least one 2240 * [Product][google.cloud.retail.v2beta.Product] is using this attribute in 2241 * [Product.attributes][google.cloud.retail.v2beta.Product.attributes]. 2242 * Otherwise, this field is `False`. 2243 * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] can be 2244 * pre-loaded by using 2245 * [CatalogService.AddCatalogAttribute][google.cloud.retail.v2beta.CatalogService.AddCatalogAttribute], 2246 * [CatalogService.ImportCatalogAttributes][], or 2247 * [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2beta.CatalogService.UpdateAttributesConfig] 2248 * APIs. This field is `False` for pre-loaded 2249 * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s. 2250 * Only pre-loaded [catalog 2251 * attributes][google.cloud.retail.v2beta.CatalogAttribute] that are neither 2252 * in use by products nor predefined can be deleted. [Catalog 2253 * attributes][google.cloud.retail.v2beta.CatalogAttribute] that are 2254 * either in use by products or are predefined attributes cannot be deleted; 2255 * however, their configuration properties will reset to default values upon 2256 * removal request. 2257 * After catalog changes, it takes about 10 minutes for this field to update. 2258 * </pre> 2259 * 2260 * <code>bool in_use = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 2261 * 2262 * @param value The inUse to set. 2263 * @return This builder for chaining. 2264 */ setInUse(boolean value)2265 public Builder setInUse(boolean value) { 2266 2267 inUse_ = value; 2268 bitField0_ |= 0x00000002; 2269 onChanged(); 2270 return this; 2271 } 2272 /** 2273 * 2274 * 2275 * <pre> 2276 * Output only. Indicates whether this attribute has been used by any 2277 * products. `True` if at least one 2278 * [Product][google.cloud.retail.v2beta.Product] is using this attribute in 2279 * [Product.attributes][google.cloud.retail.v2beta.Product.attributes]. 2280 * Otherwise, this field is `False`. 2281 * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] can be 2282 * pre-loaded by using 2283 * [CatalogService.AddCatalogAttribute][google.cloud.retail.v2beta.CatalogService.AddCatalogAttribute], 2284 * [CatalogService.ImportCatalogAttributes][], or 2285 * [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2beta.CatalogService.UpdateAttributesConfig] 2286 * APIs. This field is `False` for pre-loaded 2287 * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s. 2288 * Only pre-loaded [catalog 2289 * attributes][google.cloud.retail.v2beta.CatalogAttribute] that are neither 2290 * in use by products nor predefined can be deleted. [Catalog 2291 * attributes][google.cloud.retail.v2beta.CatalogAttribute] that are 2292 * either in use by products or are predefined attributes cannot be deleted; 2293 * however, their configuration properties will reset to default values upon 2294 * removal request. 2295 * After catalog changes, it takes about 10 minutes for this field to update. 2296 * </pre> 2297 * 2298 * <code>bool in_use = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 2299 * 2300 * @return This builder for chaining. 2301 */ clearInUse()2302 public Builder clearInUse() { 2303 bitField0_ = (bitField0_ & ~0x00000002); 2304 inUse_ = false; 2305 onChanged(); 2306 return this; 2307 } 2308 2309 private int type_ = 0; 2310 /** 2311 * 2312 * 2313 * <pre> 2314 * Output only. The type of this attribute. This is derived from the attribute 2315 * in [Product.attributes][google.cloud.retail.v2beta.Product.attributes]. 2316 * </pre> 2317 * 2318 * <code> 2319 * .google.cloud.retail.v2beta.CatalogAttribute.AttributeType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2320 * </code> 2321 * 2322 * @return The enum numeric value on the wire for type. 2323 */ 2324 @java.lang.Override getTypeValue()2325 public int getTypeValue() { 2326 return type_; 2327 } 2328 /** 2329 * 2330 * 2331 * <pre> 2332 * Output only. The type of this attribute. This is derived from the attribute 2333 * in [Product.attributes][google.cloud.retail.v2beta.Product.attributes]. 2334 * </pre> 2335 * 2336 * <code> 2337 * .google.cloud.retail.v2beta.CatalogAttribute.AttributeType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2338 * </code> 2339 * 2340 * @param value The enum numeric value on the wire for type to set. 2341 * @return This builder for chaining. 2342 */ setTypeValue(int value)2343 public Builder setTypeValue(int value) { 2344 type_ = value; 2345 bitField0_ |= 0x00000004; 2346 onChanged(); 2347 return this; 2348 } 2349 /** 2350 * 2351 * 2352 * <pre> 2353 * Output only. The type of this attribute. This is derived from the attribute 2354 * in [Product.attributes][google.cloud.retail.v2beta.Product.attributes]. 2355 * </pre> 2356 * 2357 * <code> 2358 * .google.cloud.retail.v2beta.CatalogAttribute.AttributeType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2359 * </code> 2360 * 2361 * @return The type. 2362 */ 2363 @java.lang.Override getType()2364 public com.google.cloud.retail.v2beta.CatalogAttribute.AttributeType getType() { 2365 com.google.cloud.retail.v2beta.CatalogAttribute.AttributeType result = 2366 com.google.cloud.retail.v2beta.CatalogAttribute.AttributeType.forNumber(type_); 2367 return result == null 2368 ? com.google.cloud.retail.v2beta.CatalogAttribute.AttributeType.UNRECOGNIZED 2369 : result; 2370 } 2371 /** 2372 * 2373 * 2374 * <pre> 2375 * Output only. The type of this attribute. This is derived from the attribute 2376 * in [Product.attributes][google.cloud.retail.v2beta.Product.attributes]. 2377 * </pre> 2378 * 2379 * <code> 2380 * .google.cloud.retail.v2beta.CatalogAttribute.AttributeType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2381 * </code> 2382 * 2383 * @param value The type to set. 2384 * @return This builder for chaining. 2385 */ setType(com.google.cloud.retail.v2beta.CatalogAttribute.AttributeType value)2386 public Builder setType(com.google.cloud.retail.v2beta.CatalogAttribute.AttributeType value) { 2387 if (value == null) { 2388 throw new NullPointerException(); 2389 } 2390 bitField0_ |= 0x00000004; 2391 type_ = value.getNumber(); 2392 onChanged(); 2393 return this; 2394 } 2395 /** 2396 * 2397 * 2398 * <pre> 2399 * Output only. The type of this attribute. This is derived from the attribute 2400 * in [Product.attributes][google.cloud.retail.v2beta.Product.attributes]. 2401 * </pre> 2402 * 2403 * <code> 2404 * .google.cloud.retail.v2beta.CatalogAttribute.AttributeType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2405 * </code> 2406 * 2407 * @return This builder for chaining. 2408 */ clearType()2409 public Builder clearType() { 2410 bitField0_ = (bitField0_ & ~0x00000004); 2411 type_ = 0; 2412 onChanged(); 2413 return this; 2414 } 2415 2416 private int indexableOption_ = 0; 2417 /** 2418 * 2419 * 2420 * <pre> 2421 * When 2422 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] 2423 * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values 2424 * are indexed so that it can be filtered, faceted, or boosted in 2425 * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. 2426 * Must be specified, otherwise throws INVALID_FORMAT error. 2427 * </pre> 2428 * 2429 * <code>.google.cloud.retail.v2beta.CatalogAttribute.IndexableOption indexable_option = 5; 2430 * </code> 2431 * 2432 * @return The enum numeric value on the wire for indexableOption. 2433 */ 2434 @java.lang.Override getIndexableOptionValue()2435 public int getIndexableOptionValue() { 2436 return indexableOption_; 2437 } 2438 /** 2439 * 2440 * 2441 * <pre> 2442 * When 2443 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] 2444 * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values 2445 * are indexed so that it can be filtered, faceted, or boosted in 2446 * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. 2447 * Must be specified, otherwise throws INVALID_FORMAT error. 2448 * </pre> 2449 * 2450 * <code>.google.cloud.retail.v2beta.CatalogAttribute.IndexableOption indexable_option = 5; 2451 * </code> 2452 * 2453 * @param value The enum numeric value on the wire for indexableOption to set. 2454 * @return This builder for chaining. 2455 */ setIndexableOptionValue(int value)2456 public Builder setIndexableOptionValue(int value) { 2457 indexableOption_ = value; 2458 bitField0_ |= 0x00000008; 2459 onChanged(); 2460 return this; 2461 } 2462 /** 2463 * 2464 * 2465 * <pre> 2466 * When 2467 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] 2468 * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values 2469 * are indexed so that it can be filtered, faceted, or boosted in 2470 * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. 2471 * Must be specified, otherwise throws INVALID_FORMAT error. 2472 * </pre> 2473 * 2474 * <code>.google.cloud.retail.v2beta.CatalogAttribute.IndexableOption indexable_option = 5; 2475 * </code> 2476 * 2477 * @return The indexableOption. 2478 */ 2479 @java.lang.Override getIndexableOption()2480 public com.google.cloud.retail.v2beta.CatalogAttribute.IndexableOption getIndexableOption() { 2481 com.google.cloud.retail.v2beta.CatalogAttribute.IndexableOption result = 2482 com.google.cloud.retail.v2beta.CatalogAttribute.IndexableOption.forNumber( 2483 indexableOption_); 2484 return result == null 2485 ? com.google.cloud.retail.v2beta.CatalogAttribute.IndexableOption.UNRECOGNIZED 2486 : result; 2487 } 2488 /** 2489 * 2490 * 2491 * <pre> 2492 * When 2493 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] 2494 * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values 2495 * are indexed so that it can be filtered, faceted, or boosted in 2496 * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. 2497 * Must be specified, otherwise throws INVALID_FORMAT error. 2498 * </pre> 2499 * 2500 * <code>.google.cloud.retail.v2beta.CatalogAttribute.IndexableOption indexable_option = 5; 2501 * </code> 2502 * 2503 * @param value The indexableOption to set. 2504 * @return This builder for chaining. 2505 */ setIndexableOption( com.google.cloud.retail.v2beta.CatalogAttribute.IndexableOption value)2506 public Builder setIndexableOption( 2507 com.google.cloud.retail.v2beta.CatalogAttribute.IndexableOption value) { 2508 if (value == null) { 2509 throw new NullPointerException(); 2510 } 2511 bitField0_ |= 0x00000008; 2512 indexableOption_ = value.getNumber(); 2513 onChanged(); 2514 return this; 2515 } 2516 /** 2517 * 2518 * 2519 * <pre> 2520 * When 2521 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] 2522 * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values 2523 * are indexed so that it can be filtered, faceted, or boosted in 2524 * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. 2525 * Must be specified, otherwise throws INVALID_FORMAT error. 2526 * </pre> 2527 * 2528 * <code>.google.cloud.retail.v2beta.CatalogAttribute.IndexableOption indexable_option = 5; 2529 * </code> 2530 * 2531 * @return This builder for chaining. 2532 */ clearIndexableOption()2533 public Builder clearIndexableOption() { 2534 bitField0_ = (bitField0_ & ~0x00000008); 2535 indexableOption_ = 0; 2536 onChanged(); 2537 return this; 2538 } 2539 2540 private int dynamicFacetableOption_ = 0; 2541 /** 2542 * 2543 * 2544 * <pre> 2545 * If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic 2546 * facet. Could only be DYNAMIC_FACETABLE_DISABLED if 2547 * [CatalogAttribute.indexable_option][google.cloud.retail.v2beta.CatalogAttribute.indexable_option] 2548 * is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned. 2549 * Must be specified, otherwise throws INVALID_FORMAT error. 2550 * </pre> 2551 * 2552 * <code> 2553 * .google.cloud.retail.v2beta.CatalogAttribute.DynamicFacetableOption dynamic_facetable_option = 6; 2554 * </code> 2555 * 2556 * @return The enum numeric value on the wire for dynamicFacetableOption. 2557 */ 2558 @java.lang.Override getDynamicFacetableOptionValue()2559 public int getDynamicFacetableOptionValue() { 2560 return dynamicFacetableOption_; 2561 } 2562 /** 2563 * 2564 * 2565 * <pre> 2566 * If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic 2567 * facet. Could only be DYNAMIC_FACETABLE_DISABLED if 2568 * [CatalogAttribute.indexable_option][google.cloud.retail.v2beta.CatalogAttribute.indexable_option] 2569 * is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned. 2570 * Must be specified, otherwise throws INVALID_FORMAT error. 2571 * </pre> 2572 * 2573 * <code> 2574 * .google.cloud.retail.v2beta.CatalogAttribute.DynamicFacetableOption dynamic_facetable_option = 6; 2575 * </code> 2576 * 2577 * @param value The enum numeric value on the wire for dynamicFacetableOption to set. 2578 * @return This builder for chaining. 2579 */ setDynamicFacetableOptionValue(int value)2580 public Builder setDynamicFacetableOptionValue(int value) { 2581 dynamicFacetableOption_ = value; 2582 bitField0_ |= 0x00000010; 2583 onChanged(); 2584 return this; 2585 } 2586 /** 2587 * 2588 * 2589 * <pre> 2590 * If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic 2591 * facet. Could only be DYNAMIC_FACETABLE_DISABLED if 2592 * [CatalogAttribute.indexable_option][google.cloud.retail.v2beta.CatalogAttribute.indexable_option] 2593 * is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned. 2594 * Must be specified, otherwise throws INVALID_FORMAT error. 2595 * </pre> 2596 * 2597 * <code> 2598 * .google.cloud.retail.v2beta.CatalogAttribute.DynamicFacetableOption dynamic_facetable_option = 6; 2599 * </code> 2600 * 2601 * @return The dynamicFacetableOption. 2602 */ 2603 @java.lang.Override 2604 public com.google.cloud.retail.v2beta.CatalogAttribute.DynamicFacetableOption getDynamicFacetableOption()2605 getDynamicFacetableOption() { 2606 com.google.cloud.retail.v2beta.CatalogAttribute.DynamicFacetableOption result = 2607 com.google.cloud.retail.v2beta.CatalogAttribute.DynamicFacetableOption.forNumber( 2608 dynamicFacetableOption_); 2609 return result == null 2610 ? com.google.cloud.retail.v2beta.CatalogAttribute.DynamicFacetableOption.UNRECOGNIZED 2611 : result; 2612 } 2613 /** 2614 * 2615 * 2616 * <pre> 2617 * If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic 2618 * facet. Could only be DYNAMIC_FACETABLE_DISABLED if 2619 * [CatalogAttribute.indexable_option][google.cloud.retail.v2beta.CatalogAttribute.indexable_option] 2620 * is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned. 2621 * Must be specified, otherwise throws INVALID_FORMAT error. 2622 * </pre> 2623 * 2624 * <code> 2625 * .google.cloud.retail.v2beta.CatalogAttribute.DynamicFacetableOption dynamic_facetable_option = 6; 2626 * </code> 2627 * 2628 * @param value The dynamicFacetableOption to set. 2629 * @return This builder for chaining. 2630 */ setDynamicFacetableOption( com.google.cloud.retail.v2beta.CatalogAttribute.DynamicFacetableOption value)2631 public Builder setDynamicFacetableOption( 2632 com.google.cloud.retail.v2beta.CatalogAttribute.DynamicFacetableOption value) { 2633 if (value == null) { 2634 throw new NullPointerException(); 2635 } 2636 bitField0_ |= 0x00000010; 2637 dynamicFacetableOption_ = value.getNumber(); 2638 onChanged(); 2639 return this; 2640 } 2641 /** 2642 * 2643 * 2644 * <pre> 2645 * If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic 2646 * facet. Could only be DYNAMIC_FACETABLE_DISABLED if 2647 * [CatalogAttribute.indexable_option][google.cloud.retail.v2beta.CatalogAttribute.indexable_option] 2648 * is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned. 2649 * Must be specified, otherwise throws INVALID_FORMAT error. 2650 * </pre> 2651 * 2652 * <code> 2653 * .google.cloud.retail.v2beta.CatalogAttribute.DynamicFacetableOption dynamic_facetable_option = 6; 2654 * </code> 2655 * 2656 * @return This builder for chaining. 2657 */ clearDynamicFacetableOption()2658 public Builder clearDynamicFacetableOption() { 2659 bitField0_ = (bitField0_ & ~0x00000010); 2660 dynamicFacetableOption_ = 0; 2661 onChanged(); 2662 return this; 2663 } 2664 2665 private int searchableOption_ = 0; 2666 /** 2667 * 2668 * 2669 * <pre> 2670 * When 2671 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] 2672 * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values 2673 * are searchable by text queries in 2674 * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. 2675 * If SEARCHABLE_ENABLED but attribute type is numerical, attribute values 2676 * will not be searchable by text queries in 2677 * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], as 2678 * there are no text values associated to numerical attributes. 2679 * Must be specified, otherwise throws INVALID_FORMAT error. 2680 * </pre> 2681 * 2682 * <code>.google.cloud.retail.v2beta.CatalogAttribute.SearchableOption searchable_option = 7; 2683 * </code> 2684 * 2685 * @return The enum numeric value on the wire for searchableOption. 2686 */ 2687 @java.lang.Override getSearchableOptionValue()2688 public int getSearchableOptionValue() { 2689 return searchableOption_; 2690 } 2691 /** 2692 * 2693 * 2694 * <pre> 2695 * When 2696 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] 2697 * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values 2698 * are searchable by text queries in 2699 * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. 2700 * If SEARCHABLE_ENABLED but attribute type is numerical, attribute values 2701 * will not be searchable by text queries in 2702 * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], as 2703 * there are no text values associated to numerical attributes. 2704 * Must be specified, otherwise throws INVALID_FORMAT error. 2705 * </pre> 2706 * 2707 * <code>.google.cloud.retail.v2beta.CatalogAttribute.SearchableOption searchable_option = 7; 2708 * </code> 2709 * 2710 * @param value The enum numeric value on the wire for searchableOption to set. 2711 * @return This builder for chaining. 2712 */ setSearchableOptionValue(int value)2713 public Builder setSearchableOptionValue(int value) { 2714 searchableOption_ = value; 2715 bitField0_ |= 0x00000020; 2716 onChanged(); 2717 return this; 2718 } 2719 /** 2720 * 2721 * 2722 * <pre> 2723 * When 2724 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] 2725 * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values 2726 * are searchable by text queries in 2727 * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. 2728 * If SEARCHABLE_ENABLED but attribute type is numerical, attribute values 2729 * will not be searchable by text queries in 2730 * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], as 2731 * there are no text values associated to numerical attributes. 2732 * Must be specified, otherwise throws INVALID_FORMAT error. 2733 * </pre> 2734 * 2735 * <code>.google.cloud.retail.v2beta.CatalogAttribute.SearchableOption searchable_option = 7; 2736 * </code> 2737 * 2738 * @return The searchableOption. 2739 */ 2740 @java.lang.Override getSearchableOption()2741 public com.google.cloud.retail.v2beta.CatalogAttribute.SearchableOption getSearchableOption() { 2742 com.google.cloud.retail.v2beta.CatalogAttribute.SearchableOption result = 2743 com.google.cloud.retail.v2beta.CatalogAttribute.SearchableOption.forNumber( 2744 searchableOption_); 2745 return result == null 2746 ? com.google.cloud.retail.v2beta.CatalogAttribute.SearchableOption.UNRECOGNIZED 2747 : result; 2748 } 2749 /** 2750 * 2751 * 2752 * <pre> 2753 * When 2754 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] 2755 * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values 2756 * are searchable by text queries in 2757 * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. 2758 * If SEARCHABLE_ENABLED but attribute type is numerical, attribute values 2759 * will not be searchable by text queries in 2760 * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], as 2761 * there are no text values associated to numerical attributes. 2762 * Must be specified, otherwise throws INVALID_FORMAT error. 2763 * </pre> 2764 * 2765 * <code>.google.cloud.retail.v2beta.CatalogAttribute.SearchableOption searchable_option = 7; 2766 * </code> 2767 * 2768 * @param value The searchableOption to set. 2769 * @return This builder for chaining. 2770 */ setSearchableOption( com.google.cloud.retail.v2beta.CatalogAttribute.SearchableOption value)2771 public Builder setSearchableOption( 2772 com.google.cloud.retail.v2beta.CatalogAttribute.SearchableOption value) { 2773 if (value == null) { 2774 throw new NullPointerException(); 2775 } 2776 bitField0_ |= 0x00000020; 2777 searchableOption_ = value.getNumber(); 2778 onChanged(); 2779 return this; 2780 } 2781 /** 2782 * 2783 * 2784 * <pre> 2785 * When 2786 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] 2787 * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values 2788 * are searchable by text queries in 2789 * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search]. 2790 * If SEARCHABLE_ENABLED but attribute type is numerical, attribute values 2791 * will not be searchable by text queries in 2792 * [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], as 2793 * there are no text values associated to numerical attributes. 2794 * Must be specified, otherwise throws INVALID_FORMAT error. 2795 * </pre> 2796 * 2797 * <code>.google.cloud.retail.v2beta.CatalogAttribute.SearchableOption searchable_option = 7; 2798 * </code> 2799 * 2800 * @return This builder for chaining. 2801 */ clearSearchableOption()2802 public Builder clearSearchableOption() { 2803 bitField0_ = (bitField0_ & ~0x00000020); 2804 searchableOption_ = 0; 2805 onChanged(); 2806 return this; 2807 } 2808 2809 private int recommendationsFilteringOption_ = 0; 2810 /** 2811 * 2812 * 2813 * <pre> 2814 * When 2815 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] 2816 * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED, 2817 * attribute values are filterable for recommendations. 2818 * This option works for categorical features only, 2819 * does not work for numerical features, inventory filtering. 2820 * </pre> 2821 * 2822 * <code> 2823 * .google.cloud.retail.v2beta.RecommendationsFilteringOption recommendations_filtering_option = 8; 2824 * </code> 2825 * 2826 * @return The enum numeric value on the wire for recommendationsFilteringOption. 2827 */ 2828 @java.lang.Override getRecommendationsFilteringOptionValue()2829 public int getRecommendationsFilteringOptionValue() { 2830 return recommendationsFilteringOption_; 2831 } 2832 /** 2833 * 2834 * 2835 * <pre> 2836 * When 2837 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] 2838 * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED, 2839 * attribute values are filterable for recommendations. 2840 * This option works for categorical features only, 2841 * does not work for numerical features, inventory filtering. 2842 * </pre> 2843 * 2844 * <code> 2845 * .google.cloud.retail.v2beta.RecommendationsFilteringOption recommendations_filtering_option = 8; 2846 * </code> 2847 * 2848 * @param value The enum numeric value on the wire for recommendationsFilteringOption to set. 2849 * @return This builder for chaining. 2850 */ setRecommendationsFilteringOptionValue(int value)2851 public Builder setRecommendationsFilteringOptionValue(int value) { 2852 recommendationsFilteringOption_ = value; 2853 bitField0_ |= 0x00000040; 2854 onChanged(); 2855 return this; 2856 } 2857 /** 2858 * 2859 * 2860 * <pre> 2861 * When 2862 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] 2863 * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED, 2864 * attribute values are filterable for recommendations. 2865 * This option works for categorical features only, 2866 * does not work for numerical features, inventory filtering. 2867 * </pre> 2868 * 2869 * <code> 2870 * .google.cloud.retail.v2beta.RecommendationsFilteringOption recommendations_filtering_option = 8; 2871 * </code> 2872 * 2873 * @return The recommendationsFilteringOption. 2874 */ 2875 @java.lang.Override 2876 public com.google.cloud.retail.v2beta.RecommendationsFilteringOption getRecommendationsFilteringOption()2877 getRecommendationsFilteringOption() { 2878 com.google.cloud.retail.v2beta.RecommendationsFilteringOption result = 2879 com.google.cloud.retail.v2beta.RecommendationsFilteringOption.forNumber( 2880 recommendationsFilteringOption_); 2881 return result == null 2882 ? com.google.cloud.retail.v2beta.RecommendationsFilteringOption.UNRECOGNIZED 2883 : result; 2884 } 2885 /** 2886 * 2887 * 2888 * <pre> 2889 * When 2890 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] 2891 * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED, 2892 * attribute values are filterable for recommendations. 2893 * This option works for categorical features only, 2894 * does not work for numerical features, inventory filtering. 2895 * </pre> 2896 * 2897 * <code> 2898 * .google.cloud.retail.v2beta.RecommendationsFilteringOption recommendations_filtering_option = 8; 2899 * </code> 2900 * 2901 * @param value The recommendationsFilteringOption to set. 2902 * @return This builder for chaining. 2903 */ setRecommendationsFilteringOption( com.google.cloud.retail.v2beta.RecommendationsFilteringOption value)2904 public Builder setRecommendationsFilteringOption( 2905 com.google.cloud.retail.v2beta.RecommendationsFilteringOption value) { 2906 if (value == null) { 2907 throw new NullPointerException(); 2908 } 2909 bitField0_ |= 0x00000040; 2910 recommendationsFilteringOption_ = value.getNumber(); 2911 onChanged(); 2912 return this; 2913 } 2914 /** 2915 * 2916 * 2917 * <pre> 2918 * When 2919 * [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level] 2920 * is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED, 2921 * attribute values are filterable for recommendations. 2922 * This option works for categorical features only, 2923 * does not work for numerical features, inventory filtering. 2924 * </pre> 2925 * 2926 * <code> 2927 * .google.cloud.retail.v2beta.RecommendationsFilteringOption recommendations_filtering_option = 8; 2928 * </code> 2929 * 2930 * @return This builder for chaining. 2931 */ clearRecommendationsFilteringOption()2932 public Builder clearRecommendationsFilteringOption() { 2933 bitField0_ = (bitField0_ & ~0x00000040); 2934 recommendationsFilteringOption_ = 0; 2935 onChanged(); 2936 return this; 2937 } 2938 2939 private int exactSearchableOption_ = 0; 2940 /** 2941 * 2942 * 2943 * <pre> 2944 * If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. 2945 * This property only applies to textual custom attributes and requires 2946 * indexable set to enabled to enable exact-searchable. If unset, the server 2947 * behavior defaults to 2948 * [EXACT_SEARCHABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption.EXACT_SEARCHABLE_DISABLED]. 2949 * </pre> 2950 * 2951 * <code> 2952 * .google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption exact_searchable_option = 11; 2953 * </code> 2954 * 2955 * @return The enum numeric value on the wire for exactSearchableOption. 2956 */ 2957 @java.lang.Override getExactSearchableOptionValue()2958 public int getExactSearchableOptionValue() { 2959 return exactSearchableOption_; 2960 } 2961 /** 2962 * 2963 * 2964 * <pre> 2965 * If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. 2966 * This property only applies to textual custom attributes and requires 2967 * indexable set to enabled to enable exact-searchable. If unset, the server 2968 * behavior defaults to 2969 * [EXACT_SEARCHABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption.EXACT_SEARCHABLE_DISABLED]. 2970 * </pre> 2971 * 2972 * <code> 2973 * .google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption exact_searchable_option = 11; 2974 * </code> 2975 * 2976 * @param value The enum numeric value on the wire for exactSearchableOption to set. 2977 * @return This builder for chaining. 2978 */ setExactSearchableOptionValue(int value)2979 public Builder setExactSearchableOptionValue(int value) { 2980 exactSearchableOption_ = value; 2981 bitField0_ |= 0x00000080; 2982 onChanged(); 2983 return this; 2984 } 2985 /** 2986 * 2987 * 2988 * <pre> 2989 * If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. 2990 * This property only applies to textual custom attributes and requires 2991 * indexable set to enabled to enable exact-searchable. If unset, the server 2992 * behavior defaults to 2993 * [EXACT_SEARCHABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption.EXACT_SEARCHABLE_DISABLED]. 2994 * </pre> 2995 * 2996 * <code> 2997 * .google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption exact_searchable_option = 11; 2998 * </code> 2999 * 3000 * @return The exactSearchableOption. 3001 */ 3002 @java.lang.Override 3003 public com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption getExactSearchableOption()3004 getExactSearchableOption() { 3005 com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption result = 3006 com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption.forNumber( 3007 exactSearchableOption_); 3008 return result == null 3009 ? com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption.UNRECOGNIZED 3010 : result; 3011 } 3012 /** 3013 * 3014 * 3015 * <pre> 3016 * If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. 3017 * This property only applies to textual custom attributes and requires 3018 * indexable set to enabled to enable exact-searchable. If unset, the server 3019 * behavior defaults to 3020 * [EXACT_SEARCHABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption.EXACT_SEARCHABLE_DISABLED]. 3021 * </pre> 3022 * 3023 * <code> 3024 * .google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption exact_searchable_option = 11; 3025 * </code> 3026 * 3027 * @param value The exactSearchableOption to set. 3028 * @return This builder for chaining. 3029 */ setExactSearchableOption( com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption value)3030 public Builder setExactSearchableOption( 3031 com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption value) { 3032 if (value == null) { 3033 throw new NullPointerException(); 3034 } 3035 bitField0_ |= 0x00000080; 3036 exactSearchableOption_ = value.getNumber(); 3037 onChanged(); 3038 return this; 3039 } 3040 /** 3041 * 3042 * 3043 * <pre> 3044 * If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. 3045 * This property only applies to textual custom attributes and requires 3046 * indexable set to enabled to enable exact-searchable. If unset, the server 3047 * behavior defaults to 3048 * [EXACT_SEARCHABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption.EXACT_SEARCHABLE_DISABLED]. 3049 * </pre> 3050 * 3051 * <code> 3052 * .google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption exact_searchable_option = 11; 3053 * </code> 3054 * 3055 * @return This builder for chaining. 3056 */ clearExactSearchableOption()3057 public Builder clearExactSearchableOption() { 3058 bitField0_ = (bitField0_ & ~0x00000080); 3059 exactSearchableOption_ = 0; 3060 onChanged(); 3061 return this; 3062 } 3063 3064 private int retrievableOption_ = 0; 3065 /** 3066 * 3067 * 3068 * <pre> 3069 * If RETRIEVABLE_ENABLED, attribute values are retrievable in the search 3070 * results. If unset, the server behavior defaults to 3071 * [RETRIEVABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption.RETRIEVABLE_DISABLED]. 3072 * </pre> 3073 * 3074 * <code>.google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption retrievable_option = 12; 3075 * </code> 3076 * 3077 * @return The enum numeric value on the wire for retrievableOption. 3078 */ 3079 @java.lang.Override getRetrievableOptionValue()3080 public int getRetrievableOptionValue() { 3081 return retrievableOption_; 3082 } 3083 /** 3084 * 3085 * 3086 * <pre> 3087 * If RETRIEVABLE_ENABLED, attribute values are retrievable in the search 3088 * results. If unset, the server behavior defaults to 3089 * [RETRIEVABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption.RETRIEVABLE_DISABLED]. 3090 * </pre> 3091 * 3092 * <code>.google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption retrievable_option = 12; 3093 * </code> 3094 * 3095 * @param value The enum numeric value on the wire for retrievableOption to set. 3096 * @return This builder for chaining. 3097 */ setRetrievableOptionValue(int value)3098 public Builder setRetrievableOptionValue(int value) { 3099 retrievableOption_ = value; 3100 bitField0_ |= 0x00000100; 3101 onChanged(); 3102 return this; 3103 } 3104 /** 3105 * 3106 * 3107 * <pre> 3108 * If RETRIEVABLE_ENABLED, attribute values are retrievable in the search 3109 * results. If unset, the server behavior defaults to 3110 * [RETRIEVABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption.RETRIEVABLE_DISABLED]. 3111 * </pre> 3112 * 3113 * <code>.google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption retrievable_option = 12; 3114 * </code> 3115 * 3116 * @return The retrievableOption. 3117 */ 3118 @java.lang.Override 3119 public com.google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption getRetrievableOption()3120 getRetrievableOption() { 3121 com.google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption result = 3122 com.google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption.forNumber( 3123 retrievableOption_); 3124 return result == null 3125 ? com.google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption.UNRECOGNIZED 3126 : result; 3127 } 3128 /** 3129 * 3130 * 3131 * <pre> 3132 * If RETRIEVABLE_ENABLED, attribute values are retrievable in the search 3133 * results. If unset, the server behavior defaults to 3134 * [RETRIEVABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption.RETRIEVABLE_DISABLED]. 3135 * </pre> 3136 * 3137 * <code>.google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption retrievable_option = 12; 3138 * </code> 3139 * 3140 * @param value The retrievableOption to set. 3141 * @return This builder for chaining. 3142 */ setRetrievableOption( com.google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption value)3143 public Builder setRetrievableOption( 3144 com.google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption value) { 3145 if (value == null) { 3146 throw new NullPointerException(); 3147 } 3148 bitField0_ |= 0x00000100; 3149 retrievableOption_ = value.getNumber(); 3150 onChanged(); 3151 return this; 3152 } 3153 /** 3154 * 3155 * 3156 * <pre> 3157 * If RETRIEVABLE_ENABLED, attribute values are retrievable in the search 3158 * results. If unset, the server behavior defaults to 3159 * [RETRIEVABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption.RETRIEVABLE_DISABLED]. 3160 * </pre> 3161 * 3162 * <code>.google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption retrievable_option = 12; 3163 * </code> 3164 * 3165 * @return This builder for chaining. 3166 */ clearRetrievableOption()3167 public Builder clearRetrievableOption() { 3168 bitField0_ = (bitField0_ & ~0x00000100); 3169 retrievableOption_ = 0; 3170 onChanged(); 3171 return this; 3172 } 3173 3174 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)3175 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 3176 return super.setUnknownFields(unknownFields); 3177 } 3178 3179 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3180 public final Builder mergeUnknownFields( 3181 final com.google.protobuf.UnknownFieldSet unknownFields) { 3182 return super.mergeUnknownFields(unknownFields); 3183 } 3184 3185 // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.CatalogAttribute) 3186 } 3187 3188 // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.CatalogAttribute) 3189 private static final com.google.cloud.retail.v2beta.CatalogAttribute DEFAULT_INSTANCE; 3190 3191 static { 3192 DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.CatalogAttribute(); 3193 } 3194 getDefaultInstance()3195 public static com.google.cloud.retail.v2beta.CatalogAttribute getDefaultInstance() { 3196 return DEFAULT_INSTANCE; 3197 } 3198 3199 private static final com.google.protobuf.Parser<CatalogAttribute> PARSER = 3200 new com.google.protobuf.AbstractParser<CatalogAttribute>() { 3201 @java.lang.Override 3202 public CatalogAttribute parsePartialFrom( 3203 com.google.protobuf.CodedInputStream input, 3204 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3205 throws com.google.protobuf.InvalidProtocolBufferException { 3206 Builder builder = newBuilder(); 3207 try { 3208 builder.mergeFrom(input, extensionRegistry); 3209 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 3210 throw e.setUnfinishedMessage(builder.buildPartial()); 3211 } catch (com.google.protobuf.UninitializedMessageException e) { 3212 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 3213 } catch (java.io.IOException e) { 3214 throw new com.google.protobuf.InvalidProtocolBufferException(e) 3215 .setUnfinishedMessage(builder.buildPartial()); 3216 } 3217 return builder.buildPartial(); 3218 } 3219 }; 3220 parser()3221 public static com.google.protobuf.Parser<CatalogAttribute> parser() { 3222 return PARSER; 3223 } 3224 3225 @java.lang.Override getParserForType()3226 public com.google.protobuf.Parser<CatalogAttribute> getParserForType() { 3227 return PARSER; 3228 } 3229 3230 @java.lang.Override getDefaultInstanceForType()3231 public com.google.cloud.retail.v2beta.CatalogAttribute getDefaultInstanceForType() { 3232 return DEFAULT_INSTANCE; 3233 } 3234 } 3235