Discovery Engine v1beta API - Class EvaluationServiceClient (1.0.0-beta15)

public abstract class EvaluationServiceClient

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

EvaluationService client wrapper, for convenient use.

Inheritance

object > EvaluationServiceClient

Namespace

Google.Cloud.DiscoveryEngine.V1Beta

Assembly

Google.Cloud.DiscoveryEngine.V1Beta.dll

Remarks

Service for managing [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s,

Properties

CreateEvaluationOperationsClient

public virtual OperationsClient CreateEvaluationOperationsClient { get; }

The long-running operations client for CreateEvaluation.

Property Value
Type Description
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default EvaluationService scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default EvaluationService scopes are:

GrpcClient

public virtual EvaluationService.EvaluationServiceClient GrpcClient { get; }

The underlying gRPC EvaluationService client

Property Value
Type Description
EvaluationServiceEvaluationServiceClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

Create()

public static EvaluationServiceClient Create()

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

Returns
Type Description
EvaluationServiceClient

The created EvaluationServiceClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskEvaluationServiceClient

The task representing the created EvaluationServiceClient.

CreateEvaluation(CreateEvaluationRequest, CallSettings)

public virtual Operation<Evaluation, CreateEvaluationMetadata> CreateEvaluation(CreateEvaluationRequest request, CallSettings callSettings = null)

Creates a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Upon creation, the evaluation will be automatically triggered and begin execution.

Parameters
Name Description
request CreateEvaluationRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEvaluationCreateEvaluationMetadata

The RPC response.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = EvaluationServiceClient.Create();
// Initialize request argument(s)
CreateEvaluationRequest request = new CreateEvaluationRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Evaluation = new Evaluation(),
};
// Make the request
Operation<Evaluation, CreateEvaluationMetadata> response = evaluationServiceClient.CreateEvaluation(request);

// Poll until the returned long-running operation is complete
Operation<Evaluation, CreateEvaluationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Evaluation 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<Evaluation, CreateEvaluationMetadata> retrievedResponse = evaluationServiceClient.PollOnceCreateEvaluation(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}

CreateEvaluation(LocationName, Evaluation, CallSettings)

public virtual Operation<Evaluation, CreateEvaluationMetadata> CreateEvaluation(LocationName parent, Evaluation evaluation, CallSettings callSettings = null)

Creates a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Upon creation, the evaluation will be automatically triggered and begin execution.

Parameters
Name Description
parent LocationName

Required. The parent resource name, such as projects/{project}/locations/{location}.

evaluation Evaluation

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEvaluationCreateEvaluationMetadata

The RPC response.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = EvaluationServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Evaluation evaluation = new Evaluation();
// Make the request
Operation<Evaluation, CreateEvaluationMetadata> response = evaluationServiceClient.CreateEvaluation(parent, evaluation);

// Poll until the returned long-running operation is complete
Operation<Evaluation, CreateEvaluationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Evaluation 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<Evaluation, CreateEvaluationMetadata> retrievedResponse = evaluationServiceClient.PollOnceCreateEvaluation(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}

CreateEvaluation(string, Evaluation, CallSettings)

public virtual Operation<Evaluation, CreateEvaluationMetadata> CreateEvaluation(string parent, Evaluation evaluation, CallSettings callSettings = null)

Creates a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Upon creation, the evaluation will be automatically triggered and begin execution.

Parameters
Name Description
parent string

Required. The parent resource name, such as projects/{project}/locations/{location}.

evaluation Evaluation

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEvaluationCreateEvaluationMetadata

The RPC response.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = EvaluationServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Evaluation evaluation = new Evaluation();
// Make the request
Operation<Evaluation, CreateEvaluationMetadata> response = evaluationServiceClient.CreateEvaluation(parent, evaluation);

// Poll until the returned long-running operation is complete
Operation<Evaluation, CreateEvaluationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Evaluation 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<Evaluation, CreateEvaluationMetadata> retrievedResponse = evaluationServiceClient.PollOnceCreateEvaluation(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}

CreateEvaluationAsync(CreateEvaluationRequest, CallSettings)

