<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: http/v1/http.proto

namespace RoadRunner\HTTP\DTO\V1;

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

/**
 * proto http request
 *
 * Generated from protobuf message <code>http.v1.Request</code>
 */
class Request extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string remote_addr = 1;</code>
     */
    protected $remote_addr = '';
    /**
     * Generated from protobuf field <code>string protocol = 2;</code>
     */
    protected $protocol = '';
    /**
     * Generated from protobuf field <code>string method = 3;</code>
     */
    protected $method = '';
    /**
     * Generated from protobuf field <code>string uri = 4;</code>
     */
    protected $uri = '';
    /**
     * Generated from protobuf field <code>map<string, .http.v1.HeaderValue> header = 5;</code>
     */
    private $header;
    /**
     * Generated from protobuf field <code>map<string, .http.v1.HeaderValue> cookies = 6;</code>
     */
    private $cookies;
    /**
     * Generated from protobuf field <code>string raw_query = 7;</code>
     */
    protected $raw_query = '';
    /**
     * Generated from protobuf field <code>bool parsed = 8;</code>
     */
    protected $parsed = false;
    /**
     * Generated from protobuf field <code>bytes uploads = 9;</code>
     */
    protected $uploads = '';
    /**
     * Generated from protobuf field <code>map<string, .http.v1.HeaderValue> attributes = 10;</code>
     */
    private $attributes;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $remote_addr
     *     @type string $protocol
     *     @type string $method
     *     @type string $uri
     *     @type array|\Google\Protobuf\Internal\MapField $header
     *     @type array|\Google\Protobuf\Internal\MapField $cookies
     *     @type string $raw_query
     *     @type bool $parsed
     *     @type string $uploads
     *     @type array|\Google\Protobuf\Internal\MapField $attributes
     * }
     */
    public function __construct($data = NULL) {
        \RoadRunner\HTTP\DTO\V1\GPBMetadata\Http::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>string remote_addr = 1;</code>
     * @return string
     */
    public function getRemoteAddr()
    {
        return $this->remote_addr;
    }

    /**
     * Generated from protobuf field <code>string remote_addr = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setRemoteAddr($var)
    {
        GPBUtil::checkString($var, True);
        $this->remote_addr = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string protocol = 2;</code>
     * @return string
     */
    public function getProtocol()
    {
        return $this->protocol;
    }

    /**
     * Generated from protobuf field <code>string protocol = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setProtocol($var)
    {
        GPBUtil::checkString($var, True);
        $this->protocol = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string method = 3;</code>
     * @return string
     */
    public function getMethod()
    {
        return $this->method;
    }

    /**
     * Generated from protobuf field <code>string method = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setMethod($var)
    {
        GPBUtil::checkString($var, True);
        $this->method = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string uri = 4;</code>
     * @return string
     */
    public function getUri()
    {
        return $this->uri;
    }

    /**
     * Generated from protobuf field <code>string uri = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->uri = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>map<string, .http.v1.HeaderValue> header = 5;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getHeader()
    {
        return $this->header;
    }

    /**
     * Generated from protobuf field <code>map<string, .http.v1.HeaderValue> header = 5;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setHeader($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\HTTP\DTO\V1\HeaderValue::class);
        $this->header = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>map<string, .http.v1.HeaderValue> cookies = 6;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getCookies()
    {
        return $this->cookies;
    }

    /**
     * Generated from protobuf field <code>map<string, .http.v1.HeaderValue> cookies = 6;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setCookies($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\HTTP\DTO\V1\HeaderValue::class);
        $this->cookies = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string raw_query = 7;</code>
     * @return string
     */
    public function getRawQuery()
    {
        return $this->raw_query;
    }

    /**
     * Generated from protobuf field <code>string raw_query = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setRawQuery($var)
    {
        GPBUtil::checkString($var, True);
        $this->raw_query = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool parsed = 8;</code>
     * @return bool
     */
    public function getParsed()
    {
        return $this->parsed;
    }

    /**
     * Generated from protobuf field <code>bool parsed = 8;</code>
     * @param bool $var
     * @return $this
     */
    public function setParsed($var)
    {
        GPBUtil::checkBool($var);
        $this->parsed = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>bytes uploads = 9;</code>
     * @return string
     */
    public function getUploads()
    {
        return $this->uploads;
    }

    /**
     * Generated from protobuf field <code>bytes uploads = 9;</code>
     * @param string $var
     * @return $this
     */
    public function setUploads($var)
    {
        GPBUtil::checkString($var, False);
        $this->uploads = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>map<string, .http.v1.HeaderValue> attributes = 10;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getAttributes()
    {
        return $this->attributes;
    }

    /**
     * Generated from protobuf field <code>map<string, .http.v1.HeaderValue> attributes = 10;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setAttributes($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \RoadRunner\HTTP\DTO\V1\HeaderValue::class);
        $this->attributes = $arr;

        return $this;
    }

}

