<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/retail/v2/catalog.proto

namespace Google\Cloud\Retail\V2;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Catalog level attribute config.
 *
 * Generated from protobuf message <code>google.cloud.retail.v2.AttributesConfig</code>
 */
class AttributesConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Immutable. The fully qualified resource name of the attribute
     * config. Format: `projects/&#42;&#47;locations/&#42;&#47;catalogs/&#42;&#47;attributesConfig`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     */
    private $name = '';
    /**
     * Enable attribute(s) config at catalog level.
     * For example, indexable, dynamic_facetable, or searchable for each
     * attribute.
     * The key is catalog attribute's name.
     * For example: `color`, `brands`, `attributes.custom_attribute`, such as
     * `attributes.xyz`.
     * The maximum number of catalog attributes allowed in a request is 1000.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.retail.v2.CatalogAttribute> catalog_attributes = 2;</code>
     */
    private $catalog_attributes;
    /**
     * Output only. The
     * [AttributeConfigLevel][google.cloud.retail.v2.AttributeConfigLevel] used
     * for this catalog.
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.AttributeConfigLevel attribute_config_level = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $attribute_config_level = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. Immutable. The fully qualified resource name of the attribute
     *           config. Format: `projects/&#42;&#47;locations/&#42;&#47;catalogs/&#42;&#47;attributesConfig`
     *     @type array|\Google\Protobuf\Internal\MapField $catalog_attributes
     *           Enable attribute(s) config at catalog level.
     *           For example, indexable, dynamic_facetable, or searchable for each
     *           attribute.
     *           The key is catalog attribute's name.
     *           For example: `color`, `brands`, `attributes.custom_attribute`, such as
     *           `attributes.xyz`.
     *           The maximum number of catalog attributes allowed in a request is 1000.
     *     @type int $attribute_config_level
     *           Output only. The
     *           [AttributeConfigLevel][google.cloud.retail.v2.AttributeConfigLevel] used
     *           for this catalog.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Retail\V2\Catalog::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Immutable. The fully qualified resource name of the attribute
     * config. Format: `projects/&#42;&#47;locations/&#42;&#47;catalogs/&#42;&#47;attributesConfig`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. Immutable. The fully qualified resource name of the attribute
     * config. Format: `projects/&#42;&#47;locations/&#42;&#47;catalogs/&#42;&#47;attributesConfig`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Enable attribute(s) config at catalog level.
     * For example, indexable, dynamic_facetable, or searchable for each
     * attribute.
     * The key is catalog attribute's name.
     * For example: `color`, `brands`, `attributes.custom_attribute`, such as
     * `attributes.xyz`.
     * The maximum number of catalog attributes allowed in a request is 1000.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.retail.v2.CatalogAttribute> catalog_attributes = 2;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getCatalogAttributes()
    {
        return $this->catalog_attributes;
    }

    /**
     * Enable attribute(s) config at catalog level.
     * For example, indexable, dynamic_facetable, or searchable for each
     * attribute.
     * The key is catalog attribute's name.
     * For example: `color`, `brands`, `attributes.custom_attribute`, such as
     * `attributes.xyz`.
     * The maximum number of catalog attributes allowed in a request is 1000.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.retail.v2.CatalogAttribute> catalog_attributes = 2;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setCatalogAttributes($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Retail\V2\CatalogAttribute::class);
        $this->catalog_attributes = $arr;

        return $this;
    }

    /**
     * Output only. The
     * [AttributeConfigLevel][google.cloud.retail.v2.AttributeConfigLevel] used
     * for this catalog.
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.AttributeConfigLevel attribute_config_level = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getAttributeConfigLevel()
    {
        return $this->attribute_config_level;
    }

    /**
     * Output only. The
     * [AttributeConfigLevel][google.cloud.retail.v2.AttributeConfigLevel] used
     * for this catalog.
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.AttributeConfigLevel attribute_config_level = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setAttributeConfigLevel($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Retail\V2\AttributeConfigLevel::class);
        $this->attribute_config_level = $var;

        return $this;
    }

}

