# Google Cloud Discovery Engine V1 Client - Class SiteSearchEngineServiceClient (1.11.1)

1.11.1 (latest) 1.11.0 1.10.1 1.9.1 1.8.0 1.7.0 1.6.1 1.5.1 1.4.0 1.3.3 1.2.0 1.1.0 1.0.0 0.11.3 0.8.0 0.7.1 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.1 Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class SiteSearchEngineServiceClient.

Service Description: Service for managing site search related 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 \\ DiscoveryEngine \\ 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\DiscoveryEngine\V1\SiteSearchEngineServiceClient; $creds = new ServiceAccountCredentials($scopes, $json); $options = new SiteSearchEngineServiceClient(['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'. |

### batchCreateTargetSites

Creates [TargetSite](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.TargetSite) in a
batch.

The async variant is
[SiteSearchEngineServiceClient::batchCreateTargetSitesAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Client.SiteSearchEngineServiceClient#_Google_Cloud_DiscoveryEngine_V1_Client_SiteSearchEngineServiceClient__batchCreateTargetSitesAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.BatchCreateTargetSitesRequest` 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-discoveryengine/latest/V1.BatchCreateTargetSitesResponse>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\DiscoveryEngine\V1\BatchCreateTargetSitesRequest;
    use Google\Cloud\DiscoveryEngine\V1\BatchCreateTargetSitesResponse;
    use Google\Cloud\DiscoveryEngine\V1\Client\SiteSearchEngineServiceClient;
    use Google\Cloud\DiscoveryEngine\V1\CreateTargetSiteRequest;
    use Google\Cloud\DiscoveryEngine\V1\TargetSite;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent                      The parent resource shared by all TargetSites being created.
     *                                                     `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.
     *                                                     The parent field in the CreateBookRequest messages must either be empty or
     *                                                     match this field. Please see
     *                                                     {@see SiteSearchEngineServiceClient::siteSearchEngineName()} for help formatting this field.
     * @param string $formattedRequestsParent              Parent resource name of
     *                                                     [TargetSite][google.cloud.discoveryengine.v1.TargetSite], such as
     *                                                     `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. Please see
     *                                                     {@see SiteSearchEngineServiceClient::siteSearchEngineName()} for help formatting this field.
     * @param string $requestsTargetSiteProvidedUriPattern Input only. The user provided URI pattern from which the
     *                                                     `generated_uri_pattern` is generated.
     */
    function batch_create_target_sites_sample(
        string $formattedParent,
        string $formattedRequestsParent,
        string $requestsTargetSiteProvidedUriPattern
    ): void {
        // Create a client.
        $siteSearchEngineServiceClient = new SiteSearchEngineServiceClient();

        // Prepare the request message.
        $requestsTargetSite = (new TargetSite())
            ->setProvidedUriPattern($requestsTargetSiteProvidedUriPattern);
        $createTargetSiteRequest = (new CreateTargetSiteRequest())
            ->setParent($formattedRequestsParent)
            ->setTargetSite($requestsTargetSite);
        $requests = [$createTargetSiteRequest,];
        $request = (new BatchCreateTargetSitesRequest())
            ->setParent($formattedParent)
            ->setRequests($requests);

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

            if ($response->operationSucceeded()) {
                /** @var BatchCreateTargetSitesResponse $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 = SiteSearchEngineServiceClient::siteSearchEngineName(
            '[PROJECT]',
            '[LOCATION]',
            '[DATA_STORE]'
        );
        $formattedRequestsParent = SiteSearchEngineServiceClient::siteSearchEngineName(
            '[PROJECT]',
            '[LOCATION]',
            '[DATA_STORE]'
        );
        $requestsTargetSiteProvidedUriPattern = '[PROVIDED_URI_PATTERN]';

        batch_create_target_sites_sample(
            $formattedParent,
            $formattedRequestsParent,
            $requestsTargetSiteProvidedUriPattern
        );
    }

### batchVerifyTargetSites

Verify target sites' ownership and validity.

This API sends all the target sites under site search engine for
verification.

The async variant is
[SiteSearchEngineServiceClient::batchVerifyTargetSitesAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Client.SiteSearchEngineServiceClient#_Google_Cloud_DiscoveryEngine_V1_Client_SiteSearchEngineServiceClient__batchVerifyTargetSitesAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.BatchVerifyTargetSitesRequest` 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-discoveryengine/latest/V1.BatchVerifyTargetSitesResponse>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\DiscoveryEngine\V1\BatchVerifyTargetSitesRequest;
    use Google\Cloud\DiscoveryEngine\V1\BatchVerifyTargetSitesResponse;
    use Google\Cloud\DiscoveryEngine\V1\Client\SiteSearchEngineServiceClient;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent The parent resource shared by all TargetSites being verified.
     *                                `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. Please see
     *                                {@see SiteSearchEngineServiceClient::siteSearchEngineName()} for help formatting this field.
     */
    function batch_verify_target_sites_sample(string $formattedParent): void
    {
        // Create a client.
        $siteSearchEngineServiceClient = new SiteSearchEngineServiceClient();

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

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

            if ($response->operationSucceeded()) {
                /** @var BatchVerifyTargetSitesResponse $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 = SiteSearchEngineServiceClient::siteSearchEngineName(
            '[PROJECT]',
            '[LOCATION]',
            '[DATA_STORE]'
        );

        batch_verify_target_sites_sample($formattedParent);
    }

### createSitemap

Creates a Sitemap.

The async variant is [SiteSearchEngineServiceClient::createSitemapAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Client.SiteSearchEngineServiceClient#_Google_Cloud_DiscoveryEngine_V1_Client_SiteSearchEngineServiceClient__createSitemapAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.CreateSitemapRequest` 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<Google\Cloud\DiscoveryEngine\V1\Sitemap>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\DiscoveryEngine\V1\Client\SiteSearchEngineServiceClient;
    use Google\Cloud\DiscoveryEngine\V1\CreateSitemapRequest;
    use Google\Cloud\DiscoveryEngine\V1\Sitemap;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent Parent resource name of the
     *                                [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine], such
     *                                as `projects/&#42;/locations/&#42;/collections/&#42;/dataStores/&#42;/siteSearchEngine`. Please see
     *                                {@see SiteSearchEngineServiceClient::siteSearchEngineName()} for help formatting this field.
     */
    function create_sitemap_sample(string $formattedParent): void
    {
        // Create a client.
        $siteSearchEngineServiceClient = new SiteSearchEngineServiceClient();

        // Prepare the request message.
        $sitemap = new Sitemap();
        $request = (new CreateSitemapRequest())
            ->setParent($formattedParent)
            ->setSitemap($sitemap);

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

            if ($response->operationSucceeded()) {
                /** @var Sitemap $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 = SiteSearchEngineServiceClient::siteSearchEngineName(
            '[PROJECT]',
            '[LOCATION]',
            '[DATA_STORE]'
        );

        create_sitemap_sample($formattedParent);
    }

### createTargetSite

Creates a [TargetSite](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.TargetSite).

The async variant is
[SiteSearchEngineServiceClient::createTargetSiteAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Client.SiteSearchEngineServiceClient#_Google_Cloud_DiscoveryEngine_V1_Client_SiteSearchEngineServiceClient__createTargetSiteAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.CreateTargetSiteRequest` 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-discoveryengine/latest/V1.TargetSite>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\DiscoveryEngine\V1\Client\SiteSearchEngineServiceClient;
    use Google\Cloud\DiscoveryEngine\V1\CreateTargetSiteRequest;
    use Google\Cloud\DiscoveryEngine\V1\TargetSite;
    use Google\Rpc\Status;

    /**
     * @param string $formattedParent              Parent resource name of
     *                                             [TargetSite][google.cloud.discoveryengine.v1.TargetSite], such as
     *                                             `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. Please see
     *                                             {@see SiteSearchEngineServiceClient::siteSearchEngineName()} for help formatting this field.
     * @param string $targetSiteProvidedUriPattern Input only. The user provided URI pattern from which the
     *                                             `generated_uri_pattern` is generated.
     */
    function create_target_site_sample(
        string $formattedParent,
        string $targetSiteProvidedUriPattern
    ): void {
        // Create a client.
        $siteSearchEngineServiceClient = new SiteSearchEngineServiceClient();

        // Prepare the request message.
        $targetSite = (new TargetSite())
            ->setProvidedUriPattern($targetSiteProvidedUriPattern);
        $request = (new CreateTargetSiteRequest())
            ->setParent($formattedParent)
            ->setTargetSite($targetSite);

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

            if ($response->operationSucceeded()) {
                /** @var TargetSite $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 = SiteSearchEngineServiceClient::siteSearchEngineName(
            '[PROJECT]',
            '[LOCATION]',
            '[DATA_STORE]'
        );
        $targetSiteProvidedUriPattern = '[PROVIDED_URI_PATTERN]';

        create_target_site_sample($formattedParent, $targetSiteProvidedUriPattern);
    }

### deleteSitemap

Deletes a Sitemap.

The async variant is [SiteSearchEngineServiceClient::deleteSitemapAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Client.SiteSearchEngineServiceClient#_Google_Cloud_DiscoveryEngine_V1_Client_SiteSearchEngineServiceClient__deleteSitemapAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.DeleteSitemapRequest` 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\DiscoveryEngine\V1\Client\SiteSearchEngineServiceClient;
    use Google\Cloud\DiscoveryEngine\V1\DeleteSitemapRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName Full resource name of
     *                              [Sitemap][google.cloud.discoveryengine.v1.Sitemap], such as
     *                              `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}`.
     *
     *                              If the caller does not have permission to access the
     *                              [Sitemap][google.cloud.discoveryengine.v1.Sitemap], regardless of whether
     *                              or not it exists, a PERMISSION_DENIED error is returned.
     *
     *                              If the requested [Sitemap][google.cloud.discoveryengine.v1.Sitemap] does
     *                              not exist, a NOT_FOUND error is returned. Please see
     *                              {@see SiteSearchEngineServiceClient::sitemapName()} for help formatting this field.
     */
    function delete_sitemap_sample(string $formattedName): void
    {
        // Create a client.
        $siteSearchEngineServiceClient = new SiteSearchEngineServiceClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $siteSearchEngineServiceClient->deleteSitemap($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 = SiteSearchEngineServiceClient::sitemapName(
            '[PROJECT]',
            '[LOCATION]',
            '[DATA_STORE]',
            '[SITEMAP]'
        );

        delete_sitemap_sample($formattedName);
    }

### deleteTargetSite

Deletes a [TargetSite](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.TargetSite).

The async variant is
[SiteSearchEngineServiceClient::deleteTargetSiteAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Client.SiteSearchEngineServiceClient#_Google_Cloud_DiscoveryEngine_V1_Client_SiteSearchEngineServiceClient__deleteTargetSiteAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.DeleteTargetSiteRequest` 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\DiscoveryEngine\V1\Client\SiteSearchEngineServiceClient;
    use Google\Cloud\DiscoveryEngine\V1\DeleteTargetSiteRequest;
    use Google\Rpc\Status;

    /**
     * @param string $formattedName Full resource name of
     *                              [TargetSite][google.cloud.discoveryengine.v1.TargetSite], such as
     *                              `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`.
     *
     *                              If the caller does not have permission to access the
     *                              [TargetSite][google.cloud.discoveryengine.v1.TargetSite], regardless of
     *                              whether or not it exists, a PERMISSION_DENIED error is returned.
     *
     *                              If the requested [TargetSite][google.cloud.discoveryengine.v1.TargetSite]
     *                              does not exist, a NOT_FOUND error is returned. Please see
     *                              {@see SiteSearchEngineServiceClient::targetSiteName()} for help formatting this field.
     */
    function delete_target_site_sample(string $formattedName): void
    {
        // Create a client.
        $siteSearchEngineServiceClient = new SiteSearchEngineServiceClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var OperationResponse $response */
            $response = $siteSearchEngineServiceClient->deleteTargetSite($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 = SiteSearchEngineServiceClient::targetSiteName(
            '[PROJECT]',
            '[LOCATION]',
            '[DATA_STORE]',
            '[TARGET_SITE]'
        );

        delete_target_site_sample($formattedName);
    }

### disableAdvancedSiteSearch

Downgrade from advanced site search to basic site search.

The async variant is
[SiteSearchEngineServiceClient::disableAdvancedSiteSearchAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Client.SiteSearchEngineServiceClient#_Google_Cloud_DiscoveryEngine_V1_Client_SiteSearchEngineServiceClient__disableAdvancedSiteSearchAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.DisableAdvancedSiteSearchRequest` 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-discoveryengine/latest/V1.DisableAdvancedSiteSearchResponse>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\DiscoveryEngine\V1\Client\SiteSearchEngineServiceClient;
    use Google\Cloud\DiscoveryEngine\V1\DisableAdvancedSiteSearchRequest;
    use Google\Cloud\DiscoveryEngine\V1\DisableAdvancedSiteSearchResponse;
    use Google\Rpc\Status;

    /**
     * @param string $formattedSiteSearchEngine Full resource name of the
     *                                          [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine], such
     *                                          as
     *                                          `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`. Please see
     *                                          {@see SiteSearchEngineServiceClient::siteSearchEngineName()} for help formatting this field.
     */
    function disable_advanced_site_search_sample(string $formattedSiteSearchEngine): void
    {
        // Create a client.
        $siteSearchEngineServiceClient = new SiteSearchEngineServiceClient();

        // Prepare the request message.
        $request = (new DisableAdvancedSiteSearchRequest())
            ->setSiteSearchEngine($formattedSiteSearchEngine);

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

            if ($response->operationSucceeded()) {
                /** @var DisableAdvancedSiteSearchResponse $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
    {
        $formattedSiteSearchEngine = SiteSearchEngineServiceClient::siteSearchEngineName(
            '[PROJECT]',
            '[LOCATION]',
            '[DATA_STORE]'
        );

        disable_advanced_site_search_sample($formattedSiteSearchEngine);
    }

### enableAdvancedSiteSearch

Upgrade from basic site search to advanced site search.

The async variant is
[SiteSearchEngineServiceClient::enableAdvancedSiteSearchAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Client.SiteSearchEngineServiceClient#_Google_Cloud_DiscoveryEngine_V1_Client_SiteSearchEngineServiceClient__enableAdvancedSiteSearchAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.EnableAdvancedSiteSearchRequest` 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-discoveryengine/latest/V1.EnableAdvancedSiteSearchResponse>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\DiscoveryEngine\V1\Client\SiteSearchEngineServiceClient;
    use Google\Cloud\DiscoveryEngine\V1\EnableAdvancedSiteSearchRequest;
    use Google\Cloud\DiscoveryEngine\V1\EnableAdvancedSiteSearchResponse;
    use Google\Rpc\Status;

    /**
     * @param string $formattedSiteSearchEngine Full resource name of the
     *                                          [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine], such
     *                                          as
     *                                          `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`. Please see
     *                                          {@see SiteSearchEngineServiceClient::siteSearchEngineName()} for help formatting this field.
     */
    function enable_advanced_site_search_sample(string $formattedSiteSearchEngine): void
    {
        // Create a client.
        $siteSearchEngineServiceClient = new SiteSearchEngineServiceClient();

        // Prepare the request message.
        $request = (new EnableAdvancedSiteSearchRequest())
            ->setSiteSearchEngine($formattedSiteSearchEngine);

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

            if ($response->operationSucceeded()) {
                /** @var EnableAdvancedSiteSearchResponse $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
    {
        $formattedSiteSearchEngine = SiteSearchEngineServiceClient::siteSearchEngineName(
            '[PROJECT]',
            '[LOCATION]',
            '[DATA_STORE]'
        );

        enable_advanced_site_search_sample($formattedSiteSearchEngine);
    }

### fetchDomainVerificationStatus

Returns list of target sites with its domain verification status.

This method can only be called under data store with BASIC_SITE_SEARCH
state at the moment.

The async variant is
[SiteSearchEngineServiceClient::fetchDomainVerificationStatusAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Client.SiteSearchEngineServiceClient#_Google_Cloud_DiscoveryEngine_V1_Client_SiteSearchEngineServiceClient__fetchDomainVerificationStatusAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.FetchDomainVerificationStatusRequest` 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\DiscoveryEngine\V1\Client\SiteSearchEngineServiceClient;
    use Google\Cloud\DiscoveryEngine\V1\FetchDomainVerificationStatusRequest;
    use Google\Cloud\DiscoveryEngine\V1\TargetSite;

    /**
     * @param string $formattedSiteSearchEngine The site search engine resource under which we fetch all the
     *                                          domain verification status.
     *                                          `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. Please see
     *                                          {@see SiteSearchEngineServiceClient::siteSearchEngineName()} for help formatting this field.
     */
    function fetch_domain_verification_status_sample(string $formattedSiteSearchEngine): void
    {
        // Create a client.
        $siteSearchEngineServiceClient = new SiteSearchEngineServiceClient();

        // Prepare the request message.
        $request = (new FetchDomainVerificationStatusRequest())
            ->setSiteSearchEngine($formattedSiteSearchEngine);

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

            /** @var TargetSite $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
    {
        $formattedSiteSearchEngine = SiteSearchEngineServiceClient::siteSearchEngineName(
            '[PROJECT]',
            '[LOCATION]',
            '[DATA_STORE]'
        );

        fetch_domain_verification_status_sample($formattedSiteSearchEngine);
    }

### fetchSitemaps

Fetch Sitemaps in a
[DataStore](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.DataStore).

The async variant is [SiteSearchEngineServiceClient::fetchSitemapsAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Client.SiteSearchEngineServiceClient#_Google_Cloud_DiscoveryEngine_V1_Client_SiteSearchEngineServiceClient__fetchSitemapsAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.FetchSitemapsRequest` 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-discoveryengine/latest/V1.FetchSitemapsResponse` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\DiscoveryEngine\V1\Client\SiteSearchEngineServiceClient;
    use Google\Cloud\DiscoveryEngine\V1\FetchSitemapsRequest;
    use Google\Cloud\DiscoveryEngine\V1\FetchSitemapsResponse;

    /**
     * @param string $formattedParent Parent resource name of the
     *                                [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine], such
     *                                as `projects/&#42;/locations/&#42;/collections/&#42;/dataStores/&#42;/siteSearchEngine`. Please see
     *                                {@see SiteSearchEngineServiceClient::siteSearchEngineName()} for help formatting this field.
     */
    function fetch_sitemaps_sample(string $formattedParent): void
    {
        // Create a client.
        $siteSearchEngineServiceClient = new SiteSearchEngineServiceClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var FetchSitemapsResponse $response */
            $response = $siteSearchEngineServiceClient->fetchSitemaps($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 = SiteSearchEngineServiceClient::siteSearchEngineName(
            '[PROJECT]',
            '[LOCATION]',
            '[DATA_STORE]'
        );

        fetch_sitemaps_sample($formattedParent);
    }

### getSiteSearchEngine

Gets the
SiteSearchEngine.

The async variant is
[SiteSearchEngineServiceClient::getSiteSearchEngineAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Client.SiteSearchEngineServiceClient#_Google_Cloud_DiscoveryEngine_V1_Client_SiteSearchEngineServiceClient__getSiteSearchEngineAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.GetSiteSearchEngineRequest` 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** |
| `Google\Cloud\DiscoveryEngine\V1\SiteSearchEngine` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\DiscoveryEngine\V1\Client\SiteSearchEngineServiceClient;
    use Google\Cloud\DiscoveryEngine\V1\GetSiteSearchEngineRequest;
    use Google\Cloud\DiscoveryEngine\V1\SiteSearchEngine;

    /**
     * @param string $formattedName Resource name of
     *                              [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine], such
     *                              as
     *                              `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.
     *
     *                              If the caller does not have permission to access the [SiteSearchEngine],
     *                              regardless of whether or not it exists, a PERMISSION_DENIED error is
     *                              returned. Please see
     *                              {@see SiteSearchEngineServiceClient::siteSearchEngineName()} for help formatting this field.
     */
    function get_site_search_engine_sample(string $formattedName): void
    {
        // Create a client.
        $siteSearchEngineServiceClient = new SiteSearchEngineServiceClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var SiteSearchEngine $response */
            $response = $siteSearchEngineServiceClient->getSiteSearchEngine($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 = SiteSearchEngineServiceClient::siteSearchEngineName(
            '[PROJECT]',
            '[LOCATION]',
            '[DATA_STORE]'
        );

        get_site_search_engine_sample($formattedName);
    }

### getTargetSite

Gets a [TargetSite](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.TargetSite).

The async variant is [SiteSearchEngineServiceClient::getTargetSiteAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Client.SiteSearchEngineServiceClient#_Google_Cloud_DiscoveryEngine_V1_Client_SiteSearchEngineServiceClient__getTargetSiteAsync__)
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.GetTargetSiteRequest` 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-discoveryengine/latest/V1.TargetSite` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\Cloud\DiscoveryEngine\V1\Client\SiteSearchEngineServiceClient;
    use Google\Cloud\DiscoveryEngine\V1\GetTargetSiteRequest;
    use Google\Cloud\DiscoveryEngine\V1\TargetSite;

    /**
     * @param string $formattedName Full resource name of
     *                              [TargetSite][google.cloud.discoveryengine.v1.TargetSite], such as
     *                              `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`.
     *
     *                              If the caller does not have permission to access the
     *                              [TargetSite][google.cloud.discoveryengine.v1.TargetSite], regardless of
     *                              whether or not it exists, a PERMISSION_DENIED error is returned.
     *
     *                              If the requested [TargetSite][google.cloud.discoveryengine.v1.TargetSite]
     *                              does not exist, a NOT_FOUND error is returned. Please see
     *                              {@see SiteSearchEngineServiceClient::targetSiteName()} for help formatting this field.
     */
    function get_target_site_sample(string $formattedName): void
    {
        // Create a client.
        $siteSearchEngineServiceClient = new SiteSearchEngineServiceClient();

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

        // Call the API and handle any network failures.
        try {
            /** @var TargetSite $response */
            $response = $siteSearchEngineServiceClient->getTargetSite($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 = SiteSearchEngineServiceClient::targetSiteName(
            '[PROJECT]',
            '[LOCATION]',
            '[DATA_STORE]',
            '[TARGET_SITE]'
        );

        get_target_site_sample($formattedName);
    }

### listTargetSites

Gets a list of [TargetSite](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.TargetSite)s.

The async variant is
[SiteSearchEngineServiceClient::listTargetSitesAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Client.SiteSearchEngineServiceClient#_Google_Cloud_DiscoveryEngine_V1_Client_SiteSearchEngineServiceClient__listTargetSitesAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.ListTargetSitesRequest` 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\DiscoveryEngine\V1\Client\SiteSearchEngineServiceClient;
    use Google\Cloud\DiscoveryEngine\V1\ListTargetSitesRequest;
    use Google\Cloud\DiscoveryEngine\V1\TargetSite;

    /**
     * @param string $formattedParent The parent site search engine resource name, such as
     *                                `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.
     *
     *                                If the caller does not have permission to list
     *                                [TargetSite][google.cloud.discoveryengine.v1.TargetSite]s under this site
     *                                search engine, regardless of whether or not this branch exists, a
     *                                PERMISSION_DENIED error is returned. Please see
     *                                {@see SiteSearchEngineServiceClient::siteSearchEngineName()} for help formatting this field.
     */
    function list_target_sites_sample(string $formattedParent): void
    {
        // Create a client.
        $siteSearchEngineServiceClient = new SiteSearchEngineServiceClient();

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

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

            /** @var TargetSite $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 = SiteSearchEngineServiceClient::siteSearchEngineName(
            '[PROJECT]',
            '[LOCATION]',
            '[DATA_STORE]'
        );

        list_target_sites_sample($formattedParent);
    }

### recrawlUris

Request on-demand recrawl for a list of URIs.

The async variant is [SiteSearchEngineServiceClient::recrawlUrisAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Client.SiteSearchEngineServiceClient#_Google_Cloud_DiscoveryEngine_V1_Client_SiteSearchEngineServiceClient__recrawlUrisAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.RecrawlUrisRequest` 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-discoveryengine/latest/V1.RecrawlUrisResponse>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\DiscoveryEngine\V1\Client\SiteSearchEngineServiceClient;
    use Google\Cloud\DiscoveryEngine\V1\RecrawlUrisRequest;
    use Google\Cloud\DiscoveryEngine\V1\RecrawlUrisResponse;
    use Google\Rpc\Status;

    /**
     * @param string $formattedSiteSearchEngine Full resource name of the
     *                                          [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine], such
     *                                          as `projects/&#42;/locations/&#42;/collections/&#42;/dataStores/&#42;/siteSearchEngine`. Please see
     *                                          {@see SiteSearchEngineServiceClient::siteSearchEngineName()} for help formatting this field.
     * @param string $urisElement               List of URIs to crawl. At most 10K URIs are supported, otherwise
     *                                          an INVALID_ARGUMENT error is thrown. Each URI should match at least one
     *                                          [TargetSite][google.cloud.discoveryengine.v1.TargetSite] in
     *                                          `site_search_engine`.
     */
    function recrawl_uris_sample(string $formattedSiteSearchEngine, string $urisElement): void
    {
        // Create a client.
        $siteSearchEngineServiceClient = new SiteSearchEngineServiceClient();

        // Prepare the request message.
        $uris = [$urisElement,];
        $request = (new RecrawlUrisRequest())
            ->setSiteSearchEngine($formattedSiteSearchEngine)
            ->setUris($uris);

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

            if ($response->operationSucceeded()) {
                /** @var RecrawlUrisResponse $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
    {
        $formattedSiteSearchEngine = SiteSearchEngineServiceClient::siteSearchEngineName(
            '[PROJECT]',
            '[LOCATION]',
            '[DATA_STORE]'
        );
        $urisElement = '[URIS]';

        recrawl_uris_sample($formattedSiteSearchEngine, $urisElement);
    }

### updateTargetSite

Updates a [TargetSite](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.TargetSite).

The async variant is
[SiteSearchEngineServiceClient::updateTargetSiteAsync()](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.Client.SiteSearchEngineServiceClient#_Google_Cloud_DiscoveryEngine_V1_Client_SiteSearchEngineServiceClient__updateTargetSiteAsync__) .

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.UpdateTargetSiteRequest` 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-discoveryengine/latest/V1.TargetSite>` |   |

**Example**

    use Google\ApiCore\ApiException;
    use Google\ApiCore\OperationResponse;
    use Google\Cloud\DiscoveryEngine\V1\Client\SiteSearchEngineServiceClient;
    use Google\Cloud\DiscoveryEngine\V1\TargetSite;
    use Google\Cloud\DiscoveryEngine\V1\UpdateTargetSiteRequest;
    use Google\Rpc\Status;

    /**
     * @param string $targetSiteProvidedUriPattern Input only. The user provided URI pattern from which the
     *                                             `generated_uri_pattern` is generated.
     */
    function update_target_site_sample(string $targetSiteProvidedUriPattern): void
    {
        // Create a client.
        $siteSearchEngineServiceClient = new SiteSearchEngineServiceClient();

        // Prepare the request message.
        $targetSite = (new TargetSite())
            ->setProvidedUriPattern($targetSiteProvidedUriPattern);
        $request = (new UpdateTargetSiteRequest())
            ->setTargetSite($targetSite);

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

            if ($response->operationSucceeded()) {
                /** @var TargetSite $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
    {
        $targetSiteProvidedUriPattern = '[PROVIDED_URI_PATTERN]';

        update_target_site_sample($targetSiteProvidedUriPattern);
    }

### batchCreateTargetSitesAsync

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

### batchVerifyTargetSitesAsync

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

### createSitemapAsync

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

### createTargetSiteAsync

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

### deleteSitemapAsync

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

### deleteTargetSiteAsync

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

### disableAdvancedSiteSearchAsync

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

### enableAdvancedSiteSearchAsync

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

### fetchDomainVerificationStatusAsync

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

### fetchSitemapsAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.FetchSitemapsRequest` |
| `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-discoveryengine/latest/V1.FetchSitemapsResponse>` |   |

### getSiteSearchEngineAsync

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-GuzzleHttp.Promise.Promise.html<Google\Cloud\DiscoveryEngine\V1\SiteSearchEngine>` |   |

### getTargetSiteAsync

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.GetTargetSiteRequest` |
| `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-discoveryengine/latest/V1.TargetSite>` |   |

### listTargetSitesAsync

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

### recrawlUrisAsync

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

### updateTargetSiteAsync

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

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

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

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

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

### static::projectLocationCollectionDataStoreSitemapName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |
| `collection` | `string` |
| `dataStore` | `string` |
| `sitemap` | `string` |

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

### static::projectLocationCollectionDataStoreTargetSiteName

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |
| `collection` | `string` |
| `dataStore` | `string` |
| `targetSite` | `string` |

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

### static::projectLocationDataStoreSiteSearchEngineName

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

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

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

### static::projectLocationDataStoreSitemapName

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

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

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

### static::projectLocationDataStoreTargetSiteName

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

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

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

### static::siteSearchEngineName

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

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

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

### static::sitemapName

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

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

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

### static::targetSiteName

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

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

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

- projectLocationCollectionDataStoreSiteSearchEngine: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine
- projectLocationCollectionDataStoreSitemap: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}
- projectLocationCollectionDataStoreTargetSite: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}
- projectLocationDataStoreSiteSearchEngine: projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine
- projectLocationDataStoreSitemap: projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}
- projectLocationDataStoreTargetSite: projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}
- siteSearchEngine: projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine
- sitemap: projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}
- targetSite: projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}

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