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

namespace Google\Cloud\Compute\V1;

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

/**
 * The request and response header transformations that take effect before the request is passed along to the selected backendService.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.HttpHeaderAction</code>
 */
class HttpHeaderAction extends \Google\Protobuf\Internal\Message
{
    /**
     * Headers to add to a matching request before forwarding the request to the backendService.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.HttpHeaderOption request_headers_to_add = 72111974;</code>
     */
    private $request_headers_to_add;
    /**
     * A list of header names for headers that need to be removed from the request before forwarding the request to the backendService.
     *
     * Generated from protobuf field <code>repeated string request_headers_to_remove = 218425247;</code>
     */
    private $request_headers_to_remove;
    /**
     * Headers to add the response before sending the response back to the client.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.HttpHeaderOption response_headers_to_add = 32136052;</code>
     */
    private $response_headers_to_add;
    /**
     * A list of header names for headers that need to be removed from the response before sending the response back to the client.
     *
     * Generated from protobuf field <code>repeated string response_headers_to_remove = 75415761;</code>
     */
    private $response_headers_to_remove;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Compute\V1\HttpHeaderOption>|\Google\Protobuf\Internal\RepeatedField $request_headers_to_add
     *           Headers to add to a matching request before forwarding the request to the backendService.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $request_headers_to_remove
     *           A list of header names for headers that need to be removed from the request before forwarding the request to the backendService.
     *     @type array<\Google\Cloud\Compute\V1\HttpHeaderOption>|\Google\Protobuf\Internal\RepeatedField $response_headers_to_add
     *           Headers to add the response before sending the response back to the client.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $response_headers_to_remove
     *           A list of header names for headers that need to be removed from the response before sending the response back to the client.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Headers to add to a matching request before forwarding the request to the backendService.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.HttpHeaderOption request_headers_to_add = 72111974;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRequestHeadersToAdd()
    {
        return $this->request_headers_to_add;
    }

    /**
     * Headers to add to a matching request before forwarding the request to the backendService.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.HttpHeaderOption request_headers_to_add = 72111974;</code>
     * @param array<\Google\Cloud\Compute\V1\HttpHeaderOption>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRequestHeadersToAdd($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\HttpHeaderOption::class);
        $this->request_headers_to_add = $arr;

        return $this;
    }

    /**
     * A list of header names for headers that need to be removed from the request before forwarding the request to the backendService.
     *
     * Generated from protobuf field <code>repeated string request_headers_to_remove = 218425247;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRequestHeadersToRemove()
    {
        return $this->request_headers_to_remove;
    }

    /**
     * A list of header names for headers that need to be removed from the request before forwarding the request to the backendService.
     *
     * Generated from protobuf field <code>repeated string request_headers_to_remove = 218425247;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRequestHeadersToRemove($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->request_headers_to_remove = $arr;

        return $this;
    }

    /**
     * Headers to add the response before sending the response back to the client.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.HttpHeaderOption response_headers_to_add = 32136052;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getResponseHeadersToAdd()
    {
        return $this->response_headers_to_add;
    }

    /**
     * Headers to add the response before sending the response back to the client.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.HttpHeaderOption response_headers_to_add = 32136052;</code>
     * @param array<\Google\Cloud\Compute\V1\HttpHeaderOption>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setResponseHeadersToAdd($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\HttpHeaderOption::class);
        $this->response_headers_to_add = $arr;

        return $this;
    }

    /**
     * A list of header names for headers that need to be removed from the response before sending the response back to the client.
     *
     * Generated from protobuf field <code>repeated string response_headers_to_remove = 75415761;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getResponseHeadersToRemove()
    {
        return $this->response_headers_to_remove;
    }

    /**
     * A list of header names for headers that need to be removed from the response before sending the response back to the client.
     *
     * Generated from protobuf field <code>repeated string response_headers_to_remove = 75415761;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setResponseHeadersToRemove($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->response_headers_to_remove = $arr;

        return $this;
    }

}

