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

namespace Google\Cloud\AlloyDb\V1\ImportClusterRequest;

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

/**
 * Options for importing data in CSV format.
 *
 * Generated from protobuf message <code>google.cloud.alloydb.v1.ImportClusterRequest.CsvImportOptions</code>
 */
class CsvImportOptions extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The database table to import CSV file into.
     *
     * Generated from protobuf field <code>string table = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $table = '';
    /**
     * Optional. 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 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $columns;
    /**
     * Optional. Specifies the character that separates columns within each row
     * (line) of the file. The default is comma. The value of this argument has
     * to be a character in Hex ASCII Code.
     *
     * Generated from protobuf field <code>string field_delimiter = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $field_delimiter = '';
    /**
     * Optional. Specifies the quoting character to be used when a data value is
     * quoted. The default is double-quote. The value of this argument has to be
     * a character in Hex ASCII Code.
     *
     * Generated from protobuf field <code>string quote_character = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $quote_character = '';
    /**
     * Optional. Specifies the character that should appear before a data
     * character that needs to be escaped. The default is same as quote
     * character. The value of this argument has to be a character in Hex ASCII
     * Code.
     *
     * Generated from protobuf field <code>string escape_character = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $escape_character = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $table
     *           Required. The database table to import CSV file into.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $columns
     *           Optional. The columns to which CSV data is imported. If not specified,
     *           all columns of the database table are loaded with CSV data.
     *     @type string $field_delimiter
     *           Optional. Specifies the character that separates columns within each row
     *           (line) of the file. The default is comma. The value of this argument has
     *           to be a character in Hex ASCII Code.
     *     @type string $quote_character
     *           Optional. Specifies the quoting character to be used when a data value is
     *           quoted. The default is double-quote. The value of this argument has to be
     *           a character in Hex ASCII Code.
     *     @type string $escape_character
     *           Optional. Specifies the character that should appear before a data
     *           character that needs to be escaped. The default is same as quote
     *           character. The value of this argument has to be a character in Hex ASCII
     *           Code.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Alloydb\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The database table to import CSV file into.
     *
     * Generated from protobuf field <code>string table = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getTable()
    {
        return $this->table;
    }

    /**
     * Required. The database table to import CSV file into.
     *
     * Generated from protobuf field <code>string table = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setTable($var)
    {
        GPBUtil::checkString($var, True);
        $this->table = $var;

        return $this;
    }

    /**
     * Optional. 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 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getColumns()
    {
        return $this->columns;
    }

    /**
     * Optional. 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 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<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;
    }

    /**
     * Optional. Specifies the character that separates columns within each row
     * (line) of the file. The default is comma. The value of this argument has
     * to be a character in Hex ASCII Code.
     *
     * Generated from protobuf field <code>string field_delimiter = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getFieldDelimiter()
    {
        return $this->field_delimiter;
    }

    /**
     * Optional. Specifies the character that separates columns within each row
     * (line) of the file. The default is comma. The value of this argument has
     * to be a character in Hex ASCII Code.
     *
     * Generated from protobuf field <code>string field_delimiter = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setFieldDelimiter($var)
    {
        GPBUtil::checkString($var, True);
        $this->field_delimiter = $var;

        return $this;
    }

    /**
     * Optional. Specifies the quoting character to be used when a data value is
     * quoted. The default is double-quote. The value of this argument has to be
     * a character in Hex ASCII Code.
     *
     * Generated from protobuf field <code>string quote_character = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getQuoteCharacter()
    {
        return $this->quote_character;
    }

    /**
     * Optional. Specifies the quoting character to be used when a data value is
     * quoted. The default is double-quote. The value of this argument has to be
     * a character in Hex ASCII Code.
     *
     * Generated from protobuf field <code>string quote_character = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setQuoteCharacter($var)
    {
        GPBUtil::checkString($var, True);
        $this->quote_character = $var;

        return $this;
    }

    /**
     * Optional. Specifies the character that should appear before a data
     * character that needs to be escaped. The default is same as quote
     * character. The value of this argument has to be a character in Hex ASCII
     * Code.
     *
     * Generated from protobuf field <code>string escape_character = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getEscapeCharacter()
    {
        return $this->escape_character;
    }

    /**
     * Optional. Specifies the character that should appear before a data
     * character that needs to be escaped. The default is same as quote
     * character. The value of this argument has to be a character in Hex ASCII
     * Code.
     *
     * Generated from protobuf field <code>string escape_character = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setEscapeCharacter($var)
    {
        GPBUtil::checkString($var, True);
        $this->escape_character = $var;

        return $this;
    }

}


