Discovery Engine v1beta API - Class SiteSearchEngineServiceClient (1.0.0-beta10)

public abstract class SiteSearchEngineServiceClient

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

SiteSearchEngineService client wrapper, for convenient use.

Inheritance

object > SiteSearchEngineServiceClient

Namespace

Google.Cloud.DiscoveryEngine.V1Beta

Assembly

Google.Cloud.DiscoveryEngine.V1Beta.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
TypeDescription
OperationsClient

BatchVerifyTargetSitesOperationsClient

public virtual OperationsClient BatchVerifyTargetSitesOperationsClient { get; }

The long-running operations client for BatchVerifyTargetSites.

Property Value
TypeDescription
OperationsClient

CreateTargetSiteOperationsClient

public virtual OperationsClient CreateTargetSiteOperationsClient { get; }

The long-running operations client for CreateTargetSite.

Property Value
TypeDescription
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
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default SiteSearchEngineService scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

The default SiteSearchEngineService scopes are:

DeleteTargetSiteOperationsClient

public virtual OperationsClient DeleteTargetSiteOperationsClient { get; }

The long-running operations client for DeleteTargetSite.

Property Value
TypeDescription
OperationsClient

DisableAdvancedSiteSearchOperationsClient

public virtual OperationsClient DisableAdvancedSiteSearchOperationsClient { get; }

The long-running operations client for DisableAdvancedSiteSearch.

Property Value
TypeDescription
OperationsClient

EnableAdvancedSiteSearchOperationsClient

public virtual OperationsClient EnableAdvancedSiteSearchOperationsClient { get; }

The long-running operations client for EnableAdvancedSiteSearch.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual SiteSearchEngineService.SiteSearchEngineServiceClient GrpcClient { get; }

The underlying gRPC SiteSearchEngineService client

Property Value
TypeDescription
SiteSearchEngineServiceSiteSearchEngineServiceClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient

RecrawlUrisOperationsClient

public virtual OperationsClient RecrawlUrisOperationsClient { get; }

The long-running operations client for RecrawlUris.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

UpdateTargetSiteOperationsClient

public virtual OperationsClient UpdateTargetSiteOperationsClient { get; }

The long-running operations client for UpdateTargetSite.

Property Value
TypeDescription
OperationsClient

Methods

BatchCreateTargetSites(BatchCreateTargetSitesRequest, CallSettings)

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

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

Parameters
NameDescription
requestBatchCreateTargetSitesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite] in a batch.

Parameters
NameDescription
requestBatchCreateTargetSitesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite] in a batch.

Parameters
NameDescription
requestBatchCreateTargetSitesRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
requestBatchVerifyTargetSitesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestBatchVerifyTargetSitesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestBatchVerifyTargetSitesRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
TypeDescription
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
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
requestCreateTargetSiteRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
parentSiteSearchEngineName

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

targetSiteTargetSite

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
parentstring

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

targetSiteTargetSite

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
requestCreateTargetSiteRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
requestCreateTargetSiteRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
parentSiteSearchEngineName

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

targetSiteTargetSite

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
parentSiteSearchEngineName

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

targetSiteTargetSite

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
parentstring

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

targetSiteTargetSite

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
parentstring

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

targetSiteTargetSite

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
requestDeleteTargetSiteRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
nameTargetSiteName

Required. Full resource name of [TargetSite][google.cloud.discoveryengine.v1beta.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.v1beta.TargetSite], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the requested [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] does not exist, a NOT_FOUND error is returned.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
namestring

Required. Full resource name of [TargetSite][google.cloud.discoveryengine.v1beta.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.v1beta.TargetSite], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the requested [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] does not exist, a NOT_FOUND error is returned.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
requestDeleteTargetSiteRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
requestDeleteTargetSiteRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
nameTargetSiteName

Required. Full resource name of [TargetSite][google.cloud.discoveryengine.v1beta.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.v1beta.TargetSite], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the requested [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] does not exist, a NOT_FOUND error is returned.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
nameTargetSiteName

Required. Full resource name of [TargetSite][google.cloud.discoveryengine.v1beta.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.v1beta.TargetSite], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the requested [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] does not exist, a NOT_FOUND error is returned.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
namestring

Required. Full resource name of [TargetSite][google.cloud.discoveryengine.v1beta.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.v1beta.TargetSite], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the requested [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] does not exist, a NOT_FOUND error is returned.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
namestring

Required. Full resource name of [TargetSite][google.cloud.discoveryengine.v1beta.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.v1beta.TargetSite], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the requested [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] does not exist, a NOT_FOUND error is returned.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
requestDisableAdvancedSiteSearchRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestDisableAdvancedSiteSearchRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestDisableAdvancedSiteSearchRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
requestEnableAdvancedSiteSearchRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestEnableAdvancedSiteSearchRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestEnableAdvancedSiteSearchRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
requestFetchDomainVerificationStatusRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestFetchDomainVerificationStatusRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.SiteSearchEngine].

Parameters
NameDescription
requestGetSiteSearchEngineRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.SiteSearchEngine].

Parameters
NameDescription
nameSiteSearchEngineName

Required. Resource name of [SiteSearchEngine][google.cloud.discoveryengine.v1beta.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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.SiteSearchEngine].

Parameters
NameDescription
namestring

Required. Resource name of [SiteSearchEngine][google.cloud.discoveryengine.v1beta.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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.SiteSearchEngine].

Parameters
NameDescription
requestGetSiteSearchEngineRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.SiteSearchEngine].

Parameters
NameDescription
requestGetSiteSearchEngineRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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.v1beta.SiteSearchEngine].

Parameters
NameDescription
nameSiteSearchEngineName

Required. Resource name of [SiteSearchEngine][google.cloud.discoveryengine.v1beta.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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.SiteSearchEngine].

Parameters
NameDescription
nameSiteSearchEngineName

Required. Resource name of [SiteSearchEngine][google.cloud.discoveryengine.v1beta.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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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.v1beta.SiteSearchEngine].

Parameters
NameDescription
namestring

Required. Resource name of [SiteSearchEngine][google.cloud.discoveryengine.v1beta.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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.SiteSearchEngine].

Parameters
NameDescription
namestring

Required. Resource name of [SiteSearchEngine][google.cloud.discoveryengine.v1beta.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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
requestGetTargetSiteRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
nameTargetSiteName

Required. Full resource name of [TargetSite][google.cloud.discoveryengine.v1beta.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.v1beta.TargetSite], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the requested [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] does not exist, a NOT_FOUND error is returned.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
namestring

Required. Full resource name of [TargetSite][google.cloud.discoveryengine.v1beta.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.v1beta.TargetSite], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the requested [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] does not exist, a NOT_FOUND error is returned.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
requestGetTargetSiteRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
requestGetTargetSiteRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
nameTargetSiteName

Required. Full resource name of [TargetSite][google.cloud.discoveryengine.v1beta.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.v1beta.TargetSite], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the requested [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] does not exist, a NOT_FOUND error is returned.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
nameTargetSiteName

Required. Full resource name of [TargetSite][google.cloud.discoveryengine.v1beta.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.v1beta.TargetSite], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the requested [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] does not exist, a NOT_FOUND error is returned.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
namestring

Required. Full resource name of [TargetSite][google.cloud.discoveryengine.v1beta.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.v1beta.TargetSite], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the requested [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] does not exist, a NOT_FOUND error is returned.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
namestring

Required. Full resource name of [TargetSite][google.cloud.discoveryengine.v1beta.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.v1beta.TargetSite], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the requested [TargetSite][google.cloud.discoveryengine.v1beta.TargetSite] does not exist, a NOT_FOUND error is returned.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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.v1beta.TargetSite]s.

Parameters
NameDescription
requestListTargetSitesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite]s.

Parameters
NameDescription
parentSiteSearchEngineName

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.v1beta.TargetSite]s under this site search engine, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned.

pageTokenstring

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

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite]s.

Parameters
NameDescription
parentstring

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.v1beta.TargetSite]s under this site search engine, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned.

pageTokenstring

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

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite]s.

Parameters
NameDescription
requestListTargetSitesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite]s.

Parameters
NameDescription
parentSiteSearchEngineName

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.v1beta.TargetSite]s under this site search engine, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned.

pageTokenstring

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

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite]s.

Parameters
NameDescription
parentstring

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.v1beta.TargetSite]s under this site search engine, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned.

pageTokenstring

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

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestRecrawlUrisRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestRecrawlUrisRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestRecrawlUrisRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
targetSiteTargetSite

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
requestUpdateTargetSiteRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
targetSiteTargetSite

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
targetSiteTargetSite

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

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
requestUpdateTargetSiteRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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.v1beta.TargetSite].

Parameters
NameDescription
requestUpdateTargetSiteRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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;
}