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

namespace Google\Cloud\Dataform\V1beta1;

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

/**
 * Describes a relation and its columns.
 *
 * Generated from protobuf message <code>google.cloud.dataform.v1beta1.RelationDescriptor</code>
 */
class RelationDescriptor extends \Google\Protobuf\Internal\Message
{
    /**
     * A text description of the relation.
     *
     * Generated from protobuf field <code>string description = 1;</code>
     */
    private $description = '';
    /**
     * A list of descriptions of columns within the relation.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor columns = 2;</code>
     */
    private $columns;
    /**
     * A set of BigQuery labels that should be applied to the relation.
     *
     * Generated from protobuf field <code>map<string, string> bigquery_labels = 3;</code>
     */
    private $bigquery_labels;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $description
     *           A text description of the relation.
     *     @type array<\Google\Cloud\Dataform\V1beta1\RelationDescriptor\ColumnDescriptor>|\Google\Protobuf\Internal\RepeatedField $columns
     *           A list of descriptions of columns within the relation.
     *     @type array|\Google\Protobuf\Internal\MapField $bigquery_labels
     *           A set of BigQuery labels that should be applied to the relation.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataform\V1Beta1\Dataform::initOnce();
        parent::__construct($data);
    }

    /**
     * A text description of the relation.
     *
     * Generated from protobuf field <code>string description = 1;</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * A text description of the relation.
     *
     * Generated from protobuf field <code>string description = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * A list of descriptions of columns within the relation.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor columns = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getColumns()
    {
        return $this->columns;
    }

    /**
     * A list of descriptions of columns within the relation.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor columns = 2;</code>
     * @param array<\Google\Cloud\Dataform\V1beta1\RelationDescriptor\ColumnDescriptor>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setColumns($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataform\V1beta1\RelationDescriptor\ColumnDescriptor::class);
        $this->columns = $arr;

        return $this;
    }

    /**
     * A set of BigQuery labels that should be applied to the relation.
     *
     * Generated from protobuf field <code>map<string, string> bigquery_labels = 3;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getBigqueryLabels()
    {
        return $this->bigquery_labels;
    }

    /**
     * A set of BigQuery labels that should be applied to the relation.
     *
     * Generated from protobuf field <code>map<string, string> bigquery_labels = 3;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setBigqueryLabels($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->bigquery_labels = $arr;

        return $this;
    }

}

