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

namespace Google\Cloud\Bigtable\V2;

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

/**
 * Describes a column in a Bigtable Query Language result set.
 *
 * Generated from protobuf message <code>google.bigtable.v2.ColumnMetadata</code>
 */
class ColumnMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * The name of the column.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    protected $name = '';
    /**
     * The type of the column.
     *
     * Generated from protobuf field <code>.google.bigtable.v2.Type type = 2;</code>
     */
    protected $type = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           The name of the column.
     *     @type \Google\Cloud\Bigtable\V2\Type $type
     *           The type of the column.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Bigtable\V2\Data::initOnce();
        parent::__construct($data);
    }

    /**
     * The name of the column.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * The name of the column.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The type of the column.
     *
     * Generated from protobuf field <code>.google.bigtable.v2.Type type = 2;</code>
     * @return \Google\Cloud\Bigtable\V2\Type|null
     */
    public function getType()
    {
        return $this->type;
    }

    public function hasType()
    {
        return isset($this->type);
    }

    public function clearType()
    {
        unset($this->type);
    }

    /**
     * The type of the column.
     *
     * Generated from protobuf field <code>.google.bigtable.v2.Type type = 2;</code>
     * @param \Google\Cloud\Bigtable\V2\Type $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Type::class);
        $this->type = $var;

        return $this;
    }

}

