<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/sql/v1beta4/cloud_sql_resources.proto

namespace Google\Cloud\Sql\V1beta4\ImportContext;

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

/**
 * Generated from protobuf message <code>google.cloud.sql.v1beta4.ImportContext.SqlCsvImportOptions</code>
 */
class SqlCsvImportOptions extends \Google\Protobuf\Internal\Message
{
    /**
     * The table to which CSV data is imported.
     *
     * Generated from protobuf field <code>string table = 1;</code>
     */
    private $table = '';
    /**
     * The columns to which CSV data is imported. If not specified, all columns
     * of the database table are loaded with CSV data.
     *
     * Generated from protobuf field <code>repeated string columns = 2;</code>
     */
    private $columns;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $table
     *           The table to which CSV data is imported.
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $columns
     *           The columns to which CSV data is imported. If not specified, all columns
     *           of the database table are loaded with CSV data.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce();
        parent::__construct($data);
    }

    /**
     * The table to which CSV data is imported.
     *
     * Generated from protobuf field <code>string table = 1;</code>
     * @return string
     */
    public function getTable()
    {
        return $this->table;
    }

    /**
     * The table to which CSV data is imported.
     *
     * Generated from protobuf field <code>string table = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setTable($var)
    {
        GPBUtil::checkString($var, True);
        $this->table = $var;

        return $this;
    }

    /**
     * The columns to which CSV data is imported. If not specified, all columns
     * of the database table are loaded with CSV data.
     *
     * Generated from protobuf field <code>repeated string columns = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getColumns()
    {
        return $this->columns;
    }

    /**
     * The columns to which CSV data is imported. If not specified, all columns
     * of the database table are loaded with CSV data.
     *
     * Generated from protobuf field <code>repeated string columns = 2;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setColumns($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->columns = $arr;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SqlCsvImportOptions::class, \Google\Cloud\Sql\V1beta4\ImportContext_SqlCsvImportOptions::class);

