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

namespace Google\Cloud\GeminiDataAnalytics\V1beta;

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

/**
 * A field in a schema.
 *
 * Generated from protobuf message <code>google.cloud.geminidataanalytics.v1beta.Field</code>
 */
class Field extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. The name of the field.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $name = '';
    /**
     * Optional. The type of the field.
     *
     * Generated from protobuf field <code>string type = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $type = '';
    /**
     * Optional. A brief description of the field.
     *
     * Generated from protobuf field <code>string description = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $description = '';
    /**
     * Optional. The mode of the field (e.g., NULLABLE, REPEATED).
     *
     * Generated from protobuf field <code>string mode = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $mode = '';
    /**
     * Optional. Field display_name (same as label in
     *
     * Generated from protobuf field <code>string display_name = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $display_name = '';
    /**
     * Optional. Recursive property for nested schema structures.
     *
     * Generated from protobuf field <code>repeated .google.cloud.geminidataanalytics.v1beta.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $subfields;
    /**
     * Optional. Field category, not required, currently only useful for Looker.
     * We are using a string to avoid depending on an external package and keep
     * this package self-contained.
     *
     * Generated from protobuf field <code>string category = 10 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $category = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Optional. The name of the field.
     *     @type string $type
     *           Optional. The type of the field.
     *     @type string $description
     *           Optional. A brief description of the field.
     *     @type string $mode
     *           Optional. The mode of the field (e.g., NULLABLE, REPEATED).
     *     @type string $display_name
     *           Optional. Field display_name (same as label in
     *     @type array<\Google\Cloud\GeminiDataAnalytics\V1beta\Field>|\Google\Protobuf\Internal\RepeatedField $subfields
     *           Optional. Recursive property for nested schema structures.
     *     @type string $category
     *           Optional. Field category, not required, currently only useful for Looker.
     *           We are using a string to avoid depending on an external package and keep
     *           this package self-contained.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Geminidataanalytics\V1Beta\Datasource::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * Optional. The type of the field.
     *
     * Generated from protobuf field <code>string type = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Optional. The type of the field.
     *
     * Generated from protobuf field <code>string type = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkString($var, True);
        $this->type = $var;

        return $this;
    }

    /**
     * Optional. A brief description of the field.
     *
     * Generated from protobuf field <code>string description = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Optional. A brief description of the field.
     *
     * Generated from protobuf field <code>string description = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * Optional. The mode of the field (e.g., NULLABLE, REPEATED).
     *
     * Generated from protobuf field <code>string mode = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getMode()
    {
        return $this->mode;
    }

    /**
     * Optional. The mode of the field (e.g., NULLABLE, REPEATED).
     *
     * Generated from protobuf field <code>string mode = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setMode($var)
    {
        GPBUtil::checkString($var, True);
        $this->mode = $var;

        return $this;
    }

    /**
     * Optional. Field display_name (same as label in
     *
     * Generated from protobuf field <code>string display_name = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * Optional. Field display_name (same as label in
     *
     * Generated from protobuf field <code>string display_name = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * Optional. Recursive property for nested schema structures.
     *
     * Generated from protobuf field <code>repeated .google.cloud.geminidataanalytics.v1beta.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSubfields()
    {
        return $this->subfields;
    }

    /**
     * Optional. Recursive property for nested schema structures.
     *
     * Generated from protobuf field <code>repeated .google.cloud.geminidataanalytics.v1beta.Field subfields = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<\Google\Cloud\GeminiDataAnalytics\V1beta\Field>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSubfields($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GeminiDataAnalytics\V1beta\Field::class);
        $this->subfields = $arr;

        return $this;
    }

    /**
     * Optional. Field category, not required, currently only useful for Looker.
     * We are using a string to avoid depending on an external package and keep
     * this package self-contained.
     *
     * Generated from protobuf field <code>string category = 10 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getCategory()
    {
        return $this->category;
    }

    /**
     * Optional. Field category, not required, currently only useful for Looker.
     * We are using a string to avoid depending on an external package and keep
     * this package self-contained.
     *
     * Generated from protobuf field <code>string category = 10 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setCategory($var)
    {
        GPBUtil::checkString($var, True);
        $this->category = $var;

        return $this;
    }

}

