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

namespace Google\Cloud\Dataplex\V1\DataDocumentationResult;

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

/**
 * Column of a table with generated metadata and nested fields.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.DataDocumentationResult.Field</code>
 */
class Field extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The name of the column.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $name = '';
    /**
     * Output only. Generated description for columns and fields.
     *
     * Generated from protobuf field <code>string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $description = '';
    /**
     * Output only. Nested fields.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dataplex.v1.DataDocumentationResult.Field fields = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $fields;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Output only. The name of the column.
     *     @type string $description
     *           Output only. Generated description for columns and fields.
     *     @type \Google\Cloud\Dataplex\V1\DataDocumentationResult\Field[] $fields
     *           Output only. Nested fields.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\DataDocumentation::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The name of the column.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

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

        return $this;
    }

    /**
     * Output only. Generated description for columns and fields.
     *
     * Generated from protobuf field <code>string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Output only. Generated description for columns and fields.
     *
     * Generated from protobuf field <code>string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * Output only. Nested fields.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dataplex.v1.DataDocumentationResult.Field fields = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return RepeatedField<\Google\Cloud\Dataplex\V1\DataDocumentationResult\Field>
     */
    public function getFields()
    {
        return $this->fields;
    }

    /**
     * Output only. Nested fields.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dataplex.v1.DataDocumentationResult.Field fields = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Dataplex\V1\DataDocumentationResult\Field[] $var
     * @return $this
     */
    public function setFields($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataDocumentationResult\Field::class);
        $this->fields = $arr;

        return $this;
    }

}

