# Google Cloud Resource Manager V3 Client - Class Folder (1.1.3)

1.1.3 (latest) 1.1.2 1.0.4 0.8.5 0.7.2 0.6.1 0.5.0 0.4.1 0.3.9 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 message `google.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 is `folders/{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 using [MoveFolder](https://docs.cloud.google.com/php/docs/reference/cloud-resource-manager/latest/V3.Client.FoldersClient#_Google_Cloud_ResourceManager_V3_Client_FoldersClient__moveFolder__). |
| `↳ 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 using [DeleteFolder](https://docs.cloud.google.com/php/docs/reference/cloud-resource-manager/latest/V3.Client.FoldersClient#_Google_Cloud_ResourceManager_V3_Client_FoldersClient__deleteFolder__) and [UndeleteFolder](https://docs.cloud.google.com/php/docs/reference/cloud-resource-manager/latest/V3.Client.FoldersClient#_Google_Cloud_ResourceManager_V3_Client_FoldersClient__undeleteFolder__). |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Timestamp when the folder was created. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Timestamp when the folder was last modified. |
| `↳ delete_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` 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 is `folders/{folder_id}`, for example: "folders/1234".

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

Output only. The resource name of the folder.

Its format is `folders/{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 using
[MoveFolder](https://docs.cloud.google.com/php/docs/reference/cloud-resource-manager/latest/V3.Client.FoldersClient#_Google_Cloud_ResourceManager_V3_Client_FoldersClient__moveFolder__).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setParent

Required. The folder's parent's resource name.

Updates to the folder's parent must be performed using
[MoveFolder](https://docs.cloud.google.com/php/docs/reference/cloud-resource-manager/latest/V3.Client.FoldersClient#_Google_Cloud_ResourceManager_V3_Client_FoldersClient__moveFolder__).

| **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}])?`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getState

Output only. The lifecycle state of the folder.

Updates to the state must be performed using
[DeleteFolder](https://docs.cloud.google.com/php/docs/reference/cloud-resource-manager/latest/V3.Client.FoldersClient#_Google_Cloud_ResourceManager_V3_Client_FoldersClient__deleteFolder__) and
[UndeleteFolder](https://docs.cloud.google.com/php/docs/reference/cloud-resource-manager/latest/V3.Client.FoldersClient#_Google_Cloud_ResourceManager_V3_Client_FoldersClient__undeleteFolder__).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-resource-manager/latest/V3.Folder.State). |

### setState

Output only. The lifecycle state of the folder.

Updates to the state must be performed using
[DeleteFolder](https://docs.cloud.google.com/php/docs/reference/cloud-resource-manager/latest/V3.Client.FoldersClient#_Google_Cloud_ResourceManager_V3_Client_FoldersClient__deleteFolder__) and
[UndeleteFolder](https://docs.cloud.google.com/php/docs/reference/cloud-resource-manager/latest/V3.Client.FoldersClient#_Google_Cloud_ResourceManager_V3_Client_FoldersClient__undeleteFolder__).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-resource-manager/latest/V3.Folder.State). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCreateTime

Output only. Timestamp when the folder was created.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. Timestamp when the folder was created.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUpdateTime

Output only. Timestamp when the folder was last modified.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. Timestamp when the folder was last modified.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDeleteTime

Output only. Timestamp when the folder was requested to be deleted.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasDeleteTime

### clearDeleteTime

### setDeleteTime

Output only. Timestamp when the folder was requested to be deleted.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getEtag

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |