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

namespace Google\Cloud\AdvisoryNotifications\V1;

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

/**
 * A representation of a CSV file attachment, as a list of column headers and
 * a list of data rows.
 *
 * Generated from protobuf message <code>google.cloud.advisorynotifications.v1.Csv</code>
 */
class Csv extends \Google\Protobuf\Internal\Message
{
    /**
     * The list of headers for data columns in a CSV file.
     *
     * Generated from protobuf field <code>repeated string headers = 1;</code>
     */
    private $headers;
    /**
     * The list of data rows in a CSV file, as string arrays rather than as a
     * single comma-separated string.
     *
     * Generated from protobuf field <code>repeated .google.cloud.advisorynotifications.v1.Csv.CsvRow data_rows = 2;</code>
     */
    private $data_rows;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $headers
     *           The list of headers for data columns in a CSV file.
     *     @type array<\Google\Cloud\AdvisoryNotifications\V1\Csv\CsvRow>|\Google\Protobuf\Internal\RepeatedField $data_rows
     *           The list of data rows in a CSV file, as string arrays rather than as a
     *           single comma-separated string.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Advisorynotifications\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * The list of headers for data columns in a CSV file.
     *
     * Generated from protobuf field <code>repeated string headers = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getHeaders()
    {
        return $this->headers;
    }

    /**
     * The list of headers for data columns in a CSV file.
     *
     * Generated from protobuf field <code>repeated string headers = 1;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setHeaders($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->headers = $arr;

        return $this;
    }

    /**
     * The list of data rows in a CSV file, as string arrays rather than as a
     * single comma-separated string.
     *
     * Generated from protobuf field <code>repeated .google.cloud.advisorynotifications.v1.Csv.CsvRow data_rows = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDataRows()
    {
        return $this->data_rows;
    }

    /**
     * The list of data rows in a CSV file, as string arrays rather than as a
     * single comma-separated string.
     *
     * Generated from protobuf field <code>repeated .google.cloud.advisorynotifications.v1.Csv.CsvRow data_rows = 2;</code>
     * @param array<\Google\Cloud\AdvisoryNotifications\V1\Csv\CsvRow>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDataRows($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AdvisoryNotifications\V1\Csv\CsvRow::class);
        $this->data_rows = $arr;

        return $this;
    }

}

