Discovery Engine v1 API - Class SiteSearchEngineServiceClient (1.3.0)

public abstract class SiteSearchEngineServiceClient

Reference documentation and code samples for the Discovery Engine v1 API class SiteSearchEngineServiceClient.

SiteSearchEngineService client wrapper, for convenient use.

Inheritance

object > SiteSearchEngineServiceClient

Namespace

Google.Cloud.DiscoveryEngine.V1

Assembly

Google.Cloud.DiscoveryEngine.V1.dll

Remarks

Service for managing site search related resources.

Properties

BatchCreateTargetSitesOperationsClient

public virtual OperationsClient BatchCreateTargetSitesOperationsClient { get; }

The long-running operations client for BatchCreateTargetSites.

Property Value
Type Description
OperationsClient

BatchVerifyTargetSitesOperationsClient

public virtual OperationsClient BatchVerifyTargetSitesOperationsClient { get; }

The long-running operations client for BatchVerifyTargetSites.

Property Value
Type Description
OperationsClient

CreateTargetSiteOperationsClient

public virtual OperationsClient CreateTargetSiteOperationsClient { get; }

The long-running operations client for CreateTargetSite.

Property Value
Type Description
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the SiteSearchEngineService service, which is a host of "discoveryengine.googleapis.com" and a port of 443.

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default SiteSearchEngineService scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default SiteSearchEngineService scopes are:

DeleteTargetSiteOperationsClient

public virtual OperationsClient DeleteTargetSiteOperationsClient { get; }

The long-running operations client for DeleteTargetSite.

Property Value
Type Description
OperationsClient

DisableAdvancedSiteSearchOperationsClient

public virtual OperationsClient DisableAdvancedSiteSearchOperationsClient { get; }

The long-running operations client for DisableAdvancedSiteSearch.

Property Value
Type Description
OperationsClient

EnableAdvancedSiteSearchOperationsClient

public virtual OperationsClient EnableAdvancedSiteSearchOperationsClient { get; }

The long-running operations client for EnableAdvancedSiteSearch.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual SiteSearchEngineService.SiteSearchEngineServiceClient GrpcClient { get; }

The underlying gRPC SiteSearchEngineService client

Property Value
Type Description
SiteSearchEngineServiceSiteSearchEngineServiceClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

RecrawlUrisOperationsClient

public virtual OperationsClient RecrawlUrisOperationsClient { get; }

The long-running operations client for RecrawlUris.

Property Value
Type Description
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

UpdateTargetSiteOperationsClient

public virtual OperationsClient UpdateTargetSiteOperationsClient { get; }

The long-running operations client for UpdateTargetSite.

Property Value
Type Description
OperationsClient

Methods

BatchCreateTargetSites(BatchCreateTargetSitesRequest, CallSettings)

public virtual Operation<BatchCreateTargetSitesResponse, BatchCreateTargetSiteMetadata> BatchCreateTargetSites(BatchCreateTargetSitesRequest request, CallSettings callSettings = null)

Creates [TargetSite][google.cloud.discoveryengine.v1.TargetSite] in a batch.

Parameters
Name Description
request BatchCreateTargetSitesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBatchCreateTargetSitesResponseBatchCreateTargetSiteMetadata

The RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = SiteSearchEngineServiceClient.Create();
// Initialize request argument(s)
BatchCreateTargetSitesRequest request = new BatchCreateTargetSitesRequest
{
    ParentAsSiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    Requests =
    {
        new CreateTargetSiteRequest(),
    },
};
// Make the request
Operation<BatchCreateTargetSitesResponse, BatchCreateTargetSiteMetadata> response = siteSearchEngineServiceClient.BatchCreateTargetSites(request);

// Poll until the returned long-running operation is complete
Operation<BatchCreateTargetSitesResponse, BatchCreateTargetSiteMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchCreateTargetSitesResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchCreateTargetSitesResponse, BatchCreateTargetSiteMetadata> retrievedResponse = siteSearchEngineServiceClient.PollOnceBatchCreateTargetSites(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    BatchCreateTargetSitesResponse retrievedResult = retrievedResponse.Result;
}

BatchCreateTargetSitesAsync(BatchCreateTargetSitesRequest, CallSettings)

public virtual Task<Operation<BatchCreateTargetSitesResponse, BatchCreateTargetSiteMetadata>> BatchCreateTargetSitesAsync(BatchCreateTargetSitesRequest request, CallSettings callSettings = null)

Creates [TargetSite][google.cloud.discoveryengine.v1.TargetSite] in a batch.

Parameters
Name Description
request BatchCreateTargetSitesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBatchCreateTargetSitesResponseBatchCreateTargetSiteMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
BatchCreateTargetSitesRequest request = new BatchCreateTargetSitesRequest
{
    ParentAsSiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    Requests =
    {
        new CreateTargetSiteRequest(),
    },
};
// Make the request
Operation<BatchCreateTargetSitesResponse, BatchCreateTargetSiteMetadata> response = await siteSearchEngineServiceClient.BatchCreateTargetSitesAsync(request);

// Poll until the returned long-running operation is complete
Operation<BatchCreateTargetSitesResponse, BatchCreateTargetSiteMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchCreateTargetSitesResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchCreateTargetSitesResponse, BatchCreateTargetSiteMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceBatchCreateTargetSitesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    BatchCreateTargetSitesResponse retrievedResult = retrievedResponse.Result;
}

BatchCreateTargetSitesAsync(BatchCreateTargetSitesRequest, CancellationToken)

public virtual Task<Operation<BatchCreateTargetSitesResponse, BatchCreateTargetSiteMetadata>> BatchCreateTargetSitesAsync(BatchCreateTargetSitesRequest request, CancellationToken cancellationToken)

Creates [TargetSite][google.cloud.discoveryengine.v1.TargetSite] in a batch.

Parameters
Name Description
request BatchCreateTargetSitesRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBatchCreateTargetSitesResponseBatchCreateTargetSiteMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
BatchCreateTargetSitesRequest request = new BatchCreateTargetSitesRequest
{
    ParentAsSiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    Requests =
    {
        new CreateTargetSiteRequest(),
    },
};
// Make the request
Operation<BatchCreateTargetSitesResponse, BatchCreateTargetSiteMetadata> response = await siteSearchEngineServiceClient.BatchCreateTargetSitesAsync(request);

// Poll until the returned long-running operation is complete
Operation<BatchCreateTargetSitesResponse, BatchCreateTargetSiteMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchCreateTargetSitesResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchCreateTargetSitesResponse, BatchCreateTargetSiteMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceBatchCreateTargetSitesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    BatchCreateTargetSitesResponse retrievedResult = retrievedResponse.Result;
}

BatchVerifyTargetSites(BatchVerifyTargetSitesRequest, CallSettings)

public virtual Operation<BatchVerifyTargetSitesResponse, BatchVerifyTargetSitesMetadata> BatchVerifyTargetSites(BatchVerifyTargetSitesRequest request, CallSettings callSettings = null)

Verify target sites' ownership and validity. This API sends all the target sites under site search engine for verification.

Parameters
Name Description
request BatchVerifyTargetSitesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBatchVerifyTargetSitesResponseBatchVerifyTargetSitesMetadata

The RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = SiteSearchEngineServiceClient.Create();
// Initialize request argument(s)
BatchVerifyTargetSitesRequest request = new BatchVerifyTargetSitesRequest
{
    ParentAsSiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
Operation<BatchVerifyTargetSitesResponse, BatchVerifyTargetSitesMetadata> response = siteSearchEngineServiceClient.BatchVerifyTargetSites(request);

// Poll until the returned long-running operation is complete
Operation<BatchVerifyTargetSitesResponse, BatchVerifyTargetSitesMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchVerifyTargetSitesResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchVerifyTargetSitesResponse, BatchVerifyTargetSitesMetadata> retrievedResponse = siteSearchEngineServiceClient.PollOnceBatchVerifyTargetSites(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    BatchVerifyTargetSitesResponse retrievedResult = retrievedResponse.Result;
}

BatchVerifyTargetSitesAsync(BatchVerifyTargetSitesRequest, CallSettings)

public virtual Task<Operation<BatchVerifyTargetSitesResponse, BatchVerifyTargetSitesMetadata>> BatchVerifyTargetSitesAsync(BatchVerifyTargetSitesRequest request, CallSettings callSettings = null)

Verify target sites' ownership and validity. This API sends all the target sites under site search engine for verification.

Parameters
Name Description
request BatchVerifyTargetSitesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBatchVerifyTargetSitesResponseBatchVerifyTargetSitesMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
BatchVerifyTargetSitesRequest request = new BatchVerifyTargetSitesRequest
{
    ParentAsSiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
Operation<BatchVerifyTargetSitesResponse, BatchVerifyTargetSitesMetadata> response = await siteSearchEngineServiceClient.BatchVerifyTargetSitesAsync(request);

// Poll until the returned long-running operation is complete
Operation<BatchVerifyTargetSitesResponse, BatchVerifyTargetSitesMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchVerifyTargetSitesResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchVerifyTargetSitesResponse, BatchVerifyTargetSitesMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceBatchVerifyTargetSitesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    BatchVerifyTargetSitesResponse retrievedResult = retrievedResponse.Result;
}

BatchVerifyTargetSitesAsync(BatchVerifyTargetSitesRequest, CancellationToken)

public virtual Task<Operation<BatchVerifyTargetSitesResponse, BatchVerifyTargetSitesMetadata>> BatchVerifyTargetSitesAsync(BatchVerifyTargetSitesRequest request, CancellationToken cancellationToken)

Verify target sites' ownership and validity. This API sends all the target sites under site search engine for verification.

Parameters
Name Description
request BatchVerifyTargetSitesRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBatchVerifyTargetSitesResponseBatchVerifyTargetSitesMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
BatchVerifyTargetSitesRequest request = new BatchVerifyTargetSitesRequest
{
    ParentAsSiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
Operation<BatchVerifyTargetSitesResponse, BatchVerifyTargetSitesMetadata> response = await siteSearchEngineServiceClient.BatchVerifyTargetSitesAsync(request);

// Poll until the returned long-running operation is complete
Operation<BatchVerifyTargetSitesResponse, BatchVerifyTargetSitesMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchVerifyTargetSitesResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<BatchVerifyTargetSitesResponse, BatchVerifyTargetSitesMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceBatchVerifyTargetSitesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    BatchVerifyTargetSitesResponse retrievedResult = retrievedResponse.Result;
}

Create()

public static SiteSearchEngineServiceClient Create()

Synchronously creates a SiteSearchEngineServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use SiteSearchEngineServiceClientBuilder.

Returns
Type Description
SiteSearchEngineServiceClient

The created SiteSearchEngineServiceClient.

CreateAsync(CancellationToken)

public static Task<SiteSearchEngineServiceClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a SiteSearchEngineServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use SiteSearchEngineServiceClientBuilder.

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskSiteSearchEngineServiceClient

The task representing the created SiteSearchEngineServiceClient.

CreateTargetSite(CreateTargetSiteRequest, CallSettings)

public virtual Operation<TargetSite, CreateTargetSiteMetadata> CreateTargetSite(CreateTargetSiteRequest request, CallSettings callSettings = null)

Creates a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
request CreateTargetSiteRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationTargetSiteCreateTargetSiteMetadata

The RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = SiteSearchEngineServiceClient.Create();
// Initialize request argument(s)
CreateTargetSiteRequest request = new CreateTargetSiteRequest
{
    ParentAsSiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    TargetSite = new TargetSite(),
};
// Make the request
Operation<TargetSite, CreateTargetSiteMetadata> response = siteSearchEngineServiceClient.CreateTargetSite(request);

// Poll until the returned long-running operation is complete
Operation<TargetSite, CreateTargetSiteMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
TargetSite result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TargetSite, CreateTargetSiteMetadata> retrievedResponse = siteSearchEngineServiceClient.PollOnceCreateTargetSite(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TargetSite retrievedResult = retrievedResponse.Result;
}

CreateTargetSite(SiteSearchEngineName, TargetSite, CallSettings)

public virtual Operation<TargetSite, CreateTargetSiteMetadata> CreateTargetSite(SiteSearchEngineName parent, TargetSite targetSite, CallSettings callSettings = null)

Creates a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
parent SiteSearchEngineName

Required. Parent resource name of [TargetSite][google.cloud.discoveryengine.v1.TargetSite], such as projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine.

targetSite TargetSite

Required. The [TargetSite][google.cloud.discoveryengine.v1.TargetSite] to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationTargetSiteCreateTargetSiteMetadata

The RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = SiteSearchEngineServiceClient.Create();
// Initialize request argument(s)
SiteSearchEngineName parent = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
TargetSite targetSite = new TargetSite();
// Make the request
Operation<TargetSite, CreateTargetSiteMetadata> response = siteSearchEngineServiceClient.CreateTargetSite(parent, targetSite);

// Poll until the returned long-running operation is complete
Operation<TargetSite, CreateTargetSiteMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
TargetSite result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TargetSite, CreateTargetSiteMetadata> retrievedResponse = siteSearchEngineServiceClient.PollOnceCreateTargetSite(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TargetSite retrievedResult = retrievedResponse.Result;
}

CreateTargetSite(string, TargetSite, CallSettings)

public virtual Operation<TargetSite, CreateTargetSiteMetadata> CreateTargetSite(string parent, TargetSite targetSite, CallSettings callSettings = null)

Creates a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
parent string

Required. Parent resource name of [TargetSite][google.cloud.discoveryengine.v1.TargetSite], such as projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine.

targetSite TargetSite

Required. The [TargetSite][google.cloud.discoveryengine.v1.TargetSite] to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationTargetSiteCreateTargetSiteMetadata

The RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = SiteSearchEngineServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/siteSearchEngine";
TargetSite targetSite = new TargetSite();
// Make the request
Operation<TargetSite, CreateTargetSiteMetadata> response = siteSearchEngineServiceClient.CreateTargetSite(parent, targetSite);

// Poll until the returned long-running operation is complete
Operation<TargetSite, CreateTargetSiteMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
TargetSite result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TargetSite, CreateTargetSiteMetadata> retrievedResponse = siteSearchEngineServiceClient.PollOnceCreateTargetSite(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TargetSite retrievedResult = retrievedResponse.Result;
}

CreateTargetSiteAsync(CreateTargetSiteRequest, CallSettings)

public virtual Task<Operation<TargetSite, CreateTargetSiteMetadata>> CreateTargetSiteAsync(CreateTargetSiteRequest request, CallSettings callSettings = null)

Creates a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
request CreateTargetSiteRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationTargetSiteCreateTargetSiteMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
CreateTargetSiteRequest request = new CreateTargetSiteRequest
{
    ParentAsSiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    TargetSite = new TargetSite(),
};
// Make the request
Operation<TargetSite, CreateTargetSiteMetadata> response = await siteSearchEngineServiceClient.CreateTargetSiteAsync(request);

// Poll until the returned long-running operation is complete
Operation<TargetSite, CreateTargetSiteMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TargetSite result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TargetSite, CreateTargetSiteMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceCreateTargetSiteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TargetSite retrievedResult = retrievedResponse.Result;
}

CreateTargetSiteAsync(CreateTargetSiteRequest, CancellationToken)

public virtual Task<Operation<TargetSite, CreateTargetSiteMetadata>> CreateTargetSiteAsync(CreateTargetSiteRequest request, CancellationToken cancellationToken)

Creates a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
request CreateTargetSiteRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationTargetSiteCreateTargetSiteMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
CreateTargetSiteRequest request = new CreateTargetSiteRequest
{
    ParentAsSiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    TargetSite = new TargetSite(),
};
// Make the request
Operation<TargetSite, CreateTargetSiteMetadata> response = await siteSearchEngineServiceClient.CreateTargetSiteAsync(request);

// Poll until the returned long-running operation is complete
Operation<TargetSite, CreateTargetSiteMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TargetSite result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TargetSite, CreateTargetSiteMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceCreateTargetSiteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TargetSite retrievedResult = retrievedResponse.Result;
}

