Class LineageClient

  • All Implemented Interfaces:
    com.google.api.gax.core.BackgroundResource, AutoCloseable

    @Generated("by gapic-generator-java")
    public class LineageClient
    extends Object
    implements com.google.api.gax.core.BackgroundResource
    Service Description: Lineage is used to track data flows between assets over time. You can create [LineageEvents][google.cloud.datacatalog.lineage.v1.LineageEvent] to record lineage between multiple sources and a single target, for example, when table data is based on data from multiple tables.

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

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

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

    The surface of this class includes several types of Java methods for each of the API's methods:

    1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
    2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
    3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

    See the individual methods for example code.

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

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

    To customize credentials:

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

    To customize the endpoint:

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

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

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

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

    • Constructor Detail

      • LineageClient

        protected LineageClient​(LineageSettings settings)
                         throws IOException
        Constructs an instance of LineageClient, 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.
        Throws:
        IOException
      • LineageClient

        protected LineageClient​(LineageStub stub)
    • Method Detail

      • create

        public static final LineageClient create​(LineageSettings settings)
                                          throws IOException
        Constructs an instance of LineageClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
        Throws:
        IOException
      • create

        public static final LineageClient create​(LineageStub stub)
        Constructs an instance of LineageClient, using the given stub for making calls. This is for advanced usage - prefer using create(LineageSettings).
      • getOperationsClient

        public final com.google.longrunning.OperationsClient getOperationsClient()
        Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
      • getHttpJsonOperationsClient

        @BetaApi
        public final com.google.api.gax.httpjson.longrunning.OperationsClient getHttpJsonOperationsClient()
        Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
      • createProcess

        public final Process createProcess​(LocationName parent,
                                           Process process)
        Creates a new process.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
           Process process = Process.newBuilder().build();
           Process response = lineageClient.createProcess(parent, process);
         }
         
        Parameters:
        parent - Required. The name of the project and its location that should own the process.
        process - Required. The process to create.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createProcess

        public final Process createProcess​(String parent,
                                           Process process)
        Creates a new process.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
           Process process = Process.newBuilder().build();
           Process response = lineageClient.createProcess(parent, process);
         }
         
        Parameters:
        parent - Required. The name of the project and its location that should own the process.
        process - Required. The process to create.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createProcess

        public final Process createProcess​(CreateProcessRequest request)
        Creates a new process.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           CreateProcessRequest request =
               CreateProcessRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setProcess(Process.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .build();
           Process response = lineageClient.createProcess(request);
         }
         
        Parameters:
        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
      • createProcessCallable

        public final com.google.api.gax.rpc.UnaryCallable<CreateProcessRequest,​Process> createProcessCallable()
        Creates a new process.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           CreateProcessRequest request =
               CreateProcessRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setProcess(Process.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .build();
           ApiFuture<Process> future = lineageClient.createProcessCallable().futureCall(request);
           // Do something.
           Process response = future.get();
         }
         
      • updateProcess

        public final Process updateProcess​(Process process,
                                           com.google.protobuf.FieldMask updateMask)
        Updates a process.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           Process process = Process.newBuilder().build();
           FieldMask updateMask = FieldMask.newBuilder().build();
           Process response = lineageClient.updateProcess(process, updateMask);
         }
         
        Parameters:
        process - Required. The lineage process to update.

        The process's `name` field is used to identify the process to update.

        updateMask - The list of fields to update. Currently not used. The whole message is updated.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • updateProcess

        public final Process updateProcess​(UpdateProcessRequest request)
        Updates a process.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           UpdateProcessRequest request =
               UpdateProcessRequest.newBuilder()
                   .setProcess(Process.newBuilder().build())
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .setAllowMissing(true)
                   .build();
           Process response = lineageClient.updateProcess(request);
         }
         
        Parameters:
        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
      • updateProcessCallable

        public final com.google.api.gax.rpc.UnaryCallable<UpdateProcessRequest,​Process> updateProcessCallable()
        Updates a process.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           UpdateProcessRequest request =
               UpdateProcessRequest.newBuilder()
                   .setProcess(Process.newBuilder().build())
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .setAllowMissing(true)
                   .build();
           ApiFuture<Process> future = lineageClient.updateProcessCallable().futureCall(request);
           // Do something.
           Process response = future.get();
         }
         
      • getProcess

        public final Process getProcess​(ProcessName name)
        Gets the details of the specified process.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]");
           Process response = lineageClient.getProcess(name);
         }
         
        Parameters:
        name - Required. The name of the process to get.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getProcess

        public final Process getProcess​(String name)
        Gets the details of the specified process.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           String name = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString();
           Process response = lineageClient.getProcess(name);
         }
         
        Parameters:
        name - Required. The name of the process to get.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getProcess

        public final Process getProcess​(GetProcessRequest request)
        Gets the details of the specified process.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           GetProcessRequest request =
               GetProcessRequest.newBuilder()
                   .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
                   .build();
           Process response = lineageClient.getProcess(request);
         }
         
        Parameters:
        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
      • getProcessCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetProcessRequest,​Process> getProcessCallable()
        Gets the details of the specified process.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           GetProcessRequest request =
               GetProcessRequest.newBuilder()
                   .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
                   .build();
           ApiFuture<Process> future = lineageClient.getProcessCallable().futureCall(request);
           // Do something.
           Process response = future.get();
         }
         
      • listProcesses

        public final LineageClient.ListProcessesPagedResponse listProcesses​(LocationName parent)
        List processes in the given project and location. List order is descending by insertion time.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
           for (Process element : lineageClient.listProcesses(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The name of the project and its location that owns this collection of processes.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listProcesses

        public final LineageClient.ListProcessesPagedResponse listProcesses​(String parent)
        List processes in the given project and location. List order is descending by insertion time.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
           for (Process element : lineageClient.listProcesses(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The name of the project and its location that owns this collection of processes.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listProcesses

        public final LineageClient.ListProcessesPagedResponse listProcesses​(ListProcessesRequest request)
        List processes in the given project and location. List order is descending by insertion time.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           ListProcessesRequest request =
               ListProcessesRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           for (Process element : lineageClient.listProcesses(request).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        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
      • listProcessesPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListProcessesRequest,​LineageClient.ListProcessesPagedResponse> listProcessesPagedCallable()
        List processes in the given project and location. List order is descending by insertion time.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           ListProcessesRequest request =
               ListProcessesRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           ApiFuture<Process> future = lineageClient.listProcessesPagedCallable().futureCall(request);
           // Do something.
           for (Process element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listProcessesCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListProcessesRequest,​ListProcessesResponse> listProcessesCallable()
        List processes in the given project and location. List order is descending by insertion time.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           ListProcessesRequest request =
               ListProcessesRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           while (true) {
             ListProcessesResponse response = lineageClient.listProcessesCallable().call(request);
             for (Process element : response.getProcessesList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • deleteProcessAsync

        public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,​OperationMetadata> deleteProcessAsync​(ProcessName name)
        Deletes the process with the specified name.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]");
           lineageClient.deleteProcessAsync(name).get();
         }
         
        Parameters:
        name - Required. The name of the process to delete.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteProcessAsync

        public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,​OperationMetadata> deleteProcessAsync​(String name)
        Deletes the process with the specified name.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           String name = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString();
           lineageClient.deleteProcessAsync(name).get();
         }
         
        Parameters:
        name - Required. The name of the process to delete.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteProcessAsync

        public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,​OperationMetadata> deleteProcessAsync​(DeleteProcessRequest request)
        Deletes the process with the specified name.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           DeleteProcessRequest request =
               DeleteProcessRequest.newBuilder()
                   .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
                   .setAllowMissing(true)
                   .build();
           lineageClient.deleteProcessAsync(request).get();
         }
         
        Parameters:
        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
      • deleteProcessOperationCallable

        public final com.google.api.gax.rpc.OperationCallable<DeleteProcessRequest,​com.google.protobuf.Empty,​OperationMetadata> deleteProcessOperationCallable()
        Deletes the process with the specified name.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           DeleteProcessRequest request =
               DeleteProcessRequest.newBuilder()
                   .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
                   .setAllowMissing(true)
                   .build();
           OperationFuture<Empty, OperationMetadata> future =
               lineageClient.deleteProcessOperationCallable().futureCall(request);
           // Do something.
           future.get();
         }
         
      • deleteProcessCallable

        public final com.google.api.gax.rpc.UnaryCallable<DeleteProcessRequest,​com.google.longrunning.Operation> deleteProcessCallable()
        Deletes the process with the specified name.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           DeleteProcessRequest request =
               DeleteProcessRequest.newBuilder()
                   .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
                   .setAllowMissing(true)
                   .build();
           ApiFuture<Operation> future = lineageClient.deleteProcessCallable().futureCall(request);
           // Do something.
           future.get();
         }
         
      • createRun

        public final Run createRun​(ProcessName parent,
                                   Run run)
        Creates a new run.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           ProcessName parent = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]");
           Run run = Run.newBuilder().build();
           Run response = lineageClient.createRun(parent, run);
         }
         
        Parameters:
        parent - Required. The name of the process that should own the run.
        run - Required. The run to create.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createRun

        public final Run createRun​(String parent,
                                   Run run)
        Creates a new run.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           String parent = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString();
           Run run = Run.newBuilder().build();
           Run response = lineageClient.createRun(parent, run);
         }
         
        Parameters:
        parent - Required. The name of the process that should own the run.
        run - Required. The run to create.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createRun

        public final Run createRun​(CreateRunRequest request)
        Creates a new run.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           CreateRunRequest request =
               CreateRunRequest.newBuilder()
                   .setParent(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
                   .setRun(Run.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .build();
           Run response = lineageClient.createRun(request);
         }
         
        Parameters:
        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
      • createRunCallable

        public final com.google.api.gax.rpc.UnaryCallable<CreateRunRequest,​Run> createRunCallable()
        Creates a new run.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           CreateRunRequest request =
               CreateRunRequest.newBuilder()
                   .setParent(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
                   .setRun(Run.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .build();
           ApiFuture<Run> future = lineageClient.createRunCallable().futureCall(request);
           // Do something.
           Run response = future.get();
         }
         
      • updateRun

        public final Run updateRun​(Run run,
                                   com.google.protobuf.FieldMask updateMask)
        Updates a run.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           Run run = Run.newBuilder().build();
           FieldMask updateMask = FieldMask.newBuilder().build();
           Run response = lineageClient.updateRun(run, updateMask);
         }
         
        Parameters:
        run - Required. The lineage run to update.

        The run's `name` field is used to identify the run to update.

        Format: `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.

        updateMask - The list of fields to update. Currently not used. The whole message is updated.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • updateRun

        public final Run updateRun​(UpdateRunRequest request)
        Updates a run.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           UpdateRunRequest request =
               UpdateRunRequest.newBuilder()
                   .setRun(Run.newBuilder().build())
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .build();
           Run response = lineageClient.updateRun(request);
         }
         
        Parameters:
        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
      • updateRunCallable

        public final com.google.api.gax.rpc.UnaryCallable<UpdateRunRequest,​Run> updateRunCallable()
        Updates a run.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           UpdateRunRequest request =
               UpdateRunRequest.newBuilder()
                   .setRun(Run.newBuilder().build())
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .build();
           ApiFuture<Run> future = lineageClient.updateRunCallable().futureCall(request);
           // Do something.
           Run response = future.get();
         }
         
      • getRun

        public final Run getRun​(RunName name)
        Gets the details of the specified run.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           RunName name = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]");
           Run response = lineageClient.getRun(name);
         }
         
        Parameters:
        name - Required. The name of the run to get.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getRun

        public final Run getRun​(String name)
        Gets the details of the specified run.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           String name = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString();
           Run response = lineageClient.getRun(name);
         }
         
        Parameters:
        name - Required. The name of the run to get.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getRun

        public final Run getRun​(GetRunRequest request)
        Gets the details of the specified run.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           GetRunRequest request =
               GetRunRequest.newBuilder()
                   .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
                   .build();
           Run response = lineageClient.getRun(request);
         }
         
        Parameters:
        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
      • getRunCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetRunRequest,​Run> getRunCallable()
        Gets the details of the specified run.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           GetRunRequest request =
               GetRunRequest.newBuilder()
                   .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
                   .build();
           ApiFuture<Run> future = lineageClient.getRunCallable().futureCall(request);
           // Do something.
           Run response = future.get();
         }
         
      • listRuns

        public final LineageClient.ListRunsPagedResponse listRuns​(ProcessName parent)
        Lists runs in the given project and location. List order is descending by `start_time`.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           ProcessName parent = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]");
           for (Run element : lineageClient.listRuns(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The name of process that owns this collection of runs.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listRuns

        public final LineageClient.ListRunsPagedResponse listRuns​(String parent)
        Lists runs in the given project and location. List order is descending by `start_time`.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           String parent = ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString();
           for (Run element : lineageClient.listRuns(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The name of process that owns this collection of runs.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listRuns

        public final LineageClient.ListRunsPagedResponse listRuns​(ListRunsRequest request)
        Lists runs in the given project and location. List order is descending by `start_time`.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           ListRunsRequest request =
               ListRunsRequest.newBuilder()
                   .setParent(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           for (Run element : lineageClient.listRuns(request).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        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
      • listRunsPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListRunsRequest,​LineageClient.ListRunsPagedResponse> listRunsPagedCallable()
        Lists runs in the given project and location. List order is descending by `start_time`.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           ListRunsRequest request =
               ListRunsRequest.newBuilder()
                   .setParent(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           ApiFuture<Run> future = lineageClient.listRunsPagedCallable().futureCall(request);
           // Do something.
           for (Run element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listRunsCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListRunsRequest,​ListRunsResponse> listRunsCallable()
        Lists runs in the given project and location. List order is descending by `start_time`.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           ListRunsRequest request =
               ListRunsRequest.newBuilder()
                   .setParent(ProcessName.of("[PROJECT]", "[LOCATION]", "[PROCESS]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           while (true) {
             ListRunsResponse response = lineageClient.listRunsCallable().call(request);
             for (Run element : response.getRunsList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • deleteRunAsync

        public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,​OperationMetadata> deleteRunAsync​(RunName name)
        Deletes the run with the specified name.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           RunName name = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]");
           lineageClient.deleteRunAsync(name).get();
         }
         
        Parameters:
        name - Required. The name of the run to delete.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteRunAsync

        public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,​OperationMetadata> deleteRunAsync​(String name)
        Deletes the run with the specified name.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           String name = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString();
           lineageClient.deleteRunAsync(name).get();
         }
         
        Parameters:
        name - Required. The name of the run to delete.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteRunAsync

        public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,​OperationMetadata> deleteRunAsync​(DeleteRunRequest request)
        Deletes the run with the specified name.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           DeleteRunRequest request =
               DeleteRunRequest.newBuilder()
                   .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
                   .setAllowMissing(true)
                   .build();
           lineageClient.deleteRunAsync(request).get();
         }
         
        Parameters:
        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
      • deleteRunOperationCallable

        public final com.google.api.gax.rpc.OperationCallable<DeleteRunRequest,​com.google.protobuf.Empty,​OperationMetadata> deleteRunOperationCallable()
        Deletes the run with the specified name.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           DeleteRunRequest request =
               DeleteRunRequest.newBuilder()
                   .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
                   .setAllowMissing(true)
                   .build();
           OperationFuture<Empty, OperationMetadata> future =
               lineageClient.deleteRunOperationCallable().futureCall(request);
           // Do something.
           future.get();
         }
         
      • deleteRunCallable

        public final com.google.api.gax.rpc.UnaryCallable<DeleteRunRequest,​com.google.longrunning.Operation> deleteRunCallable()
        Deletes the run with the specified name.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           DeleteRunRequest request =
               DeleteRunRequest.newBuilder()
                   .setName(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
                   .setAllowMissing(true)
                   .build();
           ApiFuture<Operation> future = lineageClient.deleteRunCallable().futureCall(request);
           // Do something.
           future.get();
         }
         
      • createLineageEvent

        public final LineageEvent createLineageEvent​(RunName parent,
                                                     LineageEvent lineageEvent)
        Creates a new lineage event.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           RunName parent = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]");
           LineageEvent lineageEvent = LineageEvent.newBuilder().build();
           LineageEvent response = lineageClient.createLineageEvent(parent, lineageEvent);
         }
         
        Parameters:
        parent - Required. The name of the run that should own the lineage event.
        lineageEvent - Required. The lineage event to create.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createLineageEvent

        public final LineageEvent createLineageEvent​(String parent,
                                                     LineageEvent lineageEvent)
        Creates a new lineage event.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           String parent = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString();
           LineageEvent lineageEvent = LineageEvent.newBuilder().build();
           LineageEvent response = lineageClient.createLineageEvent(parent, lineageEvent);
         }
         
        Parameters:
        parent - Required. The name of the run that should own the lineage event.
        lineageEvent - Required. The lineage event to create.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createLineageEvent

        public final LineageEvent createLineageEvent​(CreateLineageEventRequest request)
        Creates a new lineage event.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           CreateLineageEventRequest request =
               CreateLineageEventRequest.newBuilder()
                   .setParent(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
                   .setLineageEvent(LineageEvent.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .build();
           LineageEvent response = lineageClient.createLineageEvent(request);
         }
         
        Parameters:
        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
      • createLineageEventCallable

        public final com.google.api.gax.rpc.UnaryCallable<CreateLineageEventRequest,​LineageEvent> createLineageEventCallable()
        Creates a new lineage event.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           CreateLineageEventRequest request =
               CreateLineageEventRequest.newBuilder()
                   .setParent(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
                   .setLineageEvent(LineageEvent.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .build();
           ApiFuture<LineageEvent> future =
               lineageClient.createLineageEventCallable().futureCall(request);
           // Do something.
           LineageEvent response = future.get();
         }
         
      • getLineageEvent

        public final LineageEvent getLineageEvent​(LineageEventName name)
        Gets details of a specified lineage event.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           LineageEventName name =
               LineageEventName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]");
           LineageEvent response = lineageClient.getLineageEvent(name);
         }
         
        Parameters:
        name - Required. The name of the lineage event to get.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getLineageEvent

        public final LineageEvent getLineageEvent​(String name)
        Gets details of a specified lineage event.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           String name =
               LineageEventName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]")
                   .toString();
           LineageEvent response = lineageClient.getLineageEvent(name);
         }
         
        Parameters:
        name - Required. The name of the lineage event to get.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getLineageEvent

        public final LineageEvent getLineageEvent​(GetLineageEventRequest request)
        Gets details of a specified lineage event.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           GetLineageEventRequest request =
               GetLineageEventRequest.newBuilder()
                   .setName(
                       LineageEventName.of(
                               "[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]")
                           .toString())
                   .build();
           LineageEvent response = lineageClient.getLineageEvent(request);
         }
         
        Parameters:
        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
      • getLineageEventCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetLineageEventRequest,​LineageEvent> getLineageEventCallable()
        Gets details of a specified lineage event.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           GetLineageEventRequest request =
               GetLineageEventRequest.newBuilder()
                   .setName(
                       LineageEventName.of(
                               "[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]")
                           .toString())
                   .build();
           ApiFuture<LineageEvent> future = lineageClient.getLineageEventCallable().futureCall(request);
           // Do something.
           LineageEvent response = future.get();
         }
         
      • listLineageEvents

        public final LineageClient.ListLineageEventsPagedResponse listLineageEvents​(RunName parent)
        Lists lineage events in the given project and location. The list order is not defined.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           RunName parent = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]");
           for (LineageEvent element : lineageClient.listLineageEvents(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The name of the run that owns the collection of lineage events to get.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listLineageEvents

        public final LineageClient.ListLineageEventsPagedResponse listLineageEvents​(String parent)
        Lists lineage events in the given project and location. The list order is not defined.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           String parent = RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString();
           for (LineageEvent element : lineageClient.listLineageEvents(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The name of the run that owns the collection of lineage events to get.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listLineageEvents

        public final LineageClient.ListLineageEventsPagedResponse listLineageEvents​(ListLineageEventsRequest request)
        Lists lineage events in the given project and location. The list order is not defined.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           ListLineageEventsRequest request =
               ListLineageEventsRequest.newBuilder()
                   .setParent(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           for (LineageEvent element : lineageClient.listLineageEvents(request).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        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
      • listLineageEventsPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListLineageEventsRequest,​LineageClient.ListLineageEventsPagedResponse> listLineageEventsPagedCallable()
        Lists lineage events in the given project and location. The list order is not defined.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           ListLineageEventsRequest request =
               ListLineageEventsRequest.newBuilder()
                   .setParent(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           ApiFuture<LineageEvent> future =
               lineageClient.listLineageEventsPagedCallable().futureCall(request);
           // Do something.
           for (LineageEvent element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listLineageEventsCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListLineageEventsRequest,​ListLineageEventsResponse> listLineageEventsCallable()
        Lists lineage events in the given project and location. The list order is not defined.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           ListLineageEventsRequest request =
               ListLineageEventsRequest.newBuilder()
                   .setParent(RunName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           while (true) {
             ListLineageEventsResponse response =
                 lineageClient.listLineageEventsCallable().call(request);
             for (LineageEvent element : response.getLineageEventsList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • deleteLineageEvent

        public final void deleteLineageEvent​(LineageEventName name)
        Deletes the lineage event with the specified name.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           LineageEventName name =
               LineageEventName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]");
           lineageClient.deleteLineageEvent(name);
         }
         
        Parameters:
        name - Required. The name of the lineage event to delete.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteLineageEvent

        public final void deleteLineageEvent​(String name)
        Deletes the lineage event with the specified name.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           String name =
               LineageEventName.of("[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]")
                   .toString();
           lineageClient.deleteLineageEvent(name);
         }
         
        Parameters:
        name - Required. The name of the lineage event to delete.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteLineageEvent

        public final void deleteLineageEvent​(DeleteLineageEventRequest request)
        Deletes the lineage event with the specified name.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           DeleteLineageEventRequest request =
               DeleteLineageEventRequest.newBuilder()
                   .setName(
                       LineageEventName.of(
                               "[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]")
                           .toString())
                   .setAllowMissing(true)
                   .build();
           lineageClient.deleteLineageEvent(request);
         }
         
        Parameters:
        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
      • deleteLineageEventCallable

        public final com.google.api.gax.rpc.UnaryCallable<DeleteLineageEventRequest,​com.google.protobuf.Empty> deleteLineageEventCallable()
        Deletes the lineage event with the specified name.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           DeleteLineageEventRequest request =
               DeleteLineageEventRequest.newBuilder()
                   .setName(
                       LineageEventName.of(
                               "[PROJECT]", "[LOCATION]", "[PROCESS]", "[RUN]", "[LINEAGE_EVENT]")
                           .toString())
                   .setAllowMissing(true)
                   .build();
           ApiFuture<Empty> future = lineageClient.deleteLineageEventCallable().futureCall(request);
           // Do something.
           future.get();
         }
         
      • searchLinks

        public final LineageClient.SearchLinksPagedResponse searchLinks​(SearchLinksRequest request)
        Retrieve a list of links connected to a specific asset. Links represent the data flow between **source** (upstream) and **target** (downstream) assets in transformation pipelines. Links are stored in the same project as the Lineage Events that create them.

        You can retrieve links in every project where you have the `datalineage.events.get` permission. The project provided in the URL is used for Billing and Quota.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           SearchLinksRequest request =
               SearchLinksRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           for (Link element : lineageClient.searchLinks(request).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        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
      • searchLinksPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<SearchLinksRequest,​LineageClient.SearchLinksPagedResponse> searchLinksPagedCallable()
        Retrieve a list of links connected to a specific asset. Links represent the data flow between **source** (upstream) and **target** (downstream) assets in transformation pipelines. Links are stored in the same project as the Lineage Events that create them.

        You can retrieve links in every project where you have the `datalineage.events.get` permission. The project provided in the URL is used for Billing and Quota.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           SearchLinksRequest request =
               SearchLinksRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           ApiFuture<Link> future = lineageClient.searchLinksPagedCallable().futureCall(request);
           // Do something.
           for (Link element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • searchLinksCallable

        public final com.google.api.gax.rpc.UnaryCallable<SearchLinksRequest,​SearchLinksResponse> searchLinksCallable()
        Retrieve a list of links connected to a specific asset. Links represent the data flow between **source** (upstream) and **target** (downstream) assets in transformation pipelines. Links are stored in the same project as the Lineage Events that create them.

        You can retrieve links in every project where you have the `datalineage.events.get` permission. The project provided in the URL is used for Billing and Quota.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           SearchLinksRequest request =
               SearchLinksRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           while (true) {
             SearchLinksResponse response = lineageClient.searchLinksCallable().call(request);
             for (Link element : response.getLinksList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • batchSearchLinkProcesses

        public final LineageClient.BatchSearchLinkProcessesPagedResponse batchSearchLinkProcesses​(BatchSearchLinkProcessesRequest request)
        Retrieve information about LineageProcesses associated with specific links. LineageProcesses are transformation pipelines that result in data flowing from **source** to **target** assets. Links between assets represent this operation.

        If you have specific link names, you can use this method to verify which LineageProcesses contribute to creating those links. See the [SearchLinks][google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks] method for more information on how to retrieve link name.

        You can retrieve the LineageProcess information in every project where you have the `datalineage.events.get` permission. The project provided in the URL is used for Billing and Quota.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           BatchSearchLinkProcessesRequest request =
               BatchSearchLinkProcessesRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .addAllLinks(new ArrayList<String>())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           for (ProcessLinks element : lineageClient.batchSearchLinkProcesses(request).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        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
      • batchSearchLinkProcessesPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<BatchSearchLinkProcessesRequest,​LineageClient.BatchSearchLinkProcessesPagedResponse> batchSearchLinkProcessesPagedCallable()
        Retrieve information about LineageProcesses associated with specific links. LineageProcesses are transformation pipelines that result in data flowing from **source** to **target** assets. Links between assets represent this operation.

        If you have specific link names, you can use this method to verify which LineageProcesses contribute to creating those links. See the [SearchLinks][google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks] method for more information on how to retrieve link name.

        You can retrieve the LineageProcess information in every project where you have the `datalineage.events.get` permission. The project provided in the URL is used for Billing and Quota.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           BatchSearchLinkProcessesRequest request =
               BatchSearchLinkProcessesRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .addAllLinks(new ArrayList<String>())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           ApiFuture<ProcessLinks> future =
               lineageClient.batchSearchLinkProcessesPagedCallable().futureCall(request);
           // Do something.
           for (ProcessLinks element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • batchSearchLinkProcessesCallable

        public final com.google.api.gax.rpc.UnaryCallable<BatchSearchLinkProcessesRequest,​BatchSearchLinkProcessesResponse> batchSearchLinkProcessesCallable()
        Retrieve information about LineageProcesses associated with specific links. LineageProcesses are transformation pipelines that result in data flowing from **source** to **target** assets. Links between assets represent this operation.

        If you have specific link names, you can use this method to verify which LineageProcesses contribute to creating those links. See the [SearchLinks][google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks] method for more information on how to retrieve link name.

        You can retrieve the LineageProcess information in every project where you have the `datalineage.events.get` permission. The project provided in the URL is used for Billing and Quota.

        Sample code:

        
         // This snippet has been automatically generated and should be regarded as a code template only.
         // It will require modifications to work:
         // - It may require correct/in-range values for request initialization.
         // - It may require specifying regional endpoints when creating the service client as shown in
         // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
         try (LineageClient lineageClient = LineageClient.create()) {
           BatchSearchLinkProcessesRequest request =
               BatchSearchLinkProcessesRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .addAllLinks(new ArrayList<String>())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           while (true) {
             BatchSearchLinkProcessesResponse response =
                 lineageClient.batchSearchLinkProcessesCallable().call(request);
             for (ProcessLinks element : response.getProcessLinksList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • shutdown

        public void shutdown()
        Specified by:
        shutdown in interface com.google.api.gax.core.BackgroundResource
      • isShutdown

        public boolean isShutdown()
        Specified by:
        isShutdown in interface com.google.api.gax.core.BackgroundResource
      • isTerminated

        public boolean isTerminated()
        Specified by:
        isTerminated in interface com.google.api.gax.core.BackgroundResource
      • shutdownNow

        public void shutdownNow()
        Specified by:
        shutdownNow in interface com.google.api.gax.core.BackgroundResource