google.iam.v1.SetIamPolicyRequest */ class SetIamPolicyRequest extends \Google\Protobuf\Internal\Message { /** * REQUIRED: The resource for which the policy is being specified. * `resource` is usually specified as a path. For example, a Project * resource is specified as `projects/{project}`. * * Generated from protobuf field string resource = 1; */ private $resource = ''; /** * REQUIRED: The complete policy to be applied to the `resource`. The size of * the policy is limited to a few 10s of KB. An empty policy is a * valid policy but certain Cloud Platform services (such as Projects) * might reject them. * * Generated from protobuf field .google.iam.v1.Policy policy = 2; */ private $policy = null; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type string $resource * REQUIRED: The resource for which the policy is being specified. * `resource` is usually specified as a path. For example, a Project * resource is specified as `projects/{project}`. * @type \Google\Cloud\Iam\V1\Policy $policy * REQUIRED: The complete policy to be applied to the `resource`. The size of * the policy is limited to a few 10s of KB. An empty policy is a * valid policy but certain Cloud Platform services (such as Projects) * might reject them. * } */ public function __construct($data = NULL) { \GPBMetadata\Google\Iam\V1\IamPolicy::initOnce(); parent::__construct($data); } /** * REQUIRED: The resource for which the policy is being specified. * `resource` is usually specified as a path. For example, a Project * resource is specified as `projects/{project}`. * * Generated from protobuf field string resource = 1; * @return string */ public function getResource() { return $this->resource; } /** * REQUIRED: The resource for which the policy is being specified. * `resource` is usually specified as a path. For example, a Project * resource is specified as `projects/{project}`. * * Generated from protobuf field string resource = 1; * @param string $var * @return $this */ public function setResource($var) { GPBUtil::checkString($var, True); $this->resource = $var; return $this; } /** * REQUIRED: The complete policy to be applied to the `resource`. The size of * the policy is limited to a few 10s of KB. An empty policy is a * valid policy but certain Cloud Platform services (such as Projects) * might reject them. * * Generated from protobuf field .google.iam.v1.Policy policy = 2; * @return \Google\Cloud\Iam\V1\Policy */ public function getPolicy() { return $this->policy; } /** * REQUIRED: The complete policy to be applied to the `resource`. The size of * the policy is limited to a few 10s of KB. An empty policy is a * valid policy but certain Cloud Platform services (such as Projects) * might reject them. * * Generated from protobuf field .google.iam.v1.Policy policy = 2; * @param \Google\Cloud\Iam\V1\Policy $var * @return $this */ public function setPolicy($var) { GPBUtil::checkMessage($var, \Google\Cloud\Iam\V1\Policy::class); $this->policy = $var; return $this; } }