public abstract class ConversationModelsClient
Reference documentation and code samples for the Google Cloud Dialogflow v2 API class ConversationModelsClient.
ConversationModels client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Dialogflow.V2Assembly
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 | |
---|---|
Type | Description |
OperationsClient |
CreateConversationModelOperationsClient
public virtual OperationsClient CreateConversationModelOperationsClient { get; }
The long-running operations client for CreateConversationModel
.
Property Value | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default ConversationModels scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default ConversationModels scopes are:
DeleteConversationModelOperationsClient
public virtual OperationsClient DeleteConversationModelOperationsClient { get; }
The long-running operations client for DeleteConversationModel
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DeployConversationModelOperationsClient
public virtual OperationsClient DeployConversationModelOperationsClient { get; }
The long-running operations client for DeployConversationModel
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual ConversationModels.ConversationModelsClient GrpcClient { get; }
The underlying gRPC ConversationModels client
Property Value | |
---|---|
Type | Description |
ConversationModelsConversationModelsClient |
LocationsClient
public virtual LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
UndeployConversationModelOperationsClient
public virtual OperationsClient UndeployConversationModelOperationsClient { get; }
The long-running operations client for UndeployConversationModel
.
Property Value | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
ConversationModelsClient |
The created ConversationModelsClient. |
CreateAsync(CancellationToken)
public static Task<ConversationModelsClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a ConversationModelsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ConversationModelsClientBuilder .
Parameter | |
---|---|
Name | Description |
cancellationToken |
CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskConversationModelsClient |
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 | |
---|---|
Name | Description |
request |
CreateConversationModelRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationConversationModelCreateConversationModelOperationMetadata |
The RPC response. |
// 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 | |
---|---|
Name | Description |
parent |
string The project to create conversation model for. Format:
|
conversationModel |
ConversationModel Required. The conversation model to create. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationConversationModelCreateConversationModelOperationMetadata |
The RPC response. |
// 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 | |
---|---|
Name | Description |
request |
CreateConversationModelRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationConversationModelCreateConversationModelOperationMetadata |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request |
CreateConversationModelRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationConversationModelCreateConversationModelOperationMetadata |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent |
string The project to create conversation model for. Format:
|
conversationModel |
ConversationModel Required. The conversation model to create. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationConversationModelCreateConversationModelOperationMetadata |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent |
string The project to create conversation model for. Format:
|
conversationModel |
ConversationModel Required. The conversation model to create. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationConversationModelCreateConversationModelOperationMetadata |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent |
ConversationModelName Required. The conversation model resource name. Format:
|
conversationModelEvaluation |
ConversationModelEvaluation Required. The conversation model evaluation to be created. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationConversationModelEvaluationCreateConversationModelEvaluationOperationMetadata |
The RPC response. |
// 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 | |
---|---|
Name | Description |
request |
CreateConversationModelEvaluationRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationConversationModelEvaluationCreateConversationModelEvaluationOperationMetadata |
The RPC response. |
// 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 | |
---|---|
Name | Description |
parent |
string Required. The conversation model resource name. Format:
|
conversationModelEvaluation |
ConversationModelEvaluation Required. The conversation model evaluation to be created. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationConversationModelEvaluationCreateConversationModelEvaluationOperationMetadata |
The RPC response. |
// 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 | |
---|---|
Name | Description |
parent |
ConversationModelName Required. The conversation model resource name. Format:
|
conversationModelEvaluation |
ConversationModelEvaluation Required. The conversation model evaluation to be created. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationConversationModelEvaluationCreateConversationModelEvaluationOperationMetadata |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent |
ConversationModelName Required. The conversation model resource name. Format:
|
conversationModelEvaluation |
ConversationModelEvaluation Required. The conversation model evaluation to be created. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationConversationModelEvaluationCreateConversationModelEvaluationOperationMetadata |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request |
CreateConversationModelEvaluationRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationConversationModelEvaluationCreateConversationModelEvaluationOperationMetadata |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request |
CreateConversationModelEvaluationRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationConversationModelEvaluationCreateConversationModelEvaluationOperationMetadata |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent |
string Required. The conversation model resource name. Format:
|
conversationModelEvaluation |
ConversationModelEvaluation Required. The conversation model evaluation to be created. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationConversationModelEvaluationCreateConversationModelEvaluationOperationMetadata |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent |
string Required. The conversation model resource name. Format:
|
conversationModelEvaluation |
ConversationModelEvaluation Required. The conversation model evaluation to be created. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationConversationModelEvaluationCreateConversationModelEvaluationOperationMetadata |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request |
DeleteConversationModelRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeleteConversationModelOperationMetadata |
The RPC response. |
// 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 | |
---|---|
Name | Description |
name |
string Required. The conversation model to delete. Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeleteConversationModelOperationMetadata |
The RPC response. |
// 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 | |
---|---|
Name | Description |
request |
DeleteConversationModelRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteConversationModelOperationMetadata |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request |
DeleteConversationModelRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteConversationModelOperationMetadata |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name |
string Required. The conversation model to delete. Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteConversationModelOperationMetadata |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name |
string Required. The conversation model to delete. Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteConversationModelOperationMetadata |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request |
DeployConversationModelRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeployConversationModelOperationMetadata |
The RPC response. |
// 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 | |
---|---|
Name | Description |
request |
DeployConversationModelRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeployConversationModelOperationMetadata |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request |
DeployConversationModelRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeployConversationModelOperationMetadata |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request |
GetConversationModelRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ConversationModel |
The RPC response. |
// 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 | |
---|---|
Name | Description |
name |
string Required. The conversation model to retrieve. Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ConversationModel |
The RPC response. |
// 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 | |
---|---|
Name | Description |
request |
GetConversationModelRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskConversationModel |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request |
GetConversationModelRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskConversationModel |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name |
string Required. The conversation model to retrieve. Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskConversationModel |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name |
string Required. The conversation model to retrieve. Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskConversationModel |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request |
GetConversationModelEvaluationRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ConversationModelEvaluation |
The RPC response. |
// 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 | |
---|---|
Name | Description |
name |
string Required. The conversation model evaluation resource name. Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ConversationModelEvaluation |
The RPC response. |
// 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 | |
---|---|
Name | Description |
request |
GetConversationModelEvaluationRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskConversationModelEvaluation |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request |
GetConversationModelEvaluationRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskConversationModelEvaluation |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name |
string Required. The conversation model evaluation resource name. Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskConversationModelEvaluation |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name |
string Required. The conversation model evaluation resource name. Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskConversationModelEvaluation |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request |
ListConversationModelEvaluationsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListConversationModelEvaluationsResponseConversationModelEvaluation |
A pageable sequence of ConversationModelEvaluation resources. |
// 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, int?, 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 | |
---|---|
Name | Description |
parent |
string Required. The conversation model resource name. Format:
|
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListConversationModelEvaluationsResponseConversationModelEvaluation |
A pageable sequence of ConversationModelEvaluation resources. |
// 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 | |
---|---|
Name | Description |
request |
ListConversationModelEvaluationsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListConversationModelEvaluationsResponseConversationModelEvaluation |
A pageable asynchronous sequence of ConversationModelEvaluation resources. |
// 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, int?, 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 | |
---|---|
Name | Description |
parent |
string Required. The conversation model resource name. Format:
|
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListConversationModelEvaluationsResponseConversationModelEvaluation |
A pageable asynchronous sequence of ConversationModelEvaluation resources. |
// 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 | |
---|---|
Name | Description |
request |
ListConversationModelsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListConversationModelsResponseConversationModel |
A pageable sequence of ConversationModel resources. |
// 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, int?, CallSettings)
public virtual PagedEnumerable<ListConversationModelsResponse, ConversationModel> ListConversationModels(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists conversation models.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The project to list all conversation models for.
Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListConversationModelsResponseConversationModel |
A pageable sequence of ConversationModel resources. |
// 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 | |
---|---|
Name | Description |
request |
ListConversationModelsRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListConversationModelsResponseConversationModel |
A pageable asynchronous sequence of ConversationModel resources. |
// 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, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListConversationModelsResponse, ConversationModel> ListConversationModelsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists conversation models.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The project to list all conversation models for.
Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListConversationModelsResponseConversationModel |
A pageable asynchronous sequence of ConversationModel resources. |
// 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 | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationConversationModelCreateConversationModelOperationMetadata |
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 | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationConversationModelCreateConversationModelOperationMetadata |
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 | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationConversationModelEvaluationCreateConversationModelEvaluationOperationMetadata |
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 | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationConversationModelEvaluationCreateConversationModelEvaluationOperationMetadata |
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 | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeleteConversationModelOperationMetadata |
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 | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteConversationModelOperationMetadata |
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 | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeployConversationModelOperationMetadata |
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 | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeployConversationModelOperationMetadata |
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 | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyUndeployConversationModelOperationMetadata |
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 | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyUndeployConversationModelOperationMetadata |
A task representing the result of polling the operation. |
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task |
A task representing the asynchronous shutdown operation. |
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 | |
---|---|
Name | Description |
request |
UndeployConversationModelRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyUndeployConversationModelOperationMetadata |
The RPC response. |
// 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 | |
---|---|
Name | Description |
request |
UndeployConversationModelRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyUndeployConversationModelOperationMetadata |
A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request |
UndeployConversationModelRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyUndeployConversationModelOperationMetadata |
A Task containing the RPC response. |
// 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;
}