google.api.MethodPolicy
*/
class MethodPolicy extends \Google\Protobuf\Internal\Message
{
/**
* Selects a method to which these policies should be enforced, for example,
* "google.pubsub.v1.Subscriber.CreateSubscription".
* Refer to [selector][google.api.DocumentationRule.selector] for syntax
* details.
* NOTE: This field must not be set in the proto annotation. It will be
* automatically filled by the service config compiler .
*
* Generated from protobuf field string selector = 9;
*/
protected $selector = '';
/**
* Policies that are applicable to the request message.
*
* Generated from protobuf field repeated .google.api.FieldPolicy request_policies = 2;
*/
private $request_policies;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $selector
* Selects a method to which these policies should be enforced, for example,
* "google.pubsub.v1.Subscriber.CreateSubscription".
* Refer to [selector][google.api.DocumentationRule.selector] for syntax
* details.
* NOTE: This field must not be set in the proto annotation. It will be
* automatically filled by the service config compiler .
* @type \Google\Api\FieldPolicy[] $request_policies
* Policies that are applicable to the request message.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Api\Policy::initOnce();
parent::__construct($data);
}
/**
* Selects a method to which these policies should be enforced, for example,
* "google.pubsub.v1.Subscriber.CreateSubscription".
* Refer to [selector][google.api.DocumentationRule.selector] for syntax
* details.
* NOTE: This field must not be set in the proto annotation. It will be
* automatically filled by the service config compiler .
*
* Generated from protobuf field string selector = 9;
* @return string
*/
public function getSelector()
{
return $this->selector;
}
/**
* Selects a method to which these policies should be enforced, for example,
* "google.pubsub.v1.Subscriber.CreateSubscription".
* Refer to [selector][google.api.DocumentationRule.selector] for syntax
* details.
* NOTE: This field must not be set in the proto annotation. It will be
* automatically filled by the service config compiler .
*
* Generated from protobuf field string selector = 9;
* @param string $var
* @return $this
*/
public function setSelector($var)
{
GPBUtil::checkString($var, True);
$this->selector = $var;
return $this;
}
/**
* Policies that are applicable to the request message.
*
* Generated from protobuf field repeated .google.api.FieldPolicy request_policies = 2;
* @return RepeatedField<\Google\Api\FieldPolicy>
*/
public function getRequestPolicies()
{
return $this->request_policies;
}
/**
* Policies that are applicable to the request message.
*
* Generated from protobuf field repeated .google.api.FieldPolicy request_policies = 2;
* @param \Google\Api\FieldPolicy[] $var
* @return $this
*/
public function setRequestPolicies($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\FieldPolicy::class);
$this->request_policies = $arr;
return $this;
}
}