Reference documentation and code samples for the Google API Common Protos Client class ResourceInfo.
Describes the resource that is being accessed.
Generated from protobuf messagegoogle.rpc.ResourceInfo
Namespace
Google \ Rpc
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ resource_type
string
A name for the type of resource being accessed, e.g. "sql table", "cloud storage bucket", "file", "Google calendar"; or the type URL of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
↳ resource_name
string
The name of the resource being accessed. For example, a shared calendar name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current error isgoogle.rpc.Code.PERMISSION_DENIED.
↳ owner
string
The owner of the resource (optional). For example, "user:
↳ description
string
Describes what error is encountered when accessing this resource. For example, updating a cloud project may require thewriterpermission on the developer console project.
getResourceType
A name for the type of resource being accessed, e.g. "sql table",
"cloud storage bucket", "file", "Google calendar"; or the type URL
of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
Returns
Type
Description
string
setResourceType
A name for the type of resource being accessed, e.g. "sql table",
"cloud storage bucket", "file", "Google calendar"; or the type URL
of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getResourceName
The name of the resource being accessed. For example, a shared calendar
name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
error isgoogle.rpc.Code.PERMISSION_DENIED.
Returns
Type
Description
string
setResourceName
The name of the resource being accessed. For example, a shared calendar
name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
error isgoogle.rpc.Code.PERMISSION_DENIED.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getOwner
The owner of the resource (optional).
For example, "user:
Returns
Type
Description
string
setOwner
The owner of the resource (optional).
For example, "user:
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getDescription
Describes what error is encountered when accessing this resource.
For example, updating a cloud project may require thewriterpermission
on the developer console project.
Returns
Type
Description
string
setDescription
Describes what error is encountered when accessing this resource.
For example, updating a cloud project may require thewriterpermission
on the developer console project.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google API Common Protos Client - Class ResourceInfo (4.12.3)\n\nVersion latestkeyboard_arrow_down\n\n- [4.12.3 (latest)](/php/docs/reference/common-protos/latest/Rpc.ResourceInfo)\n- [4.12.2](/php/docs/reference/common-protos/4.12.2/Rpc.ResourceInfo)\n- [4.11.0](/php/docs/reference/common-protos/4.11.0/Rpc.ResourceInfo)\n- [4.10.0](/php/docs/reference/common-protos/4.10.0/Rpc.ResourceInfo)\n- [4.9.0](/php/docs/reference/common-protos/4.9.0/Rpc.ResourceInfo)\n- [4.8.3](/php/docs/reference/common-protos/4.8.3/Rpc.ResourceInfo) \nReference documentation and code samples for the Google API Common Protos Client class ResourceInfo.\n\nDescribes the resource that is being accessed.\n\nGenerated from protobuf message `google.rpc.ResourceInfo`\n\nNamespace\n---------\n\nGoogle \\\\ Rpc\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getResourceType\n\nA name for the type of resource being accessed, e.g. \"sql table\",\n\"cloud storage bucket\", \"file\", \"Google calendar\"; or the type URL\nof the resource: e.g. \"type.googleapis.com/google.pubsub.v1.Topic\".\n\n### setResourceType\n\nA name for the type of resource being accessed, e.g. \"sql table\",\n\"cloud storage bucket\", \"file\", \"Google calendar\"; or the type URL\nof the resource: e.g. \"type.googleapis.com/google.pubsub.v1.Topic\".\n\n### getResourceName\n\nThe name of the resource being accessed. For example, a shared calendar\nname: \"example.com_4fghdhgsrgh@group.calendar.google.com\", if the current\nerror is\n[google.rpc.Code.PERMISSION_DENIED](/php/docs/reference/common-protos/latest/Rpc.Code#_Google_Rpc_Code__PERMISSION_DENIED).\n\n### setResourceName\n\nThe name of the resource being accessed. For example, a shared calendar\nname: \"example.com_4fghdhgsrgh@group.calendar.google.com\", if the current\nerror is\n[google.rpc.Code.PERMISSION_DENIED](/php/docs/reference/common-protos/latest/Rpc.Code#_Google_Rpc_Code__PERMISSION_DENIED).\n\n### getOwner\n\nThe owner of the resource (optional).\n\nFor example, \"user:\n\n\n### setOwner\n\nThe owner of the resource (optional).\n\nFor example, \"user:\n\n\n### getDescription\n\nDescribes what error is encountered when accessing this resource.\n\nFor example, updating a cloud project may require the `writer` permission\non the developer console project.\n\n### setDescription\n\nDescribes what error is encountered when accessing this resource.\n\nFor example, updating a cloud project may require the `writer` permission\non the developer console project."]]