0.16.0 (latest) 0.15.0 0.14.1 0.11.1 0.10.0 0.9.0 0.8.0 0.7.1 0.6.0 0.5.0 0.4.0 0.3.1 0.2.0 0.1.1

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Cloud Gemini Data Analytics V1beta Client class DataAgentServiceClient.

Service Description: Service describing handlers for resources.

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 \\ GeminiDataAnalytics \\ V1beta \\ 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\GeminiDataAnalytics\V1beta\DataAgentServiceClient; $creds = new ServiceAccountCredentials($scopes, $json); $options = new DataAgentServiceClient(['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'. |

### createDataAgent

Creates a new DataAgent in a given project and location.

The async variant is [DataAgentServiceClient::createDataAgentAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.Client.DataAgentServiceClient#_Google_Cloud_GeminiDataAnalytics_V1beta_Client_DataAgentServiceClient__createDataAgentAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.CreateDataAgentRequest` 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<https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.DataAgent>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\GeminiDataAnalytics\V1beta\Client\DataAgentServiceClient;
    use Google\Cloud\GeminiDataAnalytics\V1beta\CreateDataAgentRequest;
    use Google\Cloud\GeminiDataAnalytics\V1beta\DataAgent;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent Value for parent. Please see
     *                                {@see DataAgentServiceClient::locationName()} for help formatting this field.
     */
    function create_data_agent_sample(string $formattedParent): void
    {
        // Create a client.
        $dataAgentServiceClient = new DataAgentServiceClient();

        // Prepare the request message.
        $dataAgent = new DataAgent();
        $request = (new CreateDataAgentRequest())
            ->setParent($formattedParent)
            ->setDataAgent($dataAgent);

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

            if ($response->operationSucceeded()) {
                /** @var DataAgent $result */
                $result = $response->getResult();
                printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
            } 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
    {
        $formattedParent = DataAgentServiceClient::locationName('[PROJECT]', '[LOCATION]');

        create_data_agent_sample($formattedParent);
    }

### createDataAgentSync

Creates a new DataAgent in a given project and location synchronously.

The async variant is [DataAgentServiceClient::createDataAgentSyncAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.Client.DataAgentServiceClient#_Google_Cloud_GeminiDataAnalytics_V1beta_Client_DataAgentServiceClient__createDataAgentSyncAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.CreateDataAgentRequest` 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-geminidataanalytics/latest/V1beta.DataAgent` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\GeminiDataAnalytics\V1beta\Client\DataAgentServiceClient;
    use Google\Cloud\GeminiDataAnalytics\V1beta\CreateDataAgentRequest;
    use Google\Cloud\GeminiDataAnalytics\V1beta\DataAgent;

    /**
     * @param string $formattedParent Value for parent. Please see
     *                                {@see DataAgentServiceClient::locationName()} for help formatting this field.
     */
    function create_data_agent_sync_sample(string $formattedParent): void
    {
        // Create a client.
        $dataAgentServiceClient = new DataAgentServiceClient();

        // Prepare the request message.
        $dataAgent = new DataAgent();
        $request = (new CreateDataAgentRequest())
            ->setParent($formattedParent)
            ->setDataAgent($dataAgent);

        // Call the API and handle any network failures.
        try {
            /** @var DataAgent $response */
            $response = $dataAgentServiceClient->createDataAgentSync($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 = DataAgentServiceClient::locationName('[PROJECT]', '[LOCATION]');

        create_data_agent_sync_sample($formattedParent);
    }

### deleteDataAgent

Deletes a single DataAgent.

The async variant is [DataAgentServiceClient::deleteDataAgentAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.Client.DataAgentServiceClient#_Google_Cloud_GeminiDataAnalytics_V1beta_Client_DataAgentServiceClient__deleteDataAgentAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.DeleteDataAgentRequest` 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\GeminiDataAnalytics\V1beta\Client\DataAgentServiceClient;
    use Google\Cloud\GeminiDataAnalytics\V1beta\DeleteDataAgentRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName Name of the resource. Please see
     *                              {@see DataAgentServiceClient::dataAgentName()} for help formatting this field.
     */
    function delete_data_agent_sample(string $formattedName): void
    {
        // Create a client.
        $dataAgentServiceClient = new DataAgentServiceClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $dataAgentServiceClient->deleteDataAgent($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 = DataAgentServiceClient::dataAgentName('[PROJECT]', '[LOCATION]', '[DATA_AGENT]');

        delete_data_agent_sample($formattedName);
    }

### deleteDataAgentSync

Deletes a single DataAgent synchronously.

The async variant is [DataAgentServiceClient::deleteDataAgentSyncAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.Client.DataAgentServiceClient#_Google_Cloud_GeminiDataAnalytics_V1beta_Client_DataAgentServiceClient__deleteDataAgentSyncAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.DeleteDataAgentRequest` 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\GeminiDataAnalytics\V1beta\Client\DataAgentServiceClient;
    use Google\Cloud\GeminiDataAnalytics\V1beta\DeleteDataAgentRequest;

    /**
     * @param string $formattedName Name of the resource. Please see
     *                              {@see DataAgentServiceClient::dataAgentName()} for help formatting this field.
     */
    function delete_data_agent_sync_sample(string $formattedName): void
    {
        // Create a client.
        $dataAgentServiceClient = new DataAgentServiceClient();

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

        // Call the API and handle any network failures.
        try {
            $dataAgentServiceClient->deleteDataAgentSync($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 = DataAgentServiceClient::dataAgentName('[PROJECT]', '[LOCATION]', '[DATA_AGENT]');

        delete_data_agent_sync_sample($formattedName);
    }

### getDataAgent

Gets details of a single DataAgent.

The async variant is [DataAgentServiceClient::getDataAgentAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.Client.DataAgentServiceClient#_Google_Cloud_GeminiDataAnalytics_V1beta_Client_DataAgentServiceClient__getDataAgentAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.GetDataAgentRequest` 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-geminidataanalytics/latest/V1beta.DataAgent` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\GeminiDataAnalytics\V1beta\Client\DataAgentServiceClient;
    use Google\Cloud\GeminiDataAnalytics\V1beta\DataAgent;
    use Google\Cloud\GeminiDataAnalytics\V1beta\GetDataAgentRequest;

    /**
     * @param string $formattedName Name of the resource. Please see
     *                              {@see DataAgentServiceClient::dataAgentName()} for help formatting this field.
     */
    function get_data_agent_sample(string $formattedName): void
    {
        // Create a client.
        $dataAgentServiceClient = new DataAgentServiceClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var DataAgent $response */
            $response = $dataAgentServiceClient->getDataAgent($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 = DataAgentServiceClient::dataAgentName('[PROJECT]', '[LOCATION]', '[DATA_AGENT]');

        get_data_agent_sample($formattedName);
    }

### getIamPolicy

Gets the IAM policy for DataAgent

The async variant is [DataAgentServiceClient::getIamPolicyAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.Client.DataAgentServiceClient#_Google_Cloud_GeminiDataAnalytics_V1beta_Client_DataAgentServiceClient__getIamPolicyAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Iam.V1.GetIamPolicyRequest.html` 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/common-protos/latest/Cloud.Iam.V1.Policy.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\GeminiDataAnalytics\V1beta\Client\DataAgentServiceClient;
    use Google\Cloud\Iam\V1\GetIamPolicyRequest;
    use Google\Cloud\Iam\V1\Policy;

    /**
     * @param string $resource REQUIRED: The resource for which the policy is being requested.
     *                         See the operation documentation for the appropriate value for this field.
     */
    function get_iam_policy_sample(string $resource): void
    {
        // Create a client.
        $dataAgentServiceClient = new DataAgentServiceClient();

        // Prepare the request message.
        $request = (new GetIamPolicyRequest())
            ->setResource($resource);

        // Call the API and handle any network failures.
        try {
            /** @var Policy $response */
            $response = $dataAgentServiceClient->getIamPolicy($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
    {
        $resource = '[RESOURCE]';

        get_iam_policy_sample($resource);
    }

### listAccessibleDataAgents

Lists DataAgents that are accessible to the caller in a given project and
location.

The async variant is
[DataAgentServiceClient::listAccessibleDataAgentsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.Client.DataAgentServiceClient#_Google_Cloud_GeminiDataAnalytics_V1beta_Client_DataAgentServiceClient__listAccessibleDataAgentsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.ListAccessibleDataAgentsRequest` 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\GeminiDataAnalytics\V1beta\Client\DataAgentServiceClient;
    use Google\Cloud\GeminiDataAnalytics\V1beta\DataAgent;
    use Google\Cloud\GeminiDataAnalytics\V1beta\ListAccessibleDataAgentsRequest;

    /**
     * @param string $formattedParent Parent value for ListAccessibleDataAgentsRequest. Please see
     *                                {@see DataAgentServiceClient::locationName()} for help formatting this field.
     */
    function list_accessible_data_agents_sample(string $formattedParent): void
    {
        // Create a client.
        $dataAgentServiceClient = new DataAgentServiceClient();

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

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

            /** @var DataAgent $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 = DataAgentServiceClient::locationName('[PROJECT]', '[LOCATION]');

        list_accessible_data_agents_sample($formattedParent);
    }

### listDataAgents

Lists DataAgents in a given project and location.

The async variant is [DataAgentServiceClient::listDataAgentsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.Client.DataAgentServiceClient#_Google_Cloud_GeminiDataAnalytics_V1beta_Client_DataAgentServiceClient__listDataAgentsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.ListDataAgentsRequest` 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\GeminiDataAnalytics\V1beta\Client\DataAgentServiceClient;
    use Google\Cloud\GeminiDataAnalytics\V1beta\DataAgent;
    use Google\Cloud\GeminiDataAnalytics\V1beta\ListDataAgentsRequest;

    /**
     * @param string $formattedParent Parent value for ListDataAgentsRequest. Please see
     *                                {@see DataAgentServiceClient::locationName()} for help formatting this field.
     */
    function list_data_agents_sample(string $formattedParent): void
    {
        // Create a client.
        $dataAgentServiceClient = new DataAgentServiceClient();

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

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

            /** @var DataAgent $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 = DataAgentServiceClient::locationName('[PROJECT]', '[LOCATION]');

        list_data_agents_sample($formattedParent);
    }

### retrieveAgentOpsObservability

Gets AgentOps observability settings and status of required services.

The async variant is
[DataAgentServiceClient::retrieveAgentOpsObservabilityAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.Client.DataAgentServiceClient#_Google_Cloud_GeminiDataAnalytics_V1beta_Client_DataAgentServiceClient__retrieveAgentOpsObservabilityAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.RetrieveAgentOpsObservabilityRequest` 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-geminidataanalytics/latest/V1beta.RetrieveAgentOpsObservabilityResponse` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\GeminiDataAnalytics\V1beta\Client\DataAgentServiceClient;
    use Google\Cloud\GeminiDataAnalytics\V1beta\RetrieveAgentOpsObservabilityRequest;
    use Google\Cloud\GeminiDataAnalytics\V1beta\RetrieveAgentOpsObservabilityResponse;

    /**
     * @param string $formattedParent Parent value for RetrieveAgentOpsObservabilityRequest.
     *                                Format: projects/{project}/locations/{location}
     *                                Please see {@see DataAgentServiceClient::locationName()} for help formatting this field.
     * @param string $dataSourceType  The data source type for which to retrieve observability
     *                                settings. Examples: "bigquery", "looker"
     */
    function retrieve_agent_ops_observability_sample(
        string $formattedParent,
        string $dataSourceType
    ): void {
        // Create a client.
        $dataAgentServiceClient = new DataAgentServiceClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var RetrieveAgentOpsObservabilityResponse $response */
            $response = $dataAgentServiceClient->retrieveAgentOpsObservability($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 = DataAgentServiceClient::locationName('[PROJECT]', '[LOCATION]');
        $dataSourceType = '[DATA_SOURCE_TYPE]';

        retrieve_agent_ops_observability_sample($formattedParent, $dataSourceType);
    }

### setAgentOpsObservability

Enables/Disables required GCP services and configures AgentOps
observability settings.

The async variant is
[DataAgentServiceClient::setAgentOpsObservabilityAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.Client.DataAgentServiceClient#_Google_Cloud_GeminiDataAnalytics_V1beta_Client_DataAgentServiceClient__setAgentOpsObservabilityAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.SetAgentOpsObservabilityRequest` 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<https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.SetAgentOpsObservabilityResponse>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\GeminiDataAnalytics\V1beta\Client\DataAgentServiceClient;
    use Google\Cloud\GeminiDataAnalytics\V1beta\SetAgentOpsObservabilityRequest;
    use Google\Cloud\GeminiDataAnalytics\V1beta\SetAgentOpsObservabilityResponse;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent Parent value for SetAgentOpsObservabilityRequest.
     *                                Format: projects/{project}/locations/{location}
     *                                Please see {@see DataAgentServiceClient::locationName()} for help formatting this field.
     * @param string $dataSourceType  The data source type for which to set observability settings.
     *                                Examples: "bigquery", "looker"
     */
    function set_agent_ops_observability_sample(string $formattedParent, string $dataSourceType): void
    {
        // Create a client.
        $dataAgentServiceClient = new DataAgentServiceClient();

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

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

            if ($response->operationSucceeded()) {
                /** @var SetAgentOpsObservabilityResponse $result */
                $result = $response->getResult();
                printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
            } 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
    {
        $formattedParent = DataAgentServiceClient::locationName('[PROJECT]', '[LOCATION]');
        $dataSourceType = '[DATA_SOURCE_TYPE]';

        set_agent_ops_observability_sample($formattedParent, $dataSourceType);
    }

### setIamPolicy

Sets the IAM policy for a DataAgent.

The async variant is [DataAgentServiceClient::setIamPolicyAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.Client.DataAgentServiceClient#_Google_Cloud_GeminiDataAnalytics_V1beta_Client_DataAgentServiceClient__setIamPolicyAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Iam.V1.SetIamPolicyRequest.html` 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/common-protos/latest/Cloud.Iam.V1.Policy.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\GeminiDataAnalytics\V1beta\Client\DataAgentServiceClient;
    use Google\Cloud\Iam\V1\Policy;
    use Google\Cloud\Iam\V1\SetIamPolicyRequest;

    /**
     * @param string $resource REQUIRED: The resource for which the policy is being specified.
     *                         See the operation documentation for the appropriate value for this field.
     */
    function set_iam_policy_sample(string $resource): void
    {
        // Create a client.
        $dataAgentServiceClient = new DataAgentServiceClient();

        // Prepare the request message.
        $policy = new Policy();
        $request = (new SetIamPolicyRequest())
            ->setResource($resource)
            ->setPolicy($policy);

        // Call the API and handle any network failures.
        try {
            /** @var Policy $response */
            $response = $dataAgentServiceClient->setIamPolicy($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
    {
        $resource = '[RESOURCE]';

        set_iam_policy_sample($resource);
    }

### updateDataAgent

Updates the parameters of a single DataAgent.

The async variant is [DataAgentServiceClient::updateDataAgentAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.Client.DataAgentServiceClient#_Google_Cloud_GeminiDataAnalytics_V1beta_Client_DataAgentServiceClient__updateDataAgentAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.UpdateDataAgentRequest` 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<https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.DataAgent>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\GeminiDataAnalytics\V1beta\Client\DataAgentServiceClient;
    use Google\Cloud\GeminiDataAnalytics\V1beta\DataAgent;
    use Google\Cloud\GeminiDataAnalytics\V1beta\UpdateDataAgentRequest;
    use Google\Rpc\Status;

    /**
     * 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_data_agent_sample(): void
    {
        // Create a client.
        $dataAgentServiceClient = new DataAgentServiceClient();

        // Prepare the request message.
        $dataAgent = new DataAgent();
        $request = (new UpdateDataAgentRequest())
            ->setDataAgent($dataAgent);

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

            if ($response->operationSucceeded()) {
                /** @var DataAgent $result */
                $result = $response->getResult();
                printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
            } 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());
        }
    }

### updateDataAgentSync

Updates the parameters of a single DataAgent synchronously.

The async variant is [DataAgentServiceClient::updateDataAgentSyncAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.Client.DataAgentServiceClient#_Google_Cloud_GeminiDataAnalytics_V1beta_Client_DataAgentServiceClient__updateDataAgentSyncAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.UpdateDataAgentRequest` 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-geminidataanalytics/latest/V1beta.DataAgent` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\GeminiDataAnalytics\V1beta\Client\DataAgentServiceClient;
    use Google\Cloud\GeminiDataAnalytics\V1beta\DataAgent;
    use Google\Cloud\GeminiDataAnalytics\V1beta\UpdateDataAgentRequest;

    /**
     * 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_data_agent_sync_sample(): void
    {
        // Create a client.
        $dataAgentServiceClient = new DataAgentServiceClient();

        // Prepare the request message.
        $dataAgent = new DataAgent();
        $request = (new UpdateDataAgentRequest())
            ->setDataAgent($dataAgent);

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

### getLocation

Gets information about a location.

The async variant is [DataAgentServiceClient::getLocationAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.Client.DataAgentServiceClient#_Google_Cloud_GeminiDataAnalytics_V1beta_Client_DataAgentServiceClient__getLocationAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Location.GetLocationRequest.html` 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/common-protos/latest/Cloud.Location.Location.html` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\GeminiDataAnalytics\V1beta\Client\DataAgentServiceClient;
    use Google\Cloud\Location\GetLocationRequest;
    use Google\Cloud\Location\Location;

    /**
     * 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 get_location_sample(): void
    {
        // Create a client.
        $dataAgentServiceClient = new DataAgentServiceClient();

        // Prepare the request message.
        $request = new GetLocationRequest();

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

### listLocations

Lists information about the supported locations for this service.

This method lists locations based on the resource scope provided in
the [ListLocationsRequest.name](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Location.ListLocationsRequest.html#_Google_Cloud_Location_ListLocationsRequest__getName__) field: \*
**Global locations** : If `name` is empty, the method lists the
public locations available to all projects. \* **Project-specific
locations** : If `name` follows the format
`projects/{project}`, the method lists locations visible to that
specific project. This includes public, private, or other
project-specific locations enabled for the project.

For gRPC and client library implementations, the resource name is
passed as the `name` field. For direct service calls, the resource
name is
incorporated into the request path based on the specific service
implementation and version.

The async variant is [DataAgentServiceClient::listLocationsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.Client.DataAgentServiceClient#_Google_Cloud_GeminiDataAnalytics_V1beta_Client_DataAgentServiceClient__listLocationsAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Location.ListLocationsRequest.html` 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\GeminiDataAnalytics\V1beta\Client\DataAgentServiceClient;
    use Google\Cloud\Location\ListLocationsRequest;
    use Google\Cloud\Location\Location;

    /**
     * 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 list_locations_sample(): void
    {
        // Create a client.
        $dataAgentServiceClient = new DataAgentServiceClient();

        // Prepare the request message.
        $request = new ListLocationsRequest();

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

            /** @var Location $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());
        }
    }

### createDataAgentAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.CreateDataAgentRequest` |
| `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>` |   |

### createDataAgentSyncAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.CreateDataAgentRequest` |
| `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-geminidataanalytics/latest/V1beta.DataAgent>` |   |

### deleteDataAgentAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.DeleteDataAgentRequest` |
| `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>` |   |

### deleteDataAgentSyncAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.DeleteDataAgentRequest` |
| `optionalArgs` | `array` |

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

### getDataAgentAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.GetDataAgentRequest` |
| `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-geminidataanalytics/latest/V1beta.DataAgent>` |   |

### getIamPolicyAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Iam.V1.GetIamPolicyRequest.html` |
| `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/common-protos/latest/Cloud.Iam.V1.Policy.html>` |   |

### listAccessibleDataAgentsAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.ListAccessibleDataAgentsRequest` |
| `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>` |   |

### listDataAgentsAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.ListDataAgentsRequest` |
| `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>` |   |

### retrieveAgentOpsObservabilityAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.RetrieveAgentOpsObservabilityRequest` |
| `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-geminidataanalytics/latest/V1beta.RetrieveAgentOpsObservabilityResponse>` |   |

### setAgentOpsObservabilityAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.SetAgentOpsObservabilityRequest` |
| `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>` |   |

### setIamPolicyAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Iam.V1.SetIamPolicyRequest.html` |
| `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/common-protos/latest/Cloud.Iam.V1.Policy.html>` |   |

### updateDataAgentAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.UpdateDataAgentRequest` |
| `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>` |   |

### updateDataAgentSyncAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-geminidataanalytics/latest/V1beta.UpdateDataAgentRequest` |
| `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-geminidataanalytics/latest/V1beta.DataAgent>` |   |

### getLocationAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Location.GetLocationRequest.html` |
| `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/common-protos/latest/Cloud.Location.Location.html>` |   |

### listLocationsAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Location.ListLocationsRequest.html` |
| `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>` |   |

### 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::cryptoKeyName

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

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

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

### static::dataAgentName

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

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | The formatted data_agent 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::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

- cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
- dataAgent: projects/{project}/locations/{location}/dataAgents/{data_agent}
- location: projects/{project}/locations/{location}

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. |