<?php

# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/api/context.proto
namespace Matomo\Dependencies\GoogleAnalyticsImporter\Google\Api;

use Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\GPBType;
use Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\GPBUtil;
use Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\RepeatedField;
/**
 * A context rule provides information about the context for an individual API
 * element.
 *
 * Generated from protobuf message <code>google.api.ContextRule</code>
 */
class ContextRule extends \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\Message
{
    /**
     * Selects the methods to which this rule applies.
     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
     * details.
     *
     * Generated from protobuf field <code>string selector = 1;</code>
     */
    protected $selector = '';
    /**
     * A list of full type names of requested contexts, only the requested context
     * will be made available to the backend.
     *
     * Generated from protobuf field <code>repeated string requested = 2;</code>
     */
    private $requested;
    /**
     * A list of full type names of provided contexts. It is used to support
     * propagating HTTP headers and ETags from the response extension.
     *
     * Generated from protobuf field <code>repeated string provided = 3;</code>
     */
    private $provided;
    /**
     * A list of full type names or extension IDs of extensions allowed in grpc
     * side channel from client to backend.
     *
     * Generated from protobuf field <code>repeated string allowed_request_extensions = 4;</code>
     */
    private $allowed_request_extensions;
    /**
     * A list of full type names or extension IDs of extensions allowed in grpc
     * side channel from backend to client.
     *
     * Generated from protobuf field <code>repeated string allowed_response_extensions = 5;</code>
     */
    private $allowed_response_extensions;
    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $selector
     *           Selects the methods to which this rule applies.
     *           Refer to [selector][google.api.DocumentationRule.selector] for syntax
     *           details.
     *     @type string[] $requested
     *           A list of full type names of requested contexts, only the requested context
     *           will be made available to the backend.
     *     @type string[] $provided
     *           A list of full type names of provided contexts. It is used to support
     *           propagating HTTP headers and ETags from the response extension.
     *     @type string[] $allowed_request_extensions
     *           A list of full type names or extension IDs of extensions allowed in grpc
     *           side channel from client to backend.
     *     @type string[] $allowed_response_extensions
     *           A list of full type names or extension IDs of extensions allowed in grpc
     *           side channel from backend to client.
     * }
     */
    public function __construct($data = NULL)
    {
        \Matomo\Dependencies\GoogleAnalyticsImporter\GPBMetadata\Google\Api\Context::initOnce();
        parent::__construct($data);
    }
    /**
     * Selects the methods to which this rule applies.
     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
     * details.
     *
     * Generated from protobuf field <code>string selector = 1;</code>
     * @return string
     */
    public function getSelector()
    {
        return $this->selector;
    }
    /**
     * Selects the methods to which this rule applies.
     * Refer to [selector][google.api.DocumentationRule.selector] for syntax
     * details.
     *
     * Generated from protobuf field <code>string selector = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setSelector($var)
    {
        GPBUtil::checkString($var, True);
        $this->selector = $var;
        return $this;
    }
    /**
     * A list of full type names of requested contexts, only the requested context
     * will be made available to the backend.
     *
     * Generated from protobuf field <code>repeated string requested = 2;</code>
     * @return RepeatedField<string>
     */
    public function getRequested()
    {
        return $this->requested;
    }
    /**
     * A list of full type names of requested contexts, only the requested context
     * will be made available to the backend.
     *
     * Generated from protobuf field <code>repeated string requested = 2;</code>
     * @param string[] $var
     * @return $this
     */
    public function setRequested($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\GPBType::STRING);
        $this->requested = $arr;
        return $this;
    }
    /**
     * A list of full type names of provided contexts. It is used to support
     * propagating HTTP headers and ETags from the response extension.
     *
     * Generated from protobuf field <code>repeated string provided = 3;</code>
     * @return RepeatedField<string>
     */
    public function getProvided()
    {
        return $this->provided;
    }
    /**
     * A list of full type names of provided contexts. It is used to support
     * propagating HTTP headers and ETags from the response extension.
     *
     * Generated from protobuf field <code>repeated string provided = 3;</code>
     * @param string[] $var
     * @return $this
     */
    public function setProvided($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\GPBType::STRING);
        $this->provided = $arr;
        return $this;
    }
    /**
     * A list of full type names or extension IDs of extensions allowed in grpc
     * side channel from client to backend.
     *
     * Generated from protobuf field <code>repeated string allowed_request_extensions = 4;</code>
     * @return RepeatedField<string>
     */
    public function getAllowedRequestExtensions()
    {
        return $this->allowed_request_extensions;
    }
    /**
     * A list of full type names or extension IDs of extensions allowed in grpc
     * side channel from client to backend.
     *
     * Generated from protobuf field <code>repeated string allowed_request_extensions = 4;</code>
     * @param string[] $var
     * @return $this
     */
    public function setAllowedRequestExtensions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\GPBType::STRING);
        $this->allowed_request_extensions = $arr;
        return $this;
    }
    /**
     * A list of full type names or extension IDs of extensions allowed in grpc
     * side channel from backend to client.
     *
     * Generated from protobuf field <code>repeated string allowed_response_extensions = 5;</code>
     * @return RepeatedField<string>
     */
    public function getAllowedResponseExtensions()
    {
        return $this->allowed_response_extensions;
    }
    /**
     * A list of full type names or extension IDs of extensions allowed in grpc
     * side channel from backend to client.
     *
     * Generated from protobuf field <code>repeated string allowed_response_extensions = 5;</code>
     * @param string[] $var
     * @return $this
     */
    public function setAllowedResponseExtensions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\GPBType::STRING);
        $this->allowed_response_extensions = $arr;
        return $this;
    }
}
