<?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\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * 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 array<\Google\Cloud\Dataplex\V1\DataDocumentationResult\Field>|\Google\Protobuf\Internal\RepeatedField $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 \Google\Protobuf\Internal\RepeatedField
     */
    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 array<\Google\Cloud\Dataplex\V1\DataDocumentationResult\Field>|\Google\Protobuf\Internal\RepeatedField $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;
    }

}


