class ProjectsLocationsRepositoriesWorkspaces extends Resource (View source)

The "workspaces" collection of methods.

Typical usage is:

 $dataformService = new Google\Service\Dataform(...);
 $workspaces = $dataformService->projects_locations_repositories_workspaces;

Methods

commit(string $name, CommitWorkspaceChangesRequest $postBody, array $optParams = [])

Applies a Git commit for uncommitted files in a Workspace.

create(string $parent, Workspace $postBody, array $optParams = [])

Creates a new Workspace in a given Repository. (workspaces.create)

delete(string $name, array $optParams = [])

Deletes a single Workspace. (workspaces.delete)

fetchFileDiff(string $workspace, array $optParams = [])

Fetches Git diff for an uncommitted file in a Workspace.

fetchFileGitStatuses(string $name, array $optParams = [])

Fetches Git statuses for the files in a Workspace.

fetchGitAheadBehind(string $name, array $optParams = [])

Fetches Git ahead/behind against a remote branch.

get(string $name, array $optParams = [])

Fetches a single Workspace. (workspaces.get)

getIamPolicy(string $resource, array $optParams = [])

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (workspaces.getIamPolicy)

installNpmPackages(string $workspace, InstallNpmPackagesRequest $postBody, array $optParams = [])

Installs dependency NPM packages (inside a Workspace).

listProjectsLocationsRepositoriesWorkspaces(string $parent, array $optParams = [])

Lists Workspaces in a given Repository.

makeDirectory(string $workspace, MakeDirectoryRequest $postBody, array $optParams = [])

Creates a directory inside a Workspace. (workspaces.makeDirectory)

moveDirectory(string $workspace, MoveDirectoryRequest $postBody, array $optParams = [])

Moves a directory (inside a Workspace), and all of its contents, to a new location. (workspaces.moveDirectory)

moveFile(string $workspace, MoveFileRequest $postBody, array $optParams = [])

Moves a file (inside a Workspace) to a new location. (workspaces.moveFile)

pull(string $name, PullGitCommitsRequest $postBody, array $optParams = [])

Pulls Git commits from the Repository's remote into a Workspace.

push(string $name, PushGitCommitsRequest $postBody, array $optParams = [])

Pushes Git commits from a Workspace to the Repository's remote.

queryDirectoryContents(string $workspace, array $optParams = [])

Returns the contents of a given Workspace directory.

readFile(string $workspace, array $optParams = [])

Returns the contents of a file (inside a Workspace). (workspaces.readFile)

removeDirectory(string $workspace, RemoveDirectoryRequest $postBody, array $optParams = [])

Deletes a directory (inside a Workspace) and all of its contents.

removeFile(string $workspace, RemoveFileRequest $postBody, array $optParams = [])

Deletes a file (inside a Workspace). (workspaces.removeFile)

reset(string $name, ResetWorkspaceChangesRequest $postBody, array $optParams = [])

Performs a Git reset for uncommitted files in a Workspace. (workspaces.reset)

searchFiles(string $workspace, array $optParams = [])

Finds the contents of a given Workspace directory by filter.

setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (workspaces.setIamPolicy)

testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking.

writeFile(string $workspace, WriteFileRequest $postBody, array $optParams = [])

Writes to a file (inside a Workspace). (workspaces.writeFile)

Details

DataformEmpty commit(string $name, CommitWorkspaceChangesRequest $postBody, array $optParams = [])

Applies a Git commit for uncommitted files in a Workspace.

(workspaces.commit)

Parameters

string $name

Required. The workspace's name.

CommitWorkspaceChangesRequest $postBody
array $optParams

Optional parameters.

Return Value

DataformEmpty

Exceptions

Exception

Workspace create(string $parent, Workspace $postBody, array $optParams = [])

Creates a new Workspace in a given Repository. (workspaces.create)

Parameters

string $parent

Required. The repository in which to create the workspace. Must be in the format projects/locations/repositories.

Workspace $postBody
array $optParams

Optional parameters.

Return Value

Workspace

Exceptions

Exception

DataformEmpty delete(string $name, array $optParams = [])

Deletes a single Workspace. (workspaces.delete)

Parameters

string $name

Required. The workspace resource's name.

array $optParams

Optional parameters.

Return Value

DataformEmpty

Exceptions

Exception

FetchFileDiffResponse fetchFileDiff(string $workspace, array $optParams = [])

Fetches Git diff for an uncommitted file in a Workspace.

(workspaces.fetchFileDiff)

Parameters

string $workspace

Required. The workspace's name.

array $optParams

Optional parameters.

Return Value

FetchFileDiffResponse

Exceptions

Exception

FetchFileGitStatusesResponse fetchFileGitStatuses(string $name, array $optParams = [])

Fetches Git statuses for the files in a Workspace.

(workspaces.fetchFileGitStatuses)

Parameters

string $name

Required. The workspace's name.

array $optParams

Optional parameters.

Return Value

FetchFileGitStatusesResponse

Exceptions

Exception

FetchGitAheadBehindResponse fetchGitAheadBehind(string $name, array $optParams = [])

Fetches Git ahead/behind against a remote branch.

(workspaces.fetchGitAheadBehind)

Parameters

string $name

Required. The workspace's name.

array $optParams

Optional parameters.

Return Value

FetchGitAheadBehindResponse

Exceptions

Exception

Workspace get(string $name, array $optParams = [])

Fetches a single Workspace. (workspaces.get)

Parameters

string $name

Required. The workspace's name.

array $optParams

Optional parameters.

Return Value

Workspace

Exceptions

Exception

