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

namespace Google\Cloud\DiscoveryEngine\V1beta\BigtableOptions;

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

/**
 * The column family of the Bigtable.
 *
 * Generated from protobuf message <code>google.cloud.discoveryengine.v1beta.BigtableOptions.BigtableColumnFamily</code>
 */
class BigtableColumnFamily extends \Google\Protobuf\Internal\Message
{
    /**
     * The field name to use for this column family in the document. The
     * name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set,
     * it is parsed from the family name with best effort. However, due to
     * different naming patterns, field name collisions could happen, where
     * parsing behavior is undefined.
     *
     * Generated from protobuf field <code>string field_name = 1;</code>
     */
    protected $field_name = '';
    /**
     * The encoding mode of the values when the type is not STRING.
     * Acceptable encoding values are:
     * * `TEXT`: indicates values are alphanumeric text strings.
     * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
     * family of functions. This can be overridden for a specific column
     * by listing that column in `columns` and specifying an encoding for it.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.BigtableOptions.Encoding encoding = 2;</code>
     */
    protected $encoding = 0;
    /**
     * The type of values in this column family.
     * The values are expected to be encoded using `HBase Bytes.toBytes`
     * function when the encoding value is set to `BINARY`.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.BigtableOptions.Type type = 3;</code>
     */
    protected $type = 0;
    /**
     * The list of objects that contains column level information for each
     * column. If a column is not present in this list it will be ignored.
     *
     * Generated from protobuf field <code>repeated .google.cloud.discoveryengine.v1beta.BigtableOptions.BigtableColumn columns = 4;</code>
     */
    private $columns;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $field_name
     *           The field name to use for this column family in the document. The
     *           name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set,
     *           it is parsed from the family name with best effort. However, due to
     *           different naming patterns, field name collisions could happen, where
     *           parsing behavior is undefined.
     *     @type int $encoding
     *           The encoding mode of the values when the type is not STRING.
     *           Acceptable encoding values are:
     *           * `TEXT`: indicates values are alphanumeric text strings.
     *           * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
     *           family of functions. This can be overridden for a specific column
     *           by listing that column in `columns` and specifying an encoding for it.
     *     @type int $type
     *           The type of values in this column family.
     *           The values are expected to be encoded using `HBase Bytes.toBytes`
     *           function when the encoding value is set to `BINARY`.
     *     @type array<\Google\Cloud\DiscoveryEngine\V1beta\BigtableOptions\BigtableColumn>|\Google\Protobuf\Internal\RepeatedField $columns
     *           The list of objects that contains column level information for each
     *           column. If a column is not present in this list it will be ignored.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce();
        parent::__construct($data);
    }

    /**
     * The field name to use for this column family in the document. The
     * name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set,
     * it is parsed from the family name with best effort. However, due to
     * different naming patterns, field name collisions could happen, where
     * parsing behavior is undefined.
     *
     * Generated from protobuf field <code>string field_name = 1;</code>
     * @return string
     */
    public function getFieldName()
    {
        return $this->field_name;
    }

    /**
     * The field name to use for this column family in the document. The
     * name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set,
     * it is parsed from the family name with best effort. However, due to
     * different naming patterns, field name collisions could happen, where
     * parsing behavior is undefined.
     *
     * Generated from protobuf field <code>string field_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setFieldName($var)
    {
        GPBUtil::checkString($var, True);
        $this->field_name = $var;

        return $this;
    }

    /**
     * The encoding mode of the values when the type is not STRING.
     * Acceptable encoding values are:
     * * `TEXT`: indicates values are alphanumeric text strings.
     * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
     * family of functions. This can be overridden for a specific column
     * by listing that column in `columns` and specifying an encoding for it.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.BigtableOptions.Encoding encoding = 2;</code>
     * @return int
     */
    public function getEncoding()
    {
        return $this->encoding;
    }

    /**
     * The encoding mode of the values when the type is not STRING.
     * Acceptable encoding values are:
     * * `TEXT`: indicates values are alphanumeric text strings.
     * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
     * family of functions. This can be overridden for a specific column
     * by listing that column in `columns` and specifying an encoding for it.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.BigtableOptions.Encoding encoding = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setEncoding($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1beta\BigtableOptions\Encoding::class);
        $this->encoding = $var;

        return $this;
    }

    /**
     * The type of values in this column family.
     * The values are expected to be encoded using `HBase Bytes.toBytes`
     * function when the encoding value is set to `BINARY`.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.BigtableOptions.Type type = 3;</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * The type of values in this column family.
     * The values are expected to be encoded using `HBase Bytes.toBytes`
     * function when the encoding value is set to `BINARY`.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.BigtableOptions.Type type = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1beta\BigtableOptions\Type::class);
        $this->type = $var;

        return $this;
    }

    /**
     * The list of objects that contains column level information for each
     * column. If a column is not present in this list it will be ignored.
     *
     * Generated from protobuf field <code>repeated .google.cloud.discoveryengine.v1beta.BigtableOptions.BigtableColumn columns = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getColumns()
    {
        return $this->columns;
    }

    /**
     * The list of objects that contains column level information for each
     * column. If a column is not present in this list it will be ignored.
     *
     * Generated from protobuf field <code>repeated .google.cloud.discoveryengine.v1beta.BigtableOptions.BigtableColumn columns = 4;</code>
     * @param array<\Google\Cloud\DiscoveryEngine\V1beta\BigtableOptions\BigtableColumn>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setColumns($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\BigtableOptions\BigtableColumn::class);
        $this->columns = $arr;

        return $this;
    }

}