CreateTargetSiteAsync(SiteSearchEngineName, TargetSite, CallSettings)

public virtual Task<Operation<TargetSite, CreateTargetSiteMetadata>> CreateTargetSiteAsync(SiteSearchEngineName parent, TargetSite targetSite, CallSettings callSettings = null)

Creates a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
parent SiteSearchEngineName

Required. Parent resource name of [TargetSite][google.cloud.discoveryengine.v1.TargetSite], such as projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine.

targetSite TargetSite

Required. The [TargetSite][google.cloud.discoveryengine.v1.TargetSite] to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationTargetSiteCreateTargetSiteMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
SiteSearchEngineName parent = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
TargetSite targetSite = new TargetSite();
// Make the request
Operation<TargetSite, CreateTargetSiteMetadata> response = await siteSearchEngineServiceClient.CreateTargetSiteAsync(parent, targetSite);

// Poll until the returned long-running operation is complete
Operation<TargetSite, CreateTargetSiteMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TargetSite result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TargetSite, CreateTargetSiteMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceCreateTargetSiteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TargetSite retrievedResult = retrievedResponse.Result;
}

CreateTargetSiteAsync(SiteSearchEngineName, TargetSite, CancellationToken)

public virtual Task<Operation<TargetSite, CreateTargetSiteMetadata>> CreateTargetSiteAsync(SiteSearchEngineName parent, TargetSite targetSite, CancellationToken cancellationToken)

Creates a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
parent SiteSearchEngineName

Required. Parent resource name of [TargetSite][google.cloud.discoveryengine.v1.TargetSite], such as projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine.

targetSite TargetSite

Required. The [TargetSite][google.cloud.discoveryengine.v1.TargetSite] to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationTargetSiteCreateTargetSiteMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
SiteSearchEngineName parent = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
TargetSite targetSite = new TargetSite();
// Make the request
Operation<TargetSite, CreateTargetSiteMetadata> response = await siteSearchEngineServiceClient.CreateTargetSiteAsync(parent, targetSite);

// Poll until the returned long-running operation is complete
Operation<TargetSite, CreateTargetSiteMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TargetSite result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TargetSite, CreateTargetSiteMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceCreateTargetSiteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TargetSite retrievedResult = retrievedResponse.Result;
}

CreateTargetSiteAsync(string, TargetSite, CallSettings)

public virtual Task<Operation<TargetSite, CreateTargetSiteMetadata>> CreateTargetSiteAsync(string parent, TargetSite targetSite, CallSettings callSettings = null)

Creates a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
parent string

Required. Parent resource name of [TargetSite][google.cloud.discoveryengine.v1.TargetSite], such as projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine.

targetSite TargetSite

Required. The [TargetSite][google.cloud.discoveryengine.v1.TargetSite] to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationTargetSiteCreateTargetSiteMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/siteSearchEngine";
TargetSite targetSite = new TargetSite();
// Make the request
Operation<TargetSite, CreateTargetSiteMetadata> response = await siteSearchEngineServiceClient.CreateTargetSiteAsync(parent, targetSite);

// Poll until the returned long-running operation is complete
Operation<TargetSite, CreateTargetSiteMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TargetSite result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TargetSite, CreateTargetSiteMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceCreateTargetSiteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TargetSite retrievedResult = retrievedResponse.Result;
}

CreateTargetSiteAsync(string, TargetSite, CancellationToken)

public virtual Task<Operation<TargetSite, CreateTargetSiteMetadata>> CreateTargetSiteAsync(string parent, TargetSite targetSite, CancellationToken cancellationToken)

Creates a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
parent string

Required. Parent resource name of [TargetSite][google.cloud.discoveryengine.v1.TargetSite], such as projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine.

targetSite TargetSite

Required. The [TargetSite][google.cloud.discoveryengine.v1.TargetSite] to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationTargetSiteCreateTargetSiteMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/siteSearchEngine";
TargetSite targetSite = new TargetSite();
// Make the request
Operation<TargetSite, CreateTargetSiteMetadata> response = await siteSearchEngineServiceClient.CreateTargetSiteAsync(parent, targetSite);

// Poll until the returned long-running operation is complete
Operation<TargetSite, CreateTargetSiteMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TargetSite result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TargetSite, CreateTargetSiteMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceCreateTargetSiteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TargetSite retrievedResult = retrievedResponse.Result;
}

DeleteTargetSite(DeleteTargetSiteRequest, CallSettings)

public virtual Operation<Empty, DeleteTargetSiteMetadata> DeleteTargetSite(DeleteTargetSiteRequest request, CallSettings callSettings = null)

Deletes a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
request DeleteTargetSiteRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteTargetSiteMetadata

The RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = SiteSearchEngineServiceClient.Create();
// Initialize request argument(s)
DeleteTargetSiteRequest request = new DeleteTargetSiteRequest
{
    TargetSiteName = TargetSiteName.FromProjectLocationDataStoreTargetSite("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[TARGET_SITE]"),
};
// Make the request
Operation<Empty, DeleteTargetSiteMetadata> response = siteSearchEngineServiceClient.DeleteTargetSite(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteTargetSiteMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteTargetSiteMetadata> retrievedResponse = siteSearchEngineServiceClient.PollOnceDeleteTargetSite(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteTargetSite(TargetSiteName, CallSettings)

public virtual Operation<Empty, DeleteTargetSiteMetadata> DeleteTargetSite(TargetSiteName name, CallSettings callSettings = null)

Deletes a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
name TargetSiteName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteTargetSiteMetadata

The RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = SiteSearchEngineServiceClient.Create();
// Initialize request argument(s)
TargetSiteName name = TargetSiteName.FromProjectLocationDataStoreTargetSite("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[TARGET_SITE]");
// Make the request
Operation<Empty, DeleteTargetSiteMetadata> response = siteSearchEngineServiceClient.DeleteTargetSite(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteTargetSiteMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteTargetSiteMetadata> retrievedResponse = siteSearchEngineServiceClient.PollOnceDeleteTargetSite(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteTargetSite(string, CallSettings)

public virtual Operation<Empty, DeleteTargetSiteMetadata> DeleteTargetSite(string name, CallSettings callSettings = null)

Deletes a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteTargetSiteMetadata

The RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = SiteSearchEngineServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/siteSearchEngine/targetSites/[TARGET_SITE]";
// Make the request
Operation<Empty, DeleteTargetSiteMetadata> response = siteSearchEngineServiceClient.DeleteTargetSite(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteTargetSiteMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteTargetSiteMetadata> retrievedResponse = siteSearchEngineServiceClient.PollOnceDeleteTargetSite(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteTargetSiteAsync(DeleteTargetSiteRequest, CallSettings)

public virtual Task<Operation<Empty, DeleteTargetSiteMetadata>> DeleteTargetSiteAsync(DeleteTargetSiteRequest request, CallSettings callSettings = null)

Deletes a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
request DeleteTargetSiteRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteTargetSiteMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteTargetSiteRequest request = new DeleteTargetSiteRequest
{
    TargetSiteName = TargetSiteName.FromProjectLocationDataStoreTargetSite("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[TARGET_SITE]"),
};
// Make the request
Operation<Empty, DeleteTargetSiteMetadata> response = await siteSearchEngineServiceClient.DeleteTargetSiteAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteTargetSiteMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteTargetSiteMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceDeleteTargetSiteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteTargetSiteAsync(DeleteTargetSiteRequest, CancellationToken)

public virtual Task<Operation<Empty, DeleteTargetSiteMetadata>> DeleteTargetSiteAsync(DeleteTargetSiteRequest request, CancellationToken cancellationToken)

Deletes a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
request DeleteTargetSiteRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteTargetSiteMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteTargetSiteRequest request = new DeleteTargetSiteRequest
{
    TargetSiteName = TargetSiteName.FromProjectLocationDataStoreTargetSite("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[TARGET_SITE]"),
};
// Make the request
Operation<Empty, DeleteTargetSiteMetadata> response = await siteSearchEngineServiceClient.DeleteTargetSiteAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteTargetSiteMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteTargetSiteMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceDeleteTargetSiteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteTargetSiteAsync(TargetSiteName, CallSettings)

public virtual Task<Operation<Empty, DeleteTargetSiteMetadata>> DeleteTargetSiteAsync(TargetSiteName name, CallSettings callSettings = null)

Deletes a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
name TargetSiteName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteTargetSiteMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
TargetSiteName name = TargetSiteName.FromProjectLocationDataStoreTargetSite("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[TARGET_SITE]");
// Make the request
Operation<Empty, DeleteTargetSiteMetadata> response = await siteSearchEngineServiceClient.DeleteTargetSiteAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteTargetSiteMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteTargetSiteMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceDeleteTargetSiteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteTargetSiteAsync(TargetSiteName, CancellationToken)

public virtual Task<Operation<Empty, DeleteTargetSiteMetadata>> DeleteTargetSiteAsync(TargetSiteName name, CancellationToken cancellationToken)

Deletes a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
name TargetSiteName

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteTargetSiteMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
TargetSiteName name = TargetSiteName.FromProjectLocationDataStoreTargetSite("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[TARGET_SITE]");
// Make the request
Operation<Empty, DeleteTargetSiteMetadata> response = await siteSearchEngineServiceClient.DeleteTargetSiteAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteTargetSiteMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteTargetSiteMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceDeleteTargetSiteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteTargetSiteAsync(string, CallSettings)

public virtual Task<Operation<Empty, DeleteTargetSiteMetadata>> DeleteTargetSiteAsync(string name, CallSettings callSettings = null)

Deletes a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteTargetSiteMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/siteSearchEngine/targetSites/[TARGET_SITE]";
// Make the request
Operation<Empty, DeleteTargetSiteMetadata> response = await siteSearchEngineServiceClient.DeleteTargetSiteAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteTargetSiteMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteTargetSiteMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceDeleteTargetSiteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteTargetSiteAsync(string, CancellationToken)

public virtual Task<Operation<Empty, DeleteTargetSiteMetadata>> DeleteTargetSiteAsync(string name, CancellationToken cancellationToken)

Deletes a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
name string

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteTargetSiteMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/siteSearchEngine/targetSites/[TARGET_SITE]";
// Make the request
Operation<Empty, DeleteTargetSiteMetadata> response = await siteSearchEngineServiceClient.DeleteTargetSiteAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteTargetSiteMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteTargetSiteMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceDeleteTargetSiteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DisableAdvancedSiteSearch(DisableAdvancedSiteSearchRequest, CallSettings)

public virtual Operation<DisableAdvancedSiteSearchResponse, DisableAdvancedSiteSearchMetadata> DisableAdvancedSiteSearch(DisableAdvancedSiteSearchRequest request, CallSettings callSettings = null)

Downgrade from advanced site search to basic site search.

Parameters
Name Description
request DisableAdvancedSiteSearchRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationDisableAdvancedSiteSearchResponseDisableAdvancedSiteSearchMetadata

The RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = SiteSearchEngineServiceClient.Create();
// Initialize request argument(s)
DisableAdvancedSiteSearchRequest request = new DisableAdvancedSiteSearchRequest
{
    SiteSearchEngineAsSiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
Operation<DisableAdvancedSiteSearchResponse, DisableAdvancedSiteSearchMetadata> response = siteSearchEngineServiceClient.DisableAdvancedSiteSearch(request);

// Poll until the returned long-running operation is complete
Operation<DisableAdvancedSiteSearchResponse, DisableAdvancedSiteSearchMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
DisableAdvancedSiteSearchResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DisableAdvancedSiteSearchResponse, DisableAdvancedSiteSearchMetadata> retrievedResponse = siteSearchEngineServiceClient.PollOnceDisableAdvancedSiteSearch(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DisableAdvancedSiteSearchResponse retrievedResult = retrievedResponse.Result;
}

DisableAdvancedSiteSearchAsync(DisableAdvancedSiteSearchRequest, CallSettings)

public virtual Task<Operation<DisableAdvancedSiteSearchResponse, DisableAdvancedSiteSearchMetadata>> DisableAdvancedSiteSearchAsync(DisableAdvancedSiteSearchRequest request, CallSettings callSettings = null)

Downgrade from advanced site search to basic site search.

Parameters
Name Description
request DisableAdvancedSiteSearchRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationDisableAdvancedSiteSearchResponseDisableAdvancedSiteSearchMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
DisableAdvancedSiteSearchRequest request = new DisableAdvancedSiteSearchRequest
{
    SiteSearchEngineAsSiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
Operation<DisableAdvancedSiteSearchResponse, DisableAdvancedSiteSearchMetadata> response = await siteSearchEngineServiceClient.DisableAdvancedSiteSearchAsync(request);

// Poll until the returned long-running operation is complete
Operation<DisableAdvancedSiteSearchResponse, DisableAdvancedSiteSearchMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DisableAdvancedSiteSearchResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DisableAdvancedSiteSearchResponse, DisableAdvancedSiteSearchMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceDisableAdvancedSiteSearchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DisableAdvancedSiteSearchResponse retrievedResult = retrievedResponse.Result;
}

DisableAdvancedSiteSearchAsync(DisableAdvancedSiteSearchRequest, CancellationToken)

public virtual Task<Operation<DisableAdvancedSiteSearchResponse, DisableAdvancedSiteSearchMetadata>> DisableAdvancedSiteSearchAsync(DisableAdvancedSiteSearchRequest request, CancellationToken cancellationToken)

Downgrade from advanced site search to basic site search.

Parameters
Name Description
request DisableAdvancedSiteSearchRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationDisableAdvancedSiteSearchResponseDisableAdvancedSiteSearchMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
DisableAdvancedSiteSearchRequest request = new DisableAdvancedSiteSearchRequest
{
    SiteSearchEngineAsSiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
Operation<DisableAdvancedSiteSearchResponse, DisableAdvancedSiteSearchMetadata> response = await siteSearchEngineServiceClient.DisableAdvancedSiteSearchAsync(request);

// Poll until the returned long-running operation is complete
Operation<DisableAdvancedSiteSearchResponse, DisableAdvancedSiteSearchMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
DisableAdvancedSiteSearchResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<DisableAdvancedSiteSearchResponse, DisableAdvancedSiteSearchMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceDisableAdvancedSiteSearchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    DisableAdvancedSiteSearchResponse retrievedResult = retrievedResponse.Result;
}

EnableAdvancedSiteSearch(EnableAdvancedSiteSearchRequest, CallSettings)

public virtual Operation<EnableAdvancedSiteSearchResponse, EnableAdvancedSiteSearchMetadata> EnableAdvancedSiteSearch(EnableAdvancedSiteSearchRequest request, CallSettings callSettings = null)

Upgrade from basic site search to advanced site search.

Parameters
Name Description
request EnableAdvancedSiteSearchRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEnableAdvancedSiteSearchResponseEnableAdvancedSiteSearchMetadata

The RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = SiteSearchEngineServiceClient.Create();
// Initialize request argument(s)
EnableAdvancedSiteSearchRequest request = new EnableAdvancedSiteSearchRequest
{
    SiteSearchEngineAsSiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
Operation<EnableAdvancedSiteSearchResponse, EnableAdvancedSiteSearchMetadata> response = siteSearchEngineServiceClient.EnableAdvancedSiteSearch(request);

// Poll until the returned long-running operation is complete
Operation<EnableAdvancedSiteSearchResponse, EnableAdvancedSiteSearchMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
EnableAdvancedSiteSearchResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<EnableAdvancedSiteSearchResponse, EnableAdvancedSiteSearchMetadata> retrievedResponse = siteSearchEngineServiceClient.PollOnceEnableAdvancedSiteSearch(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    EnableAdvancedSiteSearchResponse retrievedResult = retrievedResponse.Result;
}

EnableAdvancedSiteSearchAsync(EnableAdvancedSiteSearchRequest, CallSettings)

public virtual Task<Operation<EnableAdvancedSiteSearchResponse, EnableAdvancedSiteSearchMetadata>> EnableAdvancedSiteSearchAsync(EnableAdvancedSiteSearchRequest request, CallSettings callSettings = null)

Upgrade from basic site search to advanced site search.

Parameters
Name Description
request EnableAdvancedSiteSearchRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEnableAdvancedSiteSearchResponseEnableAdvancedSiteSearchMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
EnableAdvancedSiteSearchRequest request = new EnableAdvancedSiteSearchRequest
{
    SiteSearchEngineAsSiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
Operation<EnableAdvancedSiteSearchResponse, EnableAdvancedSiteSearchMetadata> response = await siteSearchEngineServiceClient.EnableAdvancedSiteSearchAsync(request);

// Poll until the returned long-running operation is complete
Operation<EnableAdvancedSiteSearchResponse, EnableAdvancedSiteSearchMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
EnableAdvancedSiteSearchResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<EnableAdvancedSiteSearchResponse, EnableAdvancedSiteSearchMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceEnableAdvancedSiteSearchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    EnableAdvancedSiteSearchResponse retrievedResult = retrievedResponse.Result;
}

EnableAdvancedSiteSearchAsync(EnableAdvancedSiteSearchRequest, CancellationToken)

public virtual Task<Operation<EnableAdvancedSiteSearchResponse, EnableAdvancedSiteSearchMetadata>> EnableAdvancedSiteSearchAsync(EnableAdvancedSiteSearchRequest request, CancellationToken cancellationToken)

Upgrade from basic site search to advanced site search.

Parameters
Name Description
request EnableAdvancedSiteSearchRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEnableAdvancedSiteSearchResponseEnableAdvancedSiteSearchMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
EnableAdvancedSiteSearchRequest request = new EnableAdvancedSiteSearchRequest
{
    SiteSearchEngineAsSiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
Operation<EnableAdvancedSiteSearchResponse, EnableAdvancedSiteSearchMetadata> response = await siteSearchEngineServiceClient.EnableAdvancedSiteSearchAsync(request);

// Poll until the returned long-running operation is complete
Operation<EnableAdvancedSiteSearchResponse, EnableAdvancedSiteSearchMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
EnableAdvancedSiteSearchResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<EnableAdvancedSiteSearchResponse, EnableAdvancedSiteSearchMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceEnableAdvancedSiteSearchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    EnableAdvancedSiteSearchResponse retrievedResult = retrievedResponse.Result;
}

FetchDomainVerificationStatus(FetchDomainVerificationStatusRequest, CallSettings)

public virtual PagedEnumerable<FetchDomainVerificationStatusResponse, TargetSite> FetchDomainVerificationStatus(FetchDomainVerificationStatusRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request FetchDomainVerificationStatusRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableFetchDomainVerificationStatusResponseTargetSite

A pageable sequence of TargetSite resources.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = SiteSearchEngineServiceClient.Create();
// Initialize request argument(s)
FetchDomainVerificationStatusRequest request = new FetchDomainVerificationStatusRequest
{
    SiteSearchEngineAsSiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
PagedEnumerable<FetchDomainVerificationStatusResponse, TargetSite> response = siteSearchEngineServiceClient.FetchDomainVerificationStatus(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (TargetSite item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (FetchDomainVerificationStatusResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TargetSite item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TargetSite> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TargetSite item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

FetchDomainVerificationStatusAsync(FetchDomainVerificationStatusRequest, CallSettings)

public virtual PagedAsyncEnumerable<FetchDomainVerificationStatusResponse, TargetSite> FetchDomainVerificationStatusAsync(FetchDomainVerificationStatusRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request FetchDomainVerificationStatusRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableFetchDomainVerificationStatusResponseTargetSite

A pageable asynchronous sequence of TargetSite resources.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
FetchDomainVerificationStatusRequest request = new FetchDomainVerificationStatusRequest
{
    SiteSearchEngineAsSiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
PagedAsyncEnumerable<FetchDomainVerificationStatusResponse, TargetSite> response = siteSearchEngineServiceClient.FetchDomainVerificationStatusAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((TargetSite item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((FetchDomainVerificationStatusResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TargetSite item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TargetSite> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TargetSite item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

GetSiteSearchEngine(GetSiteSearchEngineRequest, CallSettings)

public virtual SiteSearchEngine GetSiteSearchEngine(GetSiteSearchEngineRequest request, CallSettings callSettings = null)

Gets the [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine].

Parameters
Name Description
request GetSiteSearchEngineRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SiteSearchEngine

The RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = SiteSearchEngineServiceClient.Create();
// Initialize request argument(s)
GetSiteSearchEngineRequest request = new GetSiteSearchEngineRequest
{
    SiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
SiteSearchEngine response = siteSearchEngineServiceClient.GetSiteSearchEngine(request);

GetSiteSearchEngine(SiteSearchEngineName, CallSettings)

public virtual SiteSearchEngine GetSiteSearchEngine(SiteSearchEngineName name, CallSettings callSettings = null)

Gets the [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine].

Parameters
Name Description
name SiteSearchEngineName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SiteSearchEngine

The RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = SiteSearchEngineServiceClient.Create();
// Initialize request argument(s)
SiteSearchEngineName name = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
// Make the request
SiteSearchEngine response = siteSearchEngineServiceClient.GetSiteSearchEngine(name);

GetSiteSearchEngine(string, CallSettings)

public virtual SiteSearchEngine GetSiteSearchEngine(string name, CallSettings callSettings = null)

Gets the [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine].

Parameters
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SiteSearchEngine

The RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = SiteSearchEngineServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/siteSearchEngine";
// Make the request
SiteSearchEngine response = siteSearchEngineServiceClient.GetSiteSearchEngine(name);

GetSiteSearchEngineAsync(GetSiteSearchEngineRequest, CallSettings)

public virtual Task<SiteSearchEngine> GetSiteSearchEngineAsync(GetSiteSearchEngineRequest request, CallSettings callSettings = null)

Gets the [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine].

Parameters
Name Description
request GetSiteSearchEngineRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSiteSearchEngine

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
GetSiteSearchEngineRequest request = new GetSiteSearchEngineRequest
{
    SiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
SiteSearchEngine response = await siteSearchEngineServiceClient.GetSiteSearchEngineAsync(request);

GetSiteSearchEngineAsync(GetSiteSearchEngineRequest, CancellationToken)

public virtual Task<SiteSearchEngine> GetSiteSearchEngineAsync(GetSiteSearchEngineRequest request, CancellationToken cancellationToken)

Gets the [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine].

Parameters
Name Description
request GetSiteSearchEngineRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSiteSearchEngine

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
GetSiteSearchEngineRequest request = new GetSiteSearchEngineRequest
{
    SiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
SiteSearchEngine response = await siteSearchEngineServiceClient.GetSiteSearchEngineAsync(request);

GetSiteSearchEngineAsync(SiteSearchEngineName, CallSettings)

public virtual Task<SiteSearchEngine> GetSiteSearchEngineAsync(SiteSearchEngineName name, CallSettings callSettings = null)

Gets the [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine].

Parameters
Name Description
name SiteSearchEngineName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSiteSearchEngine

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
SiteSearchEngineName name = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
// Make the request
SiteSearchEngine response = await siteSearchEngineServiceClient.GetSiteSearchEngineAsync(name);

GetSiteSearchEngineAsync(SiteSearchEngineName, CancellationToken)

public virtual Task<SiteSearchEngine> GetSiteSearchEngineAsync(SiteSearchEngineName name, CancellationToken cancellationToken)

Gets the [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine].

Parameters
Name Description
name SiteSearchEngineName

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSiteSearchEngine

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
SiteSearchEngineName name = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
// Make the request
SiteSearchEngine response = await siteSearchEngineServiceClient.GetSiteSearchEngineAsync(name);

GetSiteSearchEngineAsync(string, CallSettings)

public virtual Task<SiteSearchEngine> GetSiteSearchEngineAsync(string name, CallSettings callSettings = null)

Gets the [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine].

Parameters
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSiteSearchEngine

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/siteSearchEngine";
// Make the request
SiteSearchEngine response = await siteSearchEngineServiceClient.GetSiteSearchEngineAsync(name);

GetSiteSearchEngineAsync(string, CancellationToken)

public virtual Task<SiteSearchEngine> GetSiteSearchEngineAsync(string name, CancellationToken cancellationToken)

Gets the [SiteSearchEngine][google.cloud.discoveryengine.v1.SiteSearchEngine].

Parameters
Name Description
name string

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSiteSearchEngine

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/siteSearchEngine";
// Make the request
SiteSearchEngine response = await siteSearchEngineServiceClient.GetSiteSearchEngineAsync(name);

GetTargetSite(GetTargetSiteRequest, CallSettings)

public virtual TargetSite GetTargetSite(GetTargetSiteRequest request, CallSettings callSettings = null)

Gets a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
request GetTargetSiteRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TargetSite

The RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = SiteSearchEngineServiceClient.Create();
// Initialize request argument(s)
GetTargetSiteRequest request = new GetTargetSiteRequest
{
    TargetSiteName = TargetSiteName.FromProjectLocationDataStoreTargetSite("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[TARGET_SITE]"),
};
// Make the request
TargetSite response = siteSearchEngineServiceClient.GetTargetSite(request);

GetTargetSite(TargetSiteName, CallSettings)

public virtual TargetSite GetTargetSite(TargetSiteName name, CallSettings callSettings = null)

Gets a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
name TargetSiteName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TargetSite

The RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = SiteSearchEngineServiceClient.Create();
// Initialize request argument(s)
TargetSiteName name = TargetSiteName.FromProjectLocationDataStoreTargetSite("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[TARGET_SITE]");
// Make the request
TargetSite response = siteSearchEngineServiceClient.GetTargetSite(name);

GetTargetSite(string, CallSettings)

public virtual TargetSite GetTargetSite(string name, CallSettings callSettings = null)

Gets a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TargetSite

The RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = SiteSearchEngineServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/siteSearchEngine/targetSites/[TARGET_SITE]";
// Make the request
TargetSite response = siteSearchEngineServiceClient.GetTargetSite(name);

GetTargetSiteAsync(GetTargetSiteRequest, CallSettings)

public virtual Task<TargetSite> GetTargetSiteAsync(GetTargetSiteRequest request, CallSettings callSettings = null)

Gets a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
request GetTargetSiteRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskTargetSite

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
GetTargetSiteRequest request = new GetTargetSiteRequest
{
    TargetSiteName = TargetSiteName.FromProjectLocationDataStoreTargetSite("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[TARGET_SITE]"),
};
// Make the request
TargetSite response = await siteSearchEngineServiceClient.GetTargetSiteAsync(request);

GetTargetSiteAsync(GetTargetSiteRequest, CancellationToken)

public virtual Task<TargetSite> GetTargetSiteAsync(GetTargetSiteRequest request, CancellationToken cancellationToken)

Gets a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
request GetTargetSiteRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTargetSite

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
GetTargetSiteRequest request = new GetTargetSiteRequest
{
    TargetSiteName = TargetSiteName.FromProjectLocationDataStoreTargetSite("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[TARGET_SITE]"),
};
// Make the request
TargetSite response = await siteSearchEngineServiceClient.GetTargetSiteAsync(request);

GetTargetSiteAsync(TargetSiteName, CallSettings)

public virtual Task<TargetSite> GetTargetSiteAsync(TargetSiteName name, CallSettings callSettings = null)

Gets a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
name TargetSiteName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskTargetSite

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
TargetSiteName name = TargetSiteName.FromProjectLocationDataStoreTargetSite("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[TARGET_SITE]");
// Make the request
TargetSite response = await siteSearchEngineServiceClient.GetTargetSiteAsync(name);

GetTargetSiteAsync(TargetSiteName, CancellationToken)

public virtual Task<TargetSite> GetTargetSiteAsync(TargetSiteName name, CancellationToken cancellationToken)

Gets a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
name TargetSiteName

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTargetSite

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
TargetSiteName name = TargetSiteName.FromProjectLocationDataStoreTargetSite("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[TARGET_SITE]");
// Make the request
TargetSite response = await siteSearchEngineServiceClient.GetTargetSiteAsync(name);

GetTargetSiteAsync(string, CallSettings)

public virtual Task<TargetSite> GetTargetSiteAsync(string name, CallSettings callSettings = null)

Gets a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskTargetSite

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/siteSearchEngine/targetSites/[TARGET_SITE]";
// Make the request
TargetSite response = await siteSearchEngineServiceClient.GetTargetSiteAsync(name);

GetTargetSiteAsync(string, CancellationToken)

public virtual Task<TargetSite> GetTargetSiteAsync(string name, CancellationToken cancellationToken)

Gets a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
name string

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTargetSite

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/siteSearchEngine/targetSites/[TARGET_SITE]";
// Make the request
TargetSite response = await siteSearchEngineServiceClient.GetTargetSiteAsync(name);

ListTargetSites(ListTargetSitesRequest, CallSettings)

public virtual PagedEnumerable<ListTargetSitesResponse, TargetSite> ListTargetSites(ListTargetSitesRequest request, CallSettings callSettings = null)

Gets a list of [TargetSite][google.cloud.discoveryengine.v1.TargetSite]s.

Parameters
Name Description
request ListTargetSitesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListTargetSitesResponseTargetSite

A pageable sequence of TargetSite resources.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = SiteSearchEngineServiceClient.Create();
// Initialize request argument(s)
ListTargetSitesRequest request = new ListTargetSitesRequest
{
    ParentAsSiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
PagedEnumerable<ListTargetSitesResponse, TargetSite> response = siteSearchEngineServiceClient.ListTargetSites(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (TargetSite item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTargetSitesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TargetSite item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TargetSite> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TargetSite item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListTargetSites(SiteSearchEngineName, string, int?, CallSettings)

public virtual PagedEnumerable<ListTargetSitesResponse, TargetSite> ListTargetSites(SiteSearchEngineName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Gets a list of [TargetSite][google.cloud.discoveryengine.v1.TargetSite]s.

Parameters
Name Description
parent SiteSearchEngineName

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

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListTargetSitesResponseTargetSite

A pageable sequence of TargetSite resources.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = SiteSearchEngineServiceClient.Create();
// Initialize request argument(s)
SiteSearchEngineName parent = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
// Make the request
PagedEnumerable<ListTargetSitesResponse, TargetSite> response = siteSearchEngineServiceClient.ListTargetSites(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (TargetSite item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTargetSitesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TargetSite item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TargetSite> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TargetSite item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListTargetSites(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListTargetSitesResponse, TargetSite> ListTargetSites(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Gets a list of [TargetSite][google.cloud.discoveryengine.v1.TargetSite]s.

Parameters
Name Description
parent string

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

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListTargetSitesResponseTargetSite

A pageable sequence of TargetSite resources.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = SiteSearchEngineServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/siteSearchEngine";
// Make the request
PagedEnumerable<ListTargetSitesResponse, TargetSite> response = siteSearchEngineServiceClient.ListTargetSites(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (TargetSite item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListTargetSitesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TargetSite item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TargetSite> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TargetSite item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListTargetSitesAsync(ListTargetSitesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListTargetSitesResponse, TargetSite> ListTargetSitesAsync(ListTargetSitesRequest request, CallSettings callSettings = null)

Gets a list of [TargetSite][google.cloud.discoveryengine.v1.TargetSite]s.

Parameters
Name Description
request ListTargetSitesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListTargetSitesResponseTargetSite

A pageable asynchronous sequence of TargetSite resources.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
ListTargetSitesRequest request = new ListTargetSitesRequest
{
    ParentAsSiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
};
// Make the request
PagedAsyncEnumerable<ListTargetSitesResponse, TargetSite> response = siteSearchEngineServiceClient.ListTargetSitesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((TargetSite item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTargetSitesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TargetSite item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TargetSite> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TargetSite item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListTargetSitesAsync(SiteSearchEngineName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListTargetSitesResponse, TargetSite> ListTargetSitesAsync(SiteSearchEngineName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Gets a list of [TargetSite][google.cloud.discoveryengine.v1.TargetSite]s.

Parameters
Name Description
parent SiteSearchEngineName

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

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListTargetSitesResponseTargetSite

A pageable asynchronous sequence of TargetSite resources.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
SiteSearchEngineName parent = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
// Make the request
PagedAsyncEnumerable<ListTargetSitesResponse, TargetSite> response = siteSearchEngineServiceClient.ListTargetSitesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((TargetSite item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTargetSitesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TargetSite item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TargetSite> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TargetSite item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListTargetSitesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListTargetSitesResponse, TargetSite> ListTargetSitesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Gets a list of [TargetSite][google.cloud.discoveryengine.v1.TargetSite]s.

Parameters
Name Description
parent string

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

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListTargetSitesResponseTargetSite

A pageable asynchronous sequence of TargetSite resources.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/siteSearchEngine";
// Make the request
PagedAsyncEnumerable<ListTargetSitesResponse, TargetSite> response = siteSearchEngineServiceClient.ListTargetSitesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((TargetSite item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListTargetSitesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (TargetSite item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<TargetSite> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (TargetSite item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

PollOnceBatchCreateTargetSites(string, CallSettings)

public virtual Operation<BatchCreateTargetSitesResponse, BatchCreateTargetSiteMetadata> PollOnceBatchCreateTargetSites(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of BatchCreateTargetSites.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBatchCreateTargetSitesResponseBatchCreateTargetSiteMetadata

The result of polling the operation.

PollOnceBatchCreateTargetSitesAsync(string, CallSettings)

public virtual Task<Operation<BatchCreateTargetSitesResponse, BatchCreateTargetSiteMetadata>> PollOnceBatchCreateTargetSitesAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of BatchCreateTargetSites.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBatchCreateTargetSitesResponseBatchCreateTargetSiteMetadata

A task representing the result of polling the operation.

PollOnceBatchVerifyTargetSites(string, CallSettings)

public virtual Operation<BatchVerifyTargetSitesResponse, BatchVerifyTargetSitesMetadata> PollOnceBatchVerifyTargetSites(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of BatchVerifyTargetSites.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBatchVerifyTargetSitesResponseBatchVerifyTargetSitesMetadata

The result of polling the operation.

PollOnceBatchVerifyTargetSitesAsync(string, CallSettings)

public virtual Task<Operation<BatchVerifyTargetSitesResponse, BatchVerifyTargetSitesMetadata>> PollOnceBatchVerifyTargetSitesAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of BatchVerifyTargetSites.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBatchVerifyTargetSitesResponseBatchVerifyTargetSitesMetadata

A task representing the result of polling the operation.

PollOnceCreateTargetSite(string, CallSettings)

public virtual Operation<TargetSite, CreateTargetSiteMetadata> PollOnceCreateTargetSite(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of CreateTargetSite.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationTargetSiteCreateTargetSiteMetadata

The result of polling the operation.

PollOnceCreateTargetSiteAsync(string, CallSettings)

public virtual Task<Operation<TargetSite, CreateTargetSiteMetadata>> PollOnceCreateTargetSiteAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of CreateTargetSite.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationTargetSiteCreateTargetSiteMetadata

A task representing the result of polling the operation.

PollOnceDeleteTargetSite(string, CallSettings)

public virtual Operation<Empty, DeleteTargetSiteMetadata> PollOnceDeleteTargetSite(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of DeleteTargetSite.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteTargetSiteMetadata

The result of polling the operation.

PollOnceDeleteTargetSiteAsync(string, CallSettings)

public virtual Task<Operation<Empty, DeleteTargetSiteMetadata>> PollOnceDeleteTargetSiteAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of DeleteTargetSite.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteTargetSiteMetadata

A task representing the result of polling the operation.

PollOnceDisableAdvancedSiteSearch(string, CallSettings)

public virtual Operation<DisableAdvancedSiteSearchResponse, DisableAdvancedSiteSearchMetadata> PollOnceDisableAdvancedSiteSearch(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of DisableAdvancedSiteSearch.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationDisableAdvancedSiteSearchResponseDisableAdvancedSiteSearchMetadata

The result of polling the operation.

PollOnceDisableAdvancedSiteSearchAsync(string, CallSettings)

public virtual Task<Operation<DisableAdvancedSiteSearchResponse, DisableAdvancedSiteSearchMetadata>> PollOnceDisableAdvancedSiteSearchAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of DisableAdvancedSiteSearch.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationDisableAdvancedSiteSearchResponseDisableAdvancedSiteSearchMetadata

A task representing the result of polling the operation.

PollOnceEnableAdvancedSiteSearch(string, CallSettings)

public virtual Operation<EnableAdvancedSiteSearchResponse, EnableAdvancedSiteSearchMetadata> PollOnceEnableAdvancedSiteSearch(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of EnableAdvancedSiteSearch.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEnableAdvancedSiteSearchResponseEnableAdvancedSiteSearchMetadata

The result of polling the operation.

PollOnceEnableAdvancedSiteSearchAsync(string, CallSettings)

public virtual Task<Operation<EnableAdvancedSiteSearchResponse, EnableAdvancedSiteSearchMetadata>> PollOnceEnableAdvancedSiteSearchAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of EnableAdvancedSiteSearch.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEnableAdvancedSiteSearchResponseEnableAdvancedSiteSearchMetadata

A task representing the result of polling the operation.

PollOnceRecrawlUris(string, CallSettings)

public virtual Operation<RecrawlUrisResponse, RecrawlUrisMetadata> PollOnceRecrawlUris(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of RecrawlUris.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRecrawlUrisResponseRecrawlUrisMetadata

The result of polling the operation.

PollOnceRecrawlUrisAsync(string, CallSettings)

public virtual Task<Operation<RecrawlUrisResponse, RecrawlUrisMetadata>> PollOnceRecrawlUrisAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of RecrawlUris.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRecrawlUrisResponseRecrawlUrisMetadata

A task representing the result of polling the operation.

PollOnceUpdateTargetSite(string, CallSettings)

public virtual Operation<TargetSite, UpdateTargetSiteMetadata> PollOnceUpdateTargetSite(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of UpdateTargetSite.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationTargetSiteUpdateTargetSiteMetadata

The result of polling the operation.

PollOnceUpdateTargetSiteAsync(string, CallSettings)

public virtual Task<Operation<TargetSite, UpdateTargetSiteMetadata>> PollOnceUpdateTargetSiteAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of UpdateTargetSite.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationTargetSiteUpdateTargetSiteMetadata

A task representing the result of polling the operation.

RecrawlUris(RecrawlUrisRequest, CallSettings)

public virtual Operation<RecrawlUrisResponse, RecrawlUrisMetadata> RecrawlUris(RecrawlUrisRequest request, CallSettings callSettings = null)

Request on-demand recrawl for a list of URIs.

Parameters
Name Description
request RecrawlUrisRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRecrawlUrisResponseRecrawlUrisMetadata

The RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = SiteSearchEngineServiceClient.Create();
// Initialize request argument(s)
RecrawlUrisRequest request = new RecrawlUrisRequest
{
    SiteSearchEngineAsSiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    Uris = { "", },
};
// Make the request
Operation<RecrawlUrisResponse, RecrawlUrisMetadata> response = siteSearchEngineServiceClient.RecrawlUris(request);

// Poll until the returned long-running operation is complete
Operation<RecrawlUrisResponse, RecrawlUrisMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
RecrawlUrisResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<RecrawlUrisResponse, RecrawlUrisMetadata> retrievedResponse = siteSearchEngineServiceClient.PollOnceRecrawlUris(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    RecrawlUrisResponse retrievedResult = retrievedResponse.Result;
}

RecrawlUrisAsync(RecrawlUrisRequest, CallSettings)

public virtual Task<Operation<RecrawlUrisResponse, RecrawlUrisMetadata>> RecrawlUrisAsync(RecrawlUrisRequest request, CallSettings callSettings = null)

Request on-demand recrawl for a list of URIs.

Parameters
Name Description
request RecrawlUrisRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationRecrawlUrisResponseRecrawlUrisMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
RecrawlUrisRequest request = new RecrawlUrisRequest
{
    SiteSearchEngineAsSiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    Uris = { "", },
};
// Make the request
Operation<RecrawlUrisResponse, RecrawlUrisMetadata> response = await siteSearchEngineServiceClient.RecrawlUrisAsync(request);

// Poll until the returned long-running operation is complete
Operation<RecrawlUrisResponse, RecrawlUrisMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
RecrawlUrisResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<RecrawlUrisResponse, RecrawlUrisMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceRecrawlUrisAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    RecrawlUrisResponse retrievedResult = retrievedResponse.Result;
}

RecrawlUrisAsync(RecrawlUrisRequest, CancellationToken)

public virtual Task<Operation<RecrawlUrisResponse, RecrawlUrisMetadata>> RecrawlUrisAsync(RecrawlUrisRequest request, CancellationToken cancellationToken)

Request on-demand recrawl for a list of URIs.

Parameters
Name Description
request RecrawlUrisRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationRecrawlUrisResponseRecrawlUrisMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
RecrawlUrisRequest request = new RecrawlUrisRequest
{
    SiteSearchEngineAsSiteSearchEngineName = SiteSearchEngineName.FromProjectLocationDataStore("[PROJECT]", "[LOCATION]", "[DATA_STORE]"),
    Uris = { "", },
};
// Make the request
Operation<RecrawlUrisResponse, RecrawlUrisMetadata> response = await siteSearchEngineServiceClient.RecrawlUrisAsync(request);

// Poll until the returned long-running operation is complete
Operation<RecrawlUrisResponse, RecrawlUrisMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
RecrawlUrisResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<RecrawlUrisResponse, RecrawlUrisMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceRecrawlUrisAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    RecrawlUrisResponse retrievedResult = retrievedResponse.Result;
}

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

UpdateTargetSite(TargetSite, CallSettings)

public virtual Operation<TargetSite, UpdateTargetSiteMetadata> UpdateTargetSite(TargetSite targetSite, CallSettings callSettings = null)

Updates a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
targetSite TargetSite

Required. The target site to update. If the caller does not have permission to update the [TargetSite][google.cloud.discoveryengine.v1.TargetSite], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the [TargetSite][google.cloud.discoveryengine.v1.TargetSite] to update does not exist, a NOT_FOUND error is returned.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationTargetSiteUpdateTargetSiteMetadata

The RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = SiteSearchEngineServiceClient.Create();
// Initialize request argument(s)
TargetSite targetSite = new TargetSite();
// Make the request
Operation<TargetSite, UpdateTargetSiteMetadata> response = siteSearchEngineServiceClient.UpdateTargetSite(targetSite);

// Poll until the returned long-running operation is complete
Operation<TargetSite, UpdateTargetSiteMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
TargetSite result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TargetSite, UpdateTargetSiteMetadata> retrievedResponse = siteSearchEngineServiceClient.PollOnceUpdateTargetSite(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TargetSite retrievedResult = retrievedResponse.Result;
}

UpdateTargetSite(UpdateTargetSiteRequest, CallSettings)

public virtual Operation<TargetSite, UpdateTargetSiteMetadata> UpdateTargetSite(UpdateTargetSiteRequest request, CallSettings callSettings = null)

Updates a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
request UpdateTargetSiteRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationTargetSiteUpdateTargetSiteMetadata

The RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = SiteSearchEngineServiceClient.Create();
// Initialize request argument(s)
UpdateTargetSiteRequest request = new UpdateTargetSiteRequest
{
    TargetSite = new TargetSite(),
};
// Make the request
Operation<TargetSite, UpdateTargetSiteMetadata> response = siteSearchEngineServiceClient.UpdateTargetSite(request);

// Poll until the returned long-running operation is complete
Operation<TargetSite, UpdateTargetSiteMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
TargetSite result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TargetSite, UpdateTargetSiteMetadata> retrievedResponse = siteSearchEngineServiceClient.PollOnceUpdateTargetSite(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TargetSite retrievedResult = retrievedResponse.Result;
}

UpdateTargetSiteAsync(TargetSite, CallSettings)

public virtual Task<Operation<TargetSite, UpdateTargetSiteMetadata>> UpdateTargetSiteAsync(TargetSite targetSite, CallSettings callSettings = null)

Updates a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
targetSite TargetSite

Required. The target site to update. If the caller does not have permission to update the [TargetSite][google.cloud.discoveryengine.v1.TargetSite], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the [TargetSite][google.cloud.discoveryengine.v1.TargetSite] to update does not exist, a NOT_FOUND error is returned.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationTargetSiteUpdateTargetSiteMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
TargetSite targetSite = new TargetSite();
// Make the request
Operation<TargetSite, UpdateTargetSiteMetadata> response = await siteSearchEngineServiceClient.UpdateTargetSiteAsync(targetSite);

// Poll until the returned long-running operation is complete
Operation<TargetSite, UpdateTargetSiteMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TargetSite result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TargetSite, UpdateTargetSiteMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceUpdateTargetSiteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TargetSite retrievedResult = retrievedResponse.Result;
}

UpdateTargetSiteAsync(TargetSite, CancellationToken)

public virtual Task<Operation<TargetSite, UpdateTargetSiteMetadata>> UpdateTargetSiteAsync(TargetSite targetSite, CancellationToken cancellationToken)

Updates a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
targetSite TargetSite

Required. The target site to update. If the caller does not have permission to update the [TargetSite][google.cloud.discoveryengine.v1.TargetSite], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the [TargetSite][google.cloud.discoveryengine.v1.TargetSite] to update does not exist, a NOT_FOUND error is returned.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationTargetSiteUpdateTargetSiteMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
TargetSite targetSite = new TargetSite();
// Make the request
Operation<TargetSite, UpdateTargetSiteMetadata> response = await siteSearchEngineServiceClient.UpdateTargetSiteAsync(targetSite);

// Poll until the returned long-running operation is complete
Operation<TargetSite, UpdateTargetSiteMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TargetSite result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TargetSite, UpdateTargetSiteMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceUpdateTargetSiteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TargetSite retrievedResult = retrievedResponse.Result;
}

UpdateTargetSiteAsync(UpdateTargetSiteRequest, CallSettings)

public virtual Task<Operation<TargetSite, UpdateTargetSiteMetadata>> UpdateTargetSiteAsync(UpdateTargetSiteRequest request, CallSettings callSettings = null)

Updates a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
request UpdateTargetSiteRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationTargetSiteUpdateTargetSiteMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateTargetSiteRequest request = new UpdateTargetSiteRequest
{
    TargetSite = new TargetSite(),
};
// Make the request
Operation<TargetSite, UpdateTargetSiteMetadata> response = await siteSearchEngineServiceClient.UpdateTargetSiteAsync(request);

// Poll until the returned long-running operation is complete
Operation<TargetSite, UpdateTargetSiteMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TargetSite result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TargetSite, UpdateTargetSiteMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceUpdateTargetSiteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TargetSite retrievedResult = retrievedResponse.Result;
}

UpdateTargetSiteAsync(UpdateTargetSiteRequest, CancellationToken)

public virtual Task<Operation<TargetSite, UpdateTargetSiteMetadata>> UpdateTargetSiteAsync(UpdateTargetSiteRequest request, CancellationToken cancellationToken)

Updates a [TargetSite][google.cloud.discoveryengine.v1.TargetSite].

Parameters
Name Description
request UpdateTargetSiteRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationTargetSiteUpdateTargetSiteMetadata

A Task containing the RPC response.

Example
// Create client
SiteSearchEngineServiceClient siteSearchEngineServiceClient = await SiteSearchEngineServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateTargetSiteRequest request = new UpdateTargetSiteRequest
{
    TargetSite = new TargetSite(),
};
// Make the request
Operation<TargetSite, UpdateTargetSiteMetadata> response = await siteSearchEngineServiceClient.UpdateTargetSiteAsync(request);

// Poll until the returned long-running operation is complete
Operation<TargetSite, UpdateTargetSiteMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
TargetSite result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<TargetSite, UpdateTargetSiteMetadata> retrievedResponse = await siteSearchEngineServiceClient.PollOnceUpdateTargetSiteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    TargetSite retrievedResult = retrievedResponse.Result;
}