# Google Cloud Data Catalog Lineage V1 Client - Class LineageClient (1.4.0)

1.4.0 (latest) 1.3.0 1.2.3 1.1.1 1.0.3 0.5.5 0.4.0 0.3.1 0.2.1 0.1.3 Reference documentation and code samples for the Google Cloud Data Catalog Lineage V1 Client class LineageClient.

Service Description: Lineage is used to track data flows between assets over time. You can
create [LineageEvents](https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/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.

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 parseName method to extract the individual identifiers
contained within formatted names that are returned by the API.

## Namespace

Google \\ Cloud \\ DataCatalog \\ Lineage \\ V1 \\ Client

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `options` | `array|https://docs.cloud.google.com/php/docs/reference/gax/latest/Options.ClientOptions.html` Optional. Options for configuring the service API wrapper. |
| `↳ apiEndpoint` | `string` The address of the API remote host. May optionally include the port, formatted as " |
| `↳ credentials` | `https://docs.cloud.google.com/php/docs/reference/auth/latest/FetchAuthTokenInterface.html|https://docs.cloud.google.com/php/docs/reference/gax/latest/CredentialsWrapper.html` This option should only be used with a pre-constructed [Google\\Auth\\FetchAuthTokenInterface](https://docs.cloud.google.com/php/docs/reference/auth/latest/FetchAuthTokenInterface.html) or [Google\\ApiCore\\CredentialsWrapper](https://docs.cloud.google.com/php/docs/reference/gax/latest/CredentialsWrapper.html) object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored. **Important** : If you are providing a path to a credentials file, or a decoded credentials file as a PHP array, this usage is now DEPRECATED. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. It is recommended to create the credentials explicitly `use Google\Auth\Credentials\ServiceAccountCredentials; use Google\Cloud\DataCatalog\Lineage\V1\LineageClient; $creds = new ServiceAccountCredentials($scopes, $json); $options = new LineageClient(['credentials' => $creds]);` <https://cloud.google.com/docs/authentication/external/externally-sourced-credentials> |
| `↳ credentialsConfig` | `array` Options used to configure credentials, including auth token caching, for the client. For a full list of supporting configuration options, see [Google\\ApiCore\\CredentialsWrapper::build()](https://docs.cloud.google.com/php/docs/reference/gax/latest/CredentialsWrapper.html#_Google_ApiCore_CredentialsWrapper__build__) . |
| `↳ disableRetries` | `bool` Determines whether or not retries defined by the client configuration should be disabled. Defaults to `false`. |
| `↳ clientConfig` | `string|array` Client method configuration, including retry settings. This option can be either a path to a JSON file, or a PHP array containing the decoded JSON data. By default this settings points to the default client config file, which is provided in the resources folder. |
| `↳ transport` | `string|https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.TransportInterface.html` The transport used for executing network requests. May be either the string `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. *Advanced usage* : Additionally, it is possible to pass in an already instantiated [Google\\ApiCore\\Transport\\TransportInterface](https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.TransportInterface.html) object. Note that when this object is provided, any settings in $transportConfig, and any $apiEndpoint setting, will be ignored. |
| `↳ transportConfig` | `array` Configuration options that will be used to construct the transport. Options for each supported transport type should be passed in a key for that transport. For example: $transportConfig = \[ 'grpc' =\> \[...\], 'rest' =\> \[...\], \]; See the [Google\\ApiCore\\Transport\\GrpcTransport::build()](https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.GrpcTransport.html#_Google_ApiCore_Transport_GrpcTransport__build__) and [Google\\ApiCore\\Transport\\RestTransport::build()](https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.RestTransport.html#_Google_ApiCore_Transport_RestTransport__build__) methods for the supported options. |
| `↳ clientCertSource` | `callable` A callable which returns the client cert as a string. This can be used to provide a certificate and private key to the transport layer for mTLS. |
| `↳ logger` | `false|Psr\Log\LoggerInterface` A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the 'GOOGLE_SDK_PHP_LOGGING' environment flag |
| `↳ universeDomain` | `string` The service domain for the client. Defaults to 'googleapis.com'. |

### batchSearchLinkProcesses

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](https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Client.LineageClient#_Google_Cloud_DataCatalog_Lineage_V1_Client_LineageClient__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.

The async variant is [LineageClient::batchSearchLinkProcessesAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Client.LineageClient#_Google_Cloud_DataCatalog_Lineage_V1_Client_LineageClient__batchSearchLinkProcessesAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.BatchSearchLinkProcessesRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\PagedListResponse;
    use Google\Cloud\DataCatalog\Lineage\V1\BatchSearchLinkProcessesRequest;
    use Google\Cloud\DataCatalog\Lineage\V1\Client\LineageClient;
    use Google\Cloud\DataCatalog\Lineage\V1\ProcessLinks;

    /**
     * @param string $formattedParent The project and location where you want to search. Please see
     *                                {@see LineageClient::locationName()} for help formatting this field.
     * @param string $linksElement    An array of links to check for their associated LineageProcesses.
     *
     *                                The maximum number of items in this array is 100.
     *                                If the request contains more than 100 links, it returns the
     *                                `INVALID_ARGUMENT` error.
     *
     *                                Format: `projects/{project}/locations/{location}/links/{link}`.
     */
    function batch_search_link_processes_sample(string $formattedParent, string $linksElement): void
    {
        // Create a client.
        $lineageClient = new LineageClient();

        // Prepare the request message.
        $links = [$linksElement,];
        $request = (new BatchSearchLinkProcessesRequest())
            ->setParent($formattedParent)
            ->setLinks($links);

        // Call the API and handle any network failures.
        try {
            /** @var PagedListResponse $response */
            $response = $lineageClient->batchSearchLinkProcesses($request);

            /** @var ProcessLinks $element */
            foreach ($response as $element) {
                printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedParent = LineageClient::locationName('[PROJECT]', '[LOCATION]');
        $linksElement = '[LINKS]';

        batch_search_link_processes_sample($formattedParent, $linksElement);
    }

### createLineageEvent

Creates a new lineage event.

The async variant is [LineageClient::createLineageEventAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Client.LineageClient#_Google_Cloud_DataCatalog_Lineage_V1_Client_LineageClient__createLineageEventAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.CreateLineageEventRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.LineageEvent` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\DataCatalog\Lineage\V1\Client\LineageClient;
    use Google\Cloud\DataCatalog\Lineage\V1\CreateLineageEventRequest;
    use Google\Cloud\DataCatalog\Lineage\V1\LineageEvent;
    use Google\Protobuf\Timestamp;

    /**
     * @param string $formattedParent The name of the run that should own the lineage event. Please see
     *                                {@see LineageClient::runName()} for help formatting this field.
     */
    function create_lineage_event_sample(string $formattedParent): void
    {
        // Create a client.
        $lineageClient = new LineageClient();

        // Prepare the request message.
        $lineageEventStartTime = new Timestamp();
        $lineageEvent = (new LineageEvent())
            ->setStartTime($lineageEventStartTime);
        $request = (new CreateLineageEventRequest())
            ->setParent($formattedParent)
            ->setLineageEvent($lineageEvent);

        // Call the API and handle any network failures.
        try {
            /** @var LineageEvent $response */
            $response = $lineageClient->createLineageEvent($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedParent = LineageClient::runName('[PROJECT]', '[LOCATION]', '[PROCESS]', '[RUN]');

        create_lineage_event_sample($formattedParent);
    }

### createProcess

Creates a new process.

The async variant is [LineageClient::createProcessAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Client.LineageClient#_Google_Cloud_DataCatalog_Lineage_V1_Client_LineageClient__createProcessAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.CreateProcessRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Process` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\DataCatalog\Lineage\V1\Client\LineageClient;
    use Google\Cloud\DataCatalog\Lineage\V1\CreateProcessRequest;
    use Google\Cloud\DataCatalog\Lineage\V1\Process;

    /**
     * @param string $formattedParent The name of the project and its location that should own the
     *                                process. Please see
     *                                {@see LineageClient::locationName()} for help formatting this field.
     */
    function create_process_sample(string $formattedParent): void
    {
        // Create a client.
        $lineageClient = new LineageClient();

        // Prepare the request message.
        $process = new Process();
        $request = (new CreateProcessRequest())
            ->setParent($formattedParent)
            ->setProcess($process);

        // Call the API and handle any network failures.
        try {
            /** @var Process $response */
            $response = $lineageClient->createProcess($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedParent = LineageClient::locationName('[PROJECT]', '[LOCATION]');

        create_process_sample($formattedParent);
    }

### createRun

Creates a new run.

The async variant is [LineageClient::createRunAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Client.LineageClient#_Google_Cloud_DataCatalog_Lineage_V1_Client_LineageClient__createRunAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.CreateRunRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Run` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\DataCatalog\Lineage\V1\Client\LineageClient;
    use Google\Cloud\DataCatalog\Lineage\V1\CreateRunRequest;
    use Google\Cloud\DataCatalog\Lineage\V1\Run;
    use Google\Cloud\DataCatalog\Lineage\V1\Run\State;
    use Google\Protobuf\Timestamp;

    /**
     * @param string $formattedParent The name of the process that should own the run. Please see
     *                                {@see LineageClient::processName()} for help formatting this field.
     * @param int    $runState        The state of the run.
     */
    function create_run_sample(string $formattedParent, int $runState): void
    {
        // Create a client.
        $lineageClient = new LineageClient();

        // Prepare the request message.
        $runStartTime = new Timestamp();
        $run = (new Run())
            ->setStartTime($runStartTime)
            ->setState($runState);
        $request = (new CreateRunRequest())
            ->setParent($formattedParent)
            ->setRun($run);

        // Call the API and handle any network failures.
        try {
            /** @var Run $response */
            $response = $lineageClient->createRun($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedParent = LineageClient::processName('[PROJECT]', '[LOCATION]', '[PROCESS]');
        $runState = State::UNKNOWN;

        create_run_sample($formattedParent, $runState);
    }

### deleteLineageEvent

Deletes the lineage event with the specified name.

The async variant is [LineageClient::deleteLineageEventAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Client.LineageClient#_Google_Cloud_DataCatalog_Lineage_V1_Client_LineageClient__deleteLineageEventAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.DeleteLineageEventRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\DataCatalog\Lineage\V1\Client\LineageClient;
    use Google\Cloud\DataCatalog\Lineage\V1\DeleteLineageEventRequest;

    /**
     * @param string $formattedName The name of the lineage event to delete. Please see
     *                              {@see LineageClient::lineageEventName()} for help formatting this field.
     */
    function delete_lineage_event_sample(string $formattedName): void
    {
        // Create a client.
        $lineageClient = new LineageClient();

        // Prepare the request message.
        $request = (new DeleteLineageEventRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            $lineageClient->deleteLineageEvent($request);
            printf('Call completed successfully.' . PHP_EOL);
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = LineageClient::lineageEventName(
            '[PROJECT]',
            '[LOCATION]',
            '[PROCESS]',
            '[RUN]',
            '[LINEAGE_EVENT]'
        );

        delete_lineage_event_sample($formattedName);
    }

### deleteProcess

Deletes the process with the specified name.

The async variant is [LineageClient::deleteProcessAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Client.LineageClient#_Google_Cloud_DataCatalog_Lineage_V1_Client_LineageClient__deleteProcessAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.DeleteProcessRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<null>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\DataCatalog\Lineage\V1\Client\LineageClient;
    use Google\Cloud\DataCatalog\Lineage\V1\DeleteProcessRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName The name of the process to delete. Please see
     *                              {@see LineageClient::processName()} for help formatting this field.
     */
    function delete_process_sample(string $formattedName): void
    {
        // Create a client.
        $lineageClient = new LineageClient();

        // Prepare the request message.
        $request = (new DeleteProcessRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $lineageClient->deleteProcess($request);
            $response->pollUntilComplete();

            if ($response->operationSucceeded()) {
                printf('Operation completed successfully.' . PHP_EOL);
            } else {
                /** @var Status $error */
                $error = $response->getError();
                printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = LineageClient::processName('[PROJECT]', '[LOCATION]', '[PROCESS]');

        delete_process_sample($formattedName);
    }

### deleteRun

Deletes the run with the specified name.

The async variant is [LineageClient::deleteRunAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Client.LineageClient#_Google_Cloud_DataCatalog_Lineage_V1_Client_LineageClient__deleteRunAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.DeleteRunRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html<null>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\DataCatalog\Lineage\V1\Client\LineageClient;
    use Google\Cloud\DataCatalog\Lineage\V1\DeleteRunRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName The name of the run to delete. Please see
     *                              {@see LineageClient::runName()} for help formatting this field.
     */
    function delete_run_sample(string $formattedName): void
    {
        // Create a client.
        $lineageClient = new LineageClient();

        // Prepare the request message.
        $request = (new DeleteRunRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $lineageClient->deleteRun($request);
            $response->pollUntilComplete();

            if ($response->operationSucceeded()) {
                printf('Operation completed successfully.' . PHP_EOL);
            } else {
                /** @var Status $error */
                $error = $response->getError();
                printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = LineageClient::runName('[PROJECT]', '[LOCATION]', '[PROCESS]', '[RUN]');

        delete_run_sample($formattedName);
    }

### getLineageEvent

Gets details of a specified lineage event.

The async variant is [LineageClient::getLineageEventAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Client.LineageClient#_Google_Cloud_DataCatalog_Lineage_V1_Client_LineageClient__getLineageEventAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.GetLineageEventRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.LineageEvent` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\DataCatalog\Lineage\V1\Client\LineageClient;
    use Google\Cloud\DataCatalog\Lineage\V1\GetLineageEventRequest;
    use Google\Cloud\DataCatalog\Lineage\V1\LineageEvent;

    /**
     * @param string $formattedName The name of the lineage event to get. Please see
     *                              {@see LineageClient::lineageEventName()} for help formatting this field.
     */
    function get_lineage_event_sample(string $formattedName): void
    {
        // Create a client.
        $lineageClient = new LineageClient();

        // Prepare the request message.
        $request = (new GetLineageEventRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            /** @var LineageEvent $response */
            $response = $lineageClient->getLineageEvent($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = LineageClient::lineageEventName(
            '[PROJECT]',
            '[LOCATION]',
            '[PROCESS]',
            '[RUN]',
            '[LINEAGE_EVENT]'
        );

        get_lineage_event_sample($formattedName);
    }

### getProcess

Gets the details of the specified process.

The async variant is [LineageClient::getProcessAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Client.LineageClient#_Google_Cloud_DataCatalog_Lineage_V1_Client_LineageClient__getProcessAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.GetProcessRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Process` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\DataCatalog\Lineage\V1\Client\LineageClient;
    use Google\Cloud\DataCatalog\Lineage\V1\GetProcessRequest;
    use Google\Cloud\DataCatalog\Lineage\V1\Process;

    /**
     * @param string $formattedName The name of the process to get. Please see
     *                              {@see LineageClient::processName()} for help formatting this field.
     */
    function get_process_sample(string $formattedName): void
    {
        // Create a client.
        $lineageClient = new LineageClient();

        // Prepare the request message.
        $request = (new GetProcessRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            /** @var Process $response */
            $response = $lineageClient->getProcess($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = LineageClient::processName('[PROJECT]', '[LOCATION]', '[PROCESS]');

        get_process_sample($formattedName);
    }

### getRun

Gets the details of the specified run.

The async variant is [LineageClient::getRunAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Client.LineageClient#_Google_Cloud_DataCatalog_Lineage_V1_Client_LineageClient__getRunAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.GetRunRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Run` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\DataCatalog\Lineage\V1\Client\LineageClient;
    use Google\Cloud\DataCatalog\Lineage\V1\GetRunRequest;
    use Google\Cloud\DataCatalog\Lineage\V1\Run;

    /**
     * @param string $formattedName The name of the run to get. Please see
     *                              {@see LineageClient::runName()} for help formatting this field.
     */
    function get_run_sample(string $formattedName): void
    {
        // Create a client.
        $lineageClient = new LineageClient();

        // Prepare the request message.
        $request = (new GetRunRequest())
            ->setName($formattedName);

        // Call the API and handle any network failures.
        try {
            /** @var Run $response */
            $response = $lineageClient->getRun($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedName = LineageClient::runName('[PROJECT]', '[LOCATION]', '[PROCESS]', '[RUN]');

        get_run_sample($formattedName);
    }

### listLineageEvents

Lists lineage events in the given project and location. The list order is
not defined.

The async variant is [LineageClient::listLineageEventsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Client.LineageClient#_Google_Cloud_DataCatalog_Lineage_V1_Client_LineageClient__listLineageEventsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.ListLineageEventsRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\PagedListResponse;
    use Google\Cloud\DataCatalog\Lineage\V1\Client\LineageClient;
    use Google\Cloud\DataCatalog\Lineage\V1\LineageEvent;
    use Google\Cloud\DataCatalog\Lineage\V1\ListLineageEventsRequest;

    /**
     * @param string $formattedParent The name of the run that owns the collection of lineage events to
     *                                get. Please see {@see LineageClient::runName()} for help formatting this field.
     */
    function list_lineage_events_sample(string $formattedParent): void
    {
        // Create a client.
        $lineageClient = new LineageClient();

        // Prepare the request message.
        $request = (new ListLineageEventsRequest())
            ->setParent($formattedParent);

        // Call the API and handle any network failures.
        try {
            /** @var PagedListResponse $response */
            $response = $lineageClient->listLineageEvents($request);

            /** @var LineageEvent $element */
            foreach ($response as $element) {
                printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedParent = LineageClient::runName('[PROJECT]', '[LOCATION]', '[PROCESS]', '[RUN]');

        list_lineage_events_sample($formattedParent);
    }

### listProcesses

List processes in the given project and location. List order is descending
by insertion time.

The async variant is [LineageClient::listProcessesAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Client.LineageClient#_Google_Cloud_DataCatalog_Lineage_V1_Client_LineageClient__listProcessesAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.ListProcessesRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\PagedListResponse;
    use Google\Cloud\DataCatalog\Lineage\V1\Client\LineageClient;
    use Google\Cloud\DataCatalog\Lineage\V1\ListProcessesRequest;
    use Google\Cloud\DataCatalog\Lineage\V1\Process;

    /**
     * @param string $formattedParent The name of the project and its location that owns this
     *                                collection of processes. Please see
     *                                {@see LineageClient::locationName()} for help formatting this field.
     */
    function list_processes_sample(string $formattedParent): void
    {
        // Create a client.
        $lineageClient = new LineageClient();

        // Prepare the request message.
        $request = (new ListProcessesRequest())
            ->setParent($formattedParent);

        // Call the API and handle any network failures.
        try {
            /** @var PagedListResponse $response */
            $response = $lineageClient->listProcesses($request);

            /** @var Process $element */
            foreach ($response as $element) {
                printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedParent = LineageClient::locationName('[PROJECT]', '[LOCATION]');

        list_processes_sample($formattedParent);
    }

### listRuns

Lists runs in the given project and location. List order is descending by
`start_time`.

The async variant is [LineageClient::listRunsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Client.LineageClient#_Google_Cloud_DataCatalog_Lineage_V1_Client_LineageClient__listRunsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.ListRunsRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\PagedListResponse;
    use Google\Cloud\DataCatalog\Lineage\V1\Client\LineageClient;
    use Google\Cloud\DataCatalog\Lineage\V1\ListRunsRequest;
    use Google\Cloud\DataCatalog\Lineage\V1\Run;

    /**
     * @param string $formattedParent The name of process that owns this collection of runs. Please see
     *                                {@see LineageClient::processName()} for help formatting this field.
     */
    function list_runs_sample(string $formattedParent): void
    {
        // Create a client.
        $lineageClient = new LineageClient();

        // Prepare the request message.
        $request = (new ListRunsRequest())
            ->setParent($formattedParent);

        // Call the API and handle any network failures.
        try {
            /** @var PagedListResponse $response */
            $response = $lineageClient->listRuns($request);

            /** @var Run $element */
            foreach ($response as $element) {
                printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedParent = LineageClient::processName('[PROJECT]', '[LOCATION]', '[PROCESS]');

        list_runs_sample($formattedParent);
    }

### processOpenLineageRunEvent

Creates new lineage events together with their parents: process and run.

Updates the process and run if they already exist.
Mapped from Open Lineage specification:
<https://github.com/OpenLineage/OpenLineage/blob/main/spec/OpenLineage.json>.

The async variant is [LineageClient::processOpenLineageRunEventAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Client.LineageClient#_Google_Cloud_DataCatalog_Lineage_V1_Client_LineageClient__processOpenLineageRunEventAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.ProcessOpenLineageRunEventRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.ProcessOpenLineageRunEventResponse` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\DataCatalog\Lineage\V1\Client\LineageClient;
    use Google\Cloud\DataCatalog\Lineage\V1\ProcessOpenLineageRunEventRequest;
    use Google\Cloud\DataCatalog\Lineage\V1\ProcessOpenLineageRunEventResponse;
    use Google\Protobuf\Struct;

    /**
     * @param string $parent The name of the project and its location that should own the
     *                       process, run, and lineage event.
     */
    function process_open_lineage_run_event_sample(string $parent): void
    {
        // Create a client.
        $lineageClient = new LineageClient();

        // Prepare the request message.
        $openLineage = new Struct();
        $request = (new ProcessOpenLineageRunEventRequest())
            ->setParent($parent)
            ->setOpenLineage($openLineage);

        // Call the API and handle any network failures.
        try {
            /** @var ProcessOpenLineageRunEventResponse $response */
            $response = $lineageClient->processOpenLineageRunEvent($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $parent = '[PARENT]';

        process_open_lineage_run_event_sample($parent);
    }

### searchLineageStreaming

Retrieves a streaming response of lineage links connected to the requested
assets by performing a breadth-first search in the given direction. 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. This method retrieves
links from all valid locations provided in the request. This method
supports Column-Level Lineage (CLL) along with wildcard support to retrieve
all CLL for an Entity FQN.

Following permissions are required to retrieve links:

- `datalineage.events.get` permission for the project where the link is stored for entity-level lineage.
- `datalineage.events.getFields` permission for the project where the link is stored for column-level lineage.

This method also returns processes that created the links if explicitly
requested by setting
[max_process_per_link](https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/google.cloud.datacatalog.lineage.v1.SearchLineageStreamingRequest.limits.max_process_per_link)
is non-zero and full process details are requested via
`links.processes.process` in the
[FieldMask](https://developers.google.com/workspace/docs/api/how-tos/field-masks#read_with_a_field_mask).

Permission required to retrieve processes:

- `datalineage.processes.get` permission for the project where the process is stored.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.SearchLineageStreamingRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ timeoutMillis` | `int` Timeout to use for this call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/ServerStream.html<https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.SearchLineageStreamingResponse>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\ServerStream;
    use Google\Cloud\DataCatalog\Lineage\V1\Client\LineageClient;
    use Google\Cloud\DataCatalog\Lineage\V1\SearchLineageStreamingRequest;
    use Google\Cloud\DataCatalog\Lineage\V1\SearchLineageStreamingRequest\RootCriteria;
    use Google\Cloud\DataCatalog\Lineage\V1\SearchLineageStreamingRequest\SearchDirection;
    use Google\Cloud\DataCatalog\Lineage\V1\SearchLineageStreamingResponse;

    /**
     * @param string $formattedParent  The project and location to initiate the search from. Please see
     *                                 {@see LineageClient::locationName()} for help formatting this field.
     * @param string $locationsElement The locations to search in.
     * @param int    $direction        Direction of the search.
     */
    function search_lineage_streaming_sample(
        string $formattedParent,
        string $locationsElement,
        int $direction
    ): void {
        // Create a client.
        $lineageClient = new LineageClient();

        // Prepare the request message.
        $locations = [$locationsElement,];
        $rootCriteria = new RootCriteria();
        $request = (new SearchLineageStreamingRequest())
            ->setParent($formattedParent)
            ->setLocations($locations)
            ->setRootCriteria($rootCriteria)
            ->setDirection($direction);

        // Call the API and handle any network failures.
        try {
            /** @var ServerStream $stream */
            $stream = $lineageClient->searchLineageStreaming($request);

            /** @var SearchLineageStreamingResponse $element */
            foreach ($stream->readAll() as $element) {
                printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedParent = LineageClient::locationName('[PROJECT]', '[LOCATION]');
        $locationsElement = '[LOCATIONS]';
        $direction = SearchDirection::SEARCH_DIRECTION_UNSPECIFIED;

        search_lineage_streaming_sample($formattedParent, $locationsElement, $direction);
    }

### searchLinks

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.

The async variant is [LineageClient::searchLinksAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Client.LineageClient#_Google_Cloud_DataCatalog_Lineage_V1_Client_LineageClient__searchLinksAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.SearchLinksRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\PagedListResponse;
    use Google\Cloud\DataCatalog\Lineage\V1\Client\LineageClient;
    use Google\Cloud\DataCatalog\Lineage\V1\Link;
    use Google\Cloud\DataCatalog\Lineage\V1\SearchLinksRequest;

    /**
     * @param string $formattedParent The project and location you want search in. Please see
     *                                {@see LineageClient::locationName()} for help formatting this field.
     */
    function search_links_sample(string $formattedParent): void
    {
        // Create a client.
        $lineageClient = new LineageClient();

        // Prepare the request message.
        $request = (new SearchLinksRequest())
            ->setParent($formattedParent);

        // Call the API and handle any network failures.
        try {
            /** @var PagedListResponse $response */
            $response = $lineageClient->searchLinks($request);

            /** @var Link $element */
            foreach ($response as $element) {
                printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
            }
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $formattedParent = LineageClient::locationName('[PROJECT]', '[LOCATION]');

        search_links_sample($formattedParent);
    }

### updateProcess

Updates a process.

The async variant is [LineageClient::updateProcessAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Client.LineageClient#_Google_Cloud_DataCatalog_Lineage_V1_Client_LineageClient__updateProcessAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.UpdateProcessRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Process` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\DataCatalog\Lineage\V1\Client\LineageClient;
    use Google\Cloud\DataCatalog\Lineage\V1\Process;
    use Google\Cloud\DataCatalog\Lineage\V1\UpdateProcessRequest;

    /**
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function update_process_sample(): void
    {
        // Create a client.
        $lineageClient = new LineageClient();

        // Prepare the request message.
        $process = new Process();
        $request = (new UpdateProcessRequest())
            ->setProcess($process);

        // Call the API and handle any network failures.
        try {
            /** @var Process $response */
            $response = $lineageClient->updateProcess($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

### updateRun

Updates a run.

The async variant is [LineageClient::updateRunAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Client.LineageClient#_Google_Cloud_DataCatalog_Lineage_V1_Client_LineageClient__updateRunAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.UpdateRunRequest` A request to house fields associated with the call. |
| `callOptions` | `array` Optional. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html|array` Retry settings to use for this call. Can be a [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) object, or an associative array of retry settings parameters. See the documentation on [Google\\ApiCore\\RetrySettings](https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings.html) for example usage. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Run` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\DataCatalog\Lineage\V1\Client\LineageClient;
    use Google\Cloud\DataCatalog\Lineage\V1\Run;
    use Google\Cloud\DataCatalog\Lineage\V1\Run\State;
    use Google\Cloud\DataCatalog\Lineage\V1\UpdateRunRequest;
    use Google\Protobuf\Timestamp;

    /**
     * @param int $runState The state of the run.
     */
    function update_run_sample(int $runState): void
    {
        // Create a client.
        $lineageClient = new LineageClient();

        // Prepare the request message.
        $runStartTime = new Timestamp();
        $run = (new Run())
            ->setStartTime($runStartTime)
            ->setState($runState);
        $request = (new UpdateRunRequest())
            ->setRun($run);

        // Call the API and handle any network failures.
        try {
            /** @var Run $response */
            $response = $lineageClient->updateRun($request);
            printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
        } catch (ApiException $ex) {
            printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
        }
    }

    /**
     * Helper to execute the sample.
     *
     * This sample has been automatically generated and should be regarded as a code
     * template only. It will require modifications to work:
     *  - It may require correct/in-range values for request initialization.
     *  - It may require specifying regional endpoints when creating the service client,
     *    please see the apiEndpoint client configuration option for more details.
     */
    function callSample(): void
    {
        $runState = State::UNKNOWN;

        update_run_sample($runState);
    }

### batchSearchLinkProcessesAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.BatchSearchLinkProcessesRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html>` |   |

### createLineageEventAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.CreateLineageEventRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.LineageEvent>` |   |

### createProcessAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.CreateProcessRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Process>` |   |

### createRunAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.CreateRunRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Run>` |   |

### deleteLineageEventAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.DeleteLineageEventRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<void>` |   |

### deleteProcessAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.DeleteProcessRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### deleteRunAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.DeleteRunRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html>` |   |

### getLineageEventAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.GetLineageEventRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.LineageEvent>` |   |

### getProcessAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.GetProcessRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Process>` |   |

### getRunAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.GetRunRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Run>` |   |

### listLineageEventsAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.ListLineageEventsRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html>` |   |

### listProcessesAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.ListProcessesRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html>` |   |

### listRunsAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.ListRunsRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html>` |   |

### processOpenLineageRunEventAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.ProcessOpenLineageRunEventRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.ProcessOpenLineageRunEventResponse>` |   |

### searchLinksAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.SearchLinksRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/gax/latest/PagedListResponse.html>` |   |

### updateProcessAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.UpdateProcessRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Process>` |   |

### updateRunAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.UpdateRunRequest` |
| `optionalArgs` | `array` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<https://docs.cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest/V1.Run>` |   |

### getOperationsClient

Return an OperationsClient object with the same endpoint as $this.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\LongRunning\Client\OperationsClient` |   |

### resumeOperation

Resume an existing long running operation that was previously started by a long
running API method. If $methodName is not provided, or does not match a long
running API method, then the operation can still be resumed, but the
OperationResponse object will not deserialize the final response.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `string` The name of the long running operation |
| `methodName` | `string` The name of the method used to start the operation |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/gax/latest/OperationResponse.html` |   |

### static::lineageEventName

Formats a string containing the fully-qualified path to represent a
lineage_event resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |
| `process` | `string` |
| `run` | `string` |
| `lineageEvent` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | The formatted lineage_event resource. |

### static::locationName

Formats a string containing the fully-qualified path to represent a location
resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | The formatted location resource. |

### static::processName

Formats a string containing the fully-qualified path to represent a process
resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |
| `process` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | The formatted process resource. |

### static::runName

Formats a string containing the fully-qualified path to represent a run
resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |
| `process` | `string` |
| `run` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | The formatted run resource. |

### static::parseName

Parses a formatted name string and returns an associative array of the components in the name.

The following name formats are supported:
Template: Pattern

- lineageEvent: projects/{project}/locations/{location}/processes/{process}/runs/{run}/lineageEvents/{lineage_event}
- location: projects/{project}/locations/{location}
- process: projects/{project}/locations/{location}/processes/{process}
- run: projects/{project}/locations/{location}/processes/{process}/runs/{run}

The optional $template argument can be supplied to specify a particular pattern,
and must match one of the templates listed above. If no $template argument is
provided, or if the $template argument does not match one of the templates
listed, then parseName will check each of the supported templates, and return
the first match.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `formattedName` | `string` The formatted name string |
| `template` | `?string` Optional name of template to match |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `array` | An associative array from name component IDs to component values. |