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

namespace Google\Cloud\BigQuery\DataTransfer\V1\ImportedDataInfo;

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

/**
 * Describes schema of the data to be ingested.
 *
 * Generated from protobuf message <code>google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.RecordSchema</code>
 */
class RecordSchema extends \Google\Protobuf\Internal\Message
{
    /**
     * One field per column in the record.
     *
     * Generated from protobuf field <code>repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1;</code>
     */
    private $fields;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\BigQuery\DataTransfer\V1\ImportedDataInfo\FieldSchema[]|\Google\Protobuf\Internal\RepeatedField $fields
     *           One field per column in the record.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Bigquery\Datatransfer\V1\Datasource::initOnce();
        parent::__construct($data);
    }

    /**
     * One field per column in the record.
     *
     * Generated from protobuf field <code>repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFields()
    {
        return $this->fields;
    }

    /**
     * One field per column in the record.
     *
     * Generated from protobuf field <code>repeated .google.cloud.bigquery.datatransfer.v1.ImportedDataInfo.FieldSchema fields = 1;</code>
     * @param \Google\Cloud\BigQuery\DataTransfer\V1\ImportedDataInfo\FieldSchema[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setFields($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\DataTransfer\V1\ImportedDataInfo\FieldSchema::class);
        $this->fields = $arr;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(RecordSchema::class, \Google\Cloud\BigQuery\DataTransfer\V1\ImportedDataInfo_RecordSchema::class);

