- [Resource: Workspace](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workspaces.md.txt#Workspace)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workspaces.md.txt#Workspace.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workspaces.md.txt#METHODS_SUMMARY)

## Resource: Workspace

Represents a Dataform Git workspace.

| JSON representation |
|---|
| ``` { "name": string, "createTime": string, "dataEncryptionState": { object (`DataEncryptionState`) }, "privateResourceMetadata": { object (`PrivateResourceMetadata`) }, "internalMetadata": string, "disableMoves": boolean } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. The workspace's name. |
| `createTime` | ``string (`Timestamp` format)`` Output only. The timestamp of when the workspace was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `dataEncryptionState` | ``object (`DataEncryptionState`)`` Output only. A data encryption state of a Git repository if this Workspace is protected by a KMS key. |
| `privateResourceMetadata` | ``object (`PrivateResourceMetadata`)`` Output only. Metadata indicating whether this resource is user-scoped. For `Workspace` resources, the `userScoped` field is always `true`. |
| `internalMetadata` | `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. |
| `disableMoves` | `boolean` Optional. If set to true, workspaces will not be moved if its linked Repository is moved. Instead, it will be deleted. |

| ## Methods ||
|---|---|
| ### `commit` | Applies a Git commit for uncommitted files in a Workspace. |
| ### `create` | Creates a new Workspace in a given Repository. |
| ### `createLongRunning` | Creates a new Workspace in a given Repository asynchronously. |
| ### `delete` | Deletes a single Workspace. |
| ### `fetchFileDiff` | Fetches Git diff for an uncommitted file in a Workspace. |
| ### `fetchFileGitStatuses` | Fetches Git statuses for the files in a Workspace. |
| ### `fetchGitAheadBehind` | Fetches Git ahead/behind against a remote branch. |
| ### `get` | Fetches a single Workspace. |
| ### `getIamPolicy` | Gets the access control policy for a resource. |
| ### `installNpmPackages` | Installs dependency NPM packages (inside a Workspace). |
| ### `list` | Lists Workspaces in a given Repository. |
| ### `makeDirectory` | Creates a directory inside a Workspace. |
| ### `moveDirectory` | Moves a directory (inside a Workspace), and all of its contents, to a new location. |
| ### `moveFile` | Moves a file (inside a Workspace) to a new location. |
| ### `pull` | Pulls Git commits from the Repository's remote into a Workspace. |
| ### `push` | Pushes Git commits from a Workspace to the Repository's remote. |
| ### `queryDirectoryContents` | Returns the contents of a given Workspace directory. |
| ### `readFile` | Returns the contents of a file (inside a Workspace). |
| ### `removeDirectory` | Deletes a directory (inside a Workspace) and all of its contents. |
| ### `removeFile` | Deletes a file (inside a Workspace). |
| ### `reset` | Performs a Git reset for uncommitted files in a Workspace. |
| ### `searchFiles` | Finds the contents of a given Workspace directory by filter. |
| ### `setIamPolicy` | Sets the access control policy on the specified resource. |
| ### `testIamPermissions` | Returns permissions that a caller has on the specified resource. |
| ### `writeFile` | Writes to a file (inside a Workspace). |