0.18.0 (latest) 0.17.1 0.16.0 0.15.3 0.12.0 0.11.0 0.10.1 0.9.2 0.8.1 0.7.0 0.6.0 0.5.1 0.4.7 0.3.0 0.2.3 0.1.6

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Cloud Dataform V1beta1 Client class Workspace.

Represents a Dataform Git workspace.

Generated from protobuf message `google.cloud.dataform.v1beta1.Workspace`

## Namespace

Google \\ Cloud \\ Dataform \\ V1beta1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Identifier. The workspace's name. |
| `↳ create_time` | `Google\Protobuf\Timestamp` Output only. The timestamp of when the workspace was created. |
| `↳ data_encryption_state` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataform/latest/V1beta1.DataEncryptionState` Output only. A data encryption state of a Git repository if this Workspace is protected by a KMS key. |
| `↳ internal_metadata` | `string` Output only. All the metadata information that is used internally to serve the resource. For example: timestamps, flags, status fields, etc. The format of this field is a JSON string. |
| `↳ disable_moves` | `bool` Optional. If set to true, workspaces will not be moved if its linked Repository is moved. Instead, it will be deleted. |
| `↳ original_branch` | `string` Optional. Input only. Immutable. The name of the default upstream branch for all pull/push operations in the remote repository for this workspace. If empty, the HEAD branch from repository will be used. |
| `↳ private_resource_metadata` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataform/latest/V1beta1.PrivateResourceMetadata` Output only. Metadata indicating whether this resource is user-scoped. For `Workspace` resources, the `user_scoped` field is always `true`. |
| `↳ enable_branch_management` | `bool` Immutable. Controls the enablement of branch checkout for the workspace. When set to True, the workspace will be allowed to checkout branches. |
| `↳ depth` | `int` Optional. Input only. Immutable. The maximum depth of the Git repository to checkout for this workspace. If defined and greater than 0, the Git repository will be created as a shallow clone with the given depth, otherwise a full clone will be performed. This field is available only for GitHub, Gitlab and 1p repositories with enabled branch management. |
| `↳ shallow` | `bool` Output only. If set to true, the workspace was created as a shallow clone. Will be set to true if the depth field is set to a value greater than 0, otherwise it will be set to false. |

### getName

Identifier. The workspace's name.

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

### setName

Identifier. The workspace's name.

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

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

### getCreateTime

Output only. The timestamp of when the workspace was created.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The timestamp of when the workspace was created.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

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

### getDataEncryptionState

Output only. A data encryption state of a Git repository if this Workspace
is protected by a KMS key.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dataform/latest/V1beta1.DataEncryptionState|null` |   |

### hasDataEncryptionState

### clearDataEncryptionState

### setDataEncryptionState

Output only. A data encryption state of a Git repository if this Workspace
is protected by a KMS key.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataform/latest/V1beta1.DataEncryptionState` |

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

### getInternalMetadata

Output only. All the metadata information that is used internally to serve
the resource. For example: timestamps, flags, status fields, etc. The
format of this field is a JSON string.

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

### hasInternalMetadata

### clearInternalMetadata

### setInternalMetadata

Output only. All the metadata information that is used internally to serve
the resource. For example: timestamps, flags, status fields, etc. The
format of this field is a JSON string.

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

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

### getDisableMoves

Optional. If set to true, workspaces will not be moved if its linked
Repository is moved. Instead, it will be deleted.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasDisableMoves

### clearDisableMoves

### setDisableMoves

Optional. If set to true, workspaces will not be moved if its linked
Repository is moved. Instead, it will be deleted.

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

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

### getOriginalBranch

Optional. Input only. Immutable. The name of the default upstream branch
for all pull/push operations in the remote repository for this workspace.

If empty, the HEAD branch from repository will be used.

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

### hasOriginalBranch

### clearOriginalBranch

### setOriginalBranch

Optional. Input only. Immutable. The name of the default upstream branch
for all pull/push operations in the remote repository for this workspace.

If empty, the HEAD branch from repository will be used.

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

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

### getPrivateResourceMetadata

Output only. Metadata indicating whether this resource is user-scoped. For
`Workspace` resources, the `user_scoped` field is always `true`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dataform/latest/V1beta1.PrivateResourceMetadata|null` |   |

### hasPrivateResourceMetadata

### clearPrivateResourceMetadata

### setPrivateResourceMetadata

Output only. Metadata indicating whether this resource is user-scoped. For
`Workspace` resources, the `user_scoped` field is always `true`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dataform/latest/V1beta1.PrivateResourceMetadata` |

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

### getEnableBranchManagement

Immutable. Controls the enablement of branch checkout for the
workspace.

When set to True, the workspace will be allowed to checkout branches.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasEnableBranchManagement

### clearEnableBranchManagement

### setEnableBranchManagement

Immutable. Controls the enablement of branch checkout for the
workspace.

When set to True, the workspace will be allowed to checkout branches.

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

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

### getDepth

Optional. Input only. Immutable. The maximum depth of the Git repository to
checkout for this workspace. If defined and greater than 0, the Git
repository will be created as a shallow clone with the given depth,
otherwise a full clone will be performed. This field is available only for
GitHub, Gitlab and 1p repositories with enabled branch management.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setDepth

Optional. Input only. Immutable. The maximum depth of the Git repository to
checkout for this workspace. If defined and greater than 0, the Git
repository will be created as a shallow clone with the given depth,
otherwise a full clone will be performed. This field is available only for
GitHub, Gitlab and 1p repositories with enabled branch management.

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

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

### getShallow

Output only. If set to true, the workspace was created as a shallow clone.

Will be set to true if the depth field is set to a value greater than 0,
otherwise it will be set to false.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasShallow

### clearShallow

### setShallow

Output only. If set to true, the workspace was created as a shallow clone.

Will be set to true if the depth field is set to a value greater than 0,
otherwise it will be set to false.

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

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