public virtual Task<Operation<Evaluation, CreateEvaluationMetadata>> CreateEvaluationAsync(CreateEvaluationRequest request, CallSettings callSettings = null)

Creates a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Upon creation, the evaluation will be automatically triggered and begin execution.

Parameters
Name Description
request CreateEvaluationRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEvaluationCreateEvaluationMetadata

A Task containing the RPC response.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = await EvaluationServiceClient.CreateAsync();
// Initialize request argument(s)
CreateEvaluationRequest request = new CreateEvaluationRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Evaluation = new Evaluation(),
};
// Make the request
Operation<Evaluation, CreateEvaluationMetadata> response = await evaluationServiceClient.CreateEvaluationAsync(request);

// Poll until the returned long-running operation is complete
Operation<Evaluation, CreateEvaluationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Evaluation 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<Evaluation, CreateEvaluationMetadata> retrievedResponse = await evaluationServiceClient.PollOnceCreateEvaluationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}

CreateEvaluationAsync(CreateEvaluationRequest, CancellationToken)

public virtual Task<Operation<Evaluation, CreateEvaluationMetadata>> CreateEvaluationAsync(CreateEvaluationRequest request, CancellationToken cancellationToken)

Creates a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Upon creation, the evaluation will be automatically triggered and begin execution.

Parameters
Name Description
request CreateEvaluationRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEvaluationCreateEvaluationMetadata

A Task containing the RPC response.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = await EvaluationServiceClient.CreateAsync();
// Initialize request argument(s)
CreateEvaluationRequest request = new CreateEvaluationRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Evaluation = new Evaluation(),
};
// Make the request
Operation<Evaluation, CreateEvaluationMetadata> response = await evaluationServiceClient.CreateEvaluationAsync(request);

// Poll until the returned long-running operation is complete
Operation<Evaluation, CreateEvaluationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Evaluation 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<Evaluation, CreateEvaluationMetadata> retrievedResponse = await evaluationServiceClient.PollOnceCreateEvaluationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}

CreateEvaluationAsync(LocationName, Evaluation, CallSettings)

public virtual Task<Operation<Evaluation, CreateEvaluationMetadata>> CreateEvaluationAsync(LocationName parent, Evaluation evaluation, CallSettings callSettings = null)

Creates a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Upon creation, the evaluation will be automatically triggered and begin execution.

Parameters
Name Description
parent LocationName

Required. The parent resource name, such as projects/{project}/locations/{location}.

evaluation Evaluation

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEvaluationCreateEvaluationMetadata

A Task containing the RPC response.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = await EvaluationServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Evaluation evaluation = new Evaluation();
// Make the request
Operation<Evaluation, CreateEvaluationMetadata> response = await evaluationServiceClient.CreateEvaluationAsync(parent, evaluation);

// Poll until the returned long-running operation is complete
Operation<Evaluation, CreateEvaluationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Evaluation 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<Evaluation, CreateEvaluationMetadata> retrievedResponse = await evaluationServiceClient.PollOnceCreateEvaluationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}

CreateEvaluationAsync(LocationName, Evaluation, CancellationToken)

public virtual Task<Operation<Evaluation, CreateEvaluationMetadata>> CreateEvaluationAsync(LocationName parent, Evaluation evaluation, CancellationToken cancellationToken)

Creates a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Upon creation, the evaluation will be automatically triggered and begin execution.

Parameters
Name Description
parent LocationName

Required. The parent resource name, such as projects/{project}/locations/{location}.

evaluation Evaluation

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEvaluationCreateEvaluationMetadata

A Task containing the RPC response.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = await EvaluationServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Evaluation evaluation = new Evaluation();
// Make the request
Operation<Evaluation, CreateEvaluationMetadata> response = await evaluationServiceClient.CreateEvaluationAsync(parent, evaluation);

// Poll until the returned long-running operation is complete
Operation<Evaluation, CreateEvaluationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Evaluation 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<Evaluation, CreateEvaluationMetadata> retrievedResponse = await evaluationServiceClient.PollOnceCreateEvaluationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}

