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

/**
 * 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. A list of alternative names or synonyms that can be used to refer
     * to this field. For example: ["id", "customerid", "cust_id"]. Currently only
     * used for BigQuery data sources.
     *
     * Generated from protobuf field <code>repeated string synonyms = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $synonyms;
    /**
     * Optional. A list of tags or keywords associated with the field, used for
     * categorization. For example: ["identifier", "customer", "pii"]. Currently
     * only used for BigQuery data sources.
     *
     * Generated from protobuf field <code>repeated string tags = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $tags;
    /**
     * 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 = '';
    /**
     * Optional. Looker only. Value format of the field.
     * Ref:
     * https://cloud.google.com/looker/docs/reference/param-field-value-format
     *
     * Generated from protobuf field <code>string value_format = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $value_format = '';

    /**
     * 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[] $synonyms
     *           Optional. A list of alternative names or synonyms that can be used to refer
     *           to this field. For example: ["id", "customerid", "cust_id"]. Currently only
     *           used for BigQuery data sources.
     *     @type string[] $tags
     *           Optional. A list of tags or keywords associated with the field, used for
     *           categorization. For example: ["identifier", "customer", "pii"]. Currently
     *           only used for BigQuery data sources.
     *     @type string $display_name
     *           Optional. Field display_name (same as label in
     *     @type \Google\Cloud\GeminiDataAnalytics\V1beta\Field[] $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.
     *     @type string $value_format
     *           Optional. Looker only. Value format of the field.
     *           Ref:
     *           https://cloud.google.com/looker/docs/reference/param-field-value-format
     * }
     */
    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. A list of alternative names or synonyms that can be used to refer
     * to this field. For example: ["id", "customerid", "cust_id"]. Currently only
     * used for BigQuery data sources.
     *
     * Generated from protobuf field <code>repeated string synonyms = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return RepeatedField<string>
     */
    public function getSynonyms()
    {
        return $this->synonyms;
    }

    /**
     * Optional. A list of alternative names or synonyms that can be used to refer
     * to this field. For example: ["id", "customerid", "cust_id"]. Currently only
     * used for BigQuery data sources.
     *
     * Generated from protobuf field <code>repeated string synonyms = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string[] $var
     * @return $this
     */
    public function setSynonyms($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->synonyms = $arr;

        return $this;
    }

    /**
     * Optional. A list of tags or keywords associated with the field, used for
     * categorization. For example: ["identifier", "customer", "pii"]. Currently
     * only used for BigQuery data sources.
     *
     * Generated from protobuf field <code>repeated string tags = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return RepeatedField<string>
     */
    public function getTags()
    {
        return $this->tags;
    }

    /**
     * Optional. A list of tags or keywords associated with the field, used for
     * categorization. For example: ["identifier", "customer", "pii"]. Currently
     * only used for BigQuery data sources.
     *
     * Generated from protobuf field <code>repeated string tags = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string[] $var
     * @return $this
     */
    public function setTags($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->tags = $arr;

        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 RepeatedField<\Google\Cloud\GeminiDataAnalytics\V1beta\Field>
     */
    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 \Google\Cloud\GeminiDataAnalytics\V1beta\Field[] $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;
    }

    /**
     * Optional. Looker only. Value format of the field.
     * Ref:
     * https://cloud.google.com/looker/docs/reference/param-field-value-format
     *
     * Generated from protobuf field <code>string value_format = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getValueFormat()
    {
        return $this->value_format;
    }

    /**
     * Optional. Looker only. Value format of the field.
     * Ref:
     * https://cloud.google.com/looker/docs/reference/param-field-value-format
     *
     * Generated from protobuf field <code>string value_format = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setValueFormat($var)
    {
        GPBUtil::checkString($var, True);
        $this->value_format = $var;

        return $this;
    }

}

