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: - * - *
{@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]");
- * 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(). - * - *
| 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. - *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
GetRepository |
- * Fetches a single Repository. |
- *
- * Request object method variants only take one parameter, a request object, which must be constructed before the call. - *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
UpdateRepository |
- * Updates a single Repository. |
- *
- * Request object method variants only take one parameter, a request object, which must be constructed before the call. - *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
DeleteRepository |
- * Deletes a single Repository. |
- *
- * Request object method variants only take one parameter, a request object, which must be constructed before the call. - *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
GetWorkspace |
- * Fetches a single Workspace. |
- *
- * Request object method variants only take one parameter, a request object, which must be constructed before the call. - *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
DeleteWorkspace |
- * Deletes a single Workspace. |
- *
- * Request object method variants only take one parameter, a request object, which must be constructed before the call. - *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
GetCompilationResult |
- * Fetches a single CompilationResult. |
- *
- * Request object method variants only take one parameter, a request object, which must be constructed before the call. - *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
GetWorkflowInvocation |
- * Fetches a single WorkflowInvocation. |
- *
- * Request object method variants only take one parameter, a request object, which must be constructed before the call. - *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
DeleteWorkflowInvocation |
- * Deletes a single WorkflowInvocation. |
- *
- * Request object method variants only take one parameter, a request object, which must be constructed before the call. - *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
GetLocation |
- * Gets information about a location. |
- *
- * Request object method variants only take one parameter, a request object, which must be constructed before the call. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
SetIamPolicy |
- * Sets the access control policy on the specified resource. Replacesany existing policy. - * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. |
- *
- * Request object method variants only take one parameter, a request object, which must be constructed before the call. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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. - *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - *
|
- *
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: - * - *
{@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
- * DataformSettings dataformSettings =
- * DataformSettings.newBuilder()
- * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- * .build();
- * DataformClient dataformClient = DataformClient.create(dataformSettings);
- * }
- *
- * To customize the endpoint: - * - *
{@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
- * 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: - * - *
{@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
- * DataformSettings dataformSettings = DataformSettings.newHttpJsonBuilder().build();
- * DataformClient dataformClient = DataformClient.create(dataformSettings);
- * }
- *
- * Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class DataformClient implements BackgroundResource { - private final DataformSettings settings; - private final DataformStub stub; - - /** Constructs an instance of DataformClient with default settings. */ - public static final DataformClient create() throws IOException { - return create(DataformSettings.newBuilder().build()); - } - - /** - * 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. - */ - public static final DataformClient create(DataformSettings settings) throws IOException { - return new DataformClient(settings); - } - - /** - * Constructs an instance of DataformClient, using the given stub for making calls. This is for - * advanced usage - prefer using create(DataformSettings). - */ - public static final DataformClient create(DataformStub stub) { - return new DataformClient(stub); - } - - /** - * 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. - */ - protected DataformClient(DataformSettings settings) throws IOException { - this.settings = settings; - this.stub = ((DataformStubSettings) settings.getStubSettings()).createStub(); - } - - protected DataformClient(DataformStub stub) { - this.settings = null; - this.stub = stub; - } - - public final DataformSettings getSettings() { - return settings; - } - - public DataformStub getStub() { - return stub; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists Repositories in a given project and location. - * - *
Sample code: - * - *
{@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]");
- * for (Repository element : dataformClient.listRepositories(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The location in which to list repositories. Must be in the format
- * `projects/*/locations/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListRepositoriesPagedResponse listRepositories(LocationName parent) {
- ListRepositoriesRequest request =
- ListRepositoriesRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .build();
- return listRepositories(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists Repositories in a given project and location.
- *
- * Sample code: - * - *
{@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();
- * for (Repository element : dataformClient.listRepositories(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The location in which to list repositories. Must be in the format
- * `projects/*/locations/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListRepositoriesPagedResponse listRepositories(String parent) {
- ListRepositoriesRequest request =
- ListRepositoriesRequest.newBuilder().setParent(parent).build();
- return listRepositories(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists Repositories in a given project and location.
- *
- * Sample code: - * - *
{@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()) {
- * ListRepositoriesRequest request =
- * ListRepositoriesRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setOrderBy("orderBy-1207110587")
- * .setFilter("filter-1274492040")
- * .build();
- * for (Repository element : dataformClient.listRepositories(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListRepositoriesPagedResponse listRepositories(ListRepositoriesRequest request) {
- return listRepositoriesPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists Repositories in a given project and location.
- *
- * Sample code: - * - *
{@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()) {
- * ListRepositoriesRequest request =
- * ListRepositoriesRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setOrderBy("orderBy-1207110587")
- * .setFilter("filter-1274492040")
- * .build();
- * ApiFuture future =
- * dataformClient.listRepositoriesPagedCallable().futureCall(request);
- * // Do something.
- * for (Repository element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * ListRepositoriesRequest request =
- * ListRepositoriesRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setOrderBy("orderBy-1207110587")
- * .setFilter("filter-1274492040")
- * .build();
- * while (true) {
- * ListRepositoriesResponse response = dataformClient.listRepositoriesCallable().call(request);
- * for (Repository element : response.getRepositoriesList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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]");
- * Repository response = dataformClient.getRepository(name);
- * }
- * }
- *
- * @param name Required. The repository's name.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Repository getRepository(RepositoryName name) {
- GetRepositoryRequest request =
- GetRepositoryRequest.newBuilder().setName(name == null ? null : name.toString()).build();
- return getRepository(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Fetches a single Repository.
- *
- * Sample code: - * - *
{@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();
- * Repository response = dataformClient.getRepository(name);
- * }
- * }
- *
- * @param name Required. The repository's name.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Repository getRepository(String name) {
- GetRepositoryRequest request = GetRepositoryRequest.newBuilder().setName(name).build();
- return getRepository(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Fetches a single Repository.
- *
- * Sample code: - * - *
{@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()) {
- * GetRepositoryRequest request =
- * GetRepositoryRequest.newBuilder()
- * .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
- * .build();
- * Repository response = dataformClient.getRepository(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Repository getRepository(GetRepositoryRequest request) {
- return getRepositoryCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Fetches a single Repository.
- *
- * Sample code: - * - *
{@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()) {
- * GetRepositoryRequest request =
- * GetRepositoryRequest.newBuilder()
- * .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
- * .build();
- * ApiFuture future = dataformClient.getRepositoryCallable().futureCall(request);
- * // Do something.
- * Repository response = future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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);
- * }
- * }
- *
- * @param parent Required. The location in which to create the repository. Must be in the format
- * `projects/*/locations/*`.
- * @param repository Required. The repository to create.
- * @param repositoryId Required. The ID to use for the repository, which will become the final
- * component of the repository's resource name.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Repository createRepository(
- LocationName parent, Repository repository, String repositoryId) {
- CreateRepositoryRequest request =
- CreateRepositoryRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .setRepository(repository)
- .setRepositoryId(repositoryId)
- .build();
- return createRepository(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Creates a new Repository in a given project and location.
- *
- * Sample code: - * - *
{@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);
- * }
- * }
- *
- * @param parent Required. The location in which to create the repository. Must be in the format
- * `projects/*/locations/*`.
- * @param repository Required. The repository to create.
- * @param repositoryId Required. The ID to use for the repository, which will become the final
- * component of the repository's resource name.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Repository createRepository(
- String parent, Repository repository, String repositoryId) {
- CreateRepositoryRequest request =
- CreateRepositoryRequest.newBuilder()
- .setParent(parent)
- .setRepository(repository)
- .setRepositoryId(repositoryId)
- .build();
- return createRepository(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Creates a new Repository in a given project and location.
- *
- * Sample code: - * - *
{@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);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Repository createRepository(CreateRepositoryRequest request) {
- return createRepositoryCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Creates a new Repository in a given project and location.
- *
- * Sample code: - * - *
{@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 future = dataformClient.createRepositoryCallable().futureCall(request);
- * // Do something.
- * Repository response = future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * Repository repository = Repository.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * Repository response = dataformClient.updateRepository(repository, updateMask);
- * }
- * }
- *
- * @param repository Required. The repository to update.
- * @param updateMask Optional. Specifies the fields to be updated in the repository. If left
- * unset, all fields will be updated.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Repository updateRepository(Repository repository, FieldMask updateMask) {
- UpdateRepositoryRequest request =
- UpdateRepositoryRequest.newBuilder()
- .setRepository(repository)
- .setUpdateMask(updateMask)
- .build();
- return updateRepository(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Updates a single Repository.
- *
- * Sample code: - * - *
{@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()) {
- * UpdateRepositoryRequest request =
- * UpdateRepositoryRequest.newBuilder()
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .setRepository(Repository.newBuilder().build())
- * .build();
- * Repository response = dataformClient.updateRepository(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Repository updateRepository(UpdateRepositoryRequest request) {
- return updateRepositoryCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Updates a single Repository.
- *
- * Sample code: - * - *
{@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()) {
- * UpdateRepositoryRequest request =
- * UpdateRepositoryRequest.newBuilder()
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .setRepository(Repository.newBuilder().build())
- * .build();
- * ApiFuture future = dataformClient.updateRepositoryCallable().futureCall(request);
- * // Do something.
- * Repository response = future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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);
- * }
- * }
- *
- * @param name Required. The repository's name.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteRepository(RepositoryName name) {
- DeleteRepositoryRequest request =
- DeleteRepositoryRequest.newBuilder().setName(name == null ? null : name.toString()).build();
- deleteRepository(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Deletes a single Repository.
- *
- * Sample code: - * - *
{@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);
- * }
- * }
- *
- * @param name Required. The repository's name.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteRepository(String name) {
- DeleteRepositoryRequest request = DeleteRepositoryRequest.newBuilder().setName(name).build();
- deleteRepository(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Deletes a single Repository.
- *
- * Sample code: - * - *
{@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);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteRepository(DeleteRepositoryRequest request) {
- deleteRepositoryCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Deletes a single Repository.
- *
- * Sample code: - * - *
{@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 future = dataformClient.deleteRepositoryCallable().futureCall(request);
- * // Do something.
- * future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * FetchRemoteBranchesRequest request =
- * FetchRemoteBranchesRequest.newBuilder()
- * .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
- * .build();
- * FetchRemoteBranchesResponse response = dataformClient.fetchRemoteBranches(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final FetchRemoteBranchesResponse fetchRemoteBranches(FetchRemoteBranchesRequest request) {
- return fetchRemoteBranchesCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Fetches a Repository's remote branches.
- *
- * Sample code: - * - *
{@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()) {
- * FetchRemoteBranchesRequest request =
- * FetchRemoteBranchesRequest.newBuilder()
- * .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
- * .build();
- * ApiFuture future =
- * dataformClient.fetchRemoteBranchesCallable().futureCall(request);
- * // Do something.
- * FetchRemoteBranchesResponse response = future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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]");
- * for (Workspace element : dataformClient.listWorkspaces(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The repository in which to list workspaces. Must be in the format
- * `projects/*/locations/*/repositories/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListWorkspacesPagedResponse listWorkspaces(RepositoryName parent) {
- ListWorkspacesRequest request =
- ListWorkspacesRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .build();
- return listWorkspaces(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists Workspaces in a given Repository.
- *
- * Sample code: - * - *
{@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();
- * for (Workspace element : dataformClient.listWorkspaces(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The repository in which to list workspaces. Must be in the format
- * `projects/*/locations/*/repositories/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListWorkspacesPagedResponse listWorkspaces(String parent) {
- ListWorkspacesRequest request = ListWorkspacesRequest.newBuilder().setParent(parent).build();
- return listWorkspaces(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists Workspaces in a given Repository.
- *
- * Sample code: - * - *
{@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()) {
- * ListWorkspacesRequest request =
- * ListWorkspacesRequest.newBuilder()
- * .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setOrderBy("orderBy-1207110587")
- * .setFilter("filter-1274492040")
- * .build();
- * for (Workspace element : dataformClient.listWorkspaces(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListWorkspacesPagedResponse listWorkspaces(ListWorkspacesRequest request) {
- return listWorkspacesPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists Workspaces in a given Repository.
- *
- * Sample code: - * - *
{@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()) {
- * ListWorkspacesRequest request =
- * ListWorkspacesRequest.newBuilder()
- * .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setOrderBy("orderBy-1207110587")
- * .setFilter("filter-1274492040")
- * .build();
- * ApiFuture future =
- * dataformClient.listWorkspacesPagedCallable().futureCall(request);
- * // Do something.
- * for (Workspace element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * ListWorkspacesRequest request =
- * ListWorkspacesRequest.newBuilder()
- * .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setOrderBy("orderBy-1207110587")
- * .setFilter("filter-1274492040")
- * .build();
- * while (true) {
- * ListWorkspacesResponse response = dataformClient.listWorkspacesCallable().call(request);
- * for (Workspace element : response.getWorkspacesList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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]");
- * Workspace response = dataformClient.getWorkspace(name);
- * }
- * }
- *
- * @param name Required. The workspace's name.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Workspace getWorkspace(WorkspaceName name) {
- GetWorkspaceRequest request =
- GetWorkspaceRequest.newBuilder().setName(name == null ? null : name.toString()).build();
- return getWorkspace(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Fetches a single Workspace.
- *
- * Sample code: - * - *
{@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();
- * Workspace response = dataformClient.getWorkspace(name);
- * }
- * }
- *
- * @param name Required. The workspace's name.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Workspace getWorkspace(String name) {
- GetWorkspaceRequest request = GetWorkspaceRequest.newBuilder().setName(name).build();
- return getWorkspace(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Fetches a single Workspace.
- *
- * Sample code: - * - *
{@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()) {
- * GetWorkspaceRequest request =
- * GetWorkspaceRequest.newBuilder()
- * .setName(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .build();
- * Workspace response = dataformClient.getWorkspace(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Workspace getWorkspace(GetWorkspaceRequest request) {
- return getWorkspaceCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Fetches a single Workspace.
- *
- * Sample code: - * - *
{@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()) {
- * GetWorkspaceRequest request =
- * GetWorkspaceRequest.newBuilder()
- * .setName(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .build();
- * ApiFuture future = dataformClient.getWorkspaceCallable().futureCall(request);
- * // Do something.
- * Workspace response = future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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);
- * }
- * }
- *
- * @param parent Required. The repository in which to create the workspace. Must be in the format
- * `projects/*/locations/*/repositories/*`.
- * @param workspace Required. The workspace to create.
- * @param workspaceId Required. The ID to use for the workspace, which will become the final
- * component of the workspace's resource name.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Workspace createWorkspace(
- RepositoryName parent, Workspace workspace, String workspaceId) {
- CreateWorkspaceRequest request =
- CreateWorkspaceRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .setWorkspace(workspace)
- .setWorkspaceId(workspaceId)
- .build();
- return createWorkspace(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Creates a new Workspace in a given Repository.
- *
- * Sample code: - * - *
{@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);
- * }
- * }
- *
- * @param parent Required. The repository in which to create the workspace. Must be in the format
- * `projects/*/locations/*/repositories/*`.
- * @param workspace Required. The workspace to create.
- * @param workspaceId Required. The ID to use for the workspace, which will become the final
- * component of the workspace's resource name.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Workspace createWorkspace(String parent, Workspace workspace, String workspaceId) {
- CreateWorkspaceRequest request =
- CreateWorkspaceRequest.newBuilder()
- .setParent(parent)
- .setWorkspace(workspace)
- .setWorkspaceId(workspaceId)
- .build();
- return createWorkspace(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Creates a new Workspace in a given Repository.
- *
- * Sample code: - * - *
{@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);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Workspace createWorkspace(CreateWorkspaceRequest request) {
- return createWorkspaceCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Creates a new Workspace in a given Repository.
- *
- * Sample code: - * - *
{@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 future = dataformClient.createWorkspaceCallable().futureCall(request);
- * // Do something.
- * Workspace response = future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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);
- * }
- * }
- *
- * @param name Required. The workspace resource's name.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteWorkspace(WorkspaceName name) {
- DeleteWorkspaceRequest request =
- DeleteWorkspaceRequest.newBuilder().setName(name == null ? null : name.toString()).build();
- deleteWorkspace(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Deletes a single Workspace.
- *
- * Sample code: - * - *
{@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);
- * }
- * }
- *
- * @param name Required. The workspace resource's name.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteWorkspace(String name) {
- DeleteWorkspaceRequest request = DeleteWorkspaceRequest.newBuilder().setName(name).build();
- deleteWorkspace(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Deletes a single Workspace.
- *
- * Sample code: - * - *
{@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);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteWorkspace(DeleteWorkspaceRequest request) {
- deleteWorkspaceCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Deletes a single Workspace.
- *
- * Sample code: - * - *
{@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 future = dataformClient.deleteWorkspaceCallable().futureCall(request);
- * // Do something.
- * future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * InstallNpmPackagesRequest request =
- * InstallNpmPackagesRequest.newBuilder()
- * .setWorkspace(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .build();
- * InstallNpmPackagesResponse response = dataformClient.installNpmPackages(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final InstallNpmPackagesResponse installNpmPackages(InstallNpmPackagesRequest request) {
- return installNpmPackagesCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Installs dependency NPM packages (inside a Workspace).
- *
- * Sample code: - * - *
{@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()) {
- * InstallNpmPackagesRequest request =
- * InstallNpmPackagesRequest.newBuilder()
- * .setWorkspace(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .build();
- * ApiFuture future =
- * dataformClient.installNpmPackagesCallable().futureCall(request);
- * // Do something.
- * InstallNpmPackagesResponse response = future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * PullGitCommitsRequest request =
- * PullGitCommitsRequest.newBuilder()
- * .setName(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .setRemoteBranch("remoteBranch-533119608")
- * .setAuthor(CommitAuthor.newBuilder().build())
- * .build();
- * dataformClient.pullGitCommits(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void pullGitCommits(PullGitCommitsRequest request) {
- pullGitCommitsCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Pulls Git commits from the Repository's remote into a Workspace.
- *
- * Sample code: - * - *
{@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()) {
- * PullGitCommitsRequest request =
- * PullGitCommitsRequest.newBuilder()
- * .setName(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .setRemoteBranch("remoteBranch-533119608")
- * .setAuthor(CommitAuthor.newBuilder().build())
- * .build();
- * ApiFuture future = dataformClient.pullGitCommitsCallable().futureCall(request);
- * // Do something.
- * future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * PushGitCommitsRequest request =
- * PushGitCommitsRequest.newBuilder()
- * .setName(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .setRemoteBranch("remoteBranch-533119608")
- * .build();
- * dataformClient.pushGitCommits(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void pushGitCommits(PushGitCommitsRequest request) {
- pushGitCommitsCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Pushes Git commits from a Workspace to the Repository's remote.
- *
- * Sample code: - * - *
{@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()) {
- * PushGitCommitsRequest request =
- * PushGitCommitsRequest.newBuilder()
- * .setName(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .setRemoteBranch("remoteBranch-533119608")
- * .build();
- * ApiFuture future = dataformClient.pushGitCommitsCallable().futureCall(request);
- * // Do something.
- * future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final FetchFileGitStatusesResponse fetchFileGitStatuses(
- FetchFileGitStatusesRequest request) {
- return fetchFileGitStatusesCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Fetches Git statuses for the files in a Workspace.
- *
- * Sample code: - * - *
{@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 future =
- * dataformClient.fetchFileGitStatusesCallable().futureCall(request);
- * // Do something.
- * FetchFileGitStatusesResponse response = future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final FetchGitAheadBehindResponse fetchGitAheadBehind(FetchGitAheadBehindRequest request) {
- return fetchGitAheadBehindCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Fetches Git ahead/behind against a remote branch.
- *
- * Sample code: - * - *
{@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 future =
- * dataformClient.fetchGitAheadBehindCallable().futureCall(request);
- * // Do something.
- * FetchGitAheadBehindResponse response = future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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())
- * .build();
- * dataformClient.commitWorkspaceChanges(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void commitWorkspaceChanges(CommitWorkspaceChangesRequest request) {
- commitWorkspaceChangesCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Applies a Git commit for uncommitted files in a Workspace.
- *
- * Sample code: - * - *
{@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())
- * .build();
- * ApiFuture future = dataformClient.commitWorkspaceChangesCallable().futureCall(request);
- * // Do something.
- * future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * ResetWorkspaceChangesRequest request =
- * ResetWorkspaceChangesRequest.newBuilder()
- * .setName(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .addAllPaths(new ArrayList())
- * .setClean(true)
- * .build();
- * dataformClient.resetWorkspaceChanges(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void resetWorkspaceChanges(ResetWorkspaceChangesRequest request) {
- resetWorkspaceChangesCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Performs a Git reset for uncommitted files in a Workspace.
- *
- * Sample code: - * - *
{@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()) {
- * ResetWorkspaceChangesRequest request =
- * ResetWorkspaceChangesRequest.newBuilder()
- * .setName(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .addAllPaths(new ArrayList())
- * .setClean(true)
- * .build();
- * ApiFuture future = dataformClient.resetWorkspaceChangesCallable().futureCall(request);
- * // Do something.
- * future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final FetchFileDiffResponse fetchFileDiff(FetchFileDiffRequest request) {
- return fetchFileDiffCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Fetches Git diff for an uncommitted file in a Workspace.
- *
- * Sample code: - * - *
{@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 future =
- * dataformClient.fetchFileDiffCallable().futureCall(request);
- * // Do something.
- * FetchFileDiffResponse response = future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * QueryDirectoryContentsRequest request =
- * QueryDirectoryContentsRequest.newBuilder()
- * .setWorkspace(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .setPath("path3433509")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * for (QueryDirectoryContentsResponse.DirectoryEntry element :
- * dataformClient.queryDirectoryContents(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final QueryDirectoryContentsPagedResponse queryDirectoryContents(
- QueryDirectoryContentsRequest request) {
- return queryDirectoryContentsPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Returns the contents of a given Workspace directory.
- *
- * Sample code: - * - *
{@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()) {
- * QueryDirectoryContentsRequest request =
- * QueryDirectoryContentsRequest.newBuilder()
- * .setWorkspace(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .setPath("path3433509")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * ApiFuture future =
- * dataformClient.queryDirectoryContentsPagedCallable().futureCall(request);
- * // Do something.
- * for (QueryDirectoryContentsResponse.DirectoryEntry element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * QueryDirectoryContentsRequest request =
- * QueryDirectoryContentsRequest.newBuilder()
- * .setWorkspace(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .setPath("path3433509")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * while (true) {
- * QueryDirectoryContentsResponse response =
- * dataformClient.queryDirectoryContentsCallable().call(request);
- * for (QueryDirectoryContentsResponse.DirectoryEntry element :
- * response.getDirectoryEntriesList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * MakeDirectoryRequest request =
- * MakeDirectoryRequest.newBuilder()
- * .setWorkspace(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .setPath("path3433509")
- * .build();
- * MakeDirectoryResponse response = dataformClient.makeDirectory(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final MakeDirectoryResponse makeDirectory(MakeDirectoryRequest request) {
- return makeDirectoryCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Creates a directory inside a Workspace.
- *
- * Sample code: - * - *
{@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()) {
- * MakeDirectoryRequest request =
- * MakeDirectoryRequest.newBuilder()
- * .setWorkspace(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .setPath("path3433509")
- * .build();
- * ApiFuture future =
- * dataformClient.makeDirectoryCallable().futureCall(request);
- * // Do something.
- * MakeDirectoryResponse response = future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * RemoveDirectoryRequest request =
- * RemoveDirectoryRequest.newBuilder()
- * .setWorkspace(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .setPath("path3433509")
- * .build();
- * dataformClient.removeDirectory(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void removeDirectory(RemoveDirectoryRequest request) {
- removeDirectoryCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Deletes a directory (inside a Workspace) and all of its contents.
- *
- * Sample code: - * - *
{@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()) {
- * RemoveDirectoryRequest request =
- * RemoveDirectoryRequest.newBuilder()
- * .setWorkspace(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .setPath("path3433509")
- * .build();
- * ApiFuture future = dataformClient.removeDirectoryCallable().futureCall(request);
- * // Do something.
- * future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * MoveDirectoryRequest request =
- * MoveDirectoryRequest.newBuilder()
- * .setWorkspace(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .setPath("path3433509")
- * .setNewPath("newPath1845080549")
- * .build();
- * MoveDirectoryResponse response = dataformClient.moveDirectory(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final MoveDirectoryResponse moveDirectory(MoveDirectoryRequest request) {
- return moveDirectoryCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Moves a directory (inside a Workspace), and all of its contents, to a new location.
- *
- * Sample code: - * - *
{@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()) {
- * MoveDirectoryRequest request =
- * MoveDirectoryRequest.newBuilder()
- * .setWorkspace(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .setPath("path3433509")
- * .setNewPath("newPath1845080549")
- * .build();
- * ApiFuture future =
- * dataformClient.moveDirectoryCallable().futureCall(request);
- * // Do something.
- * MoveDirectoryResponse response = future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * ReadFileRequest request =
- * ReadFileRequest.newBuilder()
- * .setWorkspace(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .setPath("path3433509")
- * .build();
- * ReadFileResponse response = dataformClient.readFile(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ReadFileResponse readFile(ReadFileRequest request) {
- return readFileCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Returns the contents of a file (inside a Workspace).
- *
- * Sample code: - * - *
{@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()) {
- * ReadFileRequest request =
- * ReadFileRequest.newBuilder()
- * .setWorkspace(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .setPath("path3433509")
- * .build();
- * ApiFuture future = dataformClient.readFileCallable().futureCall(request);
- * // Do something.
- * ReadFileResponse response = future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * RemoveFileRequest request =
- * RemoveFileRequest.newBuilder()
- * .setWorkspace(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .setPath("path3433509")
- * .build();
- * dataformClient.removeFile(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void removeFile(RemoveFileRequest request) {
- removeFileCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Deletes a file (inside a Workspace).
- *
- * Sample code: - * - *
{@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()) {
- * RemoveFileRequest request =
- * RemoveFileRequest.newBuilder()
- * .setWorkspace(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .setPath("path3433509")
- * .build();
- * ApiFuture future = dataformClient.removeFileCallable().futureCall(request);
- * // Do something.
- * future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * MoveFileRequest request =
- * MoveFileRequest.newBuilder()
- * .setWorkspace(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .setPath("path3433509")
- * .setNewPath("newPath1845080549")
- * .build();
- * MoveFileResponse response = dataformClient.moveFile(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final MoveFileResponse moveFile(MoveFileRequest request) {
- return moveFileCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Moves a file (inside a Workspace) to a new location.
- *
- * Sample code: - * - *
{@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()) {
- * MoveFileRequest request =
- * MoveFileRequest.newBuilder()
- * .setWorkspace(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .setPath("path3433509")
- * .setNewPath("newPath1845080549")
- * .build();
- * ApiFuture future = dataformClient.moveFileCallable().futureCall(request);
- * // Do something.
- * MoveFileResponse response = future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * WriteFileRequest request =
- * WriteFileRequest.newBuilder()
- * .setWorkspace(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .setPath("path3433509")
- * .setContents(ByteString.EMPTY)
- * .build();
- * WriteFileResponse response = dataformClient.writeFile(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final WriteFileResponse writeFile(WriteFileRequest request) {
- return writeFileCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Writes to a file (inside a Workspace).
- *
- * Sample code: - * - *
{@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()) {
- * WriteFileRequest request =
- * WriteFileRequest.newBuilder()
- * .setWorkspace(
- * WorkspaceName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKSPACE]")
- * .toString())
- * .setPath("path3433509")
- * .setContents(ByteString.EMPTY)
- * .build();
- * ApiFuture future = dataformClient.writeFileCallable().futureCall(request);
- * // Do something.
- * WriteFileResponse response = future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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]");
- * for (CompilationResult element : dataformClient.listCompilationResults(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The repository in which to list compilation results. Must be in the
- * format `projects/*/locations/*/repositories/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListCompilationResultsPagedResponse listCompilationResults(RepositoryName parent) {
- ListCompilationResultsRequest request =
- ListCompilationResultsRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .build();
- return listCompilationResults(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists CompilationResults in a given Repository.
- *
- * Sample code: - * - *
{@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();
- * for (CompilationResult element : dataformClient.listCompilationResults(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The repository in which to list compilation results. Must be in the
- * format `projects/*/locations/*/repositories/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListCompilationResultsPagedResponse listCompilationResults(String parent) {
- ListCompilationResultsRequest request =
- ListCompilationResultsRequest.newBuilder().setParent(parent).build();
- return listCompilationResults(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists CompilationResults in a given Repository.
- *
- * Sample code: - * - *
{@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()) {
- * ListCompilationResultsRequest request =
- * ListCompilationResultsRequest.newBuilder()
- * .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * for (CompilationResult element :
- * dataformClient.listCompilationResults(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListCompilationResultsPagedResponse listCompilationResults(
- ListCompilationResultsRequest request) {
- return listCompilationResultsPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists CompilationResults in a given Repository.
- *
- * Sample code: - * - *
{@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()) {
- * ListCompilationResultsRequest request =
- * ListCompilationResultsRequest.newBuilder()
- * .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * ApiFuture future =
- * dataformClient.listCompilationResultsPagedCallable().futureCall(request);
- * // Do something.
- * for (CompilationResult element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * ListCompilationResultsRequest request =
- * ListCompilationResultsRequest.newBuilder()
- * .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * while (true) {
- * ListCompilationResultsResponse response =
- * dataformClient.listCompilationResultsCallable().call(request);
- * for (CompilationResult element : response.getCompilationResultsList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * CompilationResultName name =
- * CompilationResultName.of(
- * "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[COMPILATION_RESULT]");
- * CompilationResult response = dataformClient.getCompilationResult(name);
- * }
- * }
- *
- * @param name Required. The compilation result's name.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final CompilationResult getCompilationResult(CompilationResultName name) {
- GetCompilationResultRequest request =
- GetCompilationResultRequest.newBuilder()
- .setName(name == null ? null : name.toString())
- .build();
- return getCompilationResult(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Fetches a single CompilationResult.
- *
- * Sample code: - * - *
{@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 =
- * CompilationResultName.of(
- * "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[COMPILATION_RESULT]")
- * .toString();
- * CompilationResult response = dataformClient.getCompilationResult(name);
- * }
- * }
- *
- * @param name Required. The compilation result's name.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final CompilationResult getCompilationResult(String name) {
- GetCompilationResultRequest request =
- GetCompilationResultRequest.newBuilder().setName(name).build();
- return getCompilationResult(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Fetches a single CompilationResult.
- *
- * Sample code: - * - *
{@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()) {
- * GetCompilationResultRequest request =
- * GetCompilationResultRequest.newBuilder()
- * .setName(
- * CompilationResultName.of(
- * "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[COMPILATION_RESULT]")
- * .toString())
- * .build();
- * CompilationResult response = dataformClient.getCompilationResult(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final CompilationResult getCompilationResult(GetCompilationResultRequest request) {
- return getCompilationResultCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Fetches a single CompilationResult.
- *
- * Sample code: - * - *
{@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()) {
- * GetCompilationResultRequest request =
- * GetCompilationResultRequest.newBuilder()
- * .setName(
- * CompilationResultName.of(
- * "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[COMPILATION_RESULT]")
- * .toString())
- * .build();
- * ApiFuture future =
- * dataformClient.getCompilationResultCallable().futureCall(request);
- * // Do something.
- * CompilationResult response = future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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);
- * }
- * }
- *
- * @param parent Required. The repository in which to create the compilation result. Must be in
- * the format `projects/*/locations/*/repositories/*`.
- * @param compilationResult Required. The compilation result to create.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final CompilationResult createCompilationResult(
- RepositoryName parent, CompilationResult compilationResult) {
- CreateCompilationResultRequest request =
- CreateCompilationResultRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .setCompilationResult(compilationResult)
- .build();
- return createCompilationResult(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Creates a new CompilationResult in a given project and location.
- *
- * Sample code: - * - *
{@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);
- * }
- * }
- *
- * @param parent Required. The repository in which to create the compilation result. Must be in
- * the format `projects/*/locations/*/repositories/*`.
- * @param compilationResult Required. The compilation result to create.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final CompilationResult createCompilationResult(
- String parent, CompilationResult compilationResult) {
- CreateCompilationResultRequest request =
- CreateCompilationResultRequest.newBuilder()
- .setParent(parent)
- .setCompilationResult(compilationResult)
- .build();
- return createCompilationResult(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Creates a new CompilationResult in a given project and location.
- *
- * Sample code: - * - *
{@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);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final CompilationResult createCompilationResult(CreateCompilationResultRequest request) {
- return createCompilationResultCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Creates a new CompilationResult in a given project and location.
- *
- * Sample code: - * - *
{@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 future =
- * dataformClient.createCompilationResultCallable().futureCall(request);
- * // Do something.
- * CompilationResult response = future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * QueryCompilationResultActionsRequest request =
- * QueryCompilationResultActionsRequest.newBuilder()
- * .setName(
- * CompilationResultName.of(
- * "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[COMPILATION_RESULT]")
- * .toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .build();
- * for (CompilationResultAction element :
- * dataformClient.queryCompilationResultActions(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final QueryCompilationResultActionsPagedResponse queryCompilationResultActions(
- QueryCompilationResultActionsRequest request) {
- return queryCompilationResultActionsPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Returns CompilationResultActions in a given CompilationResult.
- *
- * Sample code: - * - *
{@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()) {
- * QueryCompilationResultActionsRequest request =
- * QueryCompilationResultActionsRequest.newBuilder()
- * .setName(
- * CompilationResultName.of(
- * "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[COMPILATION_RESULT]")
- * .toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .build();
- * ApiFuture future =
- * dataformClient.queryCompilationResultActionsPagedCallable().futureCall(request);
- * // Do something.
- * for (CompilationResultAction element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- */
- public final UnaryCallable<
- QueryCompilationResultActionsRequest, QueryCompilationResultActionsPagedResponse>
- queryCompilationResultActionsPagedCallable() {
- return stub.queryCompilationResultActionsPagedCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Returns CompilationResultActions in a given CompilationResult.
- *
- * Sample code: - * - *
{@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()) {
- * QueryCompilationResultActionsRequest request =
- * QueryCompilationResultActionsRequest.newBuilder()
- * .setName(
- * CompilationResultName.of(
- * "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[COMPILATION_RESULT]")
- * .toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .build();
- * while (true) {
- * QueryCompilationResultActionsResponse response =
- * dataformClient.queryCompilationResultActionsCallable().call(request);
- * for (CompilationResultAction element : response.getCompilationResultActionsList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- * }
- */
- public final UnaryCallable<
- QueryCompilationResultActionsRequest, QueryCompilationResultActionsResponse>
- queryCompilationResultActionsCallable() {
- return stub.queryCompilationResultActionsCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists WorkflowInvocations in a given Repository.
- *
- * Sample code: - * - *
{@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]");
- * for (WorkflowInvocation element :
- * dataformClient.listWorkflowInvocations(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The parent resource of the WorkflowInvocation type. Must be in the
- * format `projects/*/locations/*/repositories/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListWorkflowInvocationsPagedResponse listWorkflowInvocations(RepositoryName parent) {
- ListWorkflowInvocationsRequest request =
- ListWorkflowInvocationsRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .build();
- return listWorkflowInvocations(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists WorkflowInvocations in a given Repository.
- *
- * Sample code: - * - *
{@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();
- * for (WorkflowInvocation element :
- * dataformClient.listWorkflowInvocations(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The parent resource of the WorkflowInvocation type. Must be in the
- * format `projects/*/locations/*/repositories/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListWorkflowInvocationsPagedResponse listWorkflowInvocations(String parent) {
- ListWorkflowInvocationsRequest request =
- ListWorkflowInvocationsRequest.newBuilder().setParent(parent).build();
- return listWorkflowInvocations(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists WorkflowInvocations in a given Repository.
- *
- * Sample code: - * - *
{@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()) {
- * ListWorkflowInvocationsRequest request =
- * ListWorkflowInvocationsRequest.newBuilder()
- * .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * for (WorkflowInvocation element :
- * dataformClient.listWorkflowInvocations(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListWorkflowInvocationsPagedResponse listWorkflowInvocations(
- ListWorkflowInvocationsRequest request) {
- return listWorkflowInvocationsPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists WorkflowInvocations in a given Repository.
- *
- * Sample code: - * - *
{@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()) {
- * ListWorkflowInvocationsRequest request =
- * ListWorkflowInvocationsRequest.newBuilder()
- * .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * ApiFuture future =
- * dataformClient.listWorkflowInvocationsPagedCallable().futureCall(request);
- * // Do something.
- * for (WorkflowInvocation element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * ListWorkflowInvocationsRequest request =
- * ListWorkflowInvocationsRequest.newBuilder()
- * .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * while (true) {
- * ListWorkflowInvocationsResponse response =
- * dataformClient.listWorkflowInvocationsCallable().call(request);
- * for (WorkflowInvocation element : response.getWorkflowInvocationsList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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]");
- * WorkflowInvocation response = dataformClient.getWorkflowInvocation(name);
- * }
- * }
- *
- * @param name Required. The workflow invocation resource's name.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final WorkflowInvocation getWorkflowInvocation(WorkflowInvocationName name) {
- GetWorkflowInvocationRequest request =
- GetWorkflowInvocationRequest.newBuilder()
- .setName(name == null ? null : name.toString())
- .build();
- return getWorkflowInvocation(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Fetches a single WorkflowInvocation.
- *
- * Sample code: - * - *
{@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();
- * WorkflowInvocation response = dataformClient.getWorkflowInvocation(name);
- * }
- * }
- *
- * @param name Required. The workflow invocation resource's name.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final WorkflowInvocation getWorkflowInvocation(String name) {
- GetWorkflowInvocationRequest request =
- GetWorkflowInvocationRequest.newBuilder().setName(name).build();
- return getWorkflowInvocation(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Fetches a single WorkflowInvocation.
- *
- * Sample code: - * - *
{@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()) {
- * GetWorkflowInvocationRequest request =
- * GetWorkflowInvocationRequest.newBuilder()
- * .setName(
- * WorkflowInvocationName.of(
- * "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKFLOW_INVOCATION]")
- * .toString())
- * .build();
- * WorkflowInvocation response = dataformClient.getWorkflowInvocation(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final WorkflowInvocation getWorkflowInvocation(GetWorkflowInvocationRequest request) {
- return getWorkflowInvocationCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Fetches a single WorkflowInvocation.
- *
- * Sample code: - * - *
{@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()) {
- * GetWorkflowInvocationRequest request =
- * GetWorkflowInvocationRequest.newBuilder()
- * .setName(
- * WorkflowInvocationName.of(
- * "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKFLOW_INVOCATION]")
- * .toString())
- * .build();
- * ApiFuture future =
- * dataformClient.getWorkflowInvocationCallable().futureCall(request);
- * // Do something.
- * WorkflowInvocation response = future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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);
- * }
- * }
- *
- * @param parent Required. The parent resource of the WorkflowInvocation type.
- * @param workflowInvocation Required. The workflow invocation resource to create.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final WorkflowInvocation createWorkflowInvocation(
- RepositoryName parent, WorkflowInvocation workflowInvocation) {
- CreateWorkflowInvocationRequest request =
- CreateWorkflowInvocationRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .setWorkflowInvocation(workflowInvocation)
- .build();
- return createWorkflowInvocation(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Creates a new WorkflowInvocation in a given Repository.
- *
- * Sample code: - * - *
{@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);
- * }
- * }
- *
- * @param parent Required. The parent resource of the WorkflowInvocation type.
- * @param workflowInvocation Required. The workflow invocation resource to create.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final WorkflowInvocation createWorkflowInvocation(
- String parent, WorkflowInvocation workflowInvocation) {
- CreateWorkflowInvocationRequest request =
- CreateWorkflowInvocationRequest.newBuilder()
- .setParent(parent)
- .setWorkflowInvocation(workflowInvocation)
- .build();
- return createWorkflowInvocation(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Creates a new WorkflowInvocation in a given Repository.
- *
- * Sample code: - * - *
{@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);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final WorkflowInvocation createWorkflowInvocation(
- CreateWorkflowInvocationRequest request) {
- return createWorkflowInvocationCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Creates a new WorkflowInvocation in a given Repository.
- *
- * Sample code: - * - *
{@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 future =
- * dataformClient.createWorkflowInvocationCallable().futureCall(request);
- * // Do something.
- * WorkflowInvocation response = future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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);
- * }
- * }
- *
- * @param name Required. The workflow invocation resource's name.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteWorkflowInvocation(WorkflowInvocationName name) {
- DeleteWorkflowInvocationRequest request =
- DeleteWorkflowInvocationRequest.newBuilder()
- .setName(name == null ? null : name.toString())
- .build();
- deleteWorkflowInvocation(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Deletes a single WorkflowInvocation.
- *
- * Sample code: - * - *
{@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);
- * }
- * }
- *
- * @param name Required. The workflow invocation resource's name.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteWorkflowInvocation(String name) {
- DeleteWorkflowInvocationRequest request =
- DeleteWorkflowInvocationRequest.newBuilder().setName(name).build();
- deleteWorkflowInvocation(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Deletes a single WorkflowInvocation.
- *
- * Sample code: - * - *
{@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);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void deleteWorkflowInvocation(DeleteWorkflowInvocationRequest request) {
- deleteWorkflowInvocationCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Deletes a single WorkflowInvocation.
- *
- * Sample code: - * - *
{@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 future =
- * dataformClient.deleteWorkflowInvocationCallable().futureCall(request);
- * // Do something.
- * future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final void cancelWorkflowInvocation(CancelWorkflowInvocationRequest request) {
- cancelWorkflowInvocationCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Requests cancellation of a running WorkflowInvocation.
- *
- * Sample code: - * - *
{@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 future =
- * dataformClient.cancelWorkflowInvocationCallable().futureCall(request);
- * // Do something.
- * future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * QueryWorkflowInvocationActionsRequest request =
- * QueryWorkflowInvocationActionsRequest.newBuilder()
- * .setName(
- * WorkflowInvocationName.of(
- * "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKFLOW_INVOCATION]")
- * .toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * for (WorkflowInvocationAction element :
- * dataformClient.queryWorkflowInvocationActions(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final QueryWorkflowInvocationActionsPagedResponse queryWorkflowInvocationActions(
- QueryWorkflowInvocationActionsRequest request) {
- return queryWorkflowInvocationActionsPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Returns WorkflowInvocationActions in a given WorkflowInvocation.
- *
- * Sample code: - * - *
{@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()) {
- * QueryWorkflowInvocationActionsRequest request =
- * QueryWorkflowInvocationActionsRequest.newBuilder()
- * .setName(
- * WorkflowInvocationName.of(
- * "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKFLOW_INVOCATION]")
- * .toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * ApiFuture future =
- * dataformClient.queryWorkflowInvocationActionsPagedCallable().futureCall(request);
- * // Do something.
- * for (WorkflowInvocationAction element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- */
- public final UnaryCallable<
- QueryWorkflowInvocationActionsRequest, QueryWorkflowInvocationActionsPagedResponse>
- queryWorkflowInvocationActionsPagedCallable() {
- return stub.queryWorkflowInvocationActionsPagedCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Returns WorkflowInvocationActions in a given WorkflowInvocation.
- *
- * Sample code: - * - *
{@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()) {
- * QueryWorkflowInvocationActionsRequest request =
- * QueryWorkflowInvocationActionsRequest.newBuilder()
- * .setName(
- * WorkflowInvocationName.of(
- * "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[WORKFLOW_INVOCATION]")
- * .toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * while (true) {
- * QueryWorkflowInvocationActionsResponse response =
- * dataformClient.queryWorkflowInvocationActionsCallable().call(request);
- * for (WorkflowInvocationAction element : response.getWorkflowInvocationActionsList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- * }
- */
- public final UnaryCallable<
- QueryWorkflowInvocationActionsRequest, QueryWorkflowInvocationActionsResponse>
- queryWorkflowInvocationActionsCallable() {
- return stub.queryWorkflowInvocationActionsCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists information about the supported locations for this service.
- *
- * Sample code: - * - *
{@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()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * for (Location element : dataformClient.listLocations(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
- return listLocationsPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists information about the supported locations for this service.
- *
- * Sample code: - * - *
{@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()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * ApiFuture future = dataformClient.listLocationsPagedCallable().futureCall(request);
- * // Do something.
- * for (Location element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * while (true) {
- * ListLocationsResponse response = dataformClient.listLocationsCallable().call(request);
- * for (Location element : response.getLocationsList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
- * Location response = dataformClient.getLocation(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Location getLocation(GetLocationRequest request) {
- return getLocationCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets information about a location.
- *
- * Sample code: - * - *
{@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()) {
- * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
- * ApiFuture future = dataformClient.getLocationCallable().futureCall(request);
- * // Do something.
- * Location response = future.get();
- * }
- * }
- */
- public final UnaryCallableCan return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. - * - *
Sample code: - * - *
{@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()) {
- * SetIamPolicyRequest request =
- * SetIamPolicyRequest.newBuilder()
- * .setResource(
- * CompilationResultName.of(
- * "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[COMPILATION_RESULT]")
- * .toString())
- * .setPolicy(Policy.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * Policy response = dataformClient.setIamPolicy(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Policy setIamPolicy(SetIamPolicyRequest request) {
- return setIamPolicyCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Sets the access control policy on the specified resource. Replacesany existing policy.
- *
- * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. - * - *
Sample code: - * - *
{@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()) {
- * SetIamPolicyRequest request =
- * SetIamPolicyRequest.newBuilder()
- * .setResource(
- * CompilationResultName.of(
- * "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[COMPILATION_RESULT]")
- * .toString())
- * .setPolicy(Policy.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * ApiFuture future = dataformClient.setIamPolicyCallable().futureCall(request);
- * // Do something.
- * Policy response = future.get();
- * }
- * }
- */
- public final UnaryCallableSample code: - * - *
{@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()) {
- * GetIamPolicyRequest request =
- * GetIamPolicyRequest.newBuilder()
- * .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
- * .setOptions(GetPolicyOptions.newBuilder().build())
- * .build();
- * Policy response = dataformClient.getIamPolicy(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Policy getIamPolicy(GetIamPolicyRequest request) {
- return getIamPolicyCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets the access control policy for a resource. Returns an empty policyif the resource exists
- * and does not have a policy set.
- *
- * Sample code: - * - *
{@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()) {
- * GetIamPolicyRequest request =
- * GetIamPolicyRequest.newBuilder()
- * .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
- * .setOptions(GetPolicyOptions.newBuilder().build())
- * .build();
- * ApiFuture future = dataformClient.getIamPolicyCallable().futureCall(request);
- * // Do something.
- * Policy response = future.get();
- * }
- * }
- */
- public final UnaryCallableNote: 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. - * - *
Sample code: - * - *
{@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()) {
- * TestIamPermissionsRequest request =
- * TestIamPermissionsRequest.newBuilder()
- * .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
- * .addAllPermissions(new ArrayList())
- * .build();
- * TestIamPermissionsResponse response = dataformClient.testIamPermissions(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) {
- return testIamPermissionsCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * 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. - * - *
Sample code: - * - *
{@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()) {
- * TestIamPermissionsRequest request =
- * TestIamPermissionsRequest.newBuilder()
- * .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
- * .addAllPermissions(new ArrayList())
- * .build();
- * ApiFuture future =
- * dataformClient.testIamPermissionsCallable().futureCall(request);
- * // Do something.
- * TestIamPermissionsResponse response = future.get();
- * }
- * }
- */
- public final UnaryCallableThe default instance has everything set to sensible defaults: - * - *
The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *
For example, to set the - * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) - * of getRepository: - * - *
{@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
- * DataformSettings.Builder dataformSettingsBuilder = DataformSettings.newBuilder();
- * dataformSettingsBuilder
- * .getRepositorySettings()
- * .setRetrySettings(
- * dataformSettingsBuilder
- * .getRepositorySettings()
- * .getRetrySettings()
- * .toBuilder()
- * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
- * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
- * .setMaxAttempts(5)
- * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
- * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
- * .setRetryDelayMultiplier(1.3)
- * .setRpcTimeoutMultiplier(1.5)
- * .setTotalTimeoutDuration(Duration.ofSeconds(300))
- * .build());
- * DataformSettings dataformSettings = dataformSettingsBuilder.build();
- * }
- *
- * Please refer to the [Client Side Retry
- * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
- * additional support in setting retries.
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public class DataformSettings extends ClientSettingsNote: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction The interfaces provided are listed below, along with usage samples.
- *
- * ======================= DataformClient =======================
- *
- * Service Description: Dataform is a service to develop, create, document, test, and update
- * curated tables in BigQuery.
- *
- * Sample for DataformClient:
- *
- * This class is for advanced usage and reflects the underlying API directly.
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public abstract class DataformStub implements BackgroundResource {
-
- public UnaryCallable The default instance has everything set to sensible defaults:
- *
- * The builder of this class is recursive, so contained classes are themselves builders. When
- * build() is called, the tree of builders is called to create the complete settings object.
- *
- * For example, to set the
- * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
- * of getRepository:
- *
- * {@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]");
- * Repository response = dataformClient.getRepository(name);
- * }
- * }
- */
-@Generated("by gapic-generator-java")
-package com.google.cloud.dataform.v1alpha2;
-
-import javax.annotation.Generated;
diff --git a/java-dataform/google-cloud-dataform/src/main/java/com/google/cloud/dataform/v1alpha2/stub/DataformStub.java b/java-dataform/google-cloud-dataform/src/main/java/com/google/cloud/dataform/v1alpha2/stub/DataformStub.java
deleted file mode 100644
index 19a7823941e0..000000000000
--- a/java-dataform/google-cloud-dataform/src/main/java/com/google/cloud/dataform/v1alpha2/stub/DataformStub.java
+++ /dev/null
@@ -1,341 +0,0 @@
-/*
- * Copyright 2025 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.cloud.dataform.v1alpha2.stub;
-
-import static com.google.cloud.dataform.v1alpha2.DataformClient.ListCompilationResultsPagedResponse;
-import static com.google.cloud.dataform.v1alpha2.DataformClient.ListLocationsPagedResponse;
-import static com.google.cloud.dataform.v1alpha2.DataformClient.ListRepositoriesPagedResponse;
-import static com.google.cloud.dataform.v1alpha2.DataformClient.ListWorkflowInvocationsPagedResponse;
-import static com.google.cloud.dataform.v1alpha2.DataformClient.ListWorkspacesPagedResponse;
-import static com.google.cloud.dataform.v1alpha2.DataformClient.QueryCompilationResultActionsPagedResponse;
-import static com.google.cloud.dataform.v1alpha2.DataformClient.QueryDirectoryContentsPagedResponse;
-import static com.google.cloud.dataform.v1alpha2.DataformClient.QueryWorkflowInvocationActionsPagedResponse;
-
-import com.google.api.core.BetaApi;
-import com.google.api.gax.core.BackgroundResource;
-import com.google.api.gax.rpc.UnaryCallable;
-import com.google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest;
-import com.google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest;
-import com.google.cloud.dataform.v1alpha2.CompilationResult;
-import com.google.cloud.dataform.v1alpha2.CreateCompilationResultRequest;
-import com.google.cloud.dataform.v1alpha2.CreateRepositoryRequest;
-import com.google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest;
-import com.google.cloud.dataform.v1alpha2.CreateWorkspaceRequest;
-import com.google.cloud.dataform.v1alpha2.DeleteRepositoryRequest;
-import com.google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest;
-import com.google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest;
-import com.google.cloud.dataform.v1alpha2.FetchFileDiffRequest;
-import com.google.cloud.dataform.v1alpha2.FetchFileDiffResponse;
-import com.google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest;
-import com.google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse;
-import com.google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest;
-import com.google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse;
-import com.google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest;
-import com.google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse;
-import com.google.cloud.dataform.v1alpha2.GetCompilationResultRequest;
-import com.google.cloud.dataform.v1alpha2.GetRepositoryRequest;
-import com.google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest;
-import com.google.cloud.dataform.v1alpha2.GetWorkspaceRequest;
-import com.google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest;
-import com.google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse;
-import com.google.cloud.dataform.v1alpha2.ListCompilationResultsRequest;
-import com.google.cloud.dataform.v1alpha2.ListCompilationResultsResponse;
-import com.google.cloud.dataform.v1alpha2.ListRepositoriesRequest;
-import com.google.cloud.dataform.v1alpha2.ListRepositoriesResponse;
-import com.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest;
-import com.google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse;
-import com.google.cloud.dataform.v1alpha2.ListWorkspacesRequest;
-import com.google.cloud.dataform.v1alpha2.ListWorkspacesResponse;
-import com.google.cloud.dataform.v1alpha2.MakeDirectoryRequest;
-import com.google.cloud.dataform.v1alpha2.MakeDirectoryResponse;
-import com.google.cloud.dataform.v1alpha2.MoveDirectoryRequest;
-import com.google.cloud.dataform.v1alpha2.MoveDirectoryResponse;
-import com.google.cloud.dataform.v1alpha2.MoveFileRequest;
-import com.google.cloud.dataform.v1alpha2.MoveFileResponse;
-import com.google.cloud.dataform.v1alpha2.PullGitCommitsRequest;
-import com.google.cloud.dataform.v1alpha2.PushGitCommitsRequest;
-import com.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest;
-import com.google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse;
-import com.google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest;
-import com.google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse;
-import com.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest;
-import com.google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse;
-import com.google.cloud.dataform.v1alpha2.ReadFileRequest;
-import com.google.cloud.dataform.v1alpha2.ReadFileResponse;
-import com.google.cloud.dataform.v1alpha2.RemoveDirectoryRequest;
-import com.google.cloud.dataform.v1alpha2.RemoveFileRequest;
-import com.google.cloud.dataform.v1alpha2.Repository;
-import com.google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest;
-import com.google.cloud.dataform.v1alpha2.UpdateRepositoryRequest;
-import com.google.cloud.dataform.v1alpha2.WorkflowInvocation;
-import com.google.cloud.dataform.v1alpha2.Workspace;
-import com.google.cloud.dataform.v1alpha2.WriteFileRequest;
-import com.google.cloud.dataform.v1alpha2.WriteFileResponse;
-import com.google.cloud.location.GetLocationRequest;
-import com.google.cloud.location.ListLocationsRequest;
-import com.google.cloud.location.ListLocationsResponse;
-import com.google.cloud.location.Location;
-import com.google.iam.v1.GetIamPolicyRequest;
-import com.google.iam.v1.Policy;
-import com.google.iam.v1.SetIamPolicyRequest;
-import com.google.iam.v1.TestIamPermissionsRequest;
-import com.google.iam.v1.TestIamPermissionsResponse;
-import com.google.protobuf.Empty;
-import javax.annotation.Generated;
-
-// AUTO-GENERATED DOCUMENTATION AND CLASS.
-/**
- * Base stub class for the Dataform service API.
- *
- *
- *
- *
- * {@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
- * DataformStubSettings.Builder dataformSettingsBuilder = DataformStubSettings.newBuilder();
- * dataformSettingsBuilder
- * .getRepositorySettings()
- * .setRetrySettings(
- * dataformSettingsBuilder
- * .getRepositorySettings()
- * .getRetrySettings()
- * .toBuilder()
- * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
- * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
- * .setMaxAttempts(5)
- * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
- * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
- * .setRetryDelayMultiplier(1.3)
- * .setRpcTimeoutMultiplier(1.5)
- * .setTotalTimeoutDuration(Duration.ofSeconds(300))
- * .build());
- * DataformStubSettings dataformSettings = dataformSettingsBuilder.build();
- * }
- *
- * Please refer to the [Client Side Retry
- * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
- * additional support in setting retries.
- */
-@BetaApi
-@Generated("by gapic-generator-java")
-public class DataformStubSettings extends StubSettings