Class DataformClient (0.41.0)

GitHub RepositoryProduct Reference

Service Description: Dataform is a service to develop, create, document, test, and update curated tables in BigQuery.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   RepositoryName name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
   Repository response = dataformClient.getRepository(name);
 }
 

Note: close() needs to be called on the DataformClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
Method Description Method Variants

ListRepositories

Lists Repositories in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listRepositories(ListRepositoriesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listRepositories(LocationName parent)

  • listRepositories(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listRepositoriesPagedCallable()

  • listRepositoriesCallable()

GetRepository

Fetches a single Repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getRepository(GetRepositoryRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getRepository(RepositoryName name)

  • getRepository(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getRepositoryCallable()

CreateRepository

Creates a new Repository in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createRepository(CreateRepositoryRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createRepository(LocationName parent, Repository repository, String repositoryId)

  • createRepository(String parent, Repository repository, String repositoryId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createRepositoryCallable()

UpdateRepository

Updates a single Repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateRepository(UpdateRepositoryRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateRepository(Repository repository, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateRepositoryCallable()

DeleteRepository

Deletes a single Repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteRepository(DeleteRepositoryRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • deleteRepository(RepositoryName name)

  • deleteRepository(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteRepositoryCallable()

FetchRemoteBranches

Fetches a Repository's remote branches.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • fetchRemoteBranches(FetchRemoteBranchesRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • fetchRemoteBranchesCallable()

ListWorkspaces

Lists Workspaces in a given Repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listWorkspaces(ListWorkspacesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listWorkspaces(RepositoryName parent)

  • listWorkspaces(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listWorkspacesPagedCallable()

  • listWorkspacesCallable()

GetWorkspace

Fetches a single Workspace.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getWorkspace(GetWorkspaceRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getWorkspace(WorkspaceName name)

  • getWorkspace(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getWorkspaceCallable()

CreateWorkspace

Creates a new Workspace in a given Repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createWorkspace(CreateWorkspaceRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createWorkspace(RepositoryName parent, Workspace workspace, String workspaceId)

  • createWorkspace(String parent, Workspace workspace, String workspaceId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createWorkspaceCallable()

DeleteWorkspace

Deletes a single Workspace.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteWorkspace(DeleteWorkspaceRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • deleteWorkspace(WorkspaceName name)

  • deleteWorkspace(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteWorkspaceCallable()

InstallNpmPackages

Installs dependency NPM packages (inside a Workspace).

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • installNpmPackages(InstallNpmPackagesRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • installNpmPackagesCallable()

PullGitCommits

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • pullGitCommits(PullGitCommitsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • pullGitCommitsCallable()

PushGitCommits

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • pushGitCommits(PushGitCommitsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • pushGitCommitsCallable()

FetchFileGitStatuses

Fetches Git statuses for the files in a Workspace.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • fetchFileGitStatuses(FetchFileGitStatusesRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • fetchFileGitStatusesCallable()

FetchGitAheadBehind

Fetches Git ahead/behind against a remote branch.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • fetchGitAheadBehind(FetchGitAheadBehindRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • fetchGitAheadBehindCallable()

CommitWorkspaceChanges

Applies a Git commit for uncommitted files in a Workspace.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • commitWorkspaceChanges(CommitWorkspaceChangesRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • commitWorkspaceChangesCallable()

ResetWorkspaceChanges

Performs a Git reset for uncommitted files in a Workspace.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • resetWorkspaceChanges(ResetWorkspaceChangesRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • resetWorkspaceChangesCallable()

FetchFileDiff

Fetches Git diff for an uncommitted file in a Workspace.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • fetchFileDiff(FetchFileDiffRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • fetchFileDiffCallable()

QueryDirectoryContents

Returns the contents of a given Workspace directory.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • queryDirectoryContents(QueryDirectoryContentsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • queryDirectoryContentsPagedCallable()

  • queryDirectoryContentsCallable()

MakeDirectory

Creates a directory inside a Workspace.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • makeDirectory(MakeDirectoryRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • makeDirectoryCallable()

RemoveDirectory

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • removeDirectory(RemoveDirectoryRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • removeDirectoryCallable()

MoveDirectory

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • moveDirectory(MoveDirectoryRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • moveDirectoryCallable()

ReadFile

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • readFile(ReadFileRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • readFileCallable()

RemoveFile

Deletes a file (inside a Workspace).

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • removeFile(RemoveFileRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • removeFileCallable()

MoveFile

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • moveFile(MoveFileRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • moveFileCallable()

WriteFile

Writes to a file (inside a Workspace).

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • writeFile(WriteFileRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • writeFileCallable()

ListCompilationResults

Lists CompilationResults in a given Repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listCompilationResults(ListCompilationResultsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listCompilationResults(RepositoryName parent)

  • listCompilationResults(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listCompilationResultsPagedCallable()

  • listCompilationResultsCallable()

GetCompilationResult

Fetches a single CompilationResult.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getCompilationResult(GetCompilationResultRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getCompilationResult(CompilationResultName name)

  • getCompilationResult(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getCompilationResultCallable()

CreateCompilationResult

Creates a new CompilationResult in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createCompilationResult(CreateCompilationResultRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createCompilationResult(RepositoryName parent, CompilationResult compilationResult)

  • createCompilationResult(String parent, CompilationResult compilationResult)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createCompilationResultCallable()

QueryCompilationResultActions

Returns CompilationResultActions in a given CompilationResult.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • queryCompilationResultActions(QueryCompilationResultActionsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • queryCompilationResultActionsPagedCallable()

  • queryCompilationResultActionsCallable()

ListWorkflowInvocations

Lists WorkflowInvocations in a given Repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listWorkflowInvocations(ListWorkflowInvocationsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listWorkflowInvocations(RepositoryName parent)

  • listWorkflowInvocations(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listWorkflowInvocationsPagedCallable()

  • listWorkflowInvocationsCallable()

GetWorkflowInvocation

Fetches a single WorkflowInvocation.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getWorkflowInvocation(GetWorkflowInvocationRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getWorkflowInvocation(WorkflowInvocationName name)

  • getWorkflowInvocation(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getWorkflowInvocationCallable()

CreateWorkflowInvocation

Creates a new WorkflowInvocation in a given Repository.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createWorkflowInvocation(CreateWorkflowInvocationRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createWorkflowInvocation(RepositoryName parent, WorkflowInvocation workflowInvocation)

  • createWorkflowInvocation(String parent, WorkflowInvocation workflowInvocation)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createWorkflowInvocationCallable()

DeleteWorkflowInvocation

Deletes a single WorkflowInvocation.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteWorkflowInvocation(DeleteWorkflowInvocationRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • deleteWorkflowInvocation(WorkflowInvocationName name)

  • deleteWorkflowInvocation(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteWorkflowInvocationCallable()

CancelWorkflowInvocation

Requests cancellation of a running WorkflowInvocation.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • cancelWorkflowInvocation(CancelWorkflowInvocationRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • cancelWorkflowInvocationCallable()

QueryWorkflowInvocationActions

Returns WorkflowInvocationActions in a given WorkflowInvocation.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • queryWorkflowInvocationActions(QueryWorkflowInvocationActionsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • queryWorkflowInvocationActionsPagedCallable()

  • queryWorkflowInvocationActionsCallable()

ListLocations

Lists information about the supported locations for this service.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listLocations(ListLocationsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getLocation(GetLocationRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getLocationCallable()

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • setIamPolicy(SetIamPolicyRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • setIamPolicyCallable()

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getIamPolicy(GetIamPolicyRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getIamPolicyCallable()

TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • testIamPermissions(TestIamPermissionsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • testIamPermissionsCallable()

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of DataformSettings to create(). For example:

To customize credentials:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 DataformSettings dataformSettings =
     DataformSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 DataformClient dataformClient = DataformClient.create(dataformSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 DataformSettings dataformSettings =
     DataformSettings.newBuilder().setEndpoint(myEndpoint).build();
 DataformClient dataformClient = DataformClient.create(dataformSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 DataformSettings dataformSettings = DataformSettings.newHttpJsonBuilder().build();
 DataformClient dataformClient = DataformClient.create(dataformSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

Inheritance

java.lang.Object > DataformClient

Static Methods

create()

public static final DataformClient create()

Constructs an instance of DataformClient with default settings.

Returns
Type Description
DataformClient
Exceptions
Type Description
IOException

create(DataformSettings settings)

public static final DataformClient create(DataformSettings settings)

Constructs an instance of DataformClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
Name Description
settings DataformSettings
Returns
Type Description
DataformClient
Exceptions
Type Description
IOException

create(DataformStub stub)

public static final DataformClient create(DataformStub stub)

Constructs an instance of DataformClient, using the given stub for making calls. This is for advanced usage - prefer using create(DataformSettings).

Parameter
Name Description
stub DataformStub
Returns
Type Description
DataformClient

Constructors

DataformClient(DataformSettings settings)

protected DataformClient(DataformSettings settings)

Constructs an instance of DataformClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameter
Name Description
settings DataformSettings

DataformClient(DataformStub stub)

protected DataformClient(DataformStub stub)
Parameter
Name Description
stub DataformStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

cancelWorkflowInvocation(CancelWorkflowInvocationRequest request)

public final void cancelWorkflowInvocation(CancelWorkflowInvocationRequest request)

Requests cancellation of a running WorkflowInvocation.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   CancelWorkflowInvocationRequest request =
       CancelWorkflowInvocationRequest.newBuilder()
           .setName(
               WorkflowInvocationName.of(
                       "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKFLOW_INVOCATION]")
                   .toString())
           .build();
   dataformClient.cancelWorkflowInvocation(request);
 }
 
Parameter
Name Description
request CancelWorkflowInvocationRequest

The request object containing all of the parameters for the API call.

cancelWorkflowInvocationCallable()

public final UnaryCallable<CancelWorkflowInvocationRequest,Empty> cancelWorkflowInvocationCallable()

Requests cancellation of a running WorkflowInvocation.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   CancelWorkflowInvocationRequest request =
       CancelWorkflowInvocationRequest.newBuilder()
           .setName(
               WorkflowInvocationName.of(
                       "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKFLOW_INVOCATION]")
                   .toString())
           .build();
   ApiFuture<Empty> future =
       dataformClient.cancelWorkflowInvocationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<CancelWorkflowInvocationRequest,Empty>

close()

public final void close()

commitWorkspaceChanges(CommitWorkspaceChangesRequest request)

public final void commitWorkspaceChanges(CommitWorkspaceChangesRequest request)

Applies a Git commit for uncommitted files in a Workspace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   CommitWorkspaceChangesRequest request =
       CommitWorkspaceChangesRequest.newBuilder()
           .setName(
               WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
                   .toString())
           .setAuthor(CommitAuthor.newBuilder().build())
           .setCommitMessage("commitMessage2039804624")
           .addAllPaths(new ArrayList<String>())
           .build();
   dataformClient.commitWorkspaceChanges(request);
 }
 
Parameter
Name Description
request CommitWorkspaceChangesRequest

The request object containing all of the parameters for the API call.

commitWorkspaceChangesCallable()

public final UnaryCallable<CommitWorkspaceChangesRequest,Empty> commitWorkspaceChangesCallable()

Applies a Git commit for uncommitted files in a Workspace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   CommitWorkspaceChangesRequest request =
       CommitWorkspaceChangesRequest.newBuilder()
           .setName(
               WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
                   .toString())
           .setAuthor(CommitAuthor.newBuilder().build())
           .setCommitMessage("commitMessage2039804624")
           .addAllPaths(new ArrayList<String>())
           .build();
   ApiFuture<Empty> future = dataformClient.commitWorkspaceChangesCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<CommitWorkspaceChangesRequest,Empty>

createCompilationResult(CreateCompilationResultRequest request)

public final CompilationResult createCompilationResult(CreateCompilationResultRequest request)

Creates a new CompilationResult in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   CreateCompilationResultRequest request =
       CreateCompilationResultRequest.newBuilder()
           .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
           .setCompilationResult(CompilationResult.newBuilder().build())
           .build();
   CompilationResult response = dataformClient.createCompilationResult(request);
 }
 
Parameter
Name Description
request CreateCompilationResultRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
CompilationResult

createCompilationResult(RepositoryName parent, CompilationResult compilationResult)

public final CompilationResult createCompilationResult(RepositoryName parent, CompilationResult compilationResult)

Creates a new CompilationResult in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
   CompilationResult compilationResult = CompilationResult.newBuilder().build();
   CompilationResult response =
       dataformClient.createCompilationResult(parent, compilationResult);
 }
 
Parameters
Name Description
parent RepositoryName

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

compilationResult CompilationResult

Required. The compilation result to create.

Returns
Type Description
CompilationResult

createCompilationResult(String parent, CompilationResult compilationResult)

public final CompilationResult createCompilationResult(String parent, CompilationResult compilationResult)

Creates a new CompilationResult in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
   CompilationResult compilationResult = CompilationResult.newBuilder().build();
   CompilationResult response =
       dataformClient.createCompilationResult(parent, compilationResult);
 }
 
Parameters
Name Description
parent String

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

compilationResult CompilationResult

Required. The compilation result to create.

Returns
Type Description
CompilationResult

createCompilationResultCallable()

public final UnaryCallable<CreateCompilationResultRequest,CompilationResult> createCompilationResultCallable()

Creates a new CompilationResult in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   CreateCompilationResultRequest request =
       CreateCompilationResultRequest.newBuilder()
           .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
           .setCompilationResult(CompilationResult.newBuilder().build())
           .build();
   ApiFuture<CompilationResult> future =
       dataformClient.createCompilationResultCallable().futureCall(request);
   // Do something.
   CompilationResult response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateCompilationResultRequest,CompilationResult>

createRepository(CreateRepositoryRequest request)

public final Repository createRepository(CreateRepositoryRequest request)

Creates a new Repository in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   CreateRepositoryRequest request =
       CreateRepositoryRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setRepository(Repository.newBuilder().build())
           .setRepositoryId("repositoryId2113747461")
           .build();
   Repository response = dataformClient.createRepository(request);
 }
 
Parameter
Name Description
request CreateRepositoryRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Repository

createRepository(LocationName parent, Repository repository, String repositoryId)

public final Repository createRepository(LocationName parent, Repository repository, String repositoryId)

Creates a new Repository in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Repository repository = Repository.newBuilder().build();
   String repositoryId = "repositoryId2113747461";
   Repository response = dataformClient.createRepository(parent, repository, repositoryId);
 }
 
Parameters
Name Description
parent LocationName

Required. The location in which to create the repository. Must be in the format projects/*/locations/*.

repository Repository

Required. The repository to create.

repositoryId String

Required. The ID to use for the repository, which will become the final component of the repository's resource name.

Returns
Type Description
Repository

createRepository(String parent, Repository repository, String repositoryId)

public final Repository createRepository(String parent, Repository repository, String repositoryId)

Creates a new Repository in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   Repository repository = Repository.newBuilder().build();
   String repositoryId = "repositoryId2113747461";
   Repository response = dataformClient.createRepository(parent, repository, repositoryId);
 }
 
Parameters
Name Description
parent String

Required. The location in which to create the repository. Must be in the format projects/*/locations/*.

repository Repository

Required. The repository to create.

repositoryId String

Required. The ID to use for the repository, which will become the final component of the repository's resource name.

Returns
Type Description
Repository

createRepositoryCallable()

public final UnaryCallable<CreateRepositoryRequest,Repository> createRepositoryCallable()

Creates a new Repository in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   CreateRepositoryRequest request =
       CreateRepositoryRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setRepository(Repository.newBuilder().build())
           .setRepositoryId("repositoryId2113747461")
           .build();
   ApiFuture<Repository> future = dataformClient.createRepositoryCallable().futureCall(request);
   // Do something.
   Repository response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateRepositoryRequest,Repository>

createWorkflowInvocation(CreateWorkflowInvocationRequest request)

public final WorkflowInvocation createWorkflowInvocation(CreateWorkflowInvocationRequest request)

Creates a new WorkflowInvocation in a given Repository.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   CreateWorkflowInvocationRequest request =
       CreateWorkflowInvocationRequest.newBuilder()
           .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
           .setWorkflowInvocation(WorkflowInvocation.newBuilder().build())
           .build();
   WorkflowInvocation response = dataformClient.createWorkflowInvocation(request);
 }
 
Parameter
Name Description
request CreateWorkflowInvocationRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
WorkflowInvocation

createWorkflowInvocation(RepositoryName parent, WorkflowInvocation workflowInvocation)

public final WorkflowInvocation createWorkflowInvocation(RepositoryName parent, WorkflowInvocation workflowInvocation)

Creates a new WorkflowInvocation in a given Repository.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
   WorkflowInvocation workflowInvocation = WorkflowInvocation.newBuilder().build();
   WorkflowInvocation response =
       dataformClient.createWorkflowInvocation(parent, workflowInvocation);
 }
 
Parameters
Name Description
parent RepositoryName

Required. The parent resource of the WorkflowInvocation type.

workflowInvocation WorkflowInvocation

Required. The workflow invocation resource to create.

Returns
Type Description
WorkflowInvocation

createWorkflowInvocation(String parent, WorkflowInvocation workflowInvocation)

public final WorkflowInvocation createWorkflowInvocation(String parent, WorkflowInvocation workflowInvocation)

Creates a new WorkflowInvocation in a given Repository.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
   WorkflowInvocation workflowInvocation = WorkflowInvocation.newBuilder().build();
   WorkflowInvocation response =
       dataformClient.createWorkflowInvocation(parent, workflowInvocation);
 }
 
Parameters
Name Description
parent String

Required. The parent resource of the WorkflowInvocation type.

workflowInvocation WorkflowInvocation

Required. The workflow invocation resource to create.

Returns
Type Description
WorkflowInvocation

createWorkflowInvocationCallable()

public final UnaryCallable<CreateWorkflowInvocationRequest,WorkflowInvocation> createWorkflowInvocationCallable()

Creates a new WorkflowInvocation in a given Repository.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   CreateWorkflowInvocationRequest request =
       CreateWorkflowInvocationRequest.newBuilder()
           .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
           .setWorkflowInvocation(WorkflowInvocation.newBuilder().build())
           .build();
   ApiFuture<WorkflowInvocation> future =
       dataformClient.createWorkflowInvocationCallable().futureCall(request);
   // Do something.
   WorkflowInvocation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateWorkflowInvocationRequest,WorkflowInvocation>

createWorkspace(CreateWorkspaceRequest request)

public final Workspace createWorkspace(CreateWorkspaceRequest request)

Creates a new Workspace in a given Repository.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   CreateWorkspaceRequest request =
       CreateWorkspaceRequest.newBuilder()
           .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
           .setWorkspace(Workspace.newBuilder().build())
           .setWorkspaceId("workspaceId466560144")
           .build();
   Workspace response = dataformClient.createWorkspace(request);
 }
 
Parameter
Name Description
request CreateWorkspaceRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Workspace

createWorkspace(RepositoryName parent, Workspace workspace, String workspaceId)

public final Workspace createWorkspace(RepositoryName parent, Workspace workspace, String workspaceId)

Creates a new Workspace in a given Repository.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
   Workspace workspace = Workspace.newBuilder().build();
   String workspaceId = "workspaceId466560144";
   Workspace response = dataformClient.createWorkspace(parent, workspace, workspaceId);
 }
 
Parameters
Name Description
parent RepositoryName

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

workspace Workspace

Required. The workspace to create.

workspaceId String

Required. The ID to use for the workspace, which will become the final component of the workspace's resource name.

Returns
Type Description
Workspace

createWorkspace(String parent, Workspace workspace, String workspaceId)

public final Workspace createWorkspace(String parent, Workspace workspace, String workspaceId)

Creates a new Workspace in a given Repository.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
   Workspace workspace = Workspace.newBuilder().build();
   String workspaceId = "workspaceId466560144";
   Workspace response = dataformClient.createWorkspace(parent, workspace, workspaceId);
 }
 
Parameters
Name Description
parent String

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

workspace Workspace

Required. The workspace to create.

workspaceId String

Required. The ID to use for the workspace, which will become the final component of the workspace's resource name.

Returns
Type Description
Workspace

createWorkspaceCallable()

public final UnaryCallable<CreateWorkspaceRequest,Workspace> createWorkspaceCallable()

Creates a new Workspace in a given Repository.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   CreateWorkspaceRequest request =
       CreateWorkspaceRequest.newBuilder()
           .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
           .setWorkspace(Workspace.newBuilder().build())
           .setWorkspaceId("workspaceId466560144")
           .build();
   ApiFuture<Workspace> future = dataformClient.createWorkspaceCallable().futureCall(request);
   // Do something.
   Workspace response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateWorkspaceRequest,Workspace>

deleteRepository(DeleteRepositoryRequest request)

public final void deleteRepository(DeleteRepositoryRequest request)

Deletes a single Repository.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   DeleteRepositoryRequest request =
       DeleteRepositoryRequest.newBuilder()
           .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
           .setForce(true)
           .build();
   dataformClient.deleteRepository(request);
 }
 
Parameter
Name Description
request DeleteRepositoryRequest

The request object containing all of the parameters for the API call.

deleteRepository(RepositoryName name)

public final void deleteRepository(RepositoryName name)

Deletes a single Repository.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   RepositoryName name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
   dataformClient.deleteRepository(name);
 }
 
Parameter
Name Description
name RepositoryName

Required. The repository's name.

deleteRepository(String name)

public final void deleteRepository(String name)

Deletes a single Repository.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   String name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
   dataformClient.deleteRepository(name);
 }
 
Parameter
Name Description
name String

Required. The repository's name.

deleteRepositoryCallable()

public final UnaryCallable<DeleteRepositoryRequest,Empty> deleteRepositoryCallable()

Deletes a single Repository.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   DeleteRepositoryRequest request =
       DeleteRepositoryRequest.newBuilder()
           .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
           .setForce(true)
           .build();
   ApiFuture<Empty> future = dataformClient.deleteRepositoryCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteRepositoryRequest,Empty>

deleteWorkflowInvocation(DeleteWorkflowInvocationRequest request)

public final void deleteWorkflowInvocation(DeleteWorkflowInvocationRequest request)

Deletes a single WorkflowInvocation.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   DeleteWorkflowInvocationRequest request =
       DeleteWorkflowInvocationRequest.newBuilder()
           .setName(
               WorkflowInvocationName.of(
                       "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKFLOW_INVOCATION]")
                   .toString())
           .build();
   dataformClient.deleteWorkflowInvocation(request);
 }
 
Parameter
Name Description
request DeleteWorkflowInvocationRequest

The request object containing all of the parameters for the API call.

deleteWorkflowInvocation(WorkflowInvocationName name)

public final void deleteWorkflowInvocation(WorkflowInvocationName name)

Deletes a single WorkflowInvocation.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   WorkflowInvocationName name =
       WorkflowInvocationName.of(
           "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKFLOW_INVOCATION]");
   dataformClient.deleteWorkflowInvocation(name);
 }
 
Parameter
Name Description
name WorkflowInvocationName

Required. The workflow invocation resource's name.

deleteWorkflowInvocation(String name)

public final void deleteWorkflowInvocation(String name)

Deletes a single WorkflowInvocation.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   String name =
       WorkflowInvocationName.of(
               "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKFLOW_INVOCATION]")
           .toString();
   dataformClient.deleteWorkflowInvocation(name);
 }
 
Parameter
Name Description
name String

Required. The workflow invocation resource's name.

deleteWorkflowInvocationCallable()

public final UnaryCallable<DeleteWorkflowInvocationRequest,Empty> deleteWorkflowInvocationCallable()

Deletes a single WorkflowInvocation.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   DeleteWorkflowInvocationRequest request =
       DeleteWorkflowInvocationRequest.newBuilder()
           .setName(
               WorkflowInvocationName.of(
                       "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKFLOW_INVOCATION]")
                   .toString())
           .build();
   ApiFuture<Empty> future =
       dataformClient.deleteWorkflowInvocationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteWorkflowInvocationRequest,Empty>

deleteWorkspace(DeleteWorkspaceRequest request)

public final void deleteWorkspace(DeleteWorkspaceRequest request)

Deletes a single Workspace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   DeleteWorkspaceRequest request =
       DeleteWorkspaceRequest.newBuilder()
           .setName(
               WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
                   .toString())
           .build();
   dataformClient.deleteWorkspace(request);
 }
 
Parameter
Name Description
request DeleteWorkspaceRequest

The request object containing all of the parameters for the API call.

deleteWorkspace(WorkspaceName name)

public final void deleteWorkspace(WorkspaceName name)

Deletes a single Workspace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   WorkspaceName name =
       WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]");
   dataformClient.deleteWorkspace(name);
 }
 
Parameter
Name Description
name WorkspaceName

Required. The workspace resource's name.

deleteWorkspace(String name)

public final void deleteWorkspace(String name)

Deletes a single Workspace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   String name =
       WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]").toString();
   dataformClient.deleteWorkspace(name);
 }
 
Parameter
Name Description
name String

Required. The workspace resource's name.

deleteWorkspaceCallable()

public final UnaryCallable<DeleteWorkspaceRequest,Empty> deleteWorkspaceCallable()

Deletes a single Workspace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   DeleteWorkspaceRequest request =
       DeleteWorkspaceRequest.newBuilder()
           .setName(
               WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
                   .toString())
           .build();
   ApiFuture<Empty> future = dataformClient.deleteWorkspaceCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteWorkspaceRequest,Empty>

fetchFileDiff(FetchFileDiffRequest request)

public final FetchFileDiffResponse fetchFileDiff(FetchFileDiffRequest request)

Fetches Git diff for an uncommitted file in a Workspace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   FetchFileDiffRequest request =
       FetchFileDiffRequest.newBuilder()
           .setWorkspace(
               WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
                   .toString())
           .setPath("path3433509")
           .build();
   FetchFileDiffResponse response = dataformClient.fetchFileDiff(request);
 }
 
Parameter
Name Description
request FetchFileDiffRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
FetchFileDiffResponse

fetchFileDiffCallable()

public final UnaryCallable<FetchFileDiffRequest,FetchFileDiffResponse> fetchFileDiffCallable()

Fetches Git diff for an uncommitted file in a Workspace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   FetchFileDiffRequest request =
       FetchFileDiffRequest.newBuilder()
           .setWorkspace(
               WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
                   .toString())
           .setPath("path3433509")
           .build();
   ApiFuture<FetchFileDiffResponse> future =
       dataformClient.fetchFileDiffCallable().futureCall(request);
   // Do something.
   FetchFileDiffResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<FetchFileDiffRequest,FetchFileDiffResponse>

fetchFileGitStatuses(FetchFileGitStatusesRequest request)

public final FetchFileGitStatusesResponse fetchFileGitStatuses(FetchFileGitStatusesRequest request)

Fetches Git statuses for the files in a Workspace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   FetchFileGitStatusesRequest request =
       FetchFileGitStatusesRequest.newBuilder()
           .setName(
               WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
                   .toString())
           .build();
   FetchFileGitStatusesResponse response = dataformClient.fetchFileGitStatuses(request);
 }
 
Parameter
Name Description
request FetchFileGitStatusesRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
FetchFileGitStatusesResponse

fetchFileGitStatusesCallable()

public final UnaryCallable<FetchFileGitStatusesRequest,FetchFileGitStatusesResponse> fetchFileGitStatusesCallable()

Fetches Git statuses for the files in a Workspace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   FetchFileGitStatusesRequest request =
       FetchFileGitStatusesRequest.newBuilder()
           .setName(
               WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
                   .toString())
           .build();
   ApiFuture<FetchFileGitStatusesResponse> future =
       dataformClient.fetchFileGitStatusesCallable().futureCall(request);
   // Do something.
   FetchFileGitStatusesResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<FetchFileGitStatusesRequest,FetchFileGitStatusesResponse>

fetchGitAheadBehind(FetchGitAheadBehindRequest request)

public final FetchGitAheadBehindResponse fetchGitAheadBehind(FetchGitAheadBehindRequest request)

Fetches Git ahead/behind against a remote branch.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   FetchGitAheadBehindRequest request =
       FetchGitAheadBehindRequest.newBuilder()
           .setName(
               WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
                   .toString())
           .setRemoteBranch("remoteBranch-533119608")
           .build();
   FetchGitAheadBehindResponse response = dataformClient.fetchGitAheadBehind(request);
 }
 
Parameter
Name Description
request FetchGitAheadBehindRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
FetchGitAheadBehindResponse

fetchGitAheadBehindCallable()

public final UnaryCallable<FetchGitAheadBehindRequest,FetchGitAheadBehindResponse> fetchGitAheadBehindCallable()

Fetches Git ahead/behind against a remote branch.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataformClient dataformClient = DataformClient.create()) {
   FetchGitAheadBehindRequest request =
       FetchGitAheadBehindRequest.newBuilder()
           .setName(
               WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
                   .toString())
           .setRemoteBranch("remoteBranch-533119608")
           .build();
   ApiFuture<FetchGitAheadBehindResponse> future =
       dataformClient.fetchGitAheadBehindCallable().futureCall(request);
   // Do