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

namespace Google\Cloud\Dataplex\V1\StorageFormat;

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

/**
 * Describes CSV and similar semi-structured data formats.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.StorageFormat.CsvOptions</code>
 */
class CsvOptions extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. The character encoding of the data. Accepts "US-ASCII",
     * "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified.
     *
     * Generated from protobuf field <code>string encoding = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $encoding = '';
    /**
     * Optional. The number of rows to interpret as header rows that should be
     * skipped when reading data rows. Defaults to 0.
     *
     * Generated from protobuf field <code>int32 header_rows = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $header_rows = 0;
    /**
     * Optional. The delimiter used to separate values. Defaults to ','.
     *
     * Generated from protobuf field <code>string delimiter = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $delimiter = '';
    /**
     * Optional. The character used to quote column values. Accepts '"'
     * (double quotation mark) or ''' (single quotation mark). Defaults to
     * '"' (double quotation mark) if unspecified.
     *
     * Generated from protobuf field <code>string quote = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $quote = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $encoding
     *           Optional. The character encoding of the data. Accepts "US-ASCII",
     *           "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified.
     *     @type int $header_rows
     *           Optional. The number of rows to interpret as header rows that should be
     *           skipped when reading data rows. Defaults to 0.
     *     @type string $delimiter
     *           Optional. The delimiter used to separate values. Defaults to ','.
     *     @type string $quote
     *           Optional. The character used to quote column values. Accepts '"'
     *           (double quotation mark) or ''' (single quotation mark). Defaults to
     *           '"' (double quotation mark) if unspecified.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The character encoding of the data. Accepts "US-ASCII",
     * "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified.
     *
     * Generated from protobuf field <code>string encoding = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getEncoding()
    {
        return $this->encoding;
    }

    /**
     * Optional. The character encoding of the data. Accepts "US-ASCII",
     * "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified.
     *
     * Generated from protobuf field <code>string encoding = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setEncoding($var)
    {
        GPBUtil::checkString($var, True);
        $this->encoding = $var;

        return $this;
    }

    /**
     * Optional. The number of rows to interpret as header rows that should be
     * skipped when reading data rows. Defaults to 0.
     *
     * Generated from protobuf field <code>int32 header_rows = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getHeaderRows()
    {
        return $this->header_rows;
    }

    /**
     * Optional. The number of rows to interpret as header rows that should be
     * skipped when reading data rows. Defaults to 0.
     *
     * Generated from protobuf field <code>int32 header_rows = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setHeaderRows($var)
    {
        GPBUtil::checkInt32($var);
        $this->header_rows = $var;

        return $this;
    }

    /**
     * Optional. The delimiter used to separate values. Defaults to ','.
     *
     * Generated from protobuf field <code>string delimiter = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getDelimiter()
    {
        return $this->delimiter;
    }

    /**
     * Optional. The delimiter used to separate values. Defaults to ','.
     *
     * Generated from protobuf field <code>string delimiter = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setDelimiter($var)
    {
        GPBUtil::checkString($var, True);
        $this->delimiter = $var;

        return $this;
    }

    /**
     * Optional. The character used to quote column values. Accepts '"'
     * (double quotation mark) or ''' (single quotation mark). Defaults to
     * '"' (double quotation mark) if unspecified.
     *
     * Generated from protobuf field <code>string quote = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getQuote()
    {
        return $this->quote;
    }

    /**
     * Optional. The character used to quote column values. Accepts '"'
     * (double quotation mark) or ''' (single quotation mark). Defaults to
     * '"' (double quotation mark) if unspecified.
     *
     * Generated from protobuf field <code>string quote = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setQuote($var)
    {
        GPBUtil::checkString($var, True);
        $this->quote = $var;

        return $this;
    }

}