CreateEvaluationAsync(string, Evaluation, CallSettings)

public virtual Task<Operation<Evaluation, CreateEvaluationMetadata>> CreateEvaluationAsync(string parent, Evaluation evaluation, CallSettings callSettings = null)

Creates a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Upon creation, the evaluation will be automatically triggered and begin execution.

Parameters
Name Description
parent string

Required. The parent resource name, such as projects/{project}/locations/{location}.

evaluation Evaluation

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEvaluationCreateEvaluationMetadata

A Task containing the RPC response.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = await EvaluationServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Evaluation evaluation = new Evaluation();
// Make the request
Operation<Evaluation, CreateEvaluationMetadata> response = await evaluationServiceClient.CreateEvaluationAsync(parent, evaluation);

// Poll until the returned long-running operation is complete
Operation<Evaluation, CreateEvaluationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Evaluation 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<Evaluation, CreateEvaluationMetadata> retrievedResponse = await evaluationServiceClient.PollOnceCreateEvaluationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}

CreateEvaluationAsync(string, Evaluation, CancellationToken)

public virtual Task<Operation<Evaluation, CreateEvaluationMetadata>> CreateEvaluationAsync(string parent, Evaluation evaluation, CancellationToken cancellationToken)

Creates a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Upon creation, the evaluation will be automatically triggered and begin execution.

Parameters
Name Description
parent string

Required. The parent resource name, such as projects/{project}/locations/{location}.

evaluation Evaluation

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEvaluationCreateEvaluationMetadata

A Task containing the RPC response.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = await EvaluationServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Evaluation evaluation = new Evaluation();
// Make the request
Operation<Evaluation, CreateEvaluationMetadata> response = await evaluationServiceClient.CreateEvaluationAsync(parent, evaluation);

// Poll until the returned long-running operation is complete
Operation<Evaluation, CreateEvaluationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Evaluation 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<Evaluation, CreateEvaluationMetadata> retrievedResponse = await evaluationServiceClient.PollOnceCreateEvaluationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Evaluation retrievedResult = retrievedResponse.Result;
}

GetEvaluation(EvaluationName, CallSettings)

public virtual Evaluation GetEvaluation(EvaluationName name, CallSettings callSettings = null)

Gets a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Parameters
Name Description
name EvaluationName

Required. Full resource name of [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation], such as projects/{project}/locations/{location}/evaluations/{evaluation}.

If the caller does not have permission to access the [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Evaluation

The RPC response.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = EvaluationServiceClient.Create();
// Initialize request argument(s)
EvaluationName name = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]");
// Make the request
Evaluation response = evaluationServiceClient.GetEvaluation(name);

GetEvaluation(GetEvaluationRequest, CallSettings)

public virtual Evaluation GetEvaluation(GetEvaluationRequest request, CallSettings callSettings = null)

Gets a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Parameters
Name Description
request GetEvaluationRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Evaluation

The RPC response.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = EvaluationServiceClient.Create();
// Initialize request argument(s)
GetEvaluationRequest request = new GetEvaluationRequest
{
    EvaluationName = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]"),
};
// Make the request
Evaluation response = evaluationServiceClient.GetEvaluation(request);

GetEvaluation(string, CallSettings)

public virtual Evaluation GetEvaluation(string name, CallSettings callSettings = null)

Gets a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Parameters
Name Description
name string

Required. Full resource name of [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation], such as projects/{project}/locations/{location}/evaluations/{evaluation}.

