Reference documentation and code samples for the Google Cloud Resource Manager V3 Client class Folder.
A folder in an organization's resource hierarchy, used to
organize that organization's resources.
Generated from protobuf messagegoogle.cloud.resourcemanager.v3.Folder
Namespace
Google \ Cloud \ ResourceManager \ V3
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Output only. The resource name of the folder. Its format isfolders/{folder_id}, for example: "folders/1234".
↳ parent
string
Required. The folder's parent's resource name. Updates to the folder's parent must be performed usingMoveFolder.
↳ display_name
string
The folder's display name. A folder's display name must be unique amongst its siblings. For example, no two folders with the same parent can share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be no longer than 30 characters. This is captured by the regular expression:[\p{L}\p{N}]([\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?.
↳ state
int
Output only. The lifecycle state of the folder. Updates to the state must be performed usingDeleteFolderandUndeleteFolder.
Output only. Timestamp when the folder was requested to be deleted.
↳ etag
string
Output only. A checksum computed by the server based on the current value of the folder resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
getName
Output only. The resource name of the folder.
Its format isfolders/{folder_id}, for example: "folders/1234".
Returns
Type
Description
string
setName
Output only. The resource name of the folder.
Its format isfolders/{folder_id}, for example: "folders/1234".
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getParent
Required. The folder's parent's resource name.
Updates to the folder's parent must be performed usingMoveFolder.
Returns
Type
Description
string
setParent
Required. The folder's parent's resource name.
Updates to the folder's parent must be performed usingMoveFolder.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getDisplayName
The folder's display name.
A folder's display name must be unique amongst its siblings. For example,
no two folders with the same parent can share the same display name.
The display name must start and end with a letter or digit, may contain
letters, digits, spaces, hyphens and underscores and can be no longer
than 30 characters. This is captured by the regular expression:[\p{L}\p{N}]([\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?.
Returns
Type
Description
string
setDisplayName
The folder's display name.
A folder's display name must be unique amongst its siblings. For example,
no two folders with the same parent can share the same display name.
The display name must start and end with a letter or digit, may contain
letters, digits, spaces, hyphens and underscores and can be no longer
than 30 characters. This is captured by the regular expression:[\p{L}\p{N}]([\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?.
Output only. A checksum computed by the server based on the current value
of the folder resource. This may be sent on update and delete requests to
ensure the client has an up-to-date value before proceeding.
Returns
Type
Description
string
setEtag
Output only. A checksum computed by the server based on the current value
of the folder resource. This may be sent on update and delete requests to
ensure the client has an up-to-date value before proceeding.
[[["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 Cloud Resource Manager V3 Client - Class Folder (1.0.4)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.4 (latest)](/php/docs/reference/cloud-resource-manager/latest/V3.Folder)\n- [1.0.3](/php/docs/reference/cloud-resource-manager/1.0.3/V3.Folder)\n- [0.8.5](/php/docs/reference/cloud-resource-manager/0.8.5/V3.Folder)\n- [0.7.2](/php/docs/reference/cloud-resource-manager/0.7.2/V3.Folder)\n- [0.6.1](/php/docs/reference/cloud-resource-manager/0.6.1/V3.Folder)\n- [0.5.0](/php/docs/reference/cloud-resource-manager/0.5.0/V3.Folder)\n- [0.4.1](/php/docs/reference/cloud-resource-manager/0.4.1/V3.Folder)\n- [0.3.9](/php/docs/reference/cloud-resource-manager/0.3.9/V3.Folder) \nReference documentation and code samples for the Google Cloud Resource Manager V3 Client class Folder.\n\nA folder in an organization's resource hierarchy, used to\norganize that organization's resources.\n\nGenerated from protobuf message `google.cloud.resourcemanager.v3.Folder`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ ResourceManager \\\\ V3\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nOutput only. The resource name of the folder.\n\nIts format is `folders/{folder_id}`, for example: \"folders/1234\".\n\n### setName\n\nOutput only. The resource name of the folder.\n\nIts format is `folders/{folder_id}`, for example: \"folders/1234\".\n\n### getParent\n\nRequired. The folder's parent's resource name.\n\nUpdates to the folder's parent must be performed using\n[MoveFolder](/php/docs/reference/cloud-resource-manager/latest/V3.Client.FoldersClient#_Google_Cloud_ResourceManager_V3_Client_FoldersClient__moveFolder__).\n\n### setParent\n\nRequired. The folder's parent's resource name.\n\nUpdates to the folder's parent must be performed using\n[MoveFolder](/php/docs/reference/cloud-resource-manager/latest/V3.Client.FoldersClient#_Google_Cloud_ResourceManager_V3_Client_FoldersClient__moveFolder__).\n\n### getDisplayName\n\nThe folder's display name.\n\nA folder's display name must be unique amongst its siblings. For example,\nno two folders with the same parent can share the same display name.\nThe display name must start and end with a letter or digit, may contain\nletters, digits, spaces, hyphens and underscores and can be no longer\nthan 30 characters. This is captured by the regular expression:\n`[\\p{L}\\p{N}]([\\p{L}\\p{N}_- ]{0,28}[\\p{L}\\p{N}])?`.\n\n### setDisplayName\n\nThe folder's display name.\n\nA folder's display name must be unique amongst its siblings. For example,\nno two folders with the same parent can share the same display name.\nThe display name must start and end with a letter or digit, may contain\nletters, digits, spaces, hyphens and underscores and can be no longer\nthan 30 characters. This is captured by the regular expression:\n`[\\p{L}\\p{N}]([\\p{L}\\p{N}_- ]{0,28}[\\p{L}\\p{N}])?`.\n\n### getState\n\nOutput only. The lifecycle state of the folder.\n\nUpdates to the state must be performed using\n[DeleteFolder](/php/docs/reference/cloud-resource-manager/latest/V3.Client.FoldersClient#_Google_Cloud_ResourceManager_V3_Client_FoldersClient__deleteFolder__) and\n[UndeleteFolder](/php/docs/reference/cloud-resource-manager/latest/V3.Client.FoldersClient#_Google_Cloud_ResourceManager_V3_Client_FoldersClient__undeleteFolder__).\n\n### setState\n\nOutput only. The lifecycle state of the folder.\n\nUpdates to the state must be performed using\n[DeleteFolder](/php/docs/reference/cloud-resource-manager/latest/V3.Client.FoldersClient#_Google_Cloud_ResourceManager_V3_Client_FoldersClient__deleteFolder__) and\n[UndeleteFolder](/php/docs/reference/cloud-resource-manager/latest/V3.Client.FoldersClient#_Google_Cloud_ResourceManager_V3_Client_FoldersClient__undeleteFolder__).\n\n### getCreateTime\n\nOutput only. Timestamp when the folder was created.\n\n### hasCreateTime\n\n### clearCreateTime\n\n### setCreateTime\n\nOutput only. Timestamp when the folder was created.\n\n### getUpdateTime\n\nOutput only. Timestamp when the folder was last modified.\n\n### hasUpdateTime\n\n### clearUpdateTime\n\n### setUpdateTime\n\nOutput only. Timestamp when the folder was last modified.\n\n### getDeleteTime\n\nOutput only. Timestamp when the folder was requested to be deleted.\n\n### hasDeleteTime\n\n### clearDeleteTime\n\n### setDeleteTime\n\nOutput only. Timestamp when the folder was requested to be deleted.\n\n### getEtag\n\nOutput only. A checksum computed by the server based on the current value\nof the folder resource. This may be sent on update and delete requests to\nensure the client has an up-to-date value before proceeding.\n\n### setEtag\n\nOutput only. A checksum computed by the server based on the current value\nof the folder resource. This may be sent on update and delete requests to\nensure the client has an up-to-date value before proceeding."]]