google.api.FieldPolicy */ class FieldPolicy extends \Google\Protobuf\Internal\Message { /** * Selects one or more request or response message fields to apply this * `FieldPolicy`. * When a `FieldPolicy` is used in proto annotation, the selector must * be left as empty. The service config generator will automatically fill * the correct value. * When a `FieldPolicy` is used in service config, the selector must be a * comma-separated string with valid request or response field paths, * such as "foo.bar" or "foo.bar,foo.baz". * * Generated from protobuf field string selector = 1; */ protected $selector = ''; /** * Specifies the required permission(s) for the resource referred to by the * field. It requires the field contains a valid resource reference, and * the request must pass the permission checks to proceed. For example, * "resourcemanager.projects.get". * * Generated from protobuf field string resource_permission = 2; */ protected $resource_permission = ''; /** * Specifies the resource type for the resource referred to by the field. * * Generated from protobuf field string resource_type = 3; */ protected $resource_type = ''; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type string $selector * Selects one or more request or response message fields to apply this * `FieldPolicy`. * When a `FieldPolicy` is used in proto annotation, the selector must * be left as empty. The service config generator will automatically fill * the correct value. * When a `FieldPolicy` is used in service config, the selector must be a * comma-separated string with valid request or response field paths, * such as "foo.bar" or "foo.bar,foo.baz". * @type string $resource_permission * Specifies the required permission(s) for the resource referred to by the * field. It requires the field contains a valid resource reference, and * the request must pass the permission checks to proceed. For example, * "resourcemanager.projects.get". * @type string $resource_type * Specifies the resource type for the resource referred to by the field. * } */ public function __construct($data = NULL) { \GPBMetadata\Google\Api\Policy::initOnce(); parent::__construct($data); } /** * Selects one or more request or response message fields to apply this * `FieldPolicy`. * When a `FieldPolicy` is used in proto annotation, the selector must * be left as empty. The service config generator will automatically fill * the correct value. * When a `FieldPolicy` is used in service config, the selector must be a * comma-separated string with valid request or response field paths, * such as "foo.bar" or "foo.bar,foo.baz". * * Generated from protobuf field string selector = 1; * @return string */ public function getSelector() { return $this->selector; } /** * Selects one or more request or response message fields to apply this * `FieldPolicy`. * When a `FieldPolicy` is used in proto annotation, the selector must * be left as empty. The service config generator will automatically fill * the correct value. * When a `FieldPolicy` is used in service config, the selector must be a * comma-separated string with valid request or response field paths, * such as "foo.bar" or "foo.bar,foo.baz". * * Generated from protobuf field string selector = 1; * @param string $var * @return $this */ public function setSelector($var) { GPBUtil::checkString($var, True); $this->selector = $var; return $this; } /** * Specifies the required permission(s) for the resource referred to by the * field. It requires the field contains a valid resource reference, and * the request must pass the permission checks to proceed. For example, * "resourcemanager.projects.get". * * Generated from protobuf field string resource_permission = 2; * @return string */ public function getResourcePermission() { return $this->resource_permission; } /** * Specifies the required permission(s) for the resource referred to by the * field. It requires the field contains a valid resource reference, and * the request must pass the permission checks to proceed. For example, * "resourcemanager.projects.get". * * Generated from protobuf field string resource_permission = 2; * @param string $var * @return $this */ public function setResourcePermission($var) { GPBUtil::checkString($var, True); $this->resource_permission = $var; return $this; } /** * Specifies the resource type for the resource referred to by the field. * * Generated from protobuf field string resource_type = 3; * @return string */ public function getResourceType() { return $this->resource_type; } /** * Specifies the resource type for the resource referred to by the field. * * Generated from protobuf field string resource_type = 3; * @param string $var * @return $this */ public function setResourceType($var) { GPBUtil::checkString($var, True); $this->resource_type = $var; return $this; } }