All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.aiplatform.v1beta1.MetadataServiceClient Maven / Gradle / Ivy

There is a newer version: 3.55.0
Show newest version
/*
 * Copyright 2024 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.aiplatform.v1beta1;

import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.longrunning.OperationFuture;
import com.google.api.gax.paging.AbstractFixedSizeCollection;
import com.google.api.gax.paging.AbstractPage;
import com.google.api.gax.paging.AbstractPagedListResponse;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.PageContext;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.aiplatform.v1beta1.stub.MetadataServiceStub;
import com.google.cloud.aiplatform.v1beta1.stub.MetadataServiceStubSettings;
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.common.util.concurrent.MoreExecutors;
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.longrunning.Operation;
import com.google.longrunning.OperationsClient;
import com.google.protobuf.Empty;
import com.google.protobuf.FieldMask;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
 * Service Description: Service for reading and writing metadata entries.
 *
 * 

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
 *   MetadataStoreName name = MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
 *   MetadataStore response = metadataServiceClient.getMetadataStore(name);
 * }
 * }
* *

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

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Methods
MethodDescriptionMethod Variants

CreateMetadataStore

Initializes a MetadataStore, including allocation of resources.

*

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

*
    *
  • createMetadataStoreAsync(CreateMetadataStoreRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • createMetadataStoreAsync(LocationName parent, MetadataStore metadataStore, String metadataStoreId) *

  • createMetadataStoreAsync(String parent, MetadataStore metadataStore, String metadataStoreId) *

*

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

*
    *
  • createMetadataStoreOperationCallable() *

  • createMetadataStoreCallable() *

*

GetMetadataStore

Retrieves a specific MetadataStore.

*

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

*
    *
  • getMetadataStore(GetMetadataStoreRequest request) *

*

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

*
    *
  • getMetadataStore(MetadataStoreName name) *

  • getMetadataStore(String name) *

*

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

*
    *
  • getMetadataStoreCallable() *

*

ListMetadataStores

Lists MetadataStores for a Location.

*

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

*
    *
  • listMetadataStores(ListMetadataStoresRequest request) *

*

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

*
    *
  • listMetadataStores(LocationName parent) *

  • listMetadataStores(String parent) *

*

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

*
    *
  • listMetadataStoresPagedCallable() *

  • listMetadataStoresCallable() *

*

DeleteMetadataStore

Deletes a single MetadataStore and all its child resources (Artifacts, Executions, and Contexts).

*

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

*
    *
  • deleteMetadataStoreAsync(DeleteMetadataStoreRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • deleteMetadataStoreAsync(MetadataStoreName name) *

  • deleteMetadataStoreAsync(String name) *

*

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

*
    *
  • deleteMetadataStoreOperationCallable() *

  • deleteMetadataStoreCallable() *

*

CreateArtifact

Creates an Artifact associated with a MetadataStore.

*

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

*
    *
  • createArtifact(CreateArtifactRequest request) *

*

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

*
    *
  • createArtifact(MetadataStoreName parent, Artifact artifact, String artifactId) *

  • createArtifact(String parent, Artifact artifact, String artifactId) *

*

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

*
    *
  • createArtifactCallable() *

*

GetArtifact

Retrieves a specific Artifact.

*

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

*
    *
  • getArtifact(GetArtifactRequest request) *

*

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

*
    *
  • getArtifact(ArtifactName name) *

  • getArtifact(String name) *

*

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

*
    *
  • getArtifactCallable() *

*

ListArtifacts

Lists Artifacts in the MetadataStore.

*

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

*
    *
  • listArtifacts(ListArtifactsRequest request) *

*

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

*
    *
  • listArtifacts(MetadataStoreName parent) *

  • listArtifacts(String parent) *

*

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

*
    *
  • listArtifactsPagedCallable() *

  • listArtifactsCallable() *

*

UpdateArtifact

Updates a stored Artifact.

*

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

*
    *
  • updateArtifact(UpdateArtifactRequest request) *

*

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

*
    *
  • updateArtifact(Artifact artifact, FieldMask updateMask) *

*

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

*
    *
  • updateArtifactCallable() *

*

DeleteArtifact

Deletes an Artifact.

*

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

*
    *
  • deleteArtifactAsync(DeleteArtifactRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • deleteArtifactAsync(ArtifactName name) *

  • deleteArtifactAsync(String name) *

*

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

*
    *
  • deleteArtifactOperationCallable() *

  • deleteArtifactCallable() *

*

PurgeArtifacts

Purges Artifacts.

*

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

*
    *
  • purgeArtifactsAsync(PurgeArtifactsRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • purgeArtifactsAsync(MetadataStoreName parent) *

  • purgeArtifactsAsync(String parent) *

*

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

*
    *
  • purgeArtifactsOperationCallable() *

  • purgeArtifactsCallable() *

*

CreateContext

Creates a Context associated with a MetadataStore.

*

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

*
    *
  • createContext(CreateContextRequest request) *

*

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

*
    *
  • createContext(MetadataStoreName parent, Context context, String contextId) *

  • createContext(String parent, Context context, String contextId) *

*

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

*
    *
  • createContextCallable() *

*

GetContext

Retrieves a specific Context.

*

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

*
    *
  • getContext(GetContextRequest request) *

*

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

*
    *
  • getContext(ContextName name) *

  • getContext(String name) *

*

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

*
    *
  • getContextCallable() *

*

ListContexts

Lists Contexts on the MetadataStore.

*

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

*
    *
  • listContexts(ListContextsRequest request) *

*

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

*
    *
  • listContexts(MetadataStoreName parent) *

  • listContexts(String parent) *

*

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

*
    *
  • listContextsPagedCallable() *

  • listContextsCallable() *

*

UpdateContext

Updates a stored Context.

*

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

*
    *
  • updateContext(UpdateContextRequest request) *

*

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

*
    *
  • updateContext(Context context, FieldMask updateMask) *

*

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

*
    *
  • updateContextCallable() *

*

DeleteContext

Deletes a stored Context.

*

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

*
    *
  • deleteContextAsync(DeleteContextRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • deleteContextAsync(ContextName name) *

  • deleteContextAsync(String name) *

*

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

*
    *
  • deleteContextOperationCallable() *

  • deleteContextCallable() *

*

PurgeContexts

Purges Contexts.

*

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

*
    *
  • purgeContextsAsync(PurgeContextsRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • purgeContextsAsync(MetadataStoreName parent) *

  • purgeContextsAsync(String parent) *

*

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

*
    *
  • purgeContextsOperationCallable() *

  • purgeContextsCallable() *

*

AddContextArtifactsAndExecutions

Adds a set of Artifacts and Executions to a Context. If any of the Artifacts or Executions have already been added to a Context, they are simply skipped.

*

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

*
    *
  • addContextArtifactsAndExecutions(AddContextArtifactsAndExecutionsRequest request) *

*

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

*
    *
  • addContextArtifactsAndExecutions(ContextName context, List<String> artifacts, List<String> executions) *

  • addContextArtifactsAndExecutions(String context, List<String> artifacts, List<String> executions) *

*

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

*
    *
  • addContextArtifactsAndExecutionsCallable() *

*

AddContextChildren

Adds a set of Contexts as children to a parent Context. If any of the child Contexts have already been added to the parent Context, they are simply skipped. If this call would create a cycle or cause any Context to have more than 10 parents, the request will fail with an INVALID_ARGUMENT error.

*

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

*
    *
  • addContextChildren(AddContextChildrenRequest request) *

*

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

*
    *
  • addContextChildren(ContextName context, List<String> childContexts) *

  • addContextChildren(String context, List<String> childContexts) *

*

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

*
    *
  • addContextChildrenCallable() *

*

RemoveContextChildren

Remove a set of children contexts from a parent Context. If any of the child Contexts were NOT added to the parent Context, they are simply skipped.

*

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

*
    *
  • removeContextChildren(RemoveContextChildrenRequest request) *

*

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

*
    *
  • removeContextChildren(ContextName context, List<String> childContexts) *

  • removeContextChildren(String context, List<String> childContexts) *

*

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

*
    *
  • removeContextChildrenCallable() *

*

QueryContextLineageSubgraph

Retrieves Artifacts and Executions within the specified Context, connected by Event edges and returned as a LineageSubgraph.

*

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

*
    *
  • queryContextLineageSubgraph(QueryContextLineageSubgraphRequest request) *

*

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

*
    *
  • queryContextLineageSubgraph(ContextName context) *

  • queryContextLineageSubgraph(String context) *

*

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

*
    *
  • queryContextLineageSubgraphCallable() *

*

CreateExecution

Creates an Execution associated with a MetadataStore.

*

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

*
    *
  • createExecution(CreateExecutionRequest request) *

*

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

*
    *
  • createExecution(MetadataStoreName parent, Execution execution, String executionId) *

  • createExecution(String parent, Execution execution, String executionId) *

*

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

*
    *
  • createExecutionCallable() *

*

GetExecution

Retrieves a specific Execution.

*

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

*
    *
  • getExecution(GetExecutionRequest request) *

*

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

*
    *
  • getExecution(ExecutionName name) *

  • getExecution(String name) *

*

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

*
    *
  • getExecutionCallable() *

*

ListExecutions

Lists Executions in the MetadataStore.

*

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

*
    *
  • listExecutions(ListExecutionsRequest request) *

*

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

*
    *
  • listExecutions(MetadataStoreName parent) *

  • listExecutions(String parent) *

*

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

*
    *
  • listExecutionsPagedCallable() *

  • listExecutionsCallable() *

*

UpdateExecution

Updates a stored Execution.

*

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

*
    *
  • updateExecution(UpdateExecutionRequest request) *

*

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

*
    *
  • updateExecution(Execution execution, FieldMask updateMask) *

*

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

*
    *
  • updateExecutionCallable() *

*

DeleteExecution

Deletes an Execution.

*

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

*
    *
  • deleteExecutionAsync(DeleteExecutionRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • deleteExecutionAsync(ExecutionName name) *

  • deleteExecutionAsync(String name) *

*

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

*
    *
  • deleteExecutionOperationCallable() *

  • deleteExecutionCallable() *

*

PurgeExecutions

Purges Executions.

*

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

*
    *
  • purgeExecutionsAsync(PurgeExecutionsRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • purgeExecutionsAsync(MetadataStoreName parent) *

  • purgeExecutionsAsync(String parent) *

*

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

*
    *
  • purgeExecutionsOperationCallable() *

  • purgeExecutionsCallable() *

*

AddExecutionEvents

Adds Events to the specified Execution. An Event indicates whether an Artifact was used as an input or output for an Execution. If an Event already exists between the Execution and the Artifact, the Event is skipped.

*

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

*
    *
  • addExecutionEvents(AddExecutionEventsRequest request) *

*

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

*
    *
  • addExecutionEvents(ExecutionName execution, List<Event> events) *

  • addExecutionEvents(String execution, List<Event> events) *

*

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

*
    *
  • addExecutionEventsCallable() *

*

QueryExecutionInputsAndOutputs

Obtains the set of input and output Artifacts for this Execution, in the form of LineageSubgraph that also contains the Execution and connecting Events.

*

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

*
    *
  • queryExecutionInputsAndOutputs(QueryExecutionInputsAndOutputsRequest request) *

*

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

*
    *
  • queryExecutionInputsAndOutputs(ExecutionName execution) *

  • queryExecutionInputsAndOutputs(String execution) *

*

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

*
    *
  • queryExecutionInputsAndOutputsCallable() *

*

CreateMetadataSchema

Creates a MetadataSchema.

*

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

*
    *
  • createMetadataSchema(CreateMetadataSchemaRequest request) *

*

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

*
    *
  • createMetadataSchema(MetadataStoreName parent, MetadataSchema metadataSchema, String metadataSchemaId) *

  • createMetadataSchema(String parent, MetadataSchema metadataSchema, String metadataSchemaId) *

*

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

*
    *
  • createMetadataSchemaCallable() *

*

GetMetadataSchema

Retrieves a specific MetadataSchema.

*

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

*
    *
  • getMetadataSchema(GetMetadataSchemaRequest request) *

*

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

*
    *
  • getMetadataSchema(MetadataSchemaName name) *

  • getMetadataSchema(String name) *

*

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

*
    *
  • getMetadataSchemaCallable() *

*

ListMetadataSchemas

Lists MetadataSchemas.

*

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

*
    *
  • listMetadataSchemas(ListMetadataSchemasRequest request) *

*

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

*
    *
  • listMetadataSchemas(MetadataStoreName parent) *

  • listMetadataSchemas(String parent) *

*

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

*
    *
  • listMetadataSchemasPagedCallable() *

  • listMetadataSchemasCallable() *

*

QueryArtifactLineageSubgraph

Retrieves lineage of an Artifact represented through Artifacts and Executions connected by Event edges and returned as a LineageSubgraph.

*

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

*
    *
  • queryArtifactLineageSubgraph(QueryArtifactLineageSubgraphRequest request) *

*

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

*
    *
  • queryArtifactLineageSubgraph(ArtifactName artifact) *

  • queryArtifactLineageSubgraph(String artifact) *

*

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

*
    *
  • queryArtifactLineageSubgraphCallable() *

*

ListLocations

Lists information about the supported locations for this service.

*

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

*
    *
  • listLocations(ListLocationsRequest request) *

*

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

*
    *
  • listLocationsPagedCallable() *

  • listLocationsCallable() *

*

GetLocation

Gets information about a location.

*

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

*
    *
  • getLocation(GetLocationRequest request) *

*

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

*
    *
  • getLocationCallable() *

*

SetIamPolicy

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

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

*

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

*
    *
  • setIamPolicy(SetIamPolicyRequest request) *

*

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

*
    *
  • setIamPolicyCallable() *

*

GetIamPolicy

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

*

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

*
    *
  • getIamPolicy(GetIamPolicyRequest request) *

*

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

*
    *
  • getIamPolicyCallable() *

*

TestIamPermissions

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

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

*

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

*
    *
  • testIamPermissions(TestIamPermissionsRequest request) *

*

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

*
    *
  • testIamPermissionsCallable() *

*
* *

See the individual methods for example code. * *

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

This class can be customized by passing in a custom instance of MetadataServiceSettings 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
 * MetadataServiceSettings metadataServiceSettings =
 *     MetadataServiceSettings.newBuilder()
 *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
 *         .build();
 * MetadataServiceClient metadataServiceClient =
 *     MetadataServiceClient.create(metadataServiceSettings);
 * }
* *

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
 * MetadataServiceSettings metadataServiceSettings =
 *     MetadataServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 * MetadataServiceClient metadataServiceClient =
 *     MetadataServiceClient.create(metadataServiceSettings);
 * }
* *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ @BetaApi @Generated("by gapic-generator-java") public class MetadataServiceClient implements BackgroundResource { private final MetadataServiceSettings settings; private final MetadataServiceStub stub; private final OperationsClient operationsClient; /** Constructs an instance of MetadataServiceClient with default settings. */ public static final MetadataServiceClient create() throws IOException { return create(MetadataServiceSettings.newBuilder().build()); } /** * Constructs an instance of MetadataServiceClient, 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 MetadataServiceClient create(MetadataServiceSettings settings) throws IOException { return new MetadataServiceClient(settings); } /** * Constructs an instance of MetadataServiceClient, using the given stub for making calls. This is * for advanced usage - prefer using create(MetadataServiceSettings). */ public static final MetadataServiceClient create(MetadataServiceStub stub) { return new MetadataServiceClient(stub); } /** * Constructs an instance of MetadataServiceClient, 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 MetadataServiceClient(MetadataServiceSettings settings) throws IOException { this.settings = settings; this.stub = ((MetadataServiceStubSettings) settings.getStubSettings()).createStub(); this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); } protected MetadataServiceClient(MetadataServiceStub stub) { this.settings = null; this.stub = stub; this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); } public final MetadataServiceSettings getSettings() { return settings; } public MetadataServiceStub getStub() { return stub; } /** * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ public final OperationsClient getOperationsClient() { return operationsClient; } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initializes a MetadataStore, including allocation of resources. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   *   MetadataStore metadataStore = MetadataStore.newBuilder().build();
   *   String metadataStoreId = "metadataStoreId-1811789907";
   *   MetadataStore response =
   *       metadataServiceClient
   *           .createMetadataStoreAsync(parent, metadataStore, metadataStoreId)
   *           .get();
   * }
   * }
* * @param parent Required. The resource name of the Location where the MetadataStore should be * created. Format: `projects/{project}/locations/{location}/` * @param metadataStore Required. The MetadataStore to create. * @param metadataStoreId The {metadatastore} portion of the resource name with the format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` If not provided, * the MetadataStore's ID will be a UUID generated by the service. Must be 4-128 characters in * length. Valid characters are `/[a-z][0-9]-/`. Must be unique across all MetadataStores in * the parent Location. (Otherwise the request will fail with ALREADY_EXISTS, or * PERMISSION_DENIED if the caller can't view the preexisting MetadataStore.) * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createMetadataStoreAsync( LocationName parent, MetadataStore metadataStore, String metadataStoreId) { CreateMetadataStoreRequest request = CreateMetadataStoreRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setMetadataStore(metadataStore) .setMetadataStoreId(metadataStoreId) .build(); return createMetadataStoreAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initializes a MetadataStore, including allocation of resources. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   *   MetadataStore metadataStore = MetadataStore.newBuilder().build();
   *   String metadataStoreId = "metadataStoreId-1811789907";
   *   MetadataStore response =
   *       metadataServiceClient
   *           .createMetadataStoreAsync(parent, metadataStore, metadataStoreId)
   *           .get();
   * }
   * }
* * @param parent Required. The resource name of the Location where the MetadataStore should be * created. Format: `projects/{project}/locations/{location}/` * @param metadataStore Required. The MetadataStore to create. * @param metadataStoreId The {metadatastore} portion of the resource name with the format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` If not provided, * the MetadataStore's ID will be a UUID generated by the service. Must be 4-128 characters in * length. Valid characters are `/[a-z][0-9]-/`. Must be unique across all MetadataStores in * the parent Location. (Otherwise the request will fail with ALREADY_EXISTS, or * PERMISSION_DENIED if the caller can't view the preexisting MetadataStore.) * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createMetadataStoreAsync(String parent, MetadataStore metadataStore, String metadataStoreId) { CreateMetadataStoreRequest request = CreateMetadataStoreRequest.newBuilder() .setParent(parent) .setMetadataStore(metadataStore) .setMetadataStoreId(metadataStoreId) .build(); return createMetadataStoreAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initializes a MetadataStore, including allocation of resources. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   CreateMetadataStoreRequest request =
   *       CreateMetadataStoreRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setMetadataStore(MetadataStore.newBuilder().build())
   *           .setMetadataStoreId("metadataStoreId-1811789907")
   *           .build();
   *   MetadataStore response = metadataServiceClient.createMetadataStoreAsync(request).get();
   * }
   * }
* * @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 OperationFuture createMetadataStoreAsync(CreateMetadataStoreRequest request) { return createMetadataStoreOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initializes a MetadataStore, including allocation of resources. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   CreateMetadataStoreRequest request =
   *       CreateMetadataStoreRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setMetadataStore(MetadataStore.newBuilder().build())
   *           .setMetadataStoreId("metadataStoreId-1811789907")
   *           .build();
   *   OperationFuture future =
   *       metadataServiceClient.createMetadataStoreOperationCallable().futureCall(request);
   *   // Do something.
   *   MetadataStore response = future.get();
   * }
   * }
*/ public final OperationCallable< CreateMetadataStoreRequest, MetadataStore, CreateMetadataStoreOperationMetadata> createMetadataStoreOperationCallable() { return stub.createMetadataStoreOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initializes a MetadataStore, including allocation of resources. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   CreateMetadataStoreRequest request =
   *       CreateMetadataStoreRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setMetadataStore(MetadataStore.newBuilder().build())
   *           .setMetadataStoreId("metadataStoreId-1811789907")
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.createMetadataStoreCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable createMetadataStoreCallable() { return stub.createMetadataStoreCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves a specific MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   MetadataStoreName name = MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
   *   MetadataStore response = metadataServiceClient.getMetadataStore(name);
   * }
   * }
