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

namespace Google\Cloud\BigQuery\Storage\V1\TableFieldSchema;

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

/**
 * Represents the type of a field element.
 *
 * Generated from protobuf message <code>google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementType</code>
 */
class FieldElementType extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The type of a field element.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $type
     *           Required. The type of a field element.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Table::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The type of a field element.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Required. The type of a field element.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\Type::class);
        $this->type = $var;

        return $this;
    }

}