Policy getIamPolicy(string $resource, array $optParams = [])

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (workspaces.getIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.

array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

InstallNpmPackagesResponse installNpmPackages(string $workspace, InstallNpmPackagesRequest $postBody, array $optParams = [])

Installs dependency NPM packages (inside a Workspace).

(workspaces.installNpmPackages)

Parameters

string $workspace

Required. The workspace's name.

InstallNpmPackagesRequest $postBody
array $optParams

Optional parameters.

Return Value

InstallNpmPackagesResponse

Exceptions

Exception

ListWorkspacesResponse listProjectsLocationsRepositoriesWorkspaces(string $parent, array $optParams = [])

Lists Workspaces in a given Repository.

(workspaces.listProjectsLocationsRepositoriesWorkspaces)

Parameters

string $parent

Required. The repository in which to list workspaces. Must be in the format projects/locations/repositories.

array $optParams

Optional parameters.

Return Value

ListWorkspacesResponse

Exceptions

Exception

MakeDirectoryResponse makeDirectory(string $workspace, MakeDirectoryRequest $postBody, array $optParams = [])

Creates a directory inside a Workspace. (workspaces.makeDirectory)

Parameters

string $workspace

Required. The workspace's name.

MakeDirectoryRequest $postBody
array $optParams

Optional parameters.

Return Value

MakeDirectoryResponse

Exceptions

Exception

MoveDirectoryResponse moveDirectory(string $workspace, MoveDirectoryRequest $postBody, array $optParams = [])

Moves a directory (inside a Workspace), and all of its contents, to a new location. (workspaces.moveDirectory)

Parameters

string $workspace

Required. The workspace's name.

MoveDirectoryRequest $postBody
array $optParams

Optional parameters.

Return Value

MoveDirectoryResponse

Exceptions

Exception

MoveFileResponse moveFile(string $workspace, MoveFileRequest $postBody, array $optParams = [])

Moves a file (inside a Workspace) to a new location. (workspaces.moveFile)

Parameters

string $workspace

Required. The workspace's name.

MoveFileRequest $postBody
array $optParams

Optional parameters.

Return Value

MoveFileResponse

Exceptions

Exception

DataformEmpty pull(string $name, PullGitCommitsRequest $postBody, array $optParams = [])

Pulls Git commits from the Repository's remote into a Workspace.

(workspaces.pull)

Parameters

string $name

Required. The workspace's name.

PullGitCommitsRequest $postBody
array $optParams

Optional parameters.

Return Value

DataformEmpty

Exceptions

Exception

DataformEmpty push(string $name, PushGitCommitsRequest $postBody, array $optParams = [])

Pushes Git commits from a Workspace to the Repository's remote.

(workspaces.push)

Parameters

string $name

Required. The workspace's name.

PushGitCommitsRequest $postBody
array $optParams

Optional parameters.

Return Value

DataformEmpty

Exceptions

Exception

QueryDirectoryContentsResponse queryDirectoryContents(string $workspace, array $optParams = [])

Returns the contents of a given Workspace directory.

(workspaces.queryDirectoryContents)

Parameters

string $workspace

Required. The workspace's name.

array $optParams

Optional parameters.

Return Value

QueryDirectoryContentsResponse

Exceptions

Exception

ReadFileResponse readFile(string $workspace, array $optParams = [])

Returns the contents of a file (inside a Workspace). (workspaces.readFile)

Parameters

string $workspace

Required. The workspace's name.

array $optParams

Optional parameters.

Return Value

ReadFileResponse

Exceptions

Exception

DataformEmpty removeDirectory(string $workspace, RemoveDirectoryRequest $postBody, array $optParams = [])

Deletes a directory (inside a Workspace) and all of its contents.

(workspaces.removeDirectory)

Parameters

string $workspace

Required. The workspace's name.

RemoveDirectoryRequest $postBody
array $optParams

Optional parameters.

Return Value

DataformEmpty

Exceptions

Exception

DataformEmpty removeFile(string $workspace, RemoveFileRequest $postBody, array $optParams = [])

Deletes a file (inside a Workspace). (workspaces.removeFile)

Parameters

string $workspace

Required. The workspace's name.

RemoveFileRequest $postBody
array $optParams

Optional parameters.

Return Value

DataformEmpty

Exceptions

Exception

DataformEmpty reset(string $name, ResetWorkspaceChangesRequest $postBody, array $optParams = [])

Performs a Git reset for uncommitted files in a Workspace. (workspaces.reset)

Parameters

string $name

Required. The workspace's name.

ResetWorkspaceChangesRequest $postBody
array $optParams

Optional parameters.

Return Value

DataformEmpty

Exceptions

Exception

SearchFilesResponse searchFiles(string $workspace, array $optParams = [])

Finds the contents of a given Workspace directory by filter.

(workspaces.searchFiles)

Parameters

string $workspace

Required. The workspace's name.

array $optParams

Optional parameters.

Return Value

SearchFilesResponse

Exceptions

Exception

Policy setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (workspaces.setIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.

SetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

TestIamPermissionsResponse testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking.

This operation may "fail open" without warning. (workspaces.testIamPermissions)

Parameters

string $resource

REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.

TestIamPermissionsRequest $postBody
array $optParams

Optional parameters.

Return Value

TestIamPermissionsResponse

Exceptions

Exception

WriteFileResponse writeFile(string $workspace, WriteFileRequest $postBody, array $optParams = [])

Writes to a file (inside a Workspace). (workspaces.writeFile)

Parameters

string $workspace

Required. The workspace's name.

WriteFileRequest $postBody
array $optParams

Optional parameters.

Return Value

WriteFileResponse

Exceptions

Exception