Class ConversationModelsClient (4.0.0)

public abstract class ConversationModelsClient

ConversationModels client wrapper, for convenient use.

Inheritance

System.Object > ConversationModelsClient

Namespace

Google.Cloud.Dialogflow.V2

Assembly

Google.Cloud.Dialogflow.V2.dll

Remarks

Manages a collection of models for human agent assistant.

Properties

CreateConversationModelEvaluationOperationsClient

public virtual OperationsClient CreateConversationModelEvaluationOperationsClient { get; }

The long-running operations client for CreateConversationModelEvaluation.

Property Value
TypeDescription
OperationsClient

CreateConversationModelOperationsClient

public virtual OperationsClient CreateConversationModelOperationsClient { get; }

The long-running operations client for CreateConversationModel.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default ConversationModels scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

DeleteConversationModelOperationsClient

public virtual OperationsClient DeleteConversationModelOperationsClient { get; }

The long-running operations client for DeleteConversationModel.

Property Value
TypeDescription
OperationsClient

DeployConversationModelOperationsClient

public virtual OperationsClient DeployConversationModelOperationsClient { get; }

The long-running operations client for DeployConversationModel.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual ConversationModels.ConversationModelsClient GrpcClient { get; }

The underlying gRPC ConversationModels client

Property Value
TypeDescription
ConversationModels.ConversationModelsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

UndeployConversationModelOperationsClient

public virtual OperationsClient UndeployConversationModelOperationsClient { get; }

The long-running operations client for UndeployConversationModel.

Property Value
TypeDescription
OperationsClient

Methods

Create()

public static ConversationModelsClient Create()

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

Returns
TypeDescription
ConversationModelsClient

The created ConversationModelsClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<ConversationModelsClient>

The task representing the created ConversationModelsClient.

CreateConversationModel(CreateConversationModelRequest, CallSettings)

public virtual Operation<ConversationModel, CreateConversationModelOperationMetadata> CreateConversationModel(CreateConversationModelRequest request, CallSettings callSettings = null)

Creates a model.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [CreateConversationModelOperationMetadata][google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata]
  • response: [ConversationModel][google.cloud.dialogflow.v2.ConversationModel]
Parameters
NameDescription
requestCreateConversationModelRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<ConversationModel, CreateConversationModelOperationMetadata>

The RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = ConversationModelsClient.Create();
// Initialize request argument(s)
CreateConversationModelRequest request = new CreateConversationModelRequest
{
    Parent = "",
    ConversationModel = new ConversationModel(),
};
// Make the request
Operation<ConversationModel, CreateConversationModelOperationMetadata> response = conversationModelsClient.CreateConversationModel(request);

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

CreateConversationModel(String, ConversationModel, CallSettings)

public virtual Operation<ConversationModel, CreateConversationModelOperationMetadata> CreateConversationModel(string parent, ConversationModel conversationModel, CallSettings callSettings = null)

Creates a model.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [CreateConversationModelOperationMetadata][google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata]
  • response: [ConversationModel][google.cloud.dialogflow.v2.ConversationModel]
Parameters
NameDescription
parentString

The project to create conversation model for. Format: projects/{Project ID}

conversationModelConversationModel

Required. The conversation model to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<ConversationModel, CreateConversationModelOperationMetadata>

The RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = ConversationModelsClient.Create();
// Initialize request argument(s)
string parent = "";
ConversationModel conversationModel = new ConversationModel();
// Make the request
Operation<ConversationModel, CreateConversationModelOperationMetadata> response = conversationModelsClient.CreateConversationModel(parent, conversationModel);

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

CreateConversationModelAsync(CreateConversationModelRequest, CallSettings)

public virtual Task<Operation<ConversationModel, CreateConversationModelOperationMetadata>> CreateConversationModelAsync(CreateConversationModelRequest request, CallSettings callSettings = null)

Creates a model.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [CreateConversationModelOperationMetadata][google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata]
  • response: [ConversationModel][google.cloud.dialogflow.v2.ConversationModel]
Parameters
NameDescription
requestCreateConversationModelRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<ConversationModel, CreateConversationModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
CreateConversationModelRequest request = new CreateConversationModelRequest
{
    Parent = "",
    ConversationModel = new ConversationModel(),
};
// Make the request
Operation<ConversationModel, CreateConversationModelOperationMetadata> response = await conversationModelsClient.CreateConversationModelAsync(request);

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

CreateConversationModelAsync(CreateConversationModelRequest, CancellationToken)

public virtual Task<Operation<ConversationModel, CreateConversationModelOperationMetadata>> CreateConversationModelAsync(CreateConversationModelRequest request, CancellationToken cancellationToken)

Creates a model.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [CreateConversationModelOperationMetadata][google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata]
  • response: [ConversationModel][google.cloud.dialogflow.v2.ConversationModel]
Parameters
NameDescription
requestCreateConversationModelRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<ConversationModel, CreateConversationModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
CreateConversationModelRequest request = new CreateConversationModelRequest
{
    Parent = "",
    ConversationModel = new ConversationModel(),
};
// Make the request
Operation<ConversationModel, CreateConversationModelOperationMetadata> response = await conversationModelsClient.CreateConversationModelAsync(request);

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

CreateConversationModelAsync(String, ConversationModel, CallSettings)

