google.cloud.audit.AuthorizationInfo
*/
class AuthorizationInfo extends \Google\Protobuf\Internal\Message
{
/**
* The resource being accessed, as a REST-style string. For example:
* bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID
*
* Generated from protobuf field string resource = 1;
*/
private $resource = '';
/**
* The required IAM permission.
*
* Generated from protobuf field string permission = 2;
*/
private $permission = '';
/**
* Whether or not authorization for `resource` and `permission`
* was granted.
*
* Generated from protobuf field bool granted = 3;
*/
private $granted = false;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $resource
* The resource being accessed, as a REST-style string. For example:
* bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID
* @type string $permission
* The required IAM permission.
* @type bool $granted
* Whether or not authorization for `resource` and `permission`
* was granted.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Cloud\Audit\AuditLog::initOnce();
parent::__construct($data);
}
/**
* The resource being accessed, as a REST-style string. For example:
* bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID
*
* Generated from protobuf field string resource = 1;
* @return string
*/
public function getResource()
{
return $this->resource;
}
/**
* The resource being accessed, as a REST-style string. For example:
* bigquery.googlapis.com/projects/PROJECTID/datasets/DATASETID
*
* 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;
}
/**
* The required IAM permission.
*
* Generated from protobuf field string permission = 2;
* @return string
*/
public function getPermission()
{
return $this->permission;
}
/**
* The required IAM permission.
*
* Generated from protobuf field string permission = 2;
* @param string $var
* @return $this
*/
public function setPermission($var)
{
GPBUtil::checkString($var, True);
$this->permission = $var;
return $this;
}
/**
* Whether or not authorization for `resource` and `permission`
* was granted.
*
* Generated from protobuf field bool granted = 3;
* @return bool
*/
public function getGranted()
{
return $this->granted;
}
/**
* Whether or not authorization for `resource` and `permission`
* was granted.
*
* Generated from protobuf field bool granted = 3;
* @param bool $var
* @return $this
*/
public function setGranted($var)
{
GPBUtil::checkBool($var);
$this->granted = $var;
return $this;
}
}