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

namespace Google\Cloud\AlloyDb\V1;

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

/**
 * Contains the name and datatype of a column in a SQL Result.
 *
 * Generated from protobuf message <code>google.cloud.alloydb.v1.SqlResultColumn</code>
 */
class SqlResultColumn extends \Google\Protobuf\Internal\Message
{
    /**
     * Name of the column.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    protected $name = '';
    /**
     * Datatype of the column as reported by the postgres driver.
     * Common type names are "VARCHAR", "TEXT", "NVARCHAR", "DECIMAL", "BOOL",
     * "INT", and "BIGINT".
     *
     * Generated from protobuf field <code>string type = 2;</code>
     */
    protected $type = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Name of the column.
     *     @type string $type
     *           Datatype of the column as reported by the postgres driver.
     *           Common type names are "VARCHAR", "TEXT", "NVARCHAR", "DECIMAL", "BOOL",
     *           "INT", and "BIGINT".
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Alloydb\V1\DataModel::initOnce();
        parent::__construct($data);
    }

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

    /**
     * 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;
    }

    /**
     * Datatype of the column as reported by the postgres driver.
     * Common type names are "VARCHAR", "TEXT", "NVARCHAR", "DECIMAL", "BOOL",
     * "INT", and "BIGINT".
     *
     * Generated from protobuf field <code>string type = 2;</code>
     * @return string
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Datatype of the column as reported by the postgres driver.
     * Common type names are "VARCHAR", "TEXT", "NVARCHAR", "DECIMAL", "BOOL",
     * "INT", and "BIGINT".
     *
     * Generated from protobuf field <code>string type = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkString($var, True);
        $this->type = $var;

        return $this;
    }

}