* * @param name Required. The resource name of the MetadataStore to retrieve. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final MetadataStore getMetadataStore(MetadataStoreName name) { GetMetadataStoreRequest request = GetMetadataStoreRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getMetadataStore(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves a specific MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String name = MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString();
   *   MetadataStore response = metadataServiceClient.getMetadataStore(name);
   * }
   * }
* * @param name Required. The resource name of the MetadataStore to retrieve. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final MetadataStore getMetadataStore(String name) { GetMetadataStoreRequest request = GetMetadataStoreRequest.newBuilder().setName(name).build(); return getMetadataStore(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves a specific MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   GetMetadataStoreRequest request =
   *       GetMetadataStoreRequest.newBuilder()
   *           .setName(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .build();
   *   MetadataStore response = metadataServiceClient.getMetadataStore(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 MetadataStore getMetadataStore(GetMetadataStoreRequest request) { return getMetadataStoreCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves a specific MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   GetMetadataStoreRequest request =
   *       GetMetadataStoreRequest.newBuilder()
   *           .setName(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.getMetadataStoreCallable().futureCall(request);
   *   // Do something.
   *   MetadataStore response = future.get();
   * }
   * }
*/ public final UnaryCallable getMetadataStoreCallable() { return stub.getMetadataStoreCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists MetadataStores for 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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   *   for (MetadataStore element : metadataServiceClient.listMetadataStores(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The Location whose MetadataStores should be listed. Format: * `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListMetadataStoresPagedResponse listMetadataStores(LocationName parent) { ListMetadataStoresRequest request = ListMetadataStoresRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listMetadataStores(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists MetadataStores for 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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   *   for (MetadataStore element : metadataServiceClient.listMetadataStores(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The Location whose MetadataStores should be listed. Format: * `projects/{project}/locations/{location}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListMetadataStoresPagedResponse listMetadataStores(String parent) { ListMetadataStoresRequest request = ListMetadataStoresRequest.newBuilder().setParent(parent).build(); return listMetadataStores(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists MetadataStores for 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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ListMetadataStoresRequest request =
   *       ListMetadataStoresRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .build();
   *   for (MetadataStore element : metadataServiceClient.listMetadataStores(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 ListMetadataStoresPagedResponse listMetadataStores( ListMetadataStoresRequest request) { return listMetadataStoresPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists MetadataStores for 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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ListMetadataStoresRequest request =
   *       ListMetadataStoresRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.listMetadataStoresPagedCallable().futureCall(request);
   *   // Do something.
   *   for (MetadataStore element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listMetadataStoresPagedCallable() { return stub.listMetadataStoresPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists MetadataStores for 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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ListMetadataStoresRequest request =
   *       ListMetadataStoresRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .build();
   *   while (true) {
   *     ListMetadataStoresResponse response =
   *         metadataServiceClient.listMetadataStoresCallable().call(request);
   *     for (MetadataStore element : response.getMetadataStoresList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listMetadataStoresCallable() { return stub.listMetadataStoresCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single MetadataStore and all its child resources (Artifacts, Executions, and * Contexts). * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   MetadataStoreName name = MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
   *   metadataServiceClient.deleteMetadataStoreAsync(name).get();
   * }
   * }
* * @param name Required. The resource name of the MetadataStore to delete. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteMetadataStoreAsync(MetadataStoreName name) { DeleteMetadataStoreRequest request = DeleteMetadataStoreRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return deleteMetadataStoreAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single MetadataStore and all its child resources (Artifacts, Executions, and * Contexts). * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String name = MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString();
   *   metadataServiceClient.deleteMetadataStoreAsync(name).get();
   * }
   * }
* * @param name Required. The resource name of the MetadataStore to delete. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteMetadataStoreAsync(String name) { DeleteMetadataStoreRequest request = DeleteMetadataStoreRequest.newBuilder().setName(name).build(); return deleteMetadataStoreAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single MetadataStore and all its child resources (Artifacts, Executions, and * Contexts). * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   DeleteMetadataStoreRequest request =
   *       DeleteMetadataStoreRequest.newBuilder()
   *           .setName(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setForce(true)
   *           .build();
   *   metadataServiceClient.deleteMetadataStoreAsync(request).get();
   * }
   * }
* * @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 OperationFuture deleteMetadataStoreAsync(DeleteMetadataStoreRequest request) { return deleteMetadataStoreOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single MetadataStore and all its child resources (Artifacts, Executions, and * Contexts). * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   DeleteMetadataStoreRequest request =
   *       DeleteMetadataStoreRequest.newBuilder()
   *           .setName(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setForce(true)
   *           .build();
   *   OperationFuture future =
   *       metadataServiceClient.deleteMetadataStoreOperationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final OperationCallable< DeleteMetadataStoreRequest, Empty, DeleteMetadataStoreOperationMetadata> deleteMetadataStoreOperationCallable() { return stub.deleteMetadataStoreOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single MetadataStore and all its child resources (Artifacts, Executions, and * Contexts). * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   DeleteMetadataStoreRequest request =
   *       DeleteMetadataStoreRequest.newBuilder()
   *           .setName(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setForce(true)
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.deleteMetadataStoreCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteMetadataStoreCallable() { return stub.deleteMetadataStoreCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an Artifact associated with a MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   MetadataStoreName parent =
   *       MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
   *   Artifact artifact = Artifact.newBuilder().build();
   *   String artifactId = "artifactId240640653";
   *   Artifact response = metadataServiceClient.createArtifact(parent, artifact, artifactId);
   * }
   * }
* * @param parent Required. The resource name of the MetadataStore where the Artifact should be * created. Format: `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @param artifact Required. The Artifact to create. * @param artifactId The {artifact} portion of the resource name with the format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` * If not provided, the Artifact's ID will be a UUID generated by the service. Must be 4-128 * characters in length. Valid characters are `/[a-z][0-9]-/`. Must be unique across all * Artifacts in the parent MetadataStore. (Otherwise the request will fail with * ALREADY_EXISTS, or PERMISSION_DENIED if the caller can't view the preexisting Artifact.) * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Artifact createArtifact( MetadataStoreName parent, Artifact artifact, String artifactId) { CreateArtifactRequest request = CreateArtifactRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setArtifact(artifact) .setArtifactId(artifactId) .build(); return createArtifact(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an Artifact associated with a MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String parent =
   *       MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString();
   *   Artifact artifact = Artifact.newBuilder().build();
   *   String artifactId = "artifactId240640653";
   *   Artifact response = metadataServiceClient.createArtifact(parent, artifact, artifactId);
   * }
   * }
* * @param parent Required. The resource name of the MetadataStore where the Artifact should be * created. Format: `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @param artifact Required. The Artifact to create. * @param artifactId The {artifact} portion of the resource name with the format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` * If not provided, the Artifact's ID will be a UUID generated by the service. Must be 4-128 * characters in length. Valid characters are `/[a-z][0-9]-/`. Must be unique across all * Artifacts in the parent MetadataStore. (Otherwise the request will fail with * ALREADY_EXISTS, or PERMISSION_DENIED if the caller can't view the preexisting Artifact.) * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Artifact createArtifact(String parent, Artifact artifact, String artifactId) { CreateArtifactRequest request = CreateArtifactRequest.newBuilder() .setParent(parent) .setArtifact(artifact) .setArtifactId(artifactId) .build(); return createArtifact(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an Artifact associated with a MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   CreateArtifactRequest request =
   *       CreateArtifactRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setArtifact(Artifact.newBuilder().build())
   *           .setArtifactId("artifactId240640653")
   *           .build();
   *   Artifact response = metadataServiceClient.createArtifact(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 Artifact createArtifact(CreateArtifactRequest request) { return createArtifactCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an Artifact associated with a MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   CreateArtifactRequest request =
   *       CreateArtifactRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setArtifact(Artifact.newBuilder().build())
   *           .setArtifactId("artifactId240640653")
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.createArtifactCallable().futureCall(request);
   *   // Do something.
   *   Artifact response = future.get();
   * }
   * }
*/ public final UnaryCallable createArtifactCallable() { return stub.createArtifactCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves a specific Artifact. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ArtifactName name =
   *       ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]");
   *   Artifact response = metadataServiceClient.getArtifact(name);
   * }
   * }
* * @param name Required. The resource name of the Artifact to retrieve. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Artifact getArtifact(ArtifactName name) { GetArtifactRequest request = GetArtifactRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getArtifact(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves a specific Artifact. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String name =
   *       ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]").toString();
   *   Artifact response = metadataServiceClient.getArtifact(name);
   * }
   * }
* * @param name Required. The resource name of the Artifact to retrieve. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Artifact getArtifact(String name) { GetArtifactRequest request = GetArtifactRequest.newBuilder().setName(name).build(); return getArtifact(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves a specific Artifact. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   GetArtifactRequest request =
   *       GetArtifactRequest.newBuilder()
   *           .setName(
   *               ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]")
   *                   .toString())
   *           .build();
   *   Artifact response = metadataServiceClient.getArtifact(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 Artifact getArtifact(GetArtifactRequest request) { return getArtifactCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves a specific Artifact. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   GetArtifactRequest request =
   *       GetArtifactRequest.newBuilder()
   *           .setName(
   *               ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]")
   *                   .toString())
   *           .build();
   *   ApiFuture future = metadataServiceClient.getArtifactCallable().futureCall(request);
   *   // Do something.
   *   Artifact response = future.get();
   * }
   * }
*/ public final UnaryCallable getArtifactCallable() { return stub.getArtifactCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Artifacts in the MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   MetadataStoreName parent =
   *       MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
   *   for (Artifact element : metadataServiceClient.listArtifacts(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The MetadataStore whose Artifacts should be listed. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListArtifactsPagedResponse listArtifacts(MetadataStoreName parent) { ListArtifactsRequest request = ListArtifactsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listArtifacts(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Artifacts in the MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String parent =
   *       MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString();
   *   for (Artifact element : metadataServiceClient.listArtifacts(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The MetadataStore whose Artifacts should be listed. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListArtifactsPagedResponse listArtifacts(String parent) { ListArtifactsRequest request = ListArtifactsRequest.newBuilder().setParent(parent).build(); return listArtifacts(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Artifacts in the MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ListArtifactsRequest request =
   *       ListArtifactsRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   for (Artifact element : metadataServiceClient.listArtifacts(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 ListArtifactsPagedResponse listArtifacts(ListArtifactsRequest request) { return listArtifactsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Artifacts in the MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ListArtifactsRequest request =
   *       ListArtifactsRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.listArtifactsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (Artifact element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listArtifactsPagedCallable() { return stub.listArtifactsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Artifacts in the MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ListArtifactsRequest request =
   *       ListArtifactsRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   while (true) {
   *     ListArtifactsResponse response =
   *         metadataServiceClient.listArtifactsCallable().call(request);
   *     for (Artifact element : response.getArtifactsList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listArtifactsCallable() { return stub.listArtifactsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a stored Artifact. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   Artifact artifact = Artifact.newBuilder().build();
   *   FieldMask updateMask = FieldMask.newBuilder().build();
   *   Artifact response = metadataServiceClient.updateArtifact(artifact, updateMask);
   * }
   * }
* * @param artifact Required. The Artifact containing updates. The Artifact's * [Artifact.name][google.cloud.aiplatform.v1beta1.Artifact.name] field is used to identify * the Artifact to be updated. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` * @param updateMask Optional. A FieldMask indicating which fields should be updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Artifact updateArtifact(Artifact artifact, FieldMask updateMask) { UpdateArtifactRequest request = UpdateArtifactRequest.newBuilder().setArtifact(artifact).setUpdateMask(updateMask).build(); return updateArtifact(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a stored Artifact. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   UpdateArtifactRequest request =
   *       UpdateArtifactRequest.newBuilder()
   *           .setArtifact(Artifact.newBuilder().build())
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setAllowMissing(true)
   *           .build();
   *   Artifact response = metadataServiceClient.updateArtifact(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 Artifact updateArtifact(UpdateArtifactRequest request) { return updateArtifactCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a stored Artifact. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   UpdateArtifactRequest request =
   *       UpdateArtifactRequest.newBuilder()
   *           .setArtifact(Artifact.newBuilder().build())
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setAllowMissing(true)
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.updateArtifactCallable().futureCall(request);
   *   // Do something.
   *   Artifact response = future.get();
   * }
   * }
*/ public final UnaryCallable updateArtifactCallable() { return stub.updateArtifactCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an Artifact. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ArtifactName name =
   *       ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]");
   *   metadataServiceClient.deleteArtifactAsync(name).get();
   * }
   * }
* * @param name Required. The resource name of the Artifact to delete. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteArtifactAsync( ArtifactName name) { DeleteArtifactRequest request = DeleteArtifactRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return deleteArtifactAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an Artifact. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String name =
   *       ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]").toString();
   *   metadataServiceClient.deleteArtifactAsync(name).get();
   * }
   * }
* * @param name Required. The resource name of the Artifact to delete. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteArtifactAsync(String name) { DeleteArtifactRequest request = DeleteArtifactRequest.newBuilder().setName(name).build(); return deleteArtifactAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an Artifact. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   DeleteArtifactRequest request =
   *       DeleteArtifactRequest.newBuilder()
   *           .setName(
   *               ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]")
   *                   .toString())
   *           .setEtag("etag3123477")
   *           .build();
   *   metadataServiceClient.deleteArtifactAsync(request).get();
   * }
   * }
* * @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 OperationFuture deleteArtifactAsync( DeleteArtifactRequest request) { return deleteArtifactOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an Artifact. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   DeleteArtifactRequest request =
   *       DeleteArtifactRequest.newBuilder()
   *           .setName(
   *               ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]")
   *                   .toString())
   *           .setEtag("etag3123477")
   *           .build();
   *   OperationFuture future =
   *       metadataServiceClient.deleteArtifactOperationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final OperationCallable deleteArtifactOperationCallable() { return stub.deleteArtifactOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an Artifact. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   DeleteArtifactRequest request =
   *       DeleteArtifactRequest.newBuilder()
   *           .setName(
   *               ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]")
   *                   .toString())
   *           .setEtag("etag3123477")
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.deleteArtifactCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteArtifactCallable() { return stub.deleteArtifactCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Purges Artifacts. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   MetadataStoreName parent =
   *       MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
   *   PurgeArtifactsResponse response = metadataServiceClient.purgeArtifactsAsync(parent).get();
   * }
   * }
* * @param parent Required. The metadata store to purge Artifacts from. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture purgeArtifactsAsync( MetadataStoreName parent) { PurgeArtifactsRequest request = PurgeArtifactsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return purgeArtifactsAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Purges Artifacts. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String parent =
   *       MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString();
   *   PurgeArtifactsResponse response = metadataServiceClient.purgeArtifactsAsync(parent).get();
   * }
   * }
* * @param parent Required. The metadata store to purge Artifacts from. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture purgeArtifactsAsync( String parent) { PurgeArtifactsRequest request = PurgeArtifactsRequest.newBuilder().setParent(parent).build(); return purgeArtifactsAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Purges Artifacts. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   PurgeArtifactsRequest request =
   *       PurgeArtifactsRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setFilter("filter-1274492040")
   *           .setForce(true)
   *           .build();
   *   PurgeArtifactsResponse response = metadataServiceClient.purgeArtifactsAsync(request).get();
   * }
   * }
* * @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 OperationFuture purgeArtifactsAsync( PurgeArtifactsRequest request) { return purgeArtifactsOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Purges Artifacts. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   PurgeArtifactsRequest request =
   *       PurgeArtifactsRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setFilter("filter-1274492040")
   *           .setForce(true)
   *           .build();
   *   OperationFuture future =
   *       metadataServiceClient.purgeArtifactsOperationCallable().futureCall(request);
   *   // Do something.
   *   PurgeArtifactsResponse response = future.get();
   * }
   * }
*/ public final OperationCallable< PurgeArtifactsRequest, PurgeArtifactsResponse, PurgeArtifactsMetadata> purgeArtifactsOperationCallable() { return stub.purgeArtifactsOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Purges Artifacts. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   PurgeArtifactsRequest request =
   *       PurgeArtifactsRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setFilter("filter-1274492040")
   *           .setForce(true)
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.purgeArtifactsCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable purgeArtifactsCallable() { return stub.purgeArtifactsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a Context associated with a MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   MetadataStoreName parent =
   *       MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
   *   Context context = Context.newBuilder().build();
   *   String contextId = "contextId-406810838";
   *   Context response = metadataServiceClient.createContext(parent, context, contextId);
   * }
   * }
* * @param parent Required. The resource name of the MetadataStore where the Context should be * created. Format: `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @param context Required. The Context to create. * @param contextId The {context} portion of the resource name with the format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`. * If not provided, the Context's ID will be a UUID generated by the service. Must be 4-128 * characters in length. Valid characters are `/[a-z][0-9]-/`. Must be unique across all * Contexts in the parent MetadataStore. (Otherwise the request will fail with ALREADY_EXISTS, * or PERMISSION_DENIED if the caller can't view the preexisting Context.) * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Context createContext(MetadataStoreName parent, Context context, String contextId) { CreateContextRequest request = CreateContextRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setContext(context) .setContextId(contextId) .build(); return createContext(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a Context associated with a MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String parent =
   *       MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString();
   *   Context context = Context.newBuilder().build();
   *   String contextId = "contextId-406810838";
   *   Context response = metadataServiceClient.createContext(parent, context, contextId);
   * }
   * }
* * @param parent Required. The resource name of the MetadataStore where the Context should be * created. Format: `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @param context Required. The Context to create. * @param contextId The {context} portion of the resource name with the format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`. * If not provided, the Context's ID will be a UUID generated by the service. Must be 4-128 * characters in length. Valid characters are `/[a-z][0-9]-/`. Must be unique across all * Contexts in the parent MetadataStore. (Otherwise the request will fail with ALREADY_EXISTS, * or PERMISSION_DENIED if the caller can't view the preexisting Context.) * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Context createContext(String parent, Context context, String contextId) { CreateContextRequest request = CreateContextRequest.newBuilder() .setParent(parent) .setContext(context) .setContextId(contextId) .build(); return createContext(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a Context associated with a MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   CreateContextRequest request =
   *       CreateContextRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setContext(Context.newBuilder().build())
   *           .setContextId("contextId-406810838")
   *           .build();
   *   Context response = metadataServiceClient.createContext(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 Context createContext(CreateContextRequest request) { return createContextCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a Context associated with a MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   CreateContextRequest request =
   *       CreateContextRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setContext(Context.newBuilder().build())
   *           .setContextId("contextId-406810838")
   *           .build();
   *   ApiFuture future = metadataServiceClient.createContextCallable().futureCall(request);
   *   // Do something.
   *   Context response = future.get();
   * }
   * }
*/ public final UnaryCallable createContextCallable() { return stub.createContextCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves a specific Context. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ContextName name = ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]");
   *   Context response = metadataServiceClient.getContext(name);
   * }
   * }
* * @param name Required. The resource name of the Context to retrieve. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Context getContext(ContextName name) { GetContextRequest request = GetContextRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getContext(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves a specific Context. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String name =
   *       ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]").toString();
   *   Context response = metadataServiceClient.getContext(name);
   * }
   * }
* * @param name Required. The resource name of the Context to retrieve. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Context getContext(String name) { GetContextRequest request = GetContextRequest.newBuilder().setName(name).build(); return getContext(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves a specific Context. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   GetContextRequest request =
   *       GetContextRequest.newBuilder()
   *           .setName(
   *               ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
   *                   .toString())
   *           .build();
   *   Context response = metadataServiceClient.getContext(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 Context getContext(GetContextRequest request) { return getContextCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves a specific Context. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   GetContextRequest request =
   *       GetContextRequest.newBuilder()
   *           .setName(
   *               ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
   *                   .toString())
   *           .build();
   *   ApiFuture future = metadataServiceClient.getContextCallable().futureCall(request);
   *   // Do something.
   *   Context response = future.get();
   * }
   * }
*/ public final UnaryCallable getContextCallable() { return stub.getContextCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Contexts on the MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   MetadataStoreName parent =
   *       MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
   *   for (Context element : metadataServiceClient.listContexts(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The MetadataStore whose Contexts should be listed. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListContextsPagedResponse listContexts(MetadataStoreName parent) { ListContextsRequest request = ListContextsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listContexts(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Contexts on the MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String parent =
   *       MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString();
   *   for (Context element : metadataServiceClient.listContexts(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The MetadataStore whose Contexts should be listed. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListContextsPagedResponse listContexts(String parent) { ListContextsRequest request = ListContextsRequest.newBuilder().setParent(parent).build(); return listContexts(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Contexts on the MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ListContextsRequest request =
   *       ListContextsRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   for (Context element : metadataServiceClient.listContexts(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 ListContextsPagedResponse listContexts(ListContextsRequest request) { return listContextsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Contexts on the MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ListContextsRequest request =
   *       ListContextsRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.listContextsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (Context element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listContextsPagedCallable() { return stub.listContextsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Contexts on the MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ListContextsRequest request =
   *       ListContextsRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   while (true) {
   *     ListContextsResponse response = metadataServiceClient.listContextsCallable().call(request);
   *     for (Context element : response.getContextsList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listContextsCallable() { return stub.listContextsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a stored Context. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   Context context = Context.newBuilder().build();
   *   FieldMask updateMask = FieldMask.newBuilder().build();
   *   Context response = metadataServiceClient.updateContext(context, updateMask);
   * }
   * }
* * @param context Required. The Context containing updates. The Context's * [Context.name][google.cloud.aiplatform.v1beta1.Context.name] field is used to identify the * Context to be updated. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` * @param updateMask Optional. A FieldMask indicating which fields should be updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Context updateContext(Context context, FieldMask updateMask) { UpdateContextRequest request = UpdateContextRequest.newBuilder().setContext(context).setUpdateMask(updateMask).build(); return updateContext(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a stored Context. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   UpdateContextRequest request =
   *       UpdateContextRequest.newBuilder()
   *           .setContext(Context.newBuilder().build())
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setAllowMissing(true)
   *           .build();
   *   Context response = metadataServiceClient.updateContext(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 Context updateContext(UpdateContextRequest request) { return updateContextCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a stored Context. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   UpdateContextRequest request =
   *       UpdateContextRequest.newBuilder()
   *           .setContext(Context.newBuilder().build())
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setAllowMissing(true)
   *           .build();
   *   ApiFuture future = metadataServiceClient.updateContextCallable().futureCall(request);
   *   // Do something.
   *   Context response = future.get();
   * }
   * }
*/ public final UnaryCallable updateContextCallable() { return stub.updateContextCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a stored Context. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ContextName name = ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]");
   *   metadataServiceClient.deleteContextAsync(name).get();
   * }
   * }
* * @param name Required. The resource name of the Context to delete. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteContextAsync( ContextName name) { DeleteContextRequest request = DeleteContextRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return deleteContextAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a stored Context. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String name =
   *       ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]").toString();
   *   metadataServiceClient.deleteContextAsync(name).get();
   * }
   * }
* * @param name Required. The resource name of the Context to delete. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteContextAsync(String name) { DeleteContextRequest request = DeleteContextRequest.newBuilder().setName(name).build(); return deleteContextAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a stored Context. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   DeleteContextRequest request =
   *       DeleteContextRequest.newBuilder()
   *           .setName(
   *               ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
   *                   .toString())
   *           .setForce(true)
   *           .setEtag("etag3123477")
   *           .build();
   *   metadataServiceClient.deleteContextAsync(request).get();
   * }
   * }
* * @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 OperationFuture deleteContextAsync( DeleteContextRequest request) { return deleteContextOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a stored Context. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   DeleteContextRequest request =
   *       DeleteContextRequest.newBuilder()
   *           .setName(
   *               ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
   *                   .toString())
   *           .setForce(true)
   *           .setEtag("etag3123477")
   *           .build();
   *   OperationFuture future =
   *       metadataServiceClient.deleteContextOperationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final OperationCallable deleteContextOperationCallable() { return stub.deleteContextOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a stored Context. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   DeleteContextRequest request =
   *       DeleteContextRequest.newBuilder()
   *           .setName(
   *               ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
   *                   .toString())
   *           .setForce(true)
   *           .setEtag("etag3123477")
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.deleteContextCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteContextCallable() { return stub.deleteContextCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Purges Contexts. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   MetadataStoreName parent =
   *       MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
   *   PurgeContextsResponse response = metadataServiceClient.purgeContextsAsync(parent).get();
   * }
   * }
* * @param parent Required. The metadata store to purge Contexts from. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture purgeContextsAsync( MetadataStoreName parent) { PurgeContextsRequest request = PurgeContextsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return purgeContextsAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Purges Contexts. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String parent =
   *       MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString();
   *   PurgeContextsResponse response = metadataServiceClient.purgeContextsAsync(parent).get();
   * }
   * }
* * @param parent Required. The metadata store to purge Contexts from. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture purgeContextsAsync( String parent) { PurgeContextsRequest request = PurgeContextsRequest.newBuilder().setParent(parent).build(); return purgeContextsAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Purges Contexts. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   PurgeContextsRequest request =
   *       PurgeContextsRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setFilter("filter-1274492040")
   *           .setForce(true)
   *           .build();
   *   PurgeContextsResponse response = metadataServiceClient.purgeContextsAsync(request).get();
   * }
   * }
* * @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 OperationFuture purgeContextsAsync( PurgeContextsRequest request) { return purgeContextsOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Purges Contexts. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   PurgeContextsRequest request =
   *       PurgeContextsRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setFilter("filter-1274492040")
   *           .setForce(true)
   *           .build();
   *   OperationFuture future =
   *       metadataServiceClient.purgeContextsOperationCallable().futureCall(request);
   *   // Do something.
   *   PurgeContextsResponse response = future.get();
   * }
   * }
*/ public final OperationCallable purgeContextsOperationCallable() { return stub.purgeContextsOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Purges Contexts. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   PurgeContextsRequest request =
   *       PurgeContextsRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setFilter("filter-1274492040")
   *           .setForce(true)
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.purgeContextsCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable purgeContextsCallable() { return stub.purgeContextsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds a set of Artifacts and Executions to a Context. If any of the Artifacts or Executions have * already been added to a Context, they are simply skipped. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ContextName context =
   *       ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]");
   *   List artifacts = new ArrayList<>();
   *   List executions = new ArrayList<>();
   *   AddContextArtifactsAndExecutionsResponse response =
   *       metadataServiceClient.addContextArtifactsAndExecutions(context, artifacts, executions);
   * }
   * }
* * @param context Required. The resource name of the Context that the Artifacts and Executions * belong to. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` * @param artifacts The resource names of the Artifacts to attribute to the Context. *

Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` * @param executions The resource names of the Executions to associate with the Context. *

Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AddContextArtifactsAndExecutionsResponse addContextArtifactsAndExecutions( ContextName context, List artifacts, List executions) { AddContextArtifactsAndExecutionsRequest request = AddContextArtifactsAndExecutionsRequest.newBuilder() .setContext(context == null ? null : context.toString()) .addAllArtifacts(artifacts) .addAllExecutions(executions) .build(); return addContextArtifactsAndExecutions(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds a set of Artifacts and Executions to a Context. If any of the Artifacts or Executions have * already been added to a Context, they are simply skipped. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String context =
   *       ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]").toString();
   *   List artifacts = new ArrayList<>();
   *   List executions = new ArrayList<>();
   *   AddContextArtifactsAndExecutionsResponse response =
   *       metadataServiceClient.addContextArtifactsAndExecutions(context, artifacts, executions);
   * }
   * }
* * @param context Required. The resource name of the Context that the Artifacts and Executions * belong to. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` * @param artifacts The resource names of the Artifacts to attribute to the Context. *

Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` * @param executions The resource names of the Executions to associate with the Context. *

Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AddContextArtifactsAndExecutionsResponse addContextArtifactsAndExecutions( String context, List artifacts, List executions) { AddContextArtifactsAndExecutionsRequest request = AddContextArtifactsAndExecutionsRequest.newBuilder() .setContext(context) .addAllArtifacts(artifacts) .addAllExecutions(executions) .build(); return addContextArtifactsAndExecutions(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds a set of Artifacts and Executions to a Context. If any of the Artifacts or Executions have * already been added to a Context, they are simply skipped. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   AddContextArtifactsAndExecutionsRequest request =
   *       AddContextArtifactsAndExecutionsRequest.newBuilder()
   *           .setContext(
   *               ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
   *                   .toString())
   *           .addAllArtifacts(new ArrayList())
   *           .addAllExecutions(new ArrayList())
   *           .build();
   *   AddContextArtifactsAndExecutionsResponse response =
   *       metadataServiceClient.addContextArtifactsAndExecutions(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 AddContextArtifactsAndExecutionsResponse addContextArtifactsAndExecutions( AddContextArtifactsAndExecutionsRequest request) { return addContextArtifactsAndExecutionsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds a set of Artifacts and Executions to a Context. If any of the Artifacts or Executions have * already been added to a Context, they are simply skipped. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   AddContextArtifactsAndExecutionsRequest request =
   *       AddContextArtifactsAndExecutionsRequest.newBuilder()
   *           .setContext(
   *               ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
   *                   .toString())
   *           .addAllArtifacts(new ArrayList())
   *           .addAllExecutions(new ArrayList())
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.addContextArtifactsAndExecutionsCallable().futureCall(request);
   *   // Do something.
   *   AddContextArtifactsAndExecutionsResponse response = future.get();
   * }
   * }
*/ public final UnaryCallable< AddContextArtifactsAndExecutionsRequest, AddContextArtifactsAndExecutionsResponse> addContextArtifactsAndExecutionsCallable() { return stub.addContextArtifactsAndExecutionsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds a set of Contexts as children to a parent Context. If any of the child Contexts have * already been added to the parent Context, they are simply skipped. If this call would create a * cycle or cause any Context to have more than 10 parents, the request will fail with an * INVALID_ARGUMENT error. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ContextName context =
   *       ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]");
   *   List childContexts = new ArrayList<>();
   *   AddContextChildrenResponse response =
   *       metadataServiceClient.addContextChildren(context, childContexts);
   * }
   * }
* * @param context Required. The resource name of the parent Context. *

Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` * @param childContexts The resource names of the child Contexts. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AddContextChildrenResponse addContextChildren( ContextName context, List childContexts) { AddContextChildrenRequest request = AddContextChildrenRequest.newBuilder() .setContext(context == null ? null : context.toString()) .addAllChildContexts(childContexts) .build(); return addContextChildren(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds a set of Contexts as children to a parent Context. If any of the child Contexts have * already been added to the parent Context, they are simply skipped. If this call would create a * cycle or cause any Context to have more than 10 parents, the request will fail with an * INVALID_ARGUMENT error. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String context =
   *       ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]").toString();
   *   List childContexts = new ArrayList<>();
   *   AddContextChildrenResponse response =
   *       metadataServiceClient.addContextChildren(context, childContexts);
   * }
   * }
* * @param context Required. The resource name of the parent Context. *

Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` * @param childContexts The resource names of the child Contexts. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AddContextChildrenResponse addContextChildren( String context, List childContexts) { AddContextChildrenRequest request = AddContextChildrenRequest.newBuilder() .setContext(context) .addAllChildContexts(childContexts) .build(); return addContextChildren(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds a set of Contexts as children to a parent Context. If any of the child Contexts have * already been added to the parent Context, they are simply skipped. If this call would create a * cycle or cause any Context to have more than 10 parents, the request will fail with an * INVALID_ARGUMENT error. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   AddContextChildrenRequest request =
   *       AddContextChildrenRequest.newBuilder()
   *           .setContext(
   *               ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
   *                   .toString())
   *           .addAllChildContexts(new ArrayList())
   *           .build();
   *   AddContextChildrenResponse response = metadataServiceClient.addContextChildren(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 AddContextChildrenResponse addContextChildren(AddContextChildrenRequest request) { return addContextChildrenCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds a set of Contexts as children to a parent Context. If any of the child Contexts have * already been added to the parent Context, they are simply skipped. If this call would create a * cycle or cause any Context to have more than 10 parents, the request will fail with an * INVALID_ARGUMENT error. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   AddContextChildrenRequest request =
   *       AddContextChildrenRequest.newBuilder()
   *           .setContext(
   *               ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
   *                   .toString())
   *           .addAllChildContexts(new ArrayList())
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.addContextChildrenCallable().futureCall(request);
   *   // Do something.
   *   AddContextChildrenResponse response = future.get();
   * }
   * }
*/ public final UnaryCallable addContextChildrenCallable() { return stub.addContextChildrenCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Remove a set of children contexts from a parent Context. If any of the child Contexts were NOT * added to the parent Context, they are simply skipped. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ContextName context =
   *       ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]");
   *   List childContexts = new ArrayList<>();
   *   RemoveContextChildrenResponse response =
   *       metadataServiceClient.removeContextChildren(context, childContexts);
   * }
   * }
* * @param context Required. The resource name of the parent Context. *

Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` * @param childContexts The resource names of the child Contexts. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final RemoveContextChildrenResponse removeContextChildren( ContextName context, List childContexts) { RemoveContextChildrenRequest request = RemoveContextChildrenRequest.newBuilder() .setContext(context == null ? null : context.toString()) .addAllChildContexts(childContexts) .build(); return removeContextChildren(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Remove a set of children contexts from a parent Context. If any of the child Contexts were NOT * added to the parent Context, they are simply skipped. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String context =
   *       ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]").toString();
   *   List childContexts = new ArrayList<>();
   *   RemoveContextChildrenResponse response =
   *       metadataServiceClient.removeContextChildren(context, childContexts);
   * }
   * }
* * @param context Required. The resource name of the parent Context. *

Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` * @param childContexts The resource names of the child Contexts. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final RemoveContextChildrenResponse removeContextChildren( String context, List childContexts) { RemoveContextChildrenRequest request = RemoveContextChildrenRequest.newBuilder() .setContext(context) .addAllChildContexts(childContexts) .build(); return removeContextChildren(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Remove a set of children contexts from a parent Context. If any of the child Contexts were NOT * added to the parent Context, they are simply skipped. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   RemoveContextChildrenRequest request =
   *       RemoveContextChildrenRequest.newBuilder()
   *           .setContext(
   *               ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
   *                   .toString())
   *           .addAllChildContexts(new ArrayList())
   *           .build();
   *   RemoveContextChildrenResponse response = metadataServiceClient.removeContextChildren(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 RemoveContextChildrenResponse removeContextChildren( RemoveContextChildrenRequest request) { return removeContextChildrenCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Remove a set of children contexts from a parent Context. If any of the child Contexts were NOT * added to the parent Context, they are simply skipped. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   RemoveContextChildrenRequest request =
   *       RemoveContextChildrenRequest.newBuilder()
   *           .setContext(
   *               ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
   *                   .toString())
   *           .addAllChildContexts(new ArrayList())
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.removeContextChildrenCallable().futureCall(request);
   *   // Do something.
   *   RemoveContextChildrenResponse response = future.get();
   * }
   * }
*/ public final UnaryCallable removeContextChildrenCallable() { return stub.removeContextChildrenCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves Artifacts and Executions within the specified Context, connected by Event edges and * returned as a LineageSubgraph. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ContextName context =
   *       ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]");
   *   LineageSubgraph response = metadataServiceClient.queryContextLineageSubgraph(context);
   * }
   * }
* * @param context Required. The resource name of the Context whose Artifacts and Executions should * be retrieved as a LineageSubgraph. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` *

The request may error with FAILED_PRECONDITION if the number of Artifacts, the number of * Executions, or the number of Events that would be returned for the Context exceeds 1000. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LineageSubgraph queryContextLineageSubgraph(ContextName context) { QueryContextLineageSubgraphRequest request = QueryContextLineageSubgraphRequest.newBuilder() .setContext(context == null ? null : context.toString()) .build(); return queryContextLineageSubgraph(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves Artifacts and Executions within the specified Context, connected by Event edges and * returned as a LineageSubgraph. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String context =
   *       ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]").toString();
   *   LineageSubgraph response = metadataServiceClient.queryContextLineageSubgraph(context);
   * }
   * }
* * @param context Required. The resource name of the Context whose Artifacts and Executions should * be retrieved as a LineageSubgraph. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}` *

The request may error with FAILED_PRECONDITION if the number of Artifacts, the number of * Executions, or the number of Events that would be returned for the Context exceeds 1000. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LineageSubgraph queryContextLineageSubgraph(String context) { QueryContextLineageSubgraphRequest request = QueryContextLineageSubgraphRequest.newBuilder().setContext(context).build(); return queryContextLineageSubgraph(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves Artifacts and Executions within the specified Context, connected by Event edges and * returned as a LineageSubgraph. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   QueryContextLineageSubgraphRequest request =
   *       QueryContextLineageSubgraphRequest.newBuilder()
   *           .setContext(
   *               ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
   *                   .toString())
   *           .build();
   *   LineageSubgraph response = metadataServiceClient.queryContextLineageSubgraph(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 LineageSubgraph queryContextLineageSubgraph( QueryContextLineageSubgraphRequest request) { return queryContextLineageSubgraphCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves Artifacts and Executions within the specified Context, connected by Event edges and * returned as a LineageSubgraph. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   QueryContextLineageSubgraphRequest request =
   *       QueryContextLineageSubgraphRequest.newBuilder()
   *           .setContext(
   *               ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
   *                   .toString())
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.queryContextLineageSubgraphCallable().futureCall(request);
   *   // Do something.
   *   LineageSubgraph response = future.get();
   * }
   * }
*/ public final UnaryCallable queryContextLineageSubgraphCallable() { return stub.queryContextLineageSubgraphCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an Execution associated with a MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   MetadataStoreName parent =
   *       MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
   *   Execution execution = Execution.newBuilder().build();
   *   String executionId = "executionId-454906285";
   *   Execution response = metadataServiceClient.createExecution(parent, execution, executionId);
   * }
   * }
* * @param parent Required. The resource name of the MetadataStore where the Execution should be * created. Format: `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @param execution Required. The Execution to create. * @param executionId The {execution} portion of the resource name with the format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` * If not provided, the Execution's ID will be a UUID generated by the service. Must be 4-128 * characters in length. Valid characters are `/[a-z][0-9]-/`. Must be unique across all * Executions in the parent MetadataStore. (Otherwise the request will fail with * ALREADY_EXISTS, or PERMISSION_DENIED if the caller can't view the preexisting Execution.) * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Execution createExecution( MetadataStoreName parent, Execution execution, String executionId) { CreateExecutionRequest request = CreateExecutionRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setExecution(execution) .setExecutionId(executionId) .build(); return createExecution(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an Execution associated with a MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String parent =
   *       MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString();
   *   Execution execution = Execution.newBuilder().build();
   *   String executionId = "executionId-454906285";
   *   Execution response = metadataServiceClient.createExecution(parent, execution, executionId);
   * }
   * }
* * @param parent Required. The resource name of the MetadataStore where the Execution should be * created. Format: `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @param execution Required. The Execution to create. * @param executionId The {execution} portion of the resource name with the format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` * If not provided, the Execution's ID will be a UUID generated by the service. Must be 4-128 * characters in length. Valid characters are `/[a-z][0-9]-/`. Must be unique across all * Executions in the parent MetadataStore. (Otherwise the request will fail with * ALREADY_EXISTS, or PERMISSION_DENIED if the caller can't view the preexisting Execution.) * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Execution createExecution(String parent, Execution execution, String executionId) { CreateExecutionRequest request = CreateExecutionRequest.newBuilder() .setParent(parent) .setExecution(execution) .setExecutionId(executionId) .build(); return createExecution(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an Execution associated with a MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   CreateExecutionRequest request =
   *       CreateExecutionRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setExecution(Execution.newBuilder().build())
   *           .setExecutionId("executionId-454906285")
   *           .build();
   *   Execution response = metadataServiceClient.createExecution(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 Execution createExecution(CreateExecutionRequest request) { return createExecutionCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an Execution associated with a MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   CreateExecutionRequest request =
   *       CreateExecutionRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setExecution(Execution.newBuilder().build())
   *           .setExecutionId("executionId-454906285")
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.createExecutionCallable().futureCall(request);
   *   // Do something.
   *   Execution response = future.get();
   * }
   * }
*/ public final UnaryCallable createExecutionCallable() { return stub.createExecutionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves a specific Execution. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ExecutionName name =
   *       ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]");
   *   Execution response = metadataServiceClient.getExecution(name);
   * }
   * }
* * @param name Required. The resource name of the Execution to retrieve. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Execution getExecution(ExecutionName name) { GetExecutionRequest request = GetExecutionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getExecution(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves a specific Execution. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String name =
   *       ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]").toString();
   *   Execution response = metadataServiceClient.getExecution(name);
   * }
   * }
* * @param name Required. The resource name of the Execution to retrieve. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Execution getExecution(String name) { GetExecutionRequest request = GetExecutionRequest.newBuilder().setName(name).build(); return getExecution(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves a specific Execution. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   GetExecutionRequest request =
   *       GetExecutionRequest.newBuilder()
   *           .setName(
   *               ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
   *                   .toString())
   *           .build();
   *   Execution response = metadataServiceClient.getExecution(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 Execution getExecution(GetExecutionRequest request) { return getExecutionCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves a specific Execution. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   GetExecutionRequest request =
   *       GetExecutionRequest.newBuilder()
   *           .setName(
   *               ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
   *                   .toString())
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.getExecutionCallable().futureCall(request);
   *   // Do something.
   *   Execution response = future.get();
   * }
   * }
*/ public final UnaryCallable getExecutionCallable() { return stub.getExecutionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Executions in the MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   MetadataStoreName parent =
   *       MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
   *   for (Execution element : metadataServiceClient.listExecutions(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The MetadataStore whose Executions should be listed. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListExecutionsPagedResponse listExecutions(MetadataStoreName parent) { ListExecutionsRequest request = ListExecutionsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listExecutions(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Executions in the MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String parent =
   *       MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString();
   *   for (Execution element : metadataServiceClient.listExecutions(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The MetadataStore whose Executions should be listed. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListExecutionsPagedResponse listExecutions(String parent) { ListExecutionsRequest request = ListExecutionsRequest.newBuilder().setParent(parent).build(); return listExecutions(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Executions in the MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ListExecutionsRequest request =
   *       ListExecutionsRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   for (Execution element : metadataServiceClient.listExecutions(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 ListExecutionsPagedResponse listExecutions(ListExecutionsRequest request) { return listExecutionsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Executions in the MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ListExecutionsRequest request =
   *       ListExecutionsRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.listExecutionsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (Execution element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listExecutionsPagedCallable() { return stub.listExecutionsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Executions in the MetadataStore. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ListExecutionsRequest request =
   *       ListExecutionsRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   while (true) {
   *     ListExecutionsResponse response =
   *         metadataServiceClient.listExecutionsCallable().call(request);
   *     for (Execution element : response.getExecutionsList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listExecutionsCallable() { return stub.listExecutionsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a stored Execution. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   Execution execution = Execution.newBuilder().build();
   *   FieldMask updateMask = FieldMask.newBuilder().build();
   *   Execution response = metadataServiceClient.updateExecution(execution, updateMask);
   * }
   * }
* * @param execution Required. The Execution containing updates. The Execution's * [Execution.name][google.cloud.aiplatform.v1beta1.Execution.name] field is used to identify * the Execution to be updated. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` * @param updateMask Optional. A FieldMask indicating which fields should be updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Execution updateExecution(Execution execution, FieldMask updateMask) { UpdateExecutionRequest request = UpdateExecutionRequest.newBuilder() .setExecution(execution) .setUpdateMask(updateMask) .build(); return updateExecution(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a stored Execution. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   UpdateExecutionRequest request =
   *       UpdateExecutionRequest.newBuilder()
   *           .setExecution(Execution.newBuilder().build())
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setAllowMissing(true)
   *           .build();
   *   Execution response = metadataServiceClient.updateExecution(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 Execution updateExecution(UpdateExecutionRequest request) { return updateExecutionCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a stored Execution. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   UpdateExecutionRequest request =
   *       UpdateExecutionRequest.newBuilder()
   *           .setExecution(Execution.newBuilder().build())
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setAllowMissing(true)
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.updateExecutionCallable().futureCall(request);
   *   // Do something.
   *   Execution response = future.get();
   * }
   * }
*/ public final UnaryCallable updateExecutionCallable() { return stub.updateExecutionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an Execution. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ExecutionName name =
   *       ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]");
   *   metadataServiceClient.deleteExecutionAsync(name).get();
   * }
   * }
* * @param name Required. The resource name of the Execution to delete. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteExecutionAsync( ExecutionName name) { DeleteExecutionRequest request = DeleteExecutionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return deleteExecutionAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an Execution. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String name =
   *       ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]").toString();
   *   metadataServiceClient.deleteExecutionAsync(name).get();
   * }
   * }
* * @param name Required. The resource name of the Execution to delete. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteExecutionAsync(String name) { DeleteExecutionRequest request = DeleteExecutionRequest.newBuilder().setName(name).build(); return deleteExecutionAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an Execution. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   DeleteExecutionRequest request =
   *       DeleteExecutionRequest.newBuilder()
   *           .setName(
   *               ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
   *                   .toString())
   *           .setEtag("etag3123477")
   *           .build();
   *   metadataServiceClient.deleteExecutionAsync(request).get();
   * }
   * }
* * @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 OperationFuture deleteExecutionAsync( DeleteExecutionRequest request) { return deleteExecutionOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an Execution. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   DeleteExecutionRequest request =
   *       DeleteExecutionRequest.newBuilder()
   *           .setName(
   *               ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
   *                   .toString())
   *           .setEtag("etag3123477")
   *           .build();
   *   OperationFuture future =
   *       metadataServiceClient.deleteExecutionOperationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final OperationCallable deleteExecutionOperationCallable() { return stub.deleteExecutionOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an Execution. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   DeleteExecutionRequest request =
   *       DeleteExecutionRequest.newBuilder()
   *           .setName(
   *               ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
   *                   .toString())
   *           .setEtag("etag3123477")
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.deleteExecutionCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteExecutionCallable() { return stub.deleteExecutionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Purges Executions. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   MetadataStoreName parent =
   *       MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
   *   PurgeExecutionsResponse response = metadataServiceClient.purgeExecutionsAsync(parent).get();
   * }
   * }
* * @param parent Required. The metadata store to purge Executions from. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture purgeExecutionsAsync(MetadataStoreName parent) { PurgeExecutionsRequest request = PurgeExecutionsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return purgeExecutionsAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Purges Executions. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String parent =
   *       MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString();
   *   PurgeExecutionsResponse response = metadataServiceClient.purgeExecutionsAsync(parent).get();
   * }
   * }
* * @param parent Required. The metadata store to purge Executions from. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture purgeExecutionsAsync(String parent) { PurgeExecutionsRequest request = PurgeExecutionsRequest.newBuilder().setParent(parent).build(); return purgeExecutionsAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Purges Executions. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   PurgeExecutionsRequest request =
   *       PurgeExecutionsRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setFilter("filter-1274492040")
   *           .setForce(true)
   *           .build();
   *   PurgeExecutionsResponse response = metadataServiceClient.purgeExecutionsAsync(request).get();
   * }
   * }
* * @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 OperationFuture purgeExecutionsAsync(PurgeExecutionsRequest request) { return purgeExecutionsOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Purges Executions. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   PurgeExecutionsRequest request =
   *       PurgeExecutionsRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setFilter("filter-1274492040")
   *           .setForce(true)
   *           .build();
   *   OperationFuture future =
   *       metadataServiceClient.purgeExecutionsOperationCallable().futureCall(request);
   *   // Do something.
   *   PurgeExecutionsResponse response = future.get();
   * }
   * }
*/ public final OperationCallable< PurgeExecutionsRequest, PurgeExecutionsResponse, PurgeExecutionsMetadata> purgeExecutionsOperationCallable() { return stub.purgeExecutionsOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Purges Executions. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   PurgeExecutionsRequest request =
   *       PurgeExecutionsRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setFilter("filter-1274492040")
   *           .setForce(true)
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.purgeExecutionsCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable purgeExecutionsCallable() { return stub.purgeExecutionsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds Events to the specified Execution. An Event indicates whether an Artifact was used as an * input or output for an Execution. If an Event already exists between the Execution and the * Artifact, the Event is skipped. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ExecutionName execution =
   *       ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]");
   *   List events = new ArrayList<>();
   *   AddExecutionEventsResponse response =
   *       metadataServiceClient.addExecutionEvents(execution, events);
   * }
   * }
* * @param execution Required. The resource name of the Execution that the Events connect Artifacts * with. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` * @param events The Events to create and add. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AddExecutionEventsResponse addExecutionEvents( ExecutionName execution, List events) { AddExecutionEventsRequest request = AddExecutionEventsRequest.newBuilder() .setExecution(execution == null ? null : execution.toString()) .addAllEvents(events) .build(); return addExecutionEvents(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds Events to the specified Execution. An Event indicates whether an Artifact was used as an * input or output for an Execution. If an Event already exists between the Execution and the * Artifact, the Event is skipped. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String execution =
   *       ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]").toString();
   *   List events = new ArrayList<>();
   *   AddExecutionEventsResponse response =
   *       metadataServiceClient.addExecutionEvents(execution, events);
   * }
   * }
* * @param execution Required. The resource name of the Execution that the Events connect Artifacts * with. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` * @param events The Events to create and add. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AddExecutionEventsResponse addExecutionEvents(String execution, List events) { AddExecutionEventsRequest request = AddExecutionEventsRequest.newBuilder().setExecution(execution).addAllEvents(events).build(); return addExecutionEvents(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds Events to the specified Execution. An Event indicates whether an Artifact was used as an * input or output for an Execution. If an Event already exists between the Execution and the * Artifact, the Event is skipped. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   AddExecutionEventsRequest request =
   *       AddExecutionEventsRequest.newBuilder()
   *           .setExecution(
   *               ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
   *                   .toString())
   *           .addAllEvents(new ArrayList())
   *           .build();
   *   AddExecutionEventsResponse response = metadataServiceClient.addExecutionEvents(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 AddExecutionEventsResponse addExecutionEvents(AddExecutionEventsRequest request) { return addExecutionEventsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds Events to the specified Execution. An Event indicates whether an Artifact was used as an * input or output for an Execution. If an Event already exists between the Execution and the * Artifact, the Event is skipped. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   AddExecutionEventsRequest request =
   *       AddExecutionEventsRequest.newBuilder()
   *           .setExecution(
   *               ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
   *                   .toString())
   *           .addAllEvents(new ArrayList())
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.addExecutionEventsCallable().futureCall(request);
   *   // Do something.
   *   AddExecutionEventsResponse response = future.get();
   * }
   * }
*/ public final UnaryCallable addExecutionEventsCallable() { return stub.addExecutionEventsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Obtains the set of input and output Artifacts for this Execution, in the form of * LineageSubgraph that also contains the Execution and connecting Events. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ExecutionName execution =
   *       ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]");
   *   LineageSubgraph response = metadataServiceClient.queryExecutionInputsAndOutputs(execution);
   * }
   * }
* * @param execution Required. The resource name of the Execution whose input and output Artifacts * should be retrieved as a LineageSubgraph. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LineageSubgraph queryExecutionInputsAndOutputs(ExecutionName execution) { QueryExecutionInputsAndOutputsRequest request = QueryExecutionInputsAndOutputsRequest.newBuilder() .setExecution(execution == null ? null : execution.toString()) .build(); return queryExecutionInputsAndOutputs(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Obtains the set of input and output Artifacts for this Execution, in the form of * LineageSubgraph that also contains the Execution and connecting Events. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String execution =
   *       ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]").toString();
   *   LineageSubgraph response = metadataServiceClient.queryExecutionInputsAndOutputs(execution);
   * }
   * }
* * @param execution Required. The resource name of the Execution whose input and output Artifacts * should be retrieved as a LineageSubgraph. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LineageSubgraph queryExecutionInputsAndOutputs(String execution) { QueryExecutionInputsAndOutputsRequest request = QueryExecutionInputsAndOutputsRequest.newBuilder().setExecution(execution).build(); return queryExecutionInputsAndOutputs(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Obtains the set of input and output Artifacts for this Execution, in the form of * LineageSubgraph that also contains the Execution and connecting Events. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   QueryExecutionInputsAndOutputsRequest request =
   *       QueryExecutionInputsAndOutputsRequest.newBuilder()
   *           .setExecution(
   *               ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
   *                   .toString())
   *           .build();
   *   LineageSubgraph response = metadataServiceClient.queryExecutionInputsAndOutputs(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 LineageSubgraph queryExecutionInputsAndOutputs( QueryExecutionInputsAndOutputsRequest request) { return queryExecutionInputsAndOutputsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Obtains the set of input and output Artifacts for this Execution, in the form of * LineageSubgraph that also contains the Execution and connecting Events. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   QueryExecutionInputsAndOutputsRequest request =
   *       QueryExecutionInputsAndOutputsRequest.newBuilder()
   *           .setExecution(
   *               ExecutionName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]")
   *                   .toString())
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.queryExecutionInputsAndOutputsCallable().futureCall(request);
   *   // Do something.
   *   LineageSubgraph response = future.get();
   * }
   * }
*/ public final UnaryCallable queryExecutionInputsAndOutputsCallable() { return stub.queryExecutionInputsAndOutputsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a MetadataSchema. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   MetadataStoreName parent =
   *       MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
   *   MetadataSchema metadataSchema = MetadataSchema.newBuilder().build();
   *   String metadataSchemaId = "metadataSchemaId1549245163";
   *   MetadataSchema response =
   *       metadataServiceClient.createMetadataSchema(parent, metadataSchema, metadataSchemaId);
   * }
   * }
* * @param parent Required. The resource name of the MetadataStore where the MetadataSchema should * be created. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @param metadataSchema Required. The MetadataSchema to create. * @param metadataSchemaId The {metadata_schema} portion of the resource name with the format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}` * If not provided, the MetadataStore's ID will be a UUID generated by the service. Must be * 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`. Must be unique across all * MetadataSchemas in the parent Location. (Otherwise the request will fail with * ALREADY_EXISTS, or PERMISSION_DENIED if the caller can't view the preexisting * MetadataSchema.) * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final MetadataSchema createMetadataSchema( MetadataStoreName parent, MetadataSchema metadataSchema, String metadataSchemaId) { CreateMetadataSchemaRequest request = CreateMetadataSchemaRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setMetadataSchema(metadataSchema) .setMetadataSchemaId(metadataSchemaId) .build(); return createMetadataSchema(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a MetadataSchema. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String parent =
   *       MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString();
   *   MetadataSchema metadataSchema = MetadataSchema.newBuilder().build();
   *   String metadataSchemaId = "metadataSchemaId1549245163";
   *   MetadataSchema response =
   *       metadataServiceClient.createMetadataSchema(parent, metadataSchema, metadataSchemaId);
   * }
   * }
* * @param parent Required. The resource name of the MetadataStore where the MetadataSchema should * be created. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @param metadataSchema Required. The MetadataSchema to create. * @param metadataSchemaId The {metadata_schema} portion of the resource name with the format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}` * If not provided, the MetadataStore's ID will be a UUID generated by the service. Must be * 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`. Must be unique across all * MetadataSchemas in the parent Location. (Otherwise the request will fail with * ALREADY_EXISTS, or PERMISSION_DENIED if the caller can't view the preexisting * MetadataSchema.) * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final MetadataSchema createMetadataSchema( String parent, MetadataSchema metadataSchema, String metadataSchemaId) { CreateMetadataSchemaRequest request = CreateMetadataSchemaRequest.newBuilder() .setParent(parent) .setMetadataSchema(metadataSchema) .setMetadataSchemaId(metadataSchemaId) .build(); return createMetadataSchema(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a MetadataSchema. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   CreateMetadataSchemaRequest request =
   *       CreateMetadataSchemaRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setMetadataSchema(MetadataSchema.newBuilder().build())
   *           .setMetadataSchemaId("metadataSchemaId1549245163")
   *           .build();
   *   MetadataSchema response = metadataServiceClient.createMetadataSchema(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 MetadataSchema createMetadataSchema(CreateMetadataSchemaRequest request) { return createMetadataSchemaCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a MetadataSchema. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   CreateMetadataSchemaRequest request =
   *       CreateMetadataSchemaRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setMetadataSchema(MetadataSchema.newBuilder().build())
   *           .setMetadataSchemaId("metadataSchemaId1549245163")
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.createMetadataSchemaCallable().futureCall(request);
   *   // Do something.
   *   MetadataSchema response = future.get();
   * }
   * }
*/ public final UnaryCallable createMetadataSchemaCallable() { return stub.createMetadataSchemaCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves a specific MetadataSchema. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   MetadataSchemaName name =
   *       MetadataSchemaName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[METADATA_SCHEMA]");
   *   MetadataSchema response = metadataServiceClient.getMetadataSchema(name);
   * }
   * }
* * @param name Required. The resource name of the MetadataSchema to retrieve. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final MetadataSchema getMetadataSchema(MetadataSchemaName name) { GetMetadataSchemaRequest request = GetMetadataSchemaRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return getMetadataSchema(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves a specific MetadataSchema. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String name =
   *       MetadataSchemaName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[METADATA_SCHEMA]")
   *           .toString();
   *   MetadataSchema response = metadataServiceClient.getMetadataSchema(name);
   * }
   * }
* * @param name Required. The resource name of the MetadataSchema to retrieve. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final MetadataSchema getMetadataSchema(String name) { GetMetadataSchemaRequest request = GetMetadataSchemaRequest.newBuilder().setName(name).build(); return getMetadataSchema(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves a specific MetadataSchema. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   GetMetadataSchemaRequest request =
   *       GetMetadataSchemaRequest.newBuilder()
   *           .setName(
   *               MetadataSchemaName.of(
   *                       "[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[METADATA_SCHEMA]")
   *                   .toString())
   *           .build();
   *   MetadataSchema response = metadataServiceClient.getMetadataSchema(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 MetadataSchema getMetadataSchema(GetMetadataSchemaRequest request) { return getMetadataSchemaCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves a specific MetadataSchema. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   GetMetadataSchemaRequest request =
   *       GetMetadataSchemaRequest.newBuilder()
   *           .setName(
   *               MetadataSchemaName.of(
   *                       "[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[METADATA_SCHEMA]")
   *                   .toString())
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.getMetadataSchemaCallable().futureCall(request);
   *   // Do something.
   *   MetadataSchema response = future.get();
   * }
   * }
*/ public final UnaryCallable getMetadataSchemaCallable() { return stub.getMetadataSchemaCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists MetadataSchemas. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   MetadataStoreName parent =
   *       MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]");
   *   for (MetadataSchema element :
   *       metadataServiceClient.listMetadataSchemas(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The MetadataStore whose MetadataSchemas should be listed. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListMetadataSchemasPagedResponse listMetadataSchemas(MetadataStoreName parent) { ListMetadataSchemasRequest request = ListMetadataSchemasRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listMetadataSchemas(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists MetadataSchemas. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String parent =
   *       MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString();
   *   for (MetadataSchema element :
   *       metadataServiceClient.listMetadataSchemas(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The MetadataStore whose MetadataSchemas should be listed. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListMetadataSchemasPagedResponse listMetadataSchemas(String parent) { ListMetadataSchemasRequest request = ListMetadataSchemasRequest.newBuilder().setParent(parent).build(); return listMetadataSchemas(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists MetadataSchemas. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ListMetadataSchemasRequest request =
   *       ListMetadataSchemasRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .build();
   *   for (MetadataSchema element :
   *       metadataServiceClient.listMetadataSchemas(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 ListMetadataSchemasPagedResponse listMetadataSchemas( ListMetadataSchemasRequest request) { return listMetadataSchemasPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists MetadataSchemas. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ListMetadataSchemasRequest request =
   *       ListMetadataSchemasRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.listMetadataSchemasPagedCallable().futureCall(request);
   *   // Do something.
   *   for (MetadataSchema element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listMetadataSchemasPagedCallable() { return stub.listMetadataSchemasPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists MetadataSchemas. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ListMetadataSchemasRequest request =
   *       ListMetadataSchemasRequest.newBuilder()
   *           .setParent(
   *               MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .build();
   *   while (true) {
   *     ListMetadataSchemasResponse response =
   *         metadataServiceClient.listMetadataSchemasCallable().call(request);
   *     for (MetadataSchema element : response.getMetadataSchemasList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listMetadataSchemasCallable() { return stub.listMetadataSchemasCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves lineage of an Artifact represented through Artifacts and Executions connected by * Event edges and returned as a LineageSubgraph. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ArtifactName artifact =
   *       ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]");
   *   LineageSubgraph response = metadataServiceClient.queryArtifactLineageSubgraph(artifact);
   * }
   * }
* * @param artifact Required. The resource name of the Artifact whose Lineage needs to be retrieved * as a LineageSubgraph. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` *

The request may error with FAILED_PRECONDITION if the number of Artifacts, the number of * Executions, or the number of Events that would be returned for the Context exceeds 1000. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LineageSubgraph queryArtifactLineageSubgraph(ArtifactName artifact) { QueryArtifactLineageSubgraphRequest request = QueryArtifactLineageSubgraphRequest.newBuilder() .setArtifact(artifact == null ? null : artifact.toString()) .build(); return queryArtifactLineageSubgraph(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves lineage of an Artifact represented through Artifacts and Executions connected by * Event edges and returned as a LineageSubgraph. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   String artifact =
   *       ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]").toString();
   *   LineageSubgraph response = metadataServiceClient.queryArtifactLineageSubgraph(artifact);
   * }
   * }
* * @param artifact Required. The resource name of the Artifact whose Lineage needs to be retrieved * as a LineageSubgraph. Format: * `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}` *

The request may error with FAILED_PRECONDITION if the number of Artifacts, the number of * Executions, or the number of Events that would be returned for the Context exceeds 1000. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LineageSubgraph queryArtifactLineageSubgraph(String artifact) { QueryArtifactLineageSubgraphRequest request = QueryArtifactLineageSubgraphRequest.newBuilder().setArtifact(artifact).build(); return queryArtifactLineageSubgraph(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves lineage of an Artifact represented through Artifacts and Executions connected by * Event edges and returned as a LineageSubgraph. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   QueryArtifactLineageSubgraphRequest request =
   *       QueryArtifactLineageSubgraphRequest.newBuilder()
   *           .setArtifact(
   *               ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]")
   *                   .toString())
   *           .setMaxHops(407750469)
   *           .setFilter("filter-1274492040")
   *           .build();
   *   LineageSubgraph response = metadataServiceClient.queryArtifactLineageSubgraph(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 LineageSubgraph queryArtifactLineageSubgraph( QueryArtifactLineageSubgraphRequest request) { return queryArtifactLineageSubgraphCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves lineage of an Artifact represented through Artifacts and Executions connected by * Event edges and returned as a LineageSubgraph. * *

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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   QueryArtifactLineageSubgraphRequest request =
   *       QueryArtifactLineageSubgraphRequest.newBuilder()
   *           .setArtifact(
   *               ArtifactName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]")
   *                   .toString())
   *           .setMaxHops(407750469)
   *           .setFilter("filter-1274492040")
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.queryArtifactLineageSubgraphCallable().futureCall(request);
   *   // Do something.
   *   LineageSubgraph response = future.get();
   * }
   * }
*/ public final UnaryCallable queryArtifactLineageSubgraphCallable() { return stub.queryArtifactLineageSubgraphCallable(); } // 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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ListLocationsRequest request =
   *       ListLocationsRequest.newBuilder()
   *           .setName("name3373707")
   *           .setFilter("filter-1274492040")
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .build();
   *   for (Location element : metadataServiceClient.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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ListLocationsRequest request =
   *       ListLocationsRequest.newBuilder()
   *           .setName("name3373707")
   *           .setFilter("filter-1274492040")
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.listLocationsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (Location element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listLocationsPagedCallable() { return stub.listLocationsPagedCallable(); } // 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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   ListLocationsRequest request =
   *       ListLocationsRequest.newBuilder()
   *           .setName("name3373707")
   *           .setFilter("filter-1274492040")
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .build();
   *   while (true) {
   *     ListLocationsResponse response =
   *         metadataServiceClient.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 UnaryCallable listLocationsCallable() { return stub.listLocationsCallable(); } // 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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   *   Location response = metadataServiceClient.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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   *   ApiFuture future = metadataServiceClient.getLocationCallable().futureCall(request);
   *   // Do something.
   *   Location response = future.get();
   * }
   * }
*/ public final UnaryCallable getLocationCallable() { return stub.getLocationCallable(); } // 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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   SetIamPolicyRequest request =
   *       SetIamPolicyRequest.newBuilder()
   *           .setResource(
   *               EndpointName.ofProjectLocationEndpointName(
   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
   *                   .toString())
   *           .setPolicy(Policy.newBuilder().build())
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .build();
   *   Policy response = metadataServiceClient.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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   SetIamPolicyRequest request =
   *       SetIamPolicyRequest.newBuilder()
   *           .setResource(
   *               EndpointName.ofProjectLocationEndpointName(
   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
   *                   .toString())
   *           .setPolicy(Policy.newBuilder().build())
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .build();
   *   ApiFuture future = metadataServiceClient.setIamPolicyCallable().futureCall(request);
   *   // Do something.
   *   Policy response = future.get();
   * }
   * }
*/ public final UnaryCallable setIamPolicyCallable() { return stub.setIamPolicyCallable(); } // 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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   GetIamPolicyRequest request =
   *       GetIamPolicyRequest.newBuilder()
   *           .setResource(
   *               EndpointName.ofProjectLocationEndpointName(
   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
   *                   .toString())
   *           .setOptions(GetPolicyOptions.newBuilder().build())
   *           .build();
   *   Policy response = metadataServiceClient.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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   GetIamPolicyRequest request =
   *       GetIamPolicyRequest.newBuilder()
   *           .setResource(
   *               EndpointName.ofProjectLocationEndpointName(
   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
   *                   .toString())
   *           .setOptions(GetPolicyOptions.newBuilder().build())
   *           .build();
   *   ApiFuture future = metadataServiceClient.getIamPolicyCallable().futureCall(request);
   *   // Do something.
   *   Policy response = future.get();
   * }
   * }
*/ public final UnaryCallable getIamPolicyCallable() { return stub.getIamPolicyCallable(); } // 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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   TestIamPermissionsRequest request =
   *       TestIamPermissionsRequest.newBuilder()
   *           .setResource(
   *               EndpointName.ofProjectLocationEndpointName(
   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
   *                   .toString())
   *           .addAllPermissions(new ArrayList())
   *           .build();
   *   TestIamPermissionsResponse response = metadataServiceClient.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 (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
   *   TestIamPermissionsRequest request =
   *       TestIamPermissionsRequest.newBuilder()
   *           .setResource(
   *               EndpointName.ofProjectLocationEndpointName(
   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
   *                   .toString())
   *           .addAllPermissions(new ArrayList())
   *           .build();
   *   ApiFuture future =
   *       metadataServiceClient.testIamPermissionsCallable().futureCall(request);
   *   // Do something.
   *   TestIamPermissionsResponse response = future.get();
   * }
   * }
*/ public final UnaryCallable testIamPermissionsCallable() { return stub.testIamPermissionsCallable(); } @Override public final void close() { stub.close(); } @Override public void shutdown() { stub.shutdown(); } @Override public boolean isShutdown() { return stub.isShutdown(); } @Override public boolean isTerminated() { return stub.isTerminated(); } @Override public void shutdownNow() { stub.shutdownNow(); } @Override public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { return stub.awaitTermination(duration, unit); } public static class ListMetadataStoresPagedResponse extends AbstractPagedListResponse< ListMetadataStoresRequest, ListMetadataStoresResponse, MetadataStore, ListMetadataStoresPage, ListMetadataStoresFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListMetadataStoresPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListMetadataStoresPagedResponse(input), MoreExecutors.directExecutor()); } private ListMetadataStoresPagedResponse(ListMetadataStoresPage page) { super(page, ListMetadataStoresFixedSizeCollection.createEmptyCollection()); } } public static class ListMetadataStoresPage extends AbstractPage< ListMetadataStoresRequest, ListMetadataStoresResponse, MetadataStore, ListMetadataStoresPage> { private ListMetadataStoresPage( PageContext context, ListMetadataStoresResponse response) { super(context, response); } private static ListMetadataStoresPage createEmptyPage() { return new ListMetadataStoresPage(null, null); } @Override protected ListMetadataStoresPage createPage( PageContext context, ListMetadataStoresResponse response) { return new ListMetadataStoresPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListMetadataStoresFixedSizeCollection extends AbstractFixedSizeCollection< ListMetadataStoresRequest, ListMetadataStoresResponse, MetadataStore, ListMetadataStoresPage, ListMetadataStoresFixedSizeCollection> { private ListMetadataStoresFixedSizeCollection( List pages, int collectionSize) { super(pages, collectionSize); } private static ListMetadataStoresFixedSizeCollection createEmptyCollection() { return new ListMetadataStoresFixedSizeCollection(null, 0); } @Override protected ListMetadataStoresFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListMetadataStoresFixedSizeCollection(pages, collectionSize); } } public static class ListArtifactsPagedResponse extends AbstractPagedListResponse< ListArtifactsRequest, ListArtifactsResponse, Artifact, ListArtifactsPage, ListArtifactsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListArtifactsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListArtifactsPagedResponse(input), MoreExecutors.directExecutor()); } private ListArtifactsPagedResponse(ListArtifactsPage page) { super(page, ListArtifactsFixedSizeCollection.createEmptyCollection()); } } public static class ListArtifactsPage extends AbstractPage< ListArtifactsRequest, ListArtifactsResponse, Artifact, ListArtifactsPage> { private ListArtifactsPage( PageContext context, ListArtifactsResponse response) { super(context, response); } private static ListArtifactsPage createEmptyPage() { return new ListArtifactsPage(null, null); } @Override protected ListArtifactsPage createPage( PageContext context, ListArtifactsResponse response) { return new ListArtifactsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListArtifactsFixedSizeCollection extends AbstractFixedSizeCollection< ListArtifactsRequest, ListArtifactsResponse, Artifact, ListArtifactsPage, ListArtifactsFixedSizeCollection> { private ListArtifactsFixedSizeCollection(List pages, int collectionSize) { super(pages, collectionSize); } private static ListArtifactsFixedSizeCollection createEmptyCollection() { return new ListArtifactsFixedSizeCollection(null, 0); } @Override protected ListArtifactsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListArtifactsFixedSizeCollection(pages, collectionSize); } } public static class ListContextsPagedResponse extends AbstractPagedListResponse< ListContextsRequest, ListContextsResponse, Context, ListContextsPage, ListContextsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListContextsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListContextsPagedResponse(input), MoreExecutors.directExecutor()); } private ListContextsPagedResponse(ListContextsPage page) { super(page, ListContextsFixedSizeCollection.createEmptyCollection()); } } public static class ListContextsPage extends AbstractPage { private ListContextsPage( PageContext context, ListContextsResponse response) { super(context, response); } private static ListContextsPage createEmptyPage() { return new ListContextsPage(null, null); } @Override protected ListContextsPage createPage( PageContext context, ListContextsResponse response) { return new ListContextsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListContextsFixedSizeCollection extends AbstractFixedSizeCollection< ListContextsRequest, ListContextsResponse, Context, ListContextsPage, ListContextsFixedSizeCollection> { private ListContextsFixedSizeCollection(List pages, int collectionSize) { super(pages, collectionSize); } private static ListContextsFixedSizeCollection createEmptyCollection() { return new ListContextsFixedSizeCollection(null, 0); } @Override protected ListContextsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListContextsFixedSizeCollection(pages, collectionSize); } } public static class ListExecutionsPagedResponse extends AbstractPagedListResponse< ListExecutionsRequest, ListExecutionsResponse, Execution, ListExecutionsPage, ListExecutionsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListExecutionsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListExecutionsPagedResponse(input), MoreExecutors.directExecutor()); } private ListExecutionsPagedResponse(ListExecutionsPage page) { super(page, ListExecutionsFixedSizeCollection.createEmptyCollection()); } } public static class ListExecutionsPage extends AbstractPage< ListExecutionsRequest, ListExecutionsResponse, Execution, ListExecutionsPage> { private ListExecutionsPage( PageContext context, ListExecutionsResponse response) { super(context, response); } private static ListExecutionsPage createEmptyPage() { return new ListExecutionsPage(null, null); } @Override protected ListExecutionsPage createPage( PageContext context, ListExecutionsResponse response) { return new ListExecutionsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListExecutionsFixedSizeCollection extends AbstractFixedSizeCollection< ListExecutionsRequest, ListExecutionsResponse, Execution, ListExecutionsPage, ListExecutionsFixedSizeCollection> { private ListExecutionsFixedSizeCollection(List pages, int collectionSize) { super(pages, collectionSize); } private static ListExecutionsFixedSizeCollection createEmptyCollection() { return new ListExecutionsFixedSizeCollection(null, 0); } @Override protected ListExecutionsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListExecutionsFixedSizeCollection(pages, collectionSize); } } public static class ListMetadataSchemasPagedResponse extends AbstractPagedListResponse< ListMetadataSchemasRequest, ListMetadataSchemasResponse, MetadataSchema, ListMetadataSchemasPage, ListMetadataSchemasFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListMetadataSchemasPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListMetadataSchemasPagedResponse(input), MoreExecutors.directExecutor()); } private ListMetadataSchemasPagedResponse(ListMetadataSchemasPage page) { super(page, ListMetadataSchemasFixedSizeCollection.createEmptyCollection()); } } public static class ListMetadataSchemasPage extends AbstractPage< ListMetadataSchemasRequest, ListMetadataSchemasResponse, MetadataSchema, ListMetadataSchemasPage> { private ListMetadataSchemasPage( PageContext context, ListMetadataSchemasResponse response) { super(context, response); } private static ListMetadataSchemasPage createEmptyPage() { return new ListMetadataSchemasPage(null, null); } @Override protected ListMetadataSchemasPage createPage( PageContext context, ListMetadataSchemasResponse response) { return new ListMetadataSchemasPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListMetadataSchemasFixedSizeCollection extends AbstractFixedSizeCollection< ListMetadataSchemasRequest, ListMetadataSchemasResponse, MetadataSchema, ListMetadataSchemasPage, ListMetadataSchemasFixedSizeCollection> { private ListMetadataSchemasFixedSizeCollection( List pages, int collectionSize) { super(pages, collectionSize); } private static ListMetadataSchemasFixedSizeCollection createEmptyCollection() { return new ListMetadataSchemasFixedSizeCollection(null, 0); } @Override protected ListMetadataSchemasFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListMetadataSchemasFixedSizeCollection(pages, collectionSize); } } public static class ListLocationsPagedResponse extends AbstractPagedListResponse< ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage, ListLocationsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListLocationsPagedResponse(input), MoreExecutors.directExecutor()); } private ListLocationsPagedResponse(ListLocationsPage page) { super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); } } public static class ListLocationsPage extends AbstractPage< ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { private ListLocationsPage( PageContext context, ListLocationsResponse response) { super(context, response); } private static ListLocationsPage createEmptyPage() { return new ListLocationsPage(null, null); } @Override protected ListLocationsPage createPage( PageContext context, ListLocationsResponse response) { return new ListLocationsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListLocationsFixedSizeCollection extends AbstractFixedSizeCollection< ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage, ListLocationsFixedSizeCollection> { private ListLocationsFixedSizeCollection(List pages, int collectionSize) { super(pages, collectionSize); } private static ListLocationsFixedSizeCollection createEmptyCollection() { return new ListLocationsFixedSizeCollection(null, 0); } @Override protected ListLocationsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListLocationsFixedSizeCollection(pages, collectionSize); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy