# Retail V2 API - Class Google::Cloud::Retail::V2::CatalogAttribute (v2.9.0)

2.9.0 (latest) 2.8.1 2.7.0 2.6.1 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.3.0 1.2.0 1.1.0 1.0.1 0.21.0 0.20.0 0.19.0 0.18.2 0.17.0 0.16.1 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.4 Reference documentation and code samples for the Retail V2 API class Google::Cloud::Retail::V2::CatalogAttribute.

Catalog level attribute config for an attribute. For example, if customers
want to enable/disable facet for a specific attribute.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #dynamic_facetable_option

    def dynamic_facetable_option() -> ::Google::Cloud::Retail::V2::CatalogAttribute::DynamicFacetableOption

**Returns**

- ([::Google::Cloud::Retail::V2::CatalogAttribute::DynamicFacetableOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-DynamicFacetableOption)) --- If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if [CatalogAttribute.indexable_option](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute#Google__Cloud__Retail__V2__CatalogAttribute_indexable_option_instance_ "Google::Cloud::Retail::V2::CatalogAttribute#indexable_option (method)") is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned.


  Must be specified, otherwise throws INVALID_FORMAT error.

### #dynamic_facetable_option=

    def dynamic_facetable_option=(value) -> ::Google::Cloud::Retail::V2::CatalogAttribute::DynamicFacetableOption

**Parameter**

- **value** ([::Google::Cloud::Retail::V2::CatalogAttribute::DynamicFacetableOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-DynamicFacetableOption)) --- If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if [CatalogAttribute.indexable_option](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute#Google__Cloud__Retail__V2__CatalogAttribute_indexable_option_instance_ "Google::Cloud::Retail::V2::CatalogAttribute#indexable_option (method)") is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned.


  Must be specified, otherwise throws INVALID_FORMAT error.
**Returns**

- ([::Google::Cloud::Retail::V2::CatalogAttribute::DynamicFacetableOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-DynamicFacetableOption)) --- If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if [CatalogAttribute.indexable_option](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute#Google__Cloud__Retail__V2__CatalogAttribute_indexable_option_instance_ "Google::Cloud::Retail::V2::CatalogAttribute#indexable_option (method)") is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned.


  Must be specified, otherwise throws INVALID_FORMAT error.

### #exact_searchable_option

    def exact_searchable_option() -> ::Google::Cloud::Retail::V2::CatalogAttribute::ExactSearchableOption

**Returns**

- ([::Google::Cloud::Retail::V2::CatalogAttribute::ExactSearchableOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-ExactSearchableOption)) --- If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. This property only applies to textual custom attributes and requires indexable set to enabled to enable exact-searchable. If unset, the server behavior defaults to [EXACT_SEARCHABLE_DISABLED](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-ExactSearchableOption#Google__Cloud__Retail__V2__CatalogAttribute__ExactSearchableOption__EXACT_SEARCHABLE_DISABLED "Google::Cloud::Retail::V2::CatalogAttribute::ExactSearchableOption::EXACT_SEARCHABLE_DISABLED (constant)").

### #exact_searchable_option=

    def exact_searchable_option=(value) -> ::Google::Cloud::Retail::V2::CatalogAttribute::ExactSearchableOption

**Parameter**

- **value** ([::Google::Cloud::Retail::V2::CatalogAttribute::ExactSearchableOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-ExactSearchableOption)) --- If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. This property only applies to textual custom attributes and requires indexable set to enabled to enable exact-searchable. If unset, the server behavior defaults to [EXACT_SEARCHABLE_DISABLED](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-ExactSearchableOption#Google__Cloud__Retail__V2__CatalogAttribute__ExactSearchableOption__EXACT_SEARCHABLE_DISABLED "Google::Cloud::Retail::V2::CatalogAttribute::ExactSearchableOption::EXACT_SEARCHABLE_DISABLED (constant)").
**Returns**

- ([::Google::Cloud::Retail::V2::CatalogAttribute::ExactSearchableOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-ExactSearchableOption)) --- If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. This property only applies to textual custom attributes and requires indexable set to enabled to enable exact-searchable. If unset, the server behavior defaults to [EXACT_SEARCHABLE_DISABLED](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-ExactSearchableOption#Google__Cloud__Retail__V2__CatalogAttribute__ExactSearchableOption__EXACT_SEARCHABLE_DISABLED "Google::Cloud::Retail::V2::CatalogAttribute::ExactSearchableOption::EXACT_SEARCHABLE_DISABLED (constant)").

### #facet_config

    def facet_config() -> ::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig

**Returns**

- ([::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-FacetConfig)) --- Contains facet options.

### #facet_config=

    def facet_config=(value) -> ::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig

**Parameter**

- **value** ([::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-FacetConfig)) --- Contains facet options.
**Returns**

- ([::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-FacetConfig)) --- Contains facet options.

### #in_use

    def in_use() -> ::Boolean

**Returns**

- (::Boolean) --- Output only. Indicates whether this attribute has been used by any products. `True` if at least one [Product](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-Product "Google::Cloud::Retail::V2::Product (class)") is using this attribute in [Product.attributes](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-Product#Google__Cloud__Retail__V2__Product_attributes_instance_ "Google::Cloud::Retail::V2::Product#attributes (method)"). Otherwise, this field is `False`.


  [CatalogAttribute](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute "Google::Cloud::Retail::V2::CatalogAttribute (class)") can be
  pre-loaded by using
  [CatalogService.AddCatalogAttribute](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogService-Client#Google__Cloud__Retail__V2__CatalogService__Client_add_catalog_attribute_instance_ "Google::Cloud::Retail::V2::CatalogService::Client#add_catalog_attribute (method)")
  or
  [CatalogService.UpdateAttributesConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogService-Client#Google__Cloud__Retail__V2__CatalogService__Client_update_attributes_config_instance_ "Google::Cloud::Retail::V2::CatalogService::Client#update_attributes_config (method)")
  APIs. This field is `False` for pre-loaded
  [CatalogAttribute](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute "Google::Cloud::Retail::V2::CatalogAttribute (class)")s.

  Only pre-loaded \[catalog
  attributes\]\[google.cloud.retail.v2.CatalogAttribute\] that are neither in
  use by products nor predefined can be deleted. \[Catalog
  attributes\]\[google.cloud.retail.v2.CatalogAttribute\] that are
  either in use by products or are predefined attributes cannot be deleted;
  however, their configuration properties will reset to default values upon
  removal request.

  After catalog changes, it takes about 10 minutes for this field to update.

### #indexable_option

    def indexable_option() -> ::Google::Cloud::Retail::V2::CatalogAttribute::IndexableOption

**Returns**

- ([::Google::Cloud::Retail::V2::CatalogAttribute::IndexableOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-IndexableOption)) --- When [AttributesConfig.attribute_config_level](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-AttributesConfig#Google__Cloud__Retail__V2__AttributesConfig_attribute_config_level_instance_ "Google::Cloud::Retail::V2::AttributesConfig#attribute_config_level (method)") is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values are indexed so that it can be filtered, faceted, or boosted in [SearchService.Search](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-SearchService-Client#Google__Cloud__Retail__V2__SearchService__Client_search_instance_ "Google::Cloud::Retail::V2::SearchService::Client#search (method)").


  Must be specified when
  [AttributesConfig.attribute_config_level](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-AttributesConfig#Google__Cloud__Retail__V2__AttributesConfig_attribute_config_level_instance_ "Google::Cloud::Retail::V2::AttributesConfig#attribute_config_level (method)")
  is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error.

### #indexable_option=

    def indexable_option=(value) -> ::Google::Cloud::Retail::V2::CatalogAttribute::IndexableOption

**Parameter**

- **value** ([::Google::Cloud::Retail::V2::CatalogAttribute::IndexableOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-IndexableOption)) --- When [AttributesConfig.attribute_config_level](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-AttributesConfig#Google__Cloud__Retail__V2__AttributesConfig_attribute_config_level_instance_ "Google::Cloud::Retail::V2::AttributesConfig#attribute_config_level (method)") is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values are indexed so that it can be filtered, faceted, or boosted in [SearchService.Search](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-SearchService-Client#Google__Cloud__Retail__V2__SearchService__Client_search_instance_ "Google::Cloud::Retail::V2::SearchService::Client#search (method)").


  Must be specified when
  [AttributesConfig.attribute_config_level](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-AttributesConfig#Google__Cloud__Retail__V2__AttributesConfig_attribute_config_level_instance_ "Google::Cloud::Retail::V2::AttributesConfig#attribute_config_level (method)")
  is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error.
**Returns**

- ([::Google::Cloud::Retail::V2::CatalogAttribute::IndexableOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-IndexableOption)) --- When [AttributesConfig.attribute_config_level](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-AttributesConfig#Google__Cloud__Retail__V2__AttributesConfig_attribute_config_level_instance_ "Google::Cloud::Retail::V2::AttributesConfig#attribute_config_level (method)") is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values are indexed so that it can be filtered, faceted, or boosted in [SearchService.Search](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-SearchService-Client#Google__Cloud__Retail__V2__SearchService__Client_search_instance_ "Google::Cloud::Retail::V2::SearchService::Client#search (method)").


  Must be specified when
  [AttributesConfig.attribute_config_level](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-AttributesConfig#Google__Cloud__Retail__V2__AttributesConfig_attribute_config_level_instance_ "Google::Cloud::Retail::V2::AttributesConfig#attribute_config_level (method)")
  is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error.

### #key

    def key() -> ::String

**Returns**

- (::String) --- Required. Attribute name. For example: `color`, `brands`, `attributes.custom_attribute`, such as `attributes.xyz`. To be indexable, the attribute name can contain only alpha-numeric characters and underscores. For example, an attribute named `attributes.abc_xyz` can be indexed, but an attribute named `attributes.abc-xyz` cannot be indexed.


  If the attribute key starts with `attributes.`, then the attribute is a
  custom attribute. Attributes such as `brands`, `patterns`, and `title` are
  built-in and called system attributes.

### #key=

    def key=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. Attribute name. For example: `color`, `brands`, `attributes.custom_attribute`, such as `attributes.xyz`. To be indexable, the attribute name can contain only alpha-numeric characters and underscores. For example, an attribute named `attributes.abc_xyz` can be indexed, but an attribute named `attributes.abc-xyz` cannot be indexed.


  If the attribute key starts with `attributes.`, then the attribute is a
  custom attribute. Attributes such as `brands`, `patterns`, and `title` are
  built-in and called system attributes.
**Returns**

- (::String) --- Required. Attribute name. For example: `color`, `brands`, `attributes.custom_attribute`, such as `attributes.xyz`. To be indexable, the attribute name can contain only alpha-numeric characters and underscores. For example, an attribute named `attributes.abc_xyz` can be indexed, but an attribute named `attributes.abc-xyz` cannot be indexed.


  If the attribute key starts with `attributes.`, then the attribute is a
  custom attribute. Attributes such as `brands`, `patterns`, and `title` are
  built-in and called system attributes.

### #retrievable_option

    def retrievable_option() -> ::Google::Cloud::Retail::V2::CatalogAttribute::RetrievableOption

**Returns**

- ([::Google::Cloud::Retail::V2::CatalogAttribute::RetrievableOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-RetrievableOption)) --- If RETRIEVABLE_ENABLED, attribute values are retrievable in the search results. If unset, the server behavior defaults to [RETRIEVABLE_DISABLED](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-RetrievableOption#Google__Cloud__Retail__V2__CatalogAttribute__RetrievableOption__RETRIEVABLE_DISABLED "Google::Cloud::Retail::V2::CatalogAttribute::RetrievableOption::RETRIEVABLE_DISABLED (constant)").

### #retrievable_option=

    def retrievable_option=(value) -> ::Google::Cloud::Retail::V2::CatalogAttribute::RetrievableOption

**Parameter**

- **value** ([::Google::Cloud::Retail::V2::CatalogAttribute::RetrievableOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-RetrievableOption)) --- If RETRIEVABLE_ENABLED, attribute values are retrievable in the search results. If unset, the server behavior defaults to [RETRIEVABLE_DISABLED](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-RetrievableOption#Google__Cloud__Retail__V2__CatalogAttribute__RetrievableOption__RETRIEVABLE_DISABLED "Google::Cloud::Retail::V2::CatalogAttribute::RetrievableOption::RETRIEVABLE_DISABLED (constant)").
**Returns**

- ([::Google::Cloud::Retail::V2::CatalogAttribute::RetrievableOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-RetrievableOption)) --- If RETRIEVABLE_ENABLED, attribute values are retrievable in the search results. If unset, the server behavior defaults to [RETRIEVABLE_DISABLED](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-RetrievableOption#Google__Cloud__Retail__V2__CatalogAttribute__RetrievableOption__RETRIEVABLE_DISABLED "Google::Cloud::Retail::V2::CatalogAttribute::RetrievableOption::RETRIEVABLE_DISABLED (constant)").

### #searchable_option

    def searchable_option() -> ::Google::Cloud::Retail::V2::CatalogAttribute::SearchableOption

**Returns**

- ([::Google::Cloud::Retail::V2::CatalogAttribute::SearchableOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-SearchableOption)) --- When [AttributesConfig.attribute_config_level](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-AttributesConfig#Google__Cloud__Retail__V2__AttributesConfig_attribute_config_level_instance_ "Google::Cloud::Retail::V2::AttributesConfig#attribute_config_level (method)") is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values are searchable by text queries in [SearchService.Search](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-SearchService-Client#Google__Cloud__Retail__V2__SearchService__Client_search_instance_ "Google::Cloud::Retail::V2::SearchService::Client#search (method)").


  If SEARCHABLE_ENABLED but attribute type is numerical, attribute values
  will not be searchable by text queries in
  [SearchService.Search](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-SearchService-Client#Google__Cloud__Retail__V2__SearchService__Client_search_instance_ "Google::Cloud::Retail::V2::SearchService::Client#search (method)"), as
  there are no text values associated to numerical attributes.

  Must be specified, when
  [AttributesConfig.attribute_config_level](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-AttributesConfig#Google__Cloud__Retail__V2__AttributesConfig_attribute_config_level_instance_ "Google::Cloud::Retail::V2::AttributesConfig#attribute_config_level (method)")
  is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error.

### #searchable_option=

    def searchable_option=(value) -> ::Google::Cloud::Retail::V2::CatalogAttribute::SearchableOption

**Parameter**

- **value** ([::Google::Cloud::Retail::V2::CatalogAttribute::SearchableOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-SearchableOption)) --- When [AttributesConfig.attribute_config_level](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-AttributesConfig#Google__Cloud__Retail__V2__AttributesConfig_attribute_config_level_instance_ "Google::Cloud::Retail::V2::AttributesConfig#attribute_config_level (method)") is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values are searchable by text queries in [SearchService.Search](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-SearchService-Client#Google__Cloud__Retail__V2__SearchService__Client_search_instance_ "Google::Cloud::Retail::V2::SearchService::Client#search (method)").


  If SEARCHABLE_ENABLED but attribute type is numerical, attribute values
  will not be searchable by text queries in
  [SearchService.Search](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-SearchService-Client#Google__Cloud__Retail__V2__SearchService__Client_search_instance_ "Google::Cloud::Retail::V2::SearchService::Client#search (method)"), as
  there are no text values associated to numerical attributes.

  Must be specified, when
  [AttributesConfig.attribute_config_level](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-AttributesConfig#Google__Cloud__Retail__V2__AttributesConfig_attribute_config_level_instance_ "Google::Cloud::Retail::V2::AttributesConfig#attribute_config_level (method)")
  is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error.
**Returns**

- ([::Google::Cloud::Retail::V2::CatalogAttribute::SearchableOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-SearchableOption)) --- When [AttributesConfig.attribute_config_level](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-AttributesConfig#Google__Cloud__Retail__V2__AttributesConfig_attribute_config_level_instance_ "Google::Cloud::Retail::V2::AttributesConfig#attribute_config_level (method)") is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values are searchable by text queries in [SearchService.Search](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-SearchService-Client#Google__Cloud__Retail__V2__SearchService__Client_search_instance_ "Google::Cloud::Retail::V2::SearchService::Client#search (method)").


  If SEARCHABLE_ENABLED but attribute type is numerical, attribute values
  will not be searchable by text queries in
  [SearchService.Search](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-SearchService-Client#Google__Cloud__Retail__V2__SearchService__Client_search_instance_ "Google::Cloud::Retail::V2::SearchService::Client#search (method)"), as
  there are no text values associated to numerical attributes.

  Must be specified, when
  [AttributesConfig.attribute_config_level](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-AttributesConfig#Google__Cloud__Retail__V2__AttributesConfig_attribute_config_level_instance_ "Google::Cloud::Retail::V2::AttributesConfig#attribute_config_level (method)")
  is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error.

### #type

    def type() -> ::Google::Cloud::Retail::V2::CatalogAttribute::AttributeType

**Returns**

- ([::Google::Cloud::Retail::V2::CatalogAttribute::AttributeType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-CatalogAttribute-AttributeType)) --- Output only. The type of this attribute. This is derived from the attribute in [Product.attributes](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest/Google-Cloud-Retail-V2-Product#Google__Cloud__Retail__V2__Product_attributes_instance_ "Google::Cloud::Retail::V2::Product#attributes (method)").