public virtual Task<Operation<ConversationModel, CreateConversationModelOperationMetadata>> CreateConversationModelAsync(string parent, ConversationModel conversationModel, CallSettings callSettings = null)

Creates a model.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [CreateConversationModelOperationMetadata][google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata]
  • response: [ConversationModel][google.cloud.dialogflow.v2.ConversationModel]
Parameters
NameDescription
parentString

The project to create conversation model for. Format: projects/{Project ID}

conversationModelConversationModel

Required. The conversation model to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<ConversationModel, CreateConversationModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
ConversationModel conversationModel = new ConversationModel();
// Make the request
Operation<ConversationModel, CreateConversationModelOperationMetadata> response = await conversationModelsClient.CreateConversationModelAsync(parent, conversationModel);

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

CreateConversationModelAsync(String, ConversationModel, CancellationToken)

public virtual Task<Operation<ConversationModel, CreateConversationModelOperationMetadata>> CreateConversationModelAsync(string parent, ConversationModel conversationModel, CancellationToken cancellationToken)

Creates a model.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [CreateConversationModelOperationMetadata][google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata]
  • response: [ConversationModel][google.cloud.dialogflow.v2.ConversationModel]
Parameters
NameDescription
parentString

The project to create conversation model for. Format: projects/{Project ID}

conversationModelConversationModel

Required. The conversation model to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<ConversationModel, CreateConversationModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
ConversationModel conversationModel = new ConversationModel();
// Make the request
Operation<ConversationModel, CreateConversationModelOperationMetadata> response = await conversationModelsClient.CreateConversationModelAsync(parent, conversationModel);

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

CreateConversationModelEvaluation(ConversationModelName, ConversationModelEvaluation, CallSettings)

public virtual Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata> CreateConversationModelEvaluation(ConversationModelName parent, ConversationModelEvaluation conversationModelEvaluation, CallSettings callSettings = null)

Creates evaluation of a conversation model.

Parameters
NameDescription
parentConversationModelName