If the caller does not have permission to access the [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Evaluation

The RPC response.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = EvaluationServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/evaluations/[EVALUATION]";
// Make the request
Evaluation response = evaluationServiceClient.GetEvaluation(name);

GetEvaluationAsync(EvaluationName, CallSettings)

public virtual Task<Evaluation> GetEvaluationAsync(EvaluationName name, CallSettings callSettings = null)

Gets a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Parameters
Name Description
name EvaluationName

Required. Full resource name of [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation], such as projects/{project}/locations/{location}/evaluations/{evaluation}.

If the caller does not have permission to access the [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskEvaluation

A Task containing the RPC response.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = await EvaluationServiceClient.CreateAsync();
// Initialize request argument(s)
EvaluationName name = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]");
// Make the request
Evaluation response = await evaluationServiceClient.GetEvaluationAsync(name);

GetEvaluationAsync(EvaluationName, CancellationToken)

public virtual Task<Evaluation> GetEvaluationAsync(EvaluationName name, CancellationToken cancellationToken)

Gets a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Parameters
Name Description
name EvaluationName

Required. Full resource name of [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation], such as projects/{project}/locations/{location}/evaluations/{evaluation}.

If the caller does not have permission to access the [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskEvaluation

A Task containing the RPC response.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = await EvaluationServiceClient.CreateAsync();
// Initialize request argument(s)
EvaluationName name = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]");
// Make the request
Evaluation response = await evaluationServiceClient.GetEvaluationAsync(name);

GetEvaluationAsync(GetEvaluationRequest, CallSettings)

public virtual Task<Evaluation> GetEvaluationAsync(GetEvaluationRequest request, CallSettings callSettings = null)

Gets a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Parameters
Name Description
request GetEvaluationRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskEvaluation

A Task containing the RPC response.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = await EvaluationServiceClient.CreateAsync();
// Initialize request argument(s)
GetEvaluationRequest request = new GetEvaluationRequest
{
    EvaluationName = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]"),
};
// Make the request
Evaluation response = await evaluationServiceClient.GetEvaluationAsync(request);

GetEvaluationAsync(GetEvaluationRequest, CancellationToken)

public virtual Task<Evaluation> GetEvaluationAsync(GetEvaluationRequest request, CancellationToken cancellationToken)

Gets a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Parameters
Name Description
request GetEvaluationRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskEvaluation

A Task containing the RPC response.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = await EvaluationServiceClient.CreateAsync();
// Initialize request argument(s)
GetEvaluationRequest request = new GetEvaluationRequest
{
    EvaluationName = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]"),
};
// Make the request
Evaluation response = await evaluationServiceClient.GetEvaluationAsync(request);

GetEvaluationAsync(string, CallSettings)

public virtual Task<Evaluation> GetEvaluationAsync(string name, CallSettings callSettings = null)

Gets a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Parameters
Name Description
name string

Required. Full resource name of [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation], such as projects/{project}/locations/{location}/evaluations/{evaluation}.

