<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/discoveryengine/v1/import_config.proto

namespace Google\Cloud\DiscoveryEngine\V1;

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

/**
 * The Bigtable Options object that contains information to support
 * the import.
 *
 * Generated from protobuf message <code>google.cloud.discoveryengine.v1.BigtableOptions</code>
 */
class BigtableOptions extends \Google\Protobuf\Internal\Message
{
    /**
     * The field name used for saving row key value in the document. The name has
     * to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
     *
     * Generated from protobuf field <code>string key_field_name = 1;</code>
     */
    protected $key_field_name = '';
    /**
     * The mapping from family names to an object that contains column families
     * level information for the given column family. If a family is not present
     * in this map it will be ignored.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily> families = 2;</code>
     */
    private $families;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $key_field_name
     *           The field name used for saving row key value in the document. The name has
     *           to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
     *     @type array|\Google\Protobuf\Internal\MapField $families
     *           The mapping from family names to an object that contains column families
     *           level information for the given column family. If a family is not present
     *           in this map it will be ignored.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce();
        parent::__construct($data);
    }

    /**
     * The field name used for saving row key value in the document. The name has
     * to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
     *
     * Generated from protobuf field <code>string key_field_name = 1;</code>
     * @return string
     */
    public function getKeyFieldName()
    {
        return $this->key_field_name;
    }

    /**
     * The field name used for saving row key value in the document. The name has
     * to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
     *
     * Generated from protobuf field <code>string key_field_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setKeyFieldName($var)
    {
        GPBUtil::checkString($var, True);
        $this->key_field_name = $var;

        return $this;
    }

    /**
     * The mapping from family names to an object that contains column families
     * level information for the given column family. If a family is not present
     * in this map it will be ignored.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily> families = 2;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getFamilies()
    {
        return $this->families;
    }

    /**
     * The mapping from family names to an object that contains column families
     * level information for the given column family. If a family is not present
     * in this map it will be ignored.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily> families = 2;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setFamilies($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\BigtableOptions\BigtableColumnFamily::class);
        $this->families = $arr;

        return $this;
    }

}