Required. The conversation model resource name. Format: projects/{Project ID}/locations/{Location ID&amp;gt;/conversationModels/&amp;lt;Conversation Model ID&amp;gt;

conversationModelEvaluationConversationModelEvaluation

Required. The conversation model evaluation to be created.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata>

The RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = ConversationModelsClient.Create();
// Initialize request argument(s)
ConversationModelName parent = ConversationModelName.FromProjectLocationConversationModel("[PROJECT]", "[LOCATION]", "[CONVERSATION_MODEL]");
ConversationModelEvaluation conversationModelEvaluation = new ConversationModelEvaluation();
// Make the request
Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata> response = conversationModelsClient.CreateConversationModelEvaluation(parent, conversationModelEvaluation);

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

CreateConversationModelEvaluation(CreateConversationModelEvaluationRequest, CallSettings)

public virtual Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata> CreateConversationModelEvaluation(CreateConversationModelEvaluationRequest request, CallSettings callSettings = null)

Creates evaluation of a conversation model.

Parameters
NameDescription
requestCreateConversationModelEvaluationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata>

The RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = ConversationModelsClient.Create();
// Initialize request argument(s)
CreateConversationModelEvaluationRequest request = new CreateConversationModelEvaluationRequest
{
    ParentAsConversationModelName = ConversationModelName.FromProjectLocationConversationModel("[PROJECT]", "[LOCATION]", "[CONVERSATION_MODEL]"),
    ConversationModelEvaluation = new ConversationModelEvaluation(),
};
// Make the request
Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata> response = conversationModelsClient.CreateConversationModelEvaluation(request);

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

CreateConversationModelEvaluation(String, ConversationModelEvaluation, CallSettings)

public virtual Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata> CreateConversationModelEvaluation(string parent, ConversationModelEvaluation conversationModelEvaluation, CallSettings callSettings = null)

Creates evaluation of a conversation model.

Parameters
NameDescription
parentString

Required. The conversation model resource name. Format: projects/{Project ID}/locations/{Location ID&amp;gt;/conversationModels/&amp;lt;Conversation Model ID&amp;gt;

conversationModelEvaluationConversationModelEvaluation

Required. The conversation model evaluation to be created.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata>

The RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = ConversationModelsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/conversationModels/[CONVERSATION_MODEL]";
ConversationModelEvaluation conversationModelEvaluation = new ConversationModelEvaluation();
// Make the request
Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata> response = conversationModelsClient.CreateConversationModelEvaluation(parent, conversationModelEvaluation);

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

CreateConversationModelEvaluationAsync(ConversationModelName, ConversationModelEvaluation, CallSettings)

public virtual Task<Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata>> CreateConversationModelEvaluationAsync(ConversationModelName parent, ConversationModelEvaluation conversationModelEvaluation, CallSettings callSettings = null)

Creates evaluation of a conversation model.

Parameters
NameDescription
parentConversationModelName

Required. The conversation model resource name. Format: projects/{Project ID}/locations/{Location ID&amp;gt;/conversationModels/&amp;lt;Conversation Model ID&amp;gt;

conversationModelEvaluationConversationModelEvaluation

Required. The conversation model evaluation to be created.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
ConversationModelName parent = ConversationModelName.FromProjectLocationConversationModel("[PROJECT]", "[LOCATION]", "[CONVERSATION_MODEL]");
ConversationModelEvaluation conversationModelEvaluation = new ConversationModelEvaluation();
// Make the request
Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata> response = await conversationModelsClient.CreateConversationModelEvaluationAsync(parent, conversationModelEvaluation);

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

CreateConversationModelEvaluationAsync(ConversationModelName, ConversationModelEvaluation, CancellationToken)

public virtual Task<Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata>> CreateConversationModelEvaluationAsync(ConversationModelName parent, ConversationModelEvaluation conversationModelEvaluation, CancellationToken cancellationToken)

Creates evaluation of a conversation model.

Parameters
NameDescription
parentConversationModelName

Required. The conversation model resource name. Format: projects/{Project ID}/locations/{Location ID&amp;gt;/conversationModels/&amp;lt;Conversation Model ID&amp;gt;

conversationModelEvaluationConversationModelEvaluation

Required. The conversation model evaluation to be created.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
ConversationModelName parent = ConversationModelName.FromProjectLocationConversationModel("[PROJECT]", "[LOCATION]", "[CONVERSATION_MODEL]");
ConversationModelEvaluation conversationModelEvaluation = new ConversationModelEvaluation();
// Make the request
Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata> response = await conversationModelsClient.CreateConversationModelEvaluationAsync(parent, conversationModelEvaluation);

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

CreateConversationModelEvaluationAsync(CreateConversationModelEvaluationRequest, CallSettings)

public virtual Task<Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata>> CreateConversationModelEvaluationAsync(CreateConversationModelEvaluationRequest request, CallSettings callSettings = null)

Creates evaluation of a conversation model.

Parameters
NameDescription
requestCreateConversationModelEvaluationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
CreateConversationModelEvaluationRequest request = new CreateConversationModelEvaluationRequest
{
    ParentAsConversationModelName = ConversationModelName.FromProjectLocationConversationModel("[PROJECT]", "[LOCATION]", "[CONVERSATION_MODEL]"),
    ConversationModelEvaluation = new ConversationModelEvaluation(),
};
// Make the request
Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata> response = await conversationModelsClient.CreateConversationModelEvaluationAsync(request);

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

CreateConversationModelEvaluationAsync(CreateConversationModelEvaluationRequest, CancellationToken)

public virtual Task<Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata>> CreateConversationModelEvaluationAsync(CreateConversationModelEvaluationRequest request, CancellationToken cancellationToken)

Creates evaluation of a conversation model.

Parameters
NameDescription
requestCreateConversationModelEvaluationRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
CreateConversationModelEvaluationRequest request = new CreateConversationModelEvaluationRequest
{
    ParentAsConversationModelName = ConversationModelName.FromProjectLocationConversationModel("[PROJECT]", "[LOCATION]", "[CONVERSATION_MODEL]"),
    ConversationModelEvaluation = new ConversationModelEvaluation(),
};
// Make the request
Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata> response = await conversationModelsClient.CreateConversationModelEvaluationAsync(request);

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

CreateConversationModelEvaluationAsync(String, ConversationModelEvaluation, CallSettings)

public virtual Task<Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata>> CreateConversationModelEvaluationAsync(string parent, ConversationModelEvaluation conversationModelEvaluation, CallSettings callSettings = null)

Creates evaluation of a conversation model.

Parameters
NameDescription
parentString

Required. The conversation model resource name. Format: projects/{Project ID}/locations/{Location ID&amp;gt;/conversationModels/&amp;lt;Conversation Model ID&amp;gt;

conversationModelEvaluationConversationModelEvaluation

Required. The conversation model evaluation to be created.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/conversationModels/[CONVERSATION_MODEL]";
ConversationModelEvaluation conversationModelEvaluation = new ConversationModelEvaluation();
// Make the request
Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata> response = await conversationModelsClient.CreateConversationModelEvaluationAsync(parent, conversationModelEvaluation);

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

CreateConversationModelEvaluationAsync(String, ConversationModelEvaluation, CancellationToken)

public virtual Task<Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata>> CreateConversationModelEvaluationAsync(string parent, ConversationModelEvaluation conversationModelEvaluation, CancellationToken cancellationToken)

Creates evaluation of a conversation model.

Parameters
NameDescription
parentString

Required. The conversation model resource name. Format: projects/{Project ID}/locations/{Location ID&amp;gt;/conversationModels/&amp;lt;Conversation Model ID&amp;gt;

conversationModelEvaluationConversationModelEvaluation

Required. The conversation model evaluation to be created.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/conversationModels/[CONVERSATION_MODEL]";
ConversationModelEvaluation conversationModelEvaluation = new ConversationModelEvaluation();
// Make the request
Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata> response = await conversationModelsClient.CreateConversationModelEvaluationAsync(parent, conversationModelEvaluation);

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

DeleteConversationModel(DeleteConversationModelRequest, CallSettings)

public virtual Operation<Empty, DeleteConversationModelOperationMetadata> DeleteConversationModel(DeleteConversationModelRequest request, CallSettings callSettings = null)

Deletes a model.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [DeleteConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata]
  • response: An Empty message
Parameters
NameDescription
requestDeleteConversationModelRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, DeleteConversationModelOperationMetadata>

The RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = ConversationModelsClient.Create();
// Initialize request argument(s)
DeleteConversationModelRequest request = new DeleteConversationModelRequest { Name = "", };
// Make the request
Operation<Empty, DeleteConversationModelOperationMetadata> response = conversationModelsClient.DeleteConversationModel(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteConversationModelOperationMetadata> 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, DeleteConversationModelOperationMetadata> retrievedResponse = conversationModelsClient.PollOnceDeleteConversationModel(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;
}

DeleteConversationModel(String, CallSettings)

public virtual Operation<Empty, DeleteConversationModelOperationMetadata> DeleteConversationModel(string name, CallSettings callSettings = null)

Deletes a model.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [DeleteConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata]
  • response: An Empty message
Parameters
NameDescription
nameString

Required. The conversation model to delete. Format: projects/{Project ID}/conversationModels/{Conversation Model ID}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, DeleteConversationModelOperationMetadata>

The RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = ConversationModelsClient.Create();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Empty, DeleteConversationModelOperationMetadata> response = conversationModelsClient.DeleteConversationModel(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteConversationModelOperationMetadata> 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, DeleteConversationModelOperationMetadata> retrievedResponse = conversationModelsClient.PollOnceDeleteConversationModel(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;
}

DeleteConversationModelAsync(DeleteConversationModelRequest, CallSettings)

public virtual Task<Operation<Empty, DeleteConversationModelOperationMetadata>> DeleteConversationModelAsync(DeleteConversationModelRequest request, CallSettings callSettings = null)

Deletes a model.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [DeleteConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata]
  • response: An Empty message
Parameters
NameDescription
requestDeleteConversationModelRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, DeleteConversationModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
DeleteConversationModelRequest request = new DeleteConversationModelRequest { Name = "", };
// Make the request
Operation<Empty, DeleteConversationModelOperationMetadata> response = await conversationModelsClient.DeleteConversationModelAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteConversationModelOperationMetadata> 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, DeleteConversationModelOperationMetadata> retrievedResponse = await conversationModelsClient.PollOnceDeleteConversationModelAsync(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;
}

DeleteConversationModelAsync(DeleteConversationModelRequest, CancellationToken)

public virtual Task<Operation<Empty, DeleteConversationModelOperationMetadata>> DeleteConversationModelAsync(DeleteConversationModelRequest request, CancellationToken cancellationToken)

Deletes a model.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [DeleteConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata]
  • response: An Empty message
Parameters
NameDescription
requestDeleteConversationModelRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, DeleteConversationModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
DeleteConversationModelRequest request = new DeleteConversationModelRequest { Name = "", };
// Make the request
Operation<Empty, DeleteConversationModelOperationMetadata> response = await conversationModelsClient.DeleteConversationModelAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteConversationModelOperationMetadata> 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, DeleteConversationModelOperationMetadata> retrievedResponse = await conversationModelsClient.PollOnceDeleteConversationModelAsync(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;
}

DeleteConversationModelAsync(String, CallSettings)

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

Deletes a model.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [DeleteConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata]
  • response: An Empty message
Parameters
NameDescription
nameString

Required. The conversation model to delete. Format: projects/{Project ID}/conversationModels/{Conversation Model ID}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, DeleteConversationModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Empty, DeleteConversationModelOperationMetadata> response = await conversationModelsClient.DeleteConversationModelAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteConversationModelOperationMetadata> 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, DeleteConversationModelOperationMetadata> retrievedResponse = await conversationModelsClient.PollOnceDeleteConversationModelAsync(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;
}

DeleteConversationModelAsync(String, CancellationToken)

public virtual Task<Operation<Empty, DeleteConversationModelOperationMetadata>> DeleteConversationModelAsync(string name, CancellationToken cancellationToken)

Deletes a model.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [DeleteConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeleteConversationModelOperationMetadata]
  • response: An Empty message
Parameters
NameDescription
nameString

Required. The conversation model to delete. Format: projects/{Project ID}/conversationModels/{Conversation Model ID}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, DeleteConversationModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Empty, DeleteConversationModelOperationMetadata> response = await conversationModelsClient.DeleteConversationModelAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteConversationModelOperationMetadata> 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, DeleteConversationModelOperationMetadata> retrievedResponse = await conversationModelsClient.PollOnceDeleteConversationModelAsync(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;
}

DeployConversationModel(DeployConversationModelRequest, CallSettings)

public virtual Operation<Empty, DeployConversationModelOperationMetadata> DeployConversationModel(DeployConversationModelRequest request, CallSettings callSettings = null)

Deploys a model. If a model is already deployed, deploying it has no effect. A model can only serve prediction requests after it gets deployed. For article suggestion, custom model will not be used unless it is deployed.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [DeployConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata]
  • response: An Empty message
Parameters
NameDescription
requestDeployConversationModelRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, DeployConversationModelOperationMetadata>

The RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = ConversationModelsClient.Create();
// Initialize request argument(s)
DeployConversationModelRequest request = new DeployConversationModelRequest { Name = "", };
// Make the request
Operation<Empty, DeployConversationModelOperationMetadata> response = conversationModelsClient.DeployConversationModel(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeployConversationModelOperationMetadata> 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, DeployConversationModelOperationMetadata> retrievedResponse = conversationModelsClient.PollOnceDeployConversationModel(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;
}

DeployConversationModelAsync(DeployConversationModelRequest, CallSettings)

public virtual Task<Operation<Empty, DeployConversationModelOperationMetadata>> DeployConversationModelAsync(DeployConversationModelRequest request, CallSettings callSettings = null)

Deploys a model. If a model is already deployed, deploying it has no effect. A model can only serve prediction requests after it gets deployed. For article suggestion, custom model will not be used unless it is deployed.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [DeployConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata]
  • response: An Empty message
Parameters
NameDescription
requestDeployConversationModelRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, DeployConversationModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
DeployConversationModelRequest request = new DeployConversationModelRequest { Name = "", };
// Make the request
Operation<Empty, DeployConversationModelOperationMetadata> response = await conversationModelsClient.DeployConversationModelAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeployConversationModelOperationMetadata> 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, DeployConversationModelOperationMetadata> retrievedResponse = await conversationModelsClient.PollOnceDeployConversationModelAsync(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;
}

DeployConversationModelAsync(DeployConversationModelRequest, CancellationToken)

public virtual Task<Operation<Empty, DeployConversationModelOperationMetadata>> DeployConversationModelAsync(DeployConversationModelRequest request, CancellationToken cancellationToken)

Deploys a model. If a model is already deployed, deploying it has no effect. A model can only serve prediction requests after it gets deployed. For article suggestion, custom model will not be used unless it is deployed.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [DeployConversationModelOperationMetadata][google.cloud.dialogflow.v2.DeployConversationModelOperationMetadata]
  • response: An Empty message
Parameters
NameDescription
requestDeployConversationModelRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, DeployConversationModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
DeployConversationModelRequest request = new DeployConversationModelRequest { Name = "", };
// Make the request
Operation<Empty, DeployConversationModelOperationMetadata> response = await conversationModelsClient.DeployConversationModelAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeployConversationModelOperationMetadata> 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, DeployConversationModelOperationMetadata> retrievedResponse = await conversationModelsClient.PollOnceDeployConversationModelAsync(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;
}

GetConversationModel(GetConversationModelRequest, CallSettings)

public virtual ConversationModel GetConversationModel(GetConversationModelRequest request, CallSettings callSettings = null)

Gets conversation model.

Parameters
NameDescription
requestGetConversationModelRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ConversationModel

The RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = ConversationModelsClient.Create();
// Initialize request argument(s)
GetConversationModelRequest request = new GetConversationModelRequest { Name = "", };
// Make the request
ConversationModel response = conversationModelsClient.GetConversationModel(request);

GetConversationModel(String, CallSettings)

public virtual ConversationModel GetConversationModel(string name, CallSettings callSettings = null)

Gets conversation model.

Parameters
NameDescription
nameString

Required. The conversation model to retrieve. Format: projects/{Project ID}/conversationModels/{Conversation Model ID}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ConversationModel

The RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = ConversationModelsClient.Create();
// Initialize request argument(s)
string name = "";
// Make the request
ConversationModel response = conversationModelsClient.GetConversationModel(name);

GetConversationModelAsync(GetConversationModelRequest, CallSettings)

public virtual Task<ConversationModel> GetConversationModelAsync(GetConversationModelRequest request, CallSettings callSettings = null)

Gets conversation model.

Parameters
NameDescription
requestGetConversationModelRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ConversationModel>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
GetConversationModelRequest request = new GetConversationModelRequest { Name = "", };
// Make the request
ConversationModel response = await conversationModelsClient.GetConversationModelAsync(request);

GetConversationModelAsync(GetConversationModelRequest, CancellationToken)

public virtual Task<ConversationModel> GetConversationModelAsync(GetConversationModelRequest request, CancellationToken cancellationToken)

Gets conversation model.

Parameters
NameDescription
requestGetConversationModelRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ConversationModel>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
GetConversationModelRequest request = new GetConversationModelRequest { Name = "", };
// Make the request
ConversationModel response = await conversationModelsClient.GetConversationModelAsync(request);

GetConversationModelAsync(String, CallSettings)

public virtual Task<ConversationModel> GetConversationModelAsync(string name, CallSettings callSettings = null)

Gets conversation model.

Parameters
NameDescription
nameString

Required. The conversation model to retrieve. Format: projects/{Project ID}/conversationModels/{Conversation Model ID}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ConversationModel>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
ConversationModel response = await conversationModelsClient.GetConversationModelAsync(name);

GetConversationModelAsync(String, CancellationToken)

public virtual Task<ConversationModel> GetConversationModelAsync(string name, CancellationToken cancellationToken)

Gets conversation model.

Parameters
NameDescription
nameString

Required. The conversation model to retrieve. Format: projects/{Project ID}/conversationModels/{Conversation Model ID}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ConversationModel>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
ConversationModel response = await conversationModelsClient.GetConversationModelAsync(name);

GetConversationModelEvaluation(GetConversationModelEvaluationRequest, CallSettings)

public virtual ConversationModelEvaluation GetConversationModelEvaluation(GetConversationModelEvaluationRequest request, CallSettings callSettings = null)

Gets an evaluation of conversation model.

Parameters
NameDescription
requestGetConversationModelEvaluationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ConversationModelEvaluation

The RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = ConversationModelsClient.Create();
// Initialize request argument(s)
GetConversationModelEvaluationRequest request = new GetConversationModelEvaluationRequest { Name = "", };
// Make the request
ConversationModelEvaluation response = conversationModelsClient.GetConversationModelEvaluation(request);

GetConversationModelEvaluation(String, CallSettings)

public virtual ConversationModelEvaluation GetConversationModelEvaluation(string name, CallSettings callSettings = null)

Gets an evaluation of conversation model.

Parameters
NameDescription
nameString

Required. The conversation model evaluation resource name. Format: projects/{Project ID}/conversationModels/{Conversation Model ID&amp;gt;/evaluations/&amp;lt;Evaluation ID&amp;gt;

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ConversationModelEvaluation

The RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = ConversationModelsClient.Create();
// Initialize request argument(s)
string name = "";
// Make the request
ConversationModelEvaluation response = conversationModelsClient.GetConversationModelEvaluation(name);

GetConversationModelEvaluationAsync(GetConversationModelEvaluationRequest, CallSettings)

public virtual Task<ConversationModelEvaluation> GetConversationModelEvaluationAsync(GetConversationModelEvaluationRequest request, CallSettings callSettings = null)

Gets an evaluation of conversation model.

Parameters
NameDescription
requestGetConversationModelEvaluationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ConversationModelEvaluation>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
GetConversationModelEvaluationRequest request = new GetConversationModelEvaluationRequest { Name = "", };
// Make the request
ConversationModelEvaluation response = await conversationModelsClient.GetConversationModelEvaluationAsync(request);

GetConversationModelEvaluationAsync(GetConversationModelEvaluationRequest, CancellationToken)

public virtual Task<ConversationModelEvaluation> GetConversationModelEvaluationAsync(GetConversationModelEvaluationRequest request, CancellationToken cancellationToken)

Gets an evaluation of conversation model.

Parameters
NameDescription
requestGetConversationModelEvaluationRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ConversationModelEvaluation>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
GetConversationModelEvaluationRequest request = new GetConversationModelEvaluationRequest { Name = "", };
// Make the request
ConversationModelEvaluation response = await conversationModelsClient.GetConversationModelEvaluationAsync(request);

GetConversationModelEvaluationAsync(String, CallSettings)

public virtual Task<ConversationModelEvaluation> GetConversationModelEvaluationAsync(string name, CallSettings callSettings = null)

Gets an evaluation of conversation model.

Parameters
NameDescription
nameString

Required. The conversation model evaluation resource name. Format: projects/{Project ID}/conversationModels/{Conversation Model ID&amp;gt;/evaluations/&amp;lt;Evaluation ID&amp;gt;

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ConversationModelEvaluation>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
ConversationModelEvaluation response = await conversationModelsClient.GetConversationModelEvaluationAsync(name);

GetConversationModelEvaluationAsync(String, CancellationToken)

public virtual Task<ConversationModelEvaluation> GetConversationModelEvaluationAsync(string name, CancellationToken cancellationToken)

Gets an evaluation of conversation model.

Parameters
NameDescription
nameString

Required. The conversation model evaluation resource name. Format: projects/{Project ID}/conversationModels/{Conversation Model ID&amp;gt;/evaluations/&amp;lt;Evaluation ID&amp;gt;

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ConversationModelEvaluation>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
ConversationModelEvaluation response = await conversationModelsClient.GetConversationModelEvaluationAsync(name);

ListConversationModelEvaluations(ListConversationModelEvaluationsRequest, CallSettings)

public virtual PagedEnumerable<ListConversationModelEvaluationsResponse, ConversationModelEvaluation> ListConversationModelEvaluations(ListConversationModelEvaluationsRequest request, CallSettings callSettings = null)

Lists evaluations of a conversation model.

Parameters
NameDescription
requestListConversationModelEvaluationsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListConversationModelEvaluationsResponse, ConversationModelEvaluation>

A pageable sequence of ConversationModelEvaluation resources.

Example
// Create client
ConversationModelsClient conversationModelsClient = ConversationModelsClient.Create();
// Initialize request argument(s)
ListConversationModelEvaluationsRequest request = new ListConversationModelEvaluationsRequest { Parent = "", };
// Make the request
PagedEnumerable<ListConversationModelEvaluationsResponse, ConversationModelEvaluation> response = conversationModelsClient.ListConversationModelEvaluations(request);

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

ListConversationModelEvaluations(String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListConversationModelEvaluationsResponse, ConversationModelEvaluation> ListConversationModelEvaluations(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists evaluations of a conversation model.

Parameters
NameDescription
parentString

Required. The conversation model resource name. Format: projects/{Project ID}/conversationModels/{Conversation Model ID}

pageTokenString

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

pageSizeSystem.Nullable<Int32>

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
PagedEnumerable<ListConversationModelEvaluationsResponse, ConversationModelEvaluation>

A pageable sequence of ConversationModelEvaluation resources.

Example
// Create client
ConversationModelsClient conversationModelsClient = ConversationModelsClient.Create();
// Initialize request argument(s)
string parent = "";
// Make the request
PagedEnumerable<ListConversationModelEvaluationsResponse, ConversationModelEvaluation> response = conversationModelsClient.ListConversationModelEvaluations(parent);

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

ListConversationModelEvaluationsAsync(ListConversationModelEvaluationsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListConversationModelEvaluationsResponse, ConversationModelEvaluation> ListConversationModelEvaluationsAsync(ListConversationModelEvaluationsRequest request, CallSettings callSettings = null)

Lists evaluations of a conversation model.

Parameters
NameDescription
requestListConversationModelEvaluationsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListConversationModelEvaluationsResponse, ConversationModelEvaluation>

A pageable asynchronous sequence of ConversationModelEvaluation resources.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
ListConversationModelEvaluationsRequest request = new ListConversationModelEvaluationsRequest { Parent = "", };
// Make the request
PagedAsyncEnumerable<ListConversationModelEvaluationsResponse, ConversationModelEvaluation> response = conversationModelsClient.ListConversationModelEvaluationsAsync(request);

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

ListConversationModelEvaluationsAsync(String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListConversationModelEvaluationsResponse, ConversationModelEvaluation> ListConversationModelEvaluationsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists evaluations of a conversation model.

Parameters
NameDescription
parentString

Required. The conversation model resource name. Format: projects/{Project ID}/conversationModels/{Conversation Model ID}

pageTokenString

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

pageSizeSystem.Nullable<Int32>

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
PagedAsyncEnumerable<ListConversationModelEvaluationsResponse, ConversationModelEvaluation>

A pageable asynchronous sequence of ConversationModelEvaluation resources.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
// Make the request
PagedAsyncEnumerable<ListConversationModelEvaluationsResponse, ConversationModelEvaluation> response = conversationModelsClient.ListConversationModelEvaluationsAsync(parent);

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

ListConversationModels(ListConversationModelsRequest, CallSettings)

public virtual PagedEnumerable<ListConversationModelsResponse, ConversationModel> ListConversationModels(ListConversationModelsRequest request, CallSettings callSettings = null)

Lists conversation models.

Parameters
NameDescription
requestListConversationModelsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListConversationModelsResponse, ConversationModel>

A pageable sequence of ConversationModel resources.

Example
// Create client
ConversationModelsClient conversationModelsClient = ConversationModelsClient.Create();
// Initialize request argument(s)
ListConversationModelsRequest request = new ListConversationModelsRequest { Parent = "", };
// Make the request
PagedEnumerable<ListConversationModelsResponse, ConversationModel> response = conversationModelsClient.ListConversationModels(request);

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

ListConversationModels(String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListConversationModelsResponse, ConversationModel> ListConversationModels(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists conversation models.

Parameters
NameDescription
parentString

Required. The project to list all conversation models for. Format: projects/{Project ID}

pageTokenString

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

pageSizeSystem.Nullable<Int32>

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
PagedEnumerable<ListConversationModelsResponse, ConversationModel>

A pageable sequence of ConversationModel resources.

Example
// Create client
ConversationModelsClient conversationModelsClient = ConversationModelsClient.Create();
// Initialize request argument(s)
string parent = "";
// Make the request
PagedEnumerable<ListConversationModelsResponse, ConversationModel> response = conversationModelsClient.ListConversationModels(parent);

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

ListConversationModelsAsync(ListConversationModelsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListConversationModelsResponse, ConversationModel> ListConversationModelsAsync(ListConversationModelsRequest request, CallSettings callSettings = null)

Lists conversation models.

Parameters
NameDescription
requestListConversationModelsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListConversationModelsResponse, ConversationModel>

A pageable asynchronous sequence of ConversationModel resources.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
ListConversationModelsRequest request = new ListConversationModelsRequest { Parent = "", };
// Make the request
PagedAsyncEnumerable<ListConversationModelsResponse, ConversationModel> response = conversationModelsClient.ListConversationModelsAsync(request);

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

ListConversationModelsAsync(String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListConversationModelsResponse, ConversationModel> ListConversationModelsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists conversation models.

Parameters
NameDescription
parentString

Required. The project to list all conversation models for. Format: projects/{Project ID}

pageTokenString

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

pageSizeSystem.Nullable<Int32>

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
PagedAsyncEnumerable<ListConversationModelsResponse, ConversationModel>

A pageable asynchronous sequence of ConversationModel resources.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
// Make the request
PagedAsyncEnumerable<ListConversationModelsResponse, ConversationModel> response = conversationModelsClient.ListConversationModelsAsync(parent);

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

PollOnceCreateConversationModel(String, CallSettings)

public virtual Operation<ConversationModel, CreateConversationModelOperationMetadata> PollOnceCreateConversationModel(string operationName, CallSettings callSettings = null)

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

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
Operation<ConversationModel, CreateConversationModelOperationMetadata>

The result of polling the operation.

PollOnceCreateConversationModelAsync(String, CallSettings)

public virtual Task<Operation<ConversationModel, CreateConversationModelOperationMetadata>> PollOnceCreateConversationModelAsync(string operationName, CallSettings callSettings = null)

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

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
Task<Operation<ConversationModel, CreateConversationModelOperationMetadata>>

A task representing the result of polling the operation.

PollOnceCreateConversationModelEvaluation(String, CallSettings)

public virtual Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata> PollOnceCreateConversationModelEvaluation(string operationName, CallSettings callSettings = null)

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

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
Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata>

The result of polling the operation.

PollOnceCreateConversationModelEvaluationAsync(String, CallSettings)

public virtual Task<Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata>> PollOnceCreateConversationModelEvaluationAsync(string operationName, CallSettings callSettings = null)

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

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
Task<Operation<ConversationModelEvaluation, CreateConversationModelEvaluationOperationMetadata>>

A task representing the result of polling the operation.

PollOnceDeleteConversationModel(String, CallSettings)

public virtual Operation<Empty, DeleteConversationModelOperationMetadata> PollOnceDeleteConversationModel(string operationName, CallSettings callSettings = null)

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

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
Operation<Empty, DeleteConversationModelOperationMetadata>

The result of polling the operation.

PollOnceDeleteConversationModelAsync(String, CallSettings)

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

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

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
Task<Operation<Empty, DeleteConversationModelOperationMetadata>>

A task representing the result of polling the operation.

PollOnceDeployConversationModel(String, CallSettings)

public virtual Operation<Empty, DeployConversationModelOperationMetadata> PollOnceDeployConversationModel(string operationName, CallSettings callSettings = null)

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

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
Operation<Empty, DeployConversationModelOperationMetadata>

The result of polling the operation.

PollOnceDeployConversationModelAsync(String, CallSettings)

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

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

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
Task<Operation<Empty, DeployConversationModelOperationMetadata>>

A task representing the result of polling the operation.

PollOnceUndeployConversationModel(String, CallSettings)

public virtual Operation<Empty, UndeployConversationModelOperationMetadata> PollOnceUndeployConversationModel(string operationName, CallSettings callSettings = null)

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

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
Operation<Empty, UndeployConversationModelOperationMetadata>

The result of polling the operation.

PollOnceUndeployConversationModelAsync(String, CallSettings)

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

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

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
Task<Operation<Empty, UndeployConversationModelOperationMetadata>>

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

UndeployConversationModel(UndeployConversationModelRequest, CallSettings)

public virtual Operation<Empty, UndeployConversationModelOperationMetadata> UndeployConversationModel(UndeployConversationModelRequest request, CallSettings callSettings = null)

Undeploys a model. If the model is not deployed this method has no effect. If the model is currently being used:

  • For article suggestion, article suggestion will fallback to the default model if model is undeployed.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [UndeployConversationModelOperationMetadata][google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata]
  • response: An Empty message
Parameters
NameDescription
requestUndeployConversationModelRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, UndeployConversationModelOperationMetadata>

The RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = ConversationModelsClient.Create();
// Initialize request argument(s)
UndeployConversationModelRequest request = new UndeployConversationModelRequest { Name = "", };
// Make the request
Operation<Empty, UndeployConversationModelOperationMetadata> response = conversationModelsClient.UndeployConversationModel(request);

// Poll until the returned long-running operation is complete
Operation<Empty, UndeployConversationModelOperationMetadata> 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, UndeployConversationModelOperationMetadata> retrievedResponse = conversationModelsClient.PollOnceUndeployConversationModel(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;
}

UndeployConversationModelAsync(UndeployConversationModelRequest, CallSettings)

public virtual Task<Operation<Empty, UndeployConversationModelOperationMetadata>> UndeployConversationModelAsync(UndeployConversationModelRequest request, CallSettings callSettings = null)

Undeploys a model. If the model is not deployed this method has no effect. If the model is currently being used:

  • For article suggestion, article suggestion will fallback to the default model if model is undeployed.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [UndeployConversationModelOperationMetadata][google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata]
  • response: An Empty message
Parameters
NameDescription
requestUndeployConversationModelRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, UndeployConversationModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
UndeployConversationModelRequest request = new UndeployConversationModelRequest { Name = "", };
// Make the request
Operation<Empty, UndeployConversationModelOperationMetadata> response = await conversationModelsClient.UndeployConversationModelAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, UndeployConversationModelOperationMetadata> 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, UndeployConversationModelOperationMetadata> retrievedResponse = await conversationModelsClient.PollOnceUndeployConversationModelAsync(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;
}

UndeployConversationModelAsync(UndeployConversationModelRequest, CancellationToken)

public virtual Task<Operation<Empty, UndeployConversationModelOperationMetadata>> UndeployConversationModelAsync(UndeployConversationModelRequest request, CancellationToken cancellationToken)

Undeploys a model. If the model is not deployed this method has no effect. If the model is currently being used:

  • For article suggestion, article suggestion will fallback to the default model if model is undeployed.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [UndeployConversationModelOperationMetadata][google.cloud.dialogflow.v2.UndeployConversationModelOperationMetadata]
  • response: An Empty message
Parameters
NameDescription
requestUndeployConversationModelRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, UndeployConversationModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ConversationModelsClient conversationModelsClient = await ConversationModelsClient.CreateAsync();
// Initialize request argument(s)
UndeployConversationModelRequest request = new UndeployConversationModelRequest { Name = "", };
// Make the request
Operation<Empty, UndeployConversationModelOperationMetadata> response = await conversationModelsClient.UndeployConversationModelAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, UndeployConversationModelOperationMetadata> 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, UndeployConversationModelOperationMetadata> retrievedResponse = await conversationModelsClient.PollOnceUndeployConversationModelAsync(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;
}