If the caller does not have permission to access the [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskEvaluation

A Task containing the RPC response.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = await EvaluationServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/evaluations/[EVALUATION]";
// Make the request
Evaluation response = await evaluationServiceClient.GetEvaluationAsync(name);

GetEvaluationAsync(string, CancellationToken)

public virtual Task<Evaluation> GetEvaluationAsync(string name, CancellationToken cancellationToken)

Gets a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Parameters
Name Description
name string

Required. Full resource name of [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation], such as projects/{project}/locations/{location}/evaluations/{evaluation}.

If the caller does not have permission to access the [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskEvaluation

A Task containing the RPC response.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = await EvaluationServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/evaluations/[EVALUATION]";
// Make the request
Evaluation response = await evaluationServiceClient.GetEvaluationAsync(name);

ListEvaluationResults(EvaluationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListEvaluationResultsResponse, ListEvaluationResultsResponse.Types.EvaluationResult> ListEvaluationResults(EvaluationName evaluation, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Gets a list of results for a given a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Parameters
Name Description
evaluation EvaluationName

Required. The evaluation resource name, such as projects/{project}/locations/{location}/evaluations/{evaluation}.

If the caller does not have permission to list [EvaluationResult][] under this evaluation, regardless of whether or not this evaluation set exists, a PERMISSION_DENIED error is returned.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListEvaluationResultsResponseListEvaluationResultsResponseTypesEvaluationResult

A pageable sequence of ListEvaluationResultsResponse.Types.EvaluationResult resources.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = EvaluationServiceClient.Create();
// Initialize request argument(s)
EvaluationName evaluation = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]");
// Make the request
PagedEnumerable<ListEvaluationResultsResponse, ListEvaluationResultsResponse.Types.EvaluationResult> response = evaluationServiceClient.ListEvaluationResults(evaluation);

// Iterate over all response items, lazily performing RPCs as required
foreach (ListEvaluationResultsResponse.Types.EvaluationResult 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 (ListEvaluationResultsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ListEvaluationResultsResponse.Types.EvaluationResult 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<ListEvaluationResultsResponse.Types.EvaluationResult> 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 (ListEvaluationResultsResponse.Types.EvaluationResult 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;

ListEvaluationResults(ListEvaluationResultsRequest, CallSettings)

public virtual PagedEnumerable<ListEvaluationResultsResponse, ListEvaluationResultsResponse.Types.EvaluationResult> ListEvaluationResults(ListEvaluationResultsRequest request, CallSettings callSettings = null)

Gets a list of results for a given a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Parameters
Name Description
request ListEvaluationResultsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListEvaluationResultsResponseListEvaluationResultsResponseTypesEvaluationResult

A pageable sequence of ListEvaluationResultsResponse.Types.EvaluationResult resources.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = EvaluationServiceClient.Create();
// Initialize request argument(s)
ListEvaluationResultsRequest request = new ListEvaluationResultsRequest
{
    EvaluationAsEvaluationName = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]"),
};
// Make the request
PagedEnumerable<ListEvaluationResultsResponse, ListEvaluationResultsResponse.Types.EvaluationResult> response = evaluationServiceClient.ListEvaluationResults(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (ListEvaluationResultsResponse.Types.EvaluationResult 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 (ListEvaluationResultsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ListEvaluationResultsResponse.Types.EvaluationResult 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<ListEvaluationResultsResponse.Types.EvaluationResult> 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 (ListEvaluationResultsResponse.Types.EvaluationResult 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;

ListEvaluationResults(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListEvaluationResultsResponse, ListEvaluationResultsResponse.Types.EvaluationResult> ListEvaluationResults(string evaluation, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Gets a list of results for a given a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Parameters
Name Description
evaluation string

Required. The evaluation resource name, such as projects/{project}/locations/{location}/evaluations/{evaluation}.

If the caller does not have permission to list [EvaluationResult][] under this evaluation, regardless of whether or not this evaluation set exists, a PERMISSION_DENIED error is returned.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListEvaluationResultsResponseListEvaluationResultsResponseTypesEvaluationResult

A pageable sequence of ListEvaluationResultsResponse.Types.EvaluationResult resources.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = EvaluationServiceClient.Create();
// Initialize request argument(s)
string evaluation = "projects/[PROJECT]/locations/[LOCATION]/evaluations/[EVALUATION]";
// Make the request
PagedEnumerable<ListEvaluationResultsResponse, ListEvaluationResultsResponse.Types.EvaluationResult> response = evaluationServiceClient.ListEvaluationResults(evaluation);

// Iterate over all response items, lazily performing RPCs as required
foreach (ListEvaluationResultsResponse.Types.EvaluationResult 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 (ListEvaluationResultsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ListEvaluationResultsResponse.Types.EvaluationResult 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<ListEvaluationResultsResponse.Types.EvaluationResult> 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 (ListEvaluationResultsResponse.Types.EvaluationResult 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;

ListEvaluationResultsAsync(EvaluationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListEvaluationResultsResponse, ListEvaluationResultsResponse.Types.EvaluationResult> ListEvaluationResultsAsync(EvaluationName evaluation, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Gets a list of results for a given a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Parameters
Name Description
evaluation EvaluationName

Required. The evaluation resource name, such as projects/{project}/locations/{location}/evaluations/{evaluation}.

If the caller does not have permission to list [EvaluationResult][] under this evaluation, regardless of whether or not this evaluation set exists, a PERMISSION_DENIED error is returned.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListEvaluationResultsResponseListEvaluationResultsResponseTypesEvaluationResult

A pageable asynchronous sequence of ListEvaluationResultsResponse.Types.EvaluationResult resources.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = await EvaluationServiceClient.CreateAsync();
// Initialize request argument(s)
EvaluationName evaluation = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]");
// Make the request
PagedAsyncEnumerable<ListEvaluationResultsResponse, ListEvaluationResultsResponse.Types.EvaluationResult> response = evaluationServiceClient.ListEvaluationResultsAsync(evaluation);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ListEvaluationResultsResponse.Types.EvaluationResult 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((ListEvaluationResultsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ListEvaluationResultsResponse.Types.EvaluationResult 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<ListEvaluationResultsResponse.Types.EvaluationResult> 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 (ListEvaluationResultsResponse.Types.EvaluationResult 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;

ListEvaluationResultsAsync(ListEvaluationResultsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListEvaluationResultsResponse, ListEvaluationResultsResponse.Types.EvaluationResult> ListEvaluationResultsAsync(ListEvaluationResultsRequest request, CallSettings callSettings = null)

Gets a list of results for a given a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Parameters
Name Description
request ListEvaluationResultsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListEvaluationResultsResponseListEvaluationResultsResponseTypesEvaluationResult

A pageable asynchronous sequence of ListEvaluationResultsResponse.Types.EvaluationResult resources.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = await EvaluationServiceClient.CreateAsync();
// Initialize request argument(s)
ListEvaluationResultsRequest request = new ListEvaluationResultsRequest
{
    EvaluationAsEvaluationName = EvaluationName.FromProjectLocationEvaluation("[PROJECT]", "[LOCATION]", "[EVALUATION]"),
};
// Make the request
PagedAsyncEnumerable<ListEvaluationResultsResponse, ListEvaluationResultsResponse.Types.EvaluationResult> response = evaluationServiceClient.ListEvaluationResultsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ListEvaluationResultsResponse.Types.EvaluationResult 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((ListEvaluationResultsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ListEvaluationResultsResponse.Types.EvaluationResult 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<ListEvaluationResultsResponse.Types.EvaluationResult> 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 (ListEvaluationResultsResponse.Types.EvaluationResult 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;

ListEvaluationResultsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListEvaluationResultsResponse, ListEvaluationResultsResponse.Types.EvaluationResult> ListEvaluationResultsAsync(string evaluation, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Gets a list of results for a given a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation].

Parameters
Name Description
evaluation string

Required. The evaluation resource name, such as projects/{project}/locations/{location}/evaluations/{evaluation}.

If the caller does not have permission to list [EvaluationResult][] under this evaluation, regardless of whether or not this evaluation set exists, a PERMISSION_DENIED error is returned.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListEvaluationResultsResponseListEvaluationResultsResponseTypesEvaluationResult

A pageable asynchronous sequence of ListEvaluationResultsResponse.Types.EvaluationResult resources.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = await EvaluationServiceClient.CreateAsync();
// Initialize request argument(s)
string evaluation = "projects/[PROJECT]/locations/[LOCATION]/evaluations/[EVALUATION]";
// Make the request
PagedAsyncEnumerable<ListEvaluationResultsResponse, ListEvaluationResultsResponse.Types.EvaluationResult> response = evaluationServiceClient.ListEvaluationResultsAsync(evaluation);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ListEvaluationResultsResponse.Types.EvaluationResult 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((ListEvaluationResultsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ListEvaluationResultsResponse.Types.EvaluationResult 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<ListEvaluationResultsResponse.Types.EvaluationResult> 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 (ListEvaluationResultsResponse.Types.EvaluationResult 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;

ListEvaluations(ListEvaluationsRequest, CallSettings)

public virtual PagedEnumerable<ListEvaluationsResponse, Evaluation> ListEvaluations(ListEvaluationsRequest request, CallSettings callSettings = null)

Gets a list of [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s.

Parameters
Name Description
request ListEvaluationsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListEvaluationsResponseEvaluation

A pageable sequence of Evaluation resources.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = EvaluationServiceClient.Create();
// Initialize request argument(s)
ListEvaluationsRequest request = new ListEvaluationsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListEvaluationsResponse, Evaluation> response = evaluationServiceClient.ListEvaluations(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Evaluation 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 (ListEvaluationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Evaluation 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<Evaluation> 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 (Evaluation 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;

ListEvaluations(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListEvaluationsResponse, Evaluation> ListEvaluations(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Gets a list of [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s.

Parameters
Name Description
parent LocationName

Required. The parent location resource name, such as projects/{project}/locations/{location}.

If the caller does not have permission to list [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s under this location, regardless of whether or not this location exists, a PERMISSION_DENIED error is returned.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListEvaluationsResponseEvaluation

A pageable sequence of Evaluation resources.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = EvaluationServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListEvaluationsResponse, Evaluation> response = evaluationServiceClient.ListEvaluations(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Evaluation 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 (ListEvaluationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Evaluation 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<Evaluation> 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 (Evaluation 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;

ListEvaluations(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListEvaluationsResponse, Evaluation> ListEvaluations(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Gets a list of [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s.

Parameters
Name Description
parent string

Required. The parent location resource name, such as projects/{project}/locations/{location}.

If the caller does not have permission to list [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s under this location, regardless of whether or not this location exists, a PERMISSION_DENIED error is returned.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListEvaluationsResponseEvaluation

A pageable sequence of Evaluation resources.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = EvaluationServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListEvaluationsResponse, Evaluation> response = evaluationServiceClient.ListEvaluations(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Evaluation 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 (ListEvaluationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Evaluation 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<Evaluation> 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 (Evaluation 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;

ListEvaluationsAsync(ListEvaluationsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListEvaluationsResponse, Evaluation> ListEvaluationsAsync(ListEvaluationsRequest request, CallSettings callSettings = null)

Gets a list of [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s.

Parameters
Name Description
request ListEvaluationsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListEvaluationsResponseEvaluation

A pageable asynchronous sequence of Evaluation resources.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = await EvaluationServiceClient.CreateAsync();
// Initialize request argument(s)
ListEvaluationsRequest request = new ListEvaluationsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListEvaluationsResponse, Evaluation> response = evaluationServiceClient.ListEvaluationsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Evaluation 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((ListEvaluationsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Evaluation 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<Evaluation> 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 (Evaluation 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;

ListEvaluationsAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListEvaluationsResponse, Evaluation> ListEvaluationsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Gets a list of [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s.

Parameters
Name Description
parent LocationName

Required. The parent location resource name, such as projects/{project}/locations/{location}.

If the caller does not have permission to list [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s under this location, regardless of whether or not this location exists, a PERMISSION_DENIED error is returned.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListEvaluationsResponseEvaluation

A pageable asynchronous sequence of Evaluation resources.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = await EvaluationServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListEvaluationsResponse, Evaluation> response = evaluationServiceClient.ListEvaluationsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Evaluation 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((ListEvaluationsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Evaluation 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<Evaluation> 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 (Evaluation 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;

ListEvaluationsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListEvaluationsResponse, Evaluation> ListEvaluationsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Gets a list of [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s.

Parameters
Name Description
parent string

Required. The parent location resource name, such as projects/{project}/locations/{location}.

If the caller does not have permission to list [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s under this location, regardless of whether or not this location exists, a PERMISSION_DENIED error is returned.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListEvaluationsResponseEvaluation

A pageable asynchronous sequence of Evaluation resources.

Example
// Create client
EvaluationServiceClient evaluationServiceClient = await EvaluationServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListEvaluationsResponse, Evaluation> response = evaluationServiceClient.ListEvaluationsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Evaluation 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((ListEvaluationsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Evaluation 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<Evaluation> 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 (Evaluation 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;

PollOnceCreateEvaluation(string, CallSettings)

public virtual Operation<Evaluation, CreateEvaluationMetadata> PollOnceCreateEvaluation(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEvaluationCreateEvaluationMetadata

The result of polling the operation.

PollOnceCreateEvaluationAsync(string, CallSettings)

public virtual Task<Operation<Evaluation, CreateEvaluationMetadata>> PollOnceCreateEvaluationAsync(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEvaluationCreateEvaluationMetadata

A task representing the result of polling the operation.

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

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

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

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