Class EntityTypesClient
EntityTypes client wrapper, for convenient use.
Namespace: Google.Cloud.Dialogflow.V2
Assembly: Google.Cloud.Dialogflow.V2.dll
Syntax
public abstract class EntityTypesClient
Remarks
Service for managing [EntityTypes][google.cloud.dialogflow.v2.EntityType].
Properties
BatchCreateEntitiesOperationsClient
The long-running operations client for BatchCreateEntities
.
Declaration
public virtual OperationsClient BatchCreateEntitiesOperationsClient { get; }
Property Value
Type | Description |
---|---|
OperationsClient |
BatchDeleteEntitiesOperationsClient
The long-running operations client for BatchDeleteEntities
.
Declaration
public virtual OperationsClient BatchDeleteEntitiesOperationsClient { get; }
Property Value
Type | Description |
---|---|
OperationsClient |
BatchDeleteEntityTypesOperationsClient
The long-running operations client for BatchDeleteEntityTypes
.
Declaration
public virtual OperationsClient BatchDeleteEntityTypesOperationsClient { get; }
Property Value
Type | Description |
---|---|
OperationsClient |
BatchUpdateEntitiesOperationsClient
The long-running operations client for BatchUpdateEntities
.
Declaration
public virtual OperationsClient BatchUpdateEntitiesOperationsClient { get; }
Property Value
Type | Description |
---|---|
OperationsClient |
BatchUpdateEntityTypesOperationsClient
The long-running operations client for BatchUpdateEntityTypes
.
Declaration
public virtual OperationsClient BatchUpdateEntityTypesOperationsClient { get; }
Property Value
Type | Description |
---|---|
OperationsClient |
DefaultEndpoint
The default endpoint for the EntityTypes service, which is a host of "dialogflow.googleapis.com" and a port of 443.
Declaration
public static string DefaultEndpoint { get; }
Property Value
Type | Description |
---|---|
string |
DefaultScopes
The default EntityTypes scopes.
Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<string> |
Remarks
The default EntityTypes scopes are:
- https://www.googleapis.com/auth/cloud-platform
- https://www.googleapis.com/auth/dialogflow
GrpcClient
The underlying gRPC EntityTypes client
Declaration
public virtual EntityTypes.EntityTypesClient GrpcClient { get; }
Property Value
Type | Description |
---|---|
EntityTypes.EntityTypesClient |
LocationsClient
The Google.Cloud.Location.LocationsClient associated with this client.
Declaration
public virtual LocationsClient LocationsClient { get; }
Property Value
Type | Description |
---|---|
LocationsClient |
ServiceMetadata
The service metadata associated with this client type.
Declaration
public static ServiceMetadata ServiceMetadata { get; }
Property Value
Type | Description |
---|---|
ServiceMetadata |
Methods
BatchCreateEntities(BatchCreateEntitiesRequest, CallSettings)
Creates multiple new entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<Empty, Struct> BatchCreateEntities(BatchCreateEntitiesRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
BatchCreateEntitiesRequest | request | 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 |
---|---|
Operation<Empty, Struct> | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
BatchCreateEntitiesRequest request = new BatchCreateEntitiesRequest
{
ParentAsEntityTypeName = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]"),
Entities =
{
new EntityType.Types.Entity(),
},
LanguageCode = "",
};
// Make the request
Operation<Empty, Struct> response = entityTypesClient.BatchCreateEntities(request);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = entityTypesClient.PollOnceBatchCreateEntities(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;
}
BatchCreateEntities(EntityTypeName, IEnumerable<Entity>, CallSettings)
Creates multiple new entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<Empty, Struct> BatchCreateEntities(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | parent | Required. The name of the entity type to create entities in. Format:
|
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, Struct> | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
EntityTypeName parent = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
// Make the request
Operation<Empty, Struct> response = entityTypesClient.BatchCreateEntities(parent, entities);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = entityTypesClient.PollOnceBatchCreateEntities(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;
}
BatchCreateEntities(EntityTypeName, IEnumerable<Entity>, string, CallSettings)
Creates multiple new entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<Empty, Struct> BatchCreateEntities(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | parent | Required. The name of the entity type to create entities in. Format:
|
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, Struct> | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
EntityTypeName parent = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
string languageCode = "";
// Make the request
Operation<Empty, Struct> response = entityTypesClient.BatchCreateEntities(parent, entities, languageCode);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = entityTypesClient.PollOnceBatchCreateEntities(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;
}
BatchCreateEntities(string, IEnumerable<Entity>, CallSettings)
Creates multiple new entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<Empty, Struct> BatchCreateEntities(string parent, IEnumerable<EntityType.Types.Entity> entities, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the entity type to create entities in. Format:
|
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, Struct> | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
// Make the request
Operation<Empty, Struct> response = entityTypesClient.BatchCreateEntities(parent, entities);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = entityTypesClient.PollOnceBatchCreateEntities(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;
}
BatchCreateEntities(string, IEnumerable<Entity>, string, CallSettings)
Creates multiple new entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<Empty, Struct> BatchCreateEntities(string parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the entity type to create entities in. Format:
|
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, Struct> | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
string languageCode = "";
// Make the request
Operation<Empty, Struct> response = entityTypesClient.BatchCreateEntities(parent, entities, languageCode);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = entityTypesClient.PollOnceBatchCreateEntities(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;
}
BatchCreateEntitiesAsync(BatchCreateEntitiesRequest, CallSettings)
Creates multiple new entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchCreateEntitiesAsync(BatchCreateEntitiesRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
BatchCreateEntitiesRequest | request | 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 |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
BatchCreateEntitiesRequest request = new BatchCreateEntitiesRequest
{
ParentAsEntityTypeName = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]"),
Entities =
{
new EntityType.Types.Entity(),
},
LanguageCode = "",
};
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchCreateEntitiesAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchCreateEntitiesAsync(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;
}
BatchCreateEntitiesAsync(BatchCreateEntitiesRequest, CancellationToken)
Creates multiple new entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchCreateEntitiesAsync(BatchCreateEntitiesRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
BatchCreateEntitiesRequest | request | The request object containing all of the parameters for the API call. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
BatchCreateEntitiesRequest request = new BatchCreateEntitiesRequest
{
ParentAsEntityTypeName = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]"),
Entities =
{
new EntityType.Types.Entity(),
},
LanguageCode = "",
};
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchCreateEntitiesAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchCreateEntitiesAsync(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;
}
BatchCreateEntitiesAsync(EntityTypeName, IEnumerable<Entity>, CallSettings)
Creates multiple new entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchCreateEntitiesAsync(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | parent | Required. The name of the entity type to create entities in. Format:
|
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
EntityTypeName parent = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchCreateEntitiesAsync(parent, entities);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchCreateEntitiesAsync(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;
}
BatchCreateEntitiesAsync(EntityTypeName, IEnumerable<Entity>, string, CallSettings)
Creates multiple new entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchCreateEntitiesAsync(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | parent | Required. The name of the entity type to create entities in. Format:
|
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
EntityTypeName parent = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
string languageCode = "";
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchCreateEntitiesAsync(parent, entities, languageCode);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchCreateEntitiesAsync(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;
}
BatchCreateEntitiesAsync(EntityTypeName, IEnumerable<Entity>, string, CancellationToken)
Creates multiple new entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchCreateEntitiesAsync(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | parent | Required. The name of the entity type to create entities in. Format:
|
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
EntityTypeName parent = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
string languageCode = "";
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchCreateEntitiesAsync(parent, entities, languageCode);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchCreateEntitiesAsync(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;
}
BatchCreateEntitiesAsync(EntityTypeName, IEnumerable<Entity>, CancellationToken)
Creates multiple new entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchCreateEntitiesAsync(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | parent | Required. The name of the entity type to create entities in. Format:
|
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to create. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
EntityTypeName parent = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchCreateEntitiesAsync(parent, entities);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchCreateEntitiesAsync(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;
}
BatchCreateEntitiesAsync(string, IEnumerable<Entity>, CallSettings)
Creates multiple new entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchCreateEntitiesAsync(string parent, IEnumerable<EntityType.Types.Entity> entities, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the entity type to create entities in. Format:
|
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchCreateEntitiesAsync(parent, entities);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchCreateEntitiesAsync(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;
}
BatchCreateEntitiesAsync(string, IEnumerable<Entity>, string, CallSettings)
Creates multiple new entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchCreateEntitiesAsync(string parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the entity type to create entities in. Format:
|
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
string languageCode = "";
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchCreateEntitiesAsync(parent, entities, languageCode);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchCreateEntitiesAsync(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;
}
BatchCreateEntitiesAsync(string, IEnumerable<Entity>, string, CancellationToken)
Creates multiple new entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchCreateEntitiesAsync(string parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the entity type to create entities in. Format:
|
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
string languageCode = "";
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchCreateEntitiesAsync(parent, entities, languageCode);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchCreateEntitiesAsync(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;
}
BatchCreateEntitiesAsync(string, IEnumerable<Entity>, CancellationToken)
Creates multiple new entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchCreateEntitiesAsync(string parent, IEnumerable<EntityType.Types.Entity> entities, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the entity type to create entities in. Format:
|
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to create. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchCreateEntitiesAsync(parent, entities);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchCreateEntitiesAsync(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;
}
BatchDeleteEntities(BatchDeleteEntitiesRequest, CallSettings)
Deletes entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<Empty, Struct> BatchDeleteEntities(BatchDeleteEntitiesRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
BatchDeleteEntitiesRequest | request | 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 |
---|---|
Operation<Empty, Struct> | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
BatchDeleteEntitiesRequest request = new BatchDeleteEntitiesRequest
{
ParentAsEntityTypeName = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]"),
EntityValues = { "", },
LanguageCode = "",
};
// Make the request
Operation<Empty, Struct> response = entityTypesClient.BatchDeleteEntities(request);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = entityTypesClient.PollOnceBatchDeleteEntities(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;
}
BatchDeleteEntities(EntityTypeName, IEnumerable<string>, CallSettings)
Deletes entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<Empty, Struct> BatchDeleteEntities(EntityTypeName parent, IEnumerable<string> entityValues, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | parent | Required. The name of the entity type to delete entries for. Format:
|
IEnumerable<string> | entityValues | Required. The reference |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, Struct> | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
EntityTypeName parent = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
IEnumerable<string> entityValues = new string[] { "", };
// Make the request
Operation<Empty, Struct> response = entityTypesClient.BatchDeleteEntities(parent, entityValues);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = entityTypesClient.PollOnceBatchDeleteEntities(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;
}
BatchDeleteEntities(EntityTypeName, IEnumerable<string>, string, CallSettings)
Deletes entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<Empty, Struct> BatchDeleteEntities(EntityTypeName parent, IEnumerable<string> entityValues, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | parent | Required. The name of the entity type to delete entries for. Format:
|
IEnumerable<string> | entityValues | Required. The reference |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, Struct> | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
EntityTypeName parent = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
IEnumerable<string> entityValues = new string[] { "", };
string languageCode = "";
// Make the request
Operation<Empty, Struct> response = entityTypesClient.BatchDeleteEntities(parent, entityValues, languageCode);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = entityTypesClient.PollOnceBatchDeleteEntities(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;
}
BatchDeleteEntities(string, IEnumerable<string>, CallSettings)
Deletes entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<Empty, Struct> BatchDeleteEntities(string parent, IEnumerable<string> entityValues, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the entity type to delete entries for. Format:
|
IEnumerable<string> | entityValues | Required. The reference |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, Struct> | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
IEnumerable<string> entityValues = new string[] { "", };
// Make the request
Operation<Empty, Struct> response = entityTypesClient.BatchDeleteEntities(parent, entityValues);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = entityTypesClient.PollOnceBatchDeleteEntities(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;
}
BatchDeleteEntities(string, IEnumerable<string>, string, CallSettings)
Deletes entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<Empty, Struct> BatchDeleteEntities(string parent, IEnumerable<string> entityValues, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the entity type to delete entries for. Format:
|
IEnumerable<string> | entityValues | Required. The reference |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, Struct> | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
IEnumerable<string> entityValues = new string[] { "", };
string languageCode = "";
// Make the request
Operation<Empty, Struct> response = entityTypesClient.BatchDeleteEntities(parent, entityValues, languageCode);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = entityTypesClient.PollOnceBatchDeleteEntities(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;
}
BatchDeleteEntitiesAsync(BatchDeleteEntitiesRequest, CallSettings)
Deletes entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchDeleteEntitiesAsync(BatchDeleteEntitiesRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
BatchDeleteEntitiesRequest | request | 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 |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
BatchDeleteEntitiesRequest request = new BatchDeleteEntitiesRequest
{
ParentAsEntityTypeName = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]"),
EntityValues = { "", },
LanguageCode = "",
};
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchDeleteEntitiesAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchDeleteEntitiesAsync(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;
}
BatchDeleteEntitiesAsync(BatchDeleteEntitiesRequest, CancellationToken)
Deletes entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchDeleteEntitiesAsync(BatchDeleteEntitiesRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
BatchDeleteEntitiesRequest | request | The request object containing all of the parameters for the API call. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
BatchDeleteEntitiesRequest request = new BatchDeleteEntitiesRequest
{
ParentAsEntityTypeName = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]"),
EntityValues = { "", },
LanguageCode = "",
};
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchDeleteEntitiesAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchDeleteEntitiesAsync(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;
}
BatchDeleteEntitiesAsync(EntityTypeName, IEnumerable<string>, CallSettings)
Deletes entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchDeleteEntitiesAsync(EntityTypeName parent, IEnumerable<string> entityValues, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | parent | Required. The name of the entity type to delete entries for. Format:
|
IEnumerable<string> | entityValues | Required. The reference |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
EntityTypeName parent = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
IEnumerable<string> entityValues = new string[] { "", };
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchDeleteEntitiesAsync(parent, entityValues);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchDeleteEntitiesAsync(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;
}
BatchDeleteEntitiesAsync(EntityTypeName, IEnumerable<string>, string, CallSettings)
Deletes entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchDeleteEntitiesAsync(EntityTypeName parent, IEnumerable<string> entityValues, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | parent | Required. The name of the entity type to delete entries for. Format:
|
IEnumerable<string> | entityValues | Required. The reference |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
EntityTypeName parent = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
IEnumerable<string> entityValues = new string[] { "", };
string languageCode = "";
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchDeleteEntitiesAsync(parent, entityValues, languageCode);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchDeleteEntitiesAsync(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;
}
BatchDeleteEntitiesAsync(EntityTypeName, IEnumerable<string>, string, CancellationToken)
Deletes entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchDeleteEntitiesAsync(EntityTypeName parent, IEnumerable<string> entityValues, string languageCode, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | parent | Required. The name of the entity type to delete entries for. Format:
|
IEnumerable<string> | entityValues | Required. The reference |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
EntityTypeName parent = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
IEnumerable<string> entityValues = new string[] { "", };
string languageCode = "";
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchDeleteEntitiesAsync(parent, entityValues, languageCode);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchDeleteEntitiesAsync(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;
}
BatchDeleteEntitiesAsync(EntityTypeName, IEnumerable<string>, CancellationToken)
Deletes entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchDeleteEntitiesAsync(EntityTypeName parent, IEnumerable<string> entityValues, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | parent | Required. The name of the entity type to delete entries for. Format:
|
IEnumerable<string> | entityValues | Required. The reference |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
EntityTypeName parent = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
IEnumerable<string> entityValues = new string[] { "", };
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchDeleteEntitiesAsync(parent, entityValues);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchDeleteEntitiesAsync(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;
}
BatchDeleteEntitiesAsync(string, IEnumerable<string>, CallSettings)
Deletes entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchDeleteEntitiesAsync(string parent, IEnumerable<string> entityValues, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the entity type to delete entries for. Format:
|
IEnumerable<string> | entityValues | Required. The reference |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
IEnumerable<string> entityValues = new string[] { "", };
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchDeleteEntitiesAsync(parent, entityValues);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchDeleteEntitiesAsync(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;
}
BatchDeleteEntitiesAsync(string, IEnumerable<string>, string, CallSettings)
Deletes entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchDeleteEntitiesAsync(string parent, IEnumerable<string> entityValues, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the entity type to delete entries for. Format:
|
IEnumerable<string> | entityValues | Required. The reference |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
IEnumerable<string> entityValues = new string[] { "", };
string languageCode = "";
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchDeleteEntitiesAsync(parent, entityValues, languageCode);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchDeleteEntitiesAsync(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;
}
BatchDeleteEntitiesAsync(string, IEnumerable<string>, string, CancellationToken)
Deletes entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchDeleteEntitiesAsync(string parent, IEnumerable<string> entityValues, string languageCode, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the entity type to delete entries for. Format:
|
IEnumerable<string> | entityValues | Required. The reference |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
IEnumerable<string> entityValues = new string[] { "", };
string languageCode = "";
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchDeleteEntitiesAsync(parent, entityValues, languageCode);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchDeleteEntitiesAsync(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;
}
BatchDeleteEntitiesAsync(string, IEnumerable<string>, CancellationToken)
Deletes entities in the specified entity type.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchDeleteEntitiesAsync(string parent, IEnumerable<string> entityValues, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the entity type to delete entries for. Format:
|
IEnumerable<string> | entityValues | Required. The reference |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
IEnumerable<string> entityValues = new string[] { "", };
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchDeleteEntitiesAsync(parent, entityValues);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchDeleteEntitiesAsync(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;
}
BatchDeleteEntityTypes(AgentName, IEnumerable<string>, CallSettings)
Deletes entity types in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<Empty, Struct> BatchDeleteEntityTypes(AgentName parent, IEnumerable<string> entityTypeNames, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The name of the agent to delete all entities types for. Format:
|
IEnumerable<string> | entityTypeNames | Required. The names entity types to delete. All names must point to the
same agent as |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, Struct> | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
IEnumerable<string> entityTypeNames = new string[] { "", };
// Make the request
Operation<Empty, Struct> response = entityTypesClient.BatchDeleteEntityTypes(parent, entityTypeNames);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = entityTypesClient.PollOnceBatchDeleteEntityTypes(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;
}
BatchDeleteEntityTypes(BatchDeleteEntityTypesRequest, CallSettings)
Deletes entity types in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<Empty, Struct> BatchDeleteEntityTypes(BatchDeleteEntityTypesRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
BatchDeleteEntityTypesRequest | request | 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 |
---|---|
Operation<Empty, Struct> | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
BatchDeleteEntityTypesRequest request = new BatchDeleteEntityTypesRequest
{
ParentAsAgentName = AgentName.FromProject("[PROJECT]"),
EntityTypeNames = { "", },
};
// Make the request
Operation<Empty, Struct> response = entityTypesClient.BatchDeleteEntityTypes(request);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = entityTypesClient.PollOnceBatchDeleteEntityTypes(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;
}
BatchDeleteEntityTypes(string, IEnumerable<string>, CallSettings)
Deletes entity types in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<Empty, Struct> BatchDeleteEntityTypes(string parent, IEnumerable<string> entityTypeNames, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the agent to delete all entities types for. Format:
|
IEnumerable<string> | entityTypeNames | Required. The names entity types to delete. All names must point to the
same agent as |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, Struct> | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
IEnumerable<string> entityTypeNames = new string[] { "", };
// Make the request
Operation<Empty, Struct> response = entityTypesClient.BatchDeleteEntityTypes(parent, entityTypeNames);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = entityTypesClient.PollOnceBatchDeleteEntityTypes(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;
}
BatchDeleteEntityTypesAsync(AgentName, IEnumerable<string>, CallSettings)
Deletes entity types in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchDeleteEntityTypesAsync(AgentName parent, IEnumerable<string> entityTypeNames, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The name of the agent to delete all entities types for. Format:
|
IEnumerable<string> | entityTypeNames | Required. The names entity types to delete. All names must point to the
same agent as |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
IEnumerable<string> entityTypeNames = new string[] { "", };
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchDeleteEntityTypesAsync(parent, entityTypeNames);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchDeleteEntityTypesAsync(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;
}
BatchDeleteEntityTypesAsync(AgentName, IEnumerable<string>, CancellationToken)
Deletes entity types in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchDeleteEntityTypesAsync(AgentName parent, IEnumerable<string> entityTypeNames, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The name of the agent to delete all entities types for. Format:
|
IEnumerable<string> | entityTypeNames | Required. The names entity types to delete. All names must point to the
same agent as |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
IEnumerable<string> entityTypeNames = new string[] { "", };
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchDeleteEntityTypesAsync(parent, entityTypeNames);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchDeleteEntityTypesAsync(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;
}
BatchDeleteEntityTypesAsync(BatchDeleteEntityTypesRequest, CallSettings)
Deletes entity types in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchDeleteEntityTypesAsync(BatchDeleteEntityTypesRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
BatchDeleteEntityTypesRequest | request | 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 |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
BatchDeleteEntityTypesRequest request = new BatchDeleteEntityTypesRequest
{
ParentAsAgentName = AgentName.FromProject("[PROJECT]"),
EntityTypeNames = { "", },
};
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchDeleteEntityTypesAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchDeleteEntityTypesAsync(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;
}
BatchDeleteEntityTypesAsync(BatchDeleteEntityTypesRequest, CancellationToken)
Deletes entity types in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchDeleteEntityTypesAsync(BatchDeleteEntityTypesRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
BatchDeleteEntityTypesRequest | request | The request object containing all of the parameters for the API call. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
BatchDeleteEntityTypesRequest request = new BatchDeleteEntityTypesRequest
{
ParentAsAgentName = AgentName.FromProject("[PROJECT]"),
EntityTypeNames = { "", },
};
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchDeleteEntityTypesAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchDeleteEntityTypesAsync(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;
}
BatchDeleteEntityTypesAsync(string, IEnumerable<string>, CallSettings)
Deletes entity types in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchDeleteEntityTypesAsync(string parent, IEnumerable<string> entityTypeNames, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the agent to delete all entities types for. Format:
|
IEnumerable<string> | entityTypeNames | Required. The names entity types to delete. All names must point to the
same agent as |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
IEnumerable<string> entityTypeNames = new string[] { "", };
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchDeleteEntityTypesAsync(parent, entityTypeNames);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchDeleteEntityTypesAsync(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;
}
BatchDeleteEntityTypesAsync(string, IEnumerable<string>, CancellationToken)
Deletes entity types in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchDeleteEntityTypesAsync(string parent, IEnumerable<string> entityTypeNames, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the agent to delete all entities types for. Format:
|
IEnumerable<string> | entityTypeNames | Required. The names entity types to delete. All names must point to the
same agent as |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
IEnumerable<string> entityTypeNames = new string[] { "", };
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchDeleteEntityTypesAsync(parent, entityTypeNames);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchDeleteEntityTypesAsync(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;
}
BatchUpdateEntities(BatchUpdateEntitiesRequest, CallSettings)
Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<Empty, Struct> BatchUpdateEntities(BatchUpdateEntitiesRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
BatchUpdateEntitiesRequest | request | 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 |
---|---|
Operation<Empty, Struct> | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
BatchUpdateEntitiesRequest request = new BatchUpdateEntitiesRequest
{
ParentAsEntityTypeName = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]"),
Entities =
{
new EntityType.Types.Entity(),
},
LanguageCode = "",
UpdateMask = new FieldMask(),
};
// Make the request
Operation<Empty, Struct> response = entityTypesClient.BatchUpdateEntities(request);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = entityTypesClient.PollOnceBatchUpdateEntities(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;
}
BatchUpdateEntities(EntityTypeName, IEnumerable<Entity>, CallSettings)
Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<Empty, Struct> BatchUpdateEntities(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | parent | Required. The name of the entity type to update or create entities in.
Format: |
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to update or create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, Struct> | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
EntityTypeName parent = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
// Make the request
Operation<Empty, Struct> response = entityTypesClient.BatchUpdateEntities(parent, entities);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = entityTypesClient.PollOnceBatchUpdateEntities(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;
}
BatchUpdateEntities(EntityTypeName, IEnumerable<Entity>, string, CallSettings)
Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<Empty, Struct> BatchUpdateEntities(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | parent | Required. The name of the entity type to update or create entities in.
Format: |
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to update or create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, Struct> | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
EntityTypeName parent = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
string languageCode = "";
// Make the request
Operation<Empty, Struct> response = entityTypesClient.BatchUpdateEntities(parent, entities, languageCode);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = entityTypesClient.PollOnceBatchUpdateEntities(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;
}
BatchUpdateEntities(string, IEnumerable<Entity>, CallSettings)
Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<Empty, Struct> BatchUpdateEntities(string parent, IEnumerable<EntityType.Types.Entity> entities, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the entity type to update or create entities in.
Format: |
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to update or create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, Struct> | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
// Make the request
Operation<Empty, Struct> response = entityTypesClient.BatchUpdateEntities(parent, entities);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = entityTypesClient.PollOnceBatchUpdateEntities(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;
}
BatchUpdateEntities(string, IEnumerable<Entity>, string, CallSettings)
Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<Empty, Struct> BatchUpdateEntities(string parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the entity type to update or create entities in.
Format: |
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to update or create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, Struct> | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
string languageCode = "";
// Make the request
Operation<Empty, Struct> response = entityTypesClient.BatchUpdateEntities(parent, entities, languageCode);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = entityTypesClient.PollOnceBatchUpdateEntities(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;
}
BatchUpdateEntitiesAsync(BatchUpdateEntitiesRequest, CallSettings)
Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchUpdateEntitiesAsync(BatchUpdateEntitiesRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
BatchUpdateEntitiesRequest | request | 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 |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
BatchUpdateEntitiesRequest request = new BatchUpdateEntitiesRequest
{
ParentAsEntityTypeName = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]"),
Entities =
{
new EntityType.Types.Entity(),
},
LanguageCode = "",
UpdateMask = new FieldMask(),
};
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchUpdateEntitiesAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchUpdateEntitiesAsync(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;
}
BatchUpdateEntitiesAsync(BatchUpdateEntitiesRequest, CancellationToken)
Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchUpdateEntitiesAsync(BatchUpdateEntitiesRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
BatchUpdateEntitiesRequest | request | The request object containing all of the parameters for the API call. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
BatchUpdateEntitiesRequest request = new BatchUpdateEntitiesRequest
{
ParentAsEntityTypeName = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]"),
Entities =
{
new EntityType.Types.Entity(),
},
LanguageCode = "",
UpdateMask = new FieldMask(),
};
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchUpdateEntitiesAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchUpdateEntitiesAsync(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;
}
BatchUpdateEntitiesAsync(EntityTypeName, IEnumerable<Entity>, CallSettings)
Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchUpdateEntitiesAsync(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | parent | Required. The name of the entity type to update or create entities in.
Format: |
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to update or create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
EntityTypeName parent = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchUpdateEntitiesAsync(parent, entities);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchUpdateEntitiesAsync(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;
}
BatchUpdateEntitiesAsync(EntityTypeName, IEnumerable<Entity>, string, CallSettings)
Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchUpdateEntitiesAsync(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | parent | Required. The name of the entity type to update or create entities in.
Format: |
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to update or create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
EntityTypeName parent = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
string languageCode = "";
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchUpdateEntitiesAsync(parent, entities, languageCode);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchUpdateEntitiesAsync(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;
}
BatchUpdateEntitiesAsync(EntityTypeName, IEnumerable<Entity>, string, CancellationToken)
Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchUpdateEntitiesAsync(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | parent | Required. The name of the entity type to update or create entities in.
Format: |
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to update or create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
EntityTypeName parent = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
string languageCode = "";
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchUpdateEntitiesAsync(parent, entities, languageCode);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchUpdateEntitiesAsync(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;
}
BatchUpdateEntitiesAsync(EntityTypeName, IEnumerable<Entity>, CancellationToken)
Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchUpdateEntitiesAsync(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | parent | Required. The name of the entity type to update or create entities in.
Format: |
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to update or create. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
EntityTypeName parent = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchUpdateEntitiesAsync(parent, entities);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchUpdateEntitiesAsync(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;
}
BatchUpdateEntitiesAsync(string, IEnumerable<Entity>, CallSettings)
Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchUpdateEntitiesAsync(string parent, IEnumerable<EntityType.Types.Entity> entities, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the entity type to update or create entities in.
Format: |
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to update or create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchUpdateEntitiesAsync(parent, entities);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchUpdateEntitiesAsync(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;
}
BatchUpdateEntitiesAsync(string, IEnumerable<Entity>, string, CallSettings)
Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchUpdateEntitiesAsync(string parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the entity type to update or create entities in.
Format: |
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to update or create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
string languageCode = "";
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchUpdateEntitiesAsync(parent, entities, languageCode);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchUpdateEntitiesAsync(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;
}
BatchUpdateEntitiesAsync(string, IEnumerable<Entity>, string, CancellationToken)
Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchUpdateEntitiesAsync(string parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the entity type to update or create entities in.
Format: |
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to update or create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
string languageCode = "";
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchUpdateEntitiesAsync(parent, entities, languageCode);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchUpdateEntitiesAsync(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;
}
BatchUpdateEntitiesAsync(string, IEnumerable<Entity>, CancellationToken)
Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: An Empty message
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<Empty, Struct>> BatchUpdateEntitiesAsync(string parent, IEnumerable<EntityType.Types.Entity> entities, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the entity type to update or create entities in.
Format: |
IEnumerable<EntityType.Types.Entity> | entities | Required. The entities to update or create. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
IEnumerable<EntityType.Types.Entity> entities = new EntityType.Types.Entity[]
{
new EntityType.Types.Entity(),
};
// Make the request
Operation<Empty, Struct> response = await entityTypesClient.BatchUpdateEntitiesAsync(parent, entities);
// Poll until the returned long-running operation is complete
Operation<Empty, Struct> 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, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchUpdateEntitiesAsync(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;
}
BatchUpdateEntityTypes(BatchUpdateEntityTypesRequest, CallSettings)
Updates/Creates multiple entity types in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse]
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Operation<BatchUpdateEntityTypesResponse, Struct> BatchUpdateEntityTypes(BatchUpdateEntityTypesRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
BatchUpdateEntityTypesRequest | request | 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 |
---|---|
Operation<BatchUpdateEntityTypesResponse, Struct> | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
BatchUpdateEntityTypesRequest request = new BatchUpdateEntityTypesRequest
{
ParentAsAgentName = AgentName.FromProject("[PROJECT]"),
EntityTypeBatchUri = "",
LanguageCode = "",
UpdateMask = new FieldMask(),
};
// Make the request
Operation<BatchUpdateEntityTypesResponse, Struct> response = entityTypesClient.BatchUpdateEntityTypes(request);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateEntityTypesResponse, Struct> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchUpdateEntityTypesResponse 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<BatchUpdateEntityTypesResponse, Struct> retrievedResponse = entityTypesClient.PollOnceBatchUpdateEntityTypes(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateEntityTypesResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateEntityTypesAsync(BatchUpdateEntityTypesRequest, CallSettings)
Updates/Creates multiple entity types in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse]
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<BatchUpdateEntityTypesResponse, Struct>> BatchUpdateEntityTypesAsync(BatchUpdateEntityTypesRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
BatchUpdateEntityTypesRequest | request | 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 |
---|---|
Task<Operation<BatchUpdateEntityTypesResponse, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
BatchUpdateEntityTypesRequest request = new BatchUpdateEntityTypesRequest
{
ParentAsAgentName = AgentName.FromProject("[PROJECT]"),
EntityTypeBatchUri = "",
LanguageCode = "",
UpdateMask = new FieldMask(),
};
// Make the request
Operation<BatchUpdateEntityTypesResponse, Struct> response = await entityTypesClient.BatchUpdateEntityTypesAsync(request);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateEntityTypesResponse, Struct> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchUpdateEntityTypesResponse 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<BatchUpdateEntityTypesResponse, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchUpdateEntityTypesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateEntityTypesResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateEntityTypesAsync(BatchUpdateEntityTypesRequest, CancellationToken)
Updates/Creates multiple entity types in the specified agent.
This method is a long-running
operation.
The returned Operation
type has the following method-specific fields:
metadata
: An empty Struct messageresponse
: [BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse]
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<Operation<BatchUpdateEntityTypesResponse, Struct>> BatchUpdateEntityTypesAsync(BatchUpdateEntityTypesRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
BatchUpdateEntityTypesRequest | request | The request object containing all of the parameters for the API call. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<BatchUpdateEntityTypesResponse, Struct>> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
BatchUpdateEntityTypesRequest request = new BatchUpdateEntityTypesRequest
{
ParentAsAgentName = AgentName.FromProject("[PROJECT]"),
EntityTypeBatchUri = "",
LanguageCode = "",
UpdateMask = new FieldMask(),
};
// Make the request
Operation<BatchUpdateEntityTypesResponse, Struct> response = await entityTypesClient.BatchUpdateEntityTypesAsync(request);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateEntityTypesResponse, Struct> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchUpdateEntityTypesResponse 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<BatchUpdateEntityTypesResponse, Struct> retrievedResponse = await entityTypesClient.PollOnceBatchUpdateEntityTypesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateEntityTypesResponse retrievedResult = retrievedResponse.Result;
}
Create()
Synchronously creates a EntityTypesClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use EntityTypesClientBuilder.
Declaration
public static EntityTypesClient Create()
Returns
Type | Description |
---|---|
EntityTypesClient | The created EntityTypesClient. |
CreateAsync(CancellationToken)
Asynchronously creates a EntityTypesClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use EntityTypesClientBuilder.
Declaration
public static Task<EntityTypesClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The CancellationToken to use while creating the client. |
Returns
Type | Description |
---|---|
Task<EntityTypesClient> | The task representing the created EntityTypesClient. |
CreateEntityType(AgentName, EntityType, CallSettings)
Creates an entity type in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual EntityType CreateEntityType(AgentName parent, EntityType entityType, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to create a entity type for.
Format: |
EntityType | entityType | Required. The entity type to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
EntityType | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
EntityType entityType = new EntityType();
// Make the request
EntityType response = entityTypesClient.CreateEntityType(parent, entityType);
CreateEntityType(AgentName, EntityType, string, CallSettings)
Creates an entity type in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual EntityType CreateEntityType(AgentName parent, EntityType entityType, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to create a entity type for.
Format: |
EntityType | entityType | Required. The entity type to create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
EntityType | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
EntityType entityType = new EntityType();
string languageCode = "";
// Make the request
EntityType response = entityTypesClient.CreateEntityType(parent, entityType, languageCode);
CreateEntityType(CreateEntityTypeRequest, CallSettings)
Creates an entity type in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual EntityType CreateEntityType(CreateEntityTypeRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
CreateEntityTypeRequest | request | 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 |
---|---|
EntityType | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
CreateEntityTypeRequest request = new CreateEntityTypeRequest
{
ParentAsAgentName = AgentName.FromProject("[PROJECT]"),
EntityType = new EntityType(),
LanguageCode = "",
};
// Make the request
EntityType response = entityTypesClient.CreateEntityType(request);
CreateEntityType(string, EntityType, CallSettings)
Creates an entity type in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual EntityType CreateEntityType(string parent, EntityType entityType, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to create a entity type for.
Format: |
EntityType | entityType | Required. The entity type to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
EntityType | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
EntityType entityType = new EntityType();
// Make the request
EntityType response = entityTypesClient.CreateEntityType(parent, entityType);
CreateEntityType(string, EntityType, string, CallSettings)
Creates an entity type in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual EntityType CreateEntityType(string parent, EntityType entityType, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to create a entity type for.
Format: |
EntityType | entityType | Required. The entity type to create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
EntityType | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
EntityType entityType = new EntityType();
string languageCode = "";
// Make the request
EntityType response = entityTypesClient.CreateEntityType(parent, entityType, languageCode);
CreateEntityTypeAsync(AgentName, EntityType, CallSettings)
Creates an entity type in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<EntityType> CreateEntityTypeAsync(AgentName parent, EntityType entityType, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to create a entity type for.
Format: |
EntityType | entityType | Required. The entity type to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
EntityType entityType = new EntityType();
// Make the request
EntityType response = await entityTypesClient.CreateEntityTypeAsync(parent, entityType);
CreateEntityTypeAsync(AgentName, EntityType, string, CallSettings)
Creates an entity type in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<EntityType> CreateEntityTypeAsync(AgentName parent, EntityType entityType, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to create a entity type for.
Format: |
EntityType | entityType | Required. The entity type to create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
EntityType entityType = new EntityType();
string languageCode = "";
// Make the request
EntityType response = await entityTypesClient.CreateEntityTypeAsync(parent, entityType, languageCode);
CreateEntityTypeAsync(AgentName, EntityType, string, CancellationToken)
Creates an entity type in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<EntityType> CreateEntityTypeAsync(AgentName parent, EntityType entityType, string languageCode, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to create a entity type for.
Format: |
EntityType | entityType | Required. The entity type to create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
EntityType entityType = new EntityType();
string languageCode = "";
// Make the request
EntityType response = await entityTypesClient.CreateEntityTypeAsync(parent, entityType, languageCode);
CreateEntityTypeAsync(AgentName, EntityType, CancellationToken)
Creates an entity type in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<EntityType> CreateEntityTypeAsync(AgentName parent, EntityType entityType, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to create a entity type for.
Format: |
EntityType | entityType | Required. The entity type to create. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
EntityType entityType = new EntityType();
// Make the request
EntityType response = await entityTypesClient.CreateEntityTypeAsync(parent, entityType);
CreateEntityTypeAsync(CreateEntityTypeRequest, CallSettings)
Creates an entity type in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<EntityType> CreateEntityTypeAsync(CreateEntityTypeRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
CreateEntityTypeRequest | request | 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 |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
CreateEntityTypeRequest request = new CreateEntityTypeRequest
{
ParentAsAgentName = AgentName.FromProject("[PROJECT]"),
EntityType = new EntityType(),
LanguageCode = "",
};
// Make the request
EntityType response = await entityTypesClient.CreateEntityTypeAsync(request);
CreateEntityTypeAsync(CreateEntityTypeRequest, CancellationToken)
Creates an entity type in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<EntityType> CreateEntityTypeAsync(CreateEntityTypeRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CreateEntityTypeRequest | request | The request object containing all of the parameters for the API call. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
CreateEntityTypeRequest request = new CreateEntityTypeRequest
{
ParentAsAgentName = AgentName.FromProject("[PROJECT]"),
EntityType = new EntityType(),
LanguageCode = "",
};
// Make the request
EntityType response = await entityTypesClient.CreateEntityTypeAsync(request);
CreateEntityTypeAsync(string, EntityType, CallSettings)
Creates an entity type in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<EntityType> CreateEntityTypeAsync(string parent, EntityType entityType, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to create a entity type for.
Format: |
EntityType | entityType | Required. The entity type to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
EntityType entityType = new EntityType();
// Make the request
EntityType response = await entityTypesClient.CreateEntityTypeAsync(parent, entityType);
CreateEntityTypeAsync(string, EntityType, string, CallSettings)
Creates an entity type in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<EntityType> CreateEntityTypeAsync(string parent, EntityType entityType, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to create a entity type for.
Format: |
EntityType | entityType | Required. The entity type to create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
EntityType entityType = new EntityType();
string languageCode = "";
// Make the request
EntityType response = await entityTypesClient.CreateEntityTypeAsync(parent, entityType, languageCode);
CreateEntityTypeAsync(string, EntityType, string, CancellationToken)
Creates an entity type in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<EntityType> CreateEntityTypeAsync(string parent, EntityType entityType, string languageCode, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to create a entity type for.
Format: |
EntityType | entityType | Required. The entity type to create. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
EntityType entityType = new EntityType();
string languageCode = "";
// Make the request
EntityType response = await entityTypesClient.CreateEntityTypeAsync(parent, entityType, languageCode);
CreateEntityTypeAsync(string, EntityType, CancellationToken)
Creates an entity type in the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<EntityType> CreateEntityTypeAsync(string parent, EntityType entityType, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to create a entity type for.
Format: |
EntityType | entityType | Required. The entity type to create. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
EntityType entityType = new EntityType();
// Make the request
EntityType response = await entityTypesClient.CreateEntityTypeAsync(parent, entityType);
DeleteEntityType(DeleteEntityTypeRequest, CallSettings)
Deletes the specified entity type.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual void DeleteEntityType(DeleteEntityTypeRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeleteEntityTypeRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
DeleteEntityTypeRequest request = new DeleteEntityTypeRequest
{
EntityTypeName = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]"),
};
// Make the request
entityTypesClient.DeleteEntityType(request);
DeleteEntityType(EntityTypeName, CallSettings)
Deletes the specified entity type.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual void DeleteEntityType(EntityTypeName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | name | Required. The name of the entity type to delete.
Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
EntityTypeName name = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
// Make the request
entityTypesClient.DeleteEntityType(name);
DeleteEntityType(string, CallSettings)
Deletes the specified entity type.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual void DeleteEntityType(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the entity type to delete.
Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
// Make the request
entityTypesClient.DeleteEntityType(name);
DeleteEntityTypeAsync(DeleteEntityTypeRequest, CallSettings)
Deletes the specified entity type.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task DeleteEntityTypeAsync(DeleteEntityTypeRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeleteEntityTypeRequest | request | 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 |
---|---|
Task | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
DeleteEntityTypeRequest request = new DeleteEntityTypeRequest
{
EntityTypeName = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]"),
};
// Make the request
await entityTypesClient.DeleteEntityTypeAsync(request);
DeleteEntityTypeAsync(DeleteEntityTypeRequest, CancellationToken)
Deletes the specified entity type.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task DeleteEntityTypeAsync(DeleteEntityTypeRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DeleteEntityTypeRequest | request | The request object containing all of the parameters for the API call. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
DeleteEntityTypeRequest request = new DeleteEntityTypeRequest
{
EntityTypeName = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]"),
};
// Make the request
await entityTypesClient.DeleteEntityTypeAsync(request);
DeleteEntityTypeAsync(EntityTypeName, CallSettings)
Deletes the specified entity type.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task DeleteEntityTypeAsync(EntityTypeName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | name | Required. The name of the entity type to delete.
Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
EntityTypeName name = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
// Make the request
await entityTypesClient.DeleteEntityTypeAsync(name);
DeleteEntityTypeAsync(EntityTypeName, CancellationToken)
Deletes the specified entity type.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task DeleteEntityTypeAsync(EntityTypeName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | name | Required. The name of the entity type to delete.
Format: |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
EntityTypeName name = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
// Make the request
await entityTypesClient.DeleteEntityTypeAsync(name);
DeleteEntityTypeAsync(string, CallSettings)
Deletes the specified entity type.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task DeleteEntityTypeAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the entity type to delete.
Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
// Make the request
await entityTypesClient.DeleteEntityTypeAsync(name);
DeleteEntityTypeAsync(string, CancellationToken)
Deletes the specified entity type.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task DeleteEntityTypeAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the entity type to delete.
Format: |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
// Make the request
await entityTypesClient.DeleteEntityTypeAsync(name);
GetEntityType(EntityTypeName, CallSettings)
Retrieves the specified entity type.
Declaration
public virtual EntityType GetEntityType(EntityTypeName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | name | Required. The name of the entity type.
Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
EntityType | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
EntityTypeName name = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
// Make the request
EntityType response = entityTypesClient.GetEntityType(name);
GetEntityType(EntityTypeName, string, CallSettings)
Retrieves the specified entity type.
Declaration
public virtual EntityType GetEntityType(EntityTypeName name, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | name | Required. The name of the entity type.
Format: |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
EntityType | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
EntityTypeName name = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
string languageCode = "";
// Make the request
EntityType response = entityTypesClient.GetEntityType(name, languageCode);
GetEntityType(GetEntityTypeRequest, CallSettings)
Retrieves the specified entity type.
Declaration
public virtual EntityType GetEntityType(GetEntityTypeRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetEntityTypeRequest | request | 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 |
---|---|
EntityType | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
GetEntityTypeRequest request = new GetEntityTypeRequest
{
EntityTypeName = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]"),
LanguageCode = "",
};
// Make the request
EntityType response = entityTypesClient.GetEntityType(request);
GetEntityType(string, CallSettings)
Retrieves the specified entity type.
Declaration
public virtual EntityType GetEntityType(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the entity type.
Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
EntityType | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
// Make the request
EntityType response = entityTypesClient.GetEntityType(name);
GetEntityType(string, string, CallSettings)
Retrieves the specified entity type.
Declaration
public virtual EntityType GetEntityType(string name, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the entity type.
Format: |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
EntityType | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
string languageCode = "";
// Make the request
EntityType response = entityTypesClient.GetEntityType(name, languageCode);
GetEntityTypeAsync(EntityTypeName, CallSettings)
Retrieves the specified entity type.
Declaration
public virtual Task<EntityType> GetEntityTypeAsync(EntityTypeName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | name | Required. The name of the entity type.
Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
EntityTypeName name = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
// Make the request
EntityType response = await entityTypesClient.GetEntityTypeAsync(name);
GetEntityTypeAsync(EntityTypeName, string, CallSettings)
Retrieves the specified entity type.
Declaration
public virtual Task<EntityType> GetEntityTypeAsync(EntityTypeName name, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | name | Required. The name of the entity type.
Format: |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
EntityTypeName name = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
string languageCode = "";
// Make the request
EntityType response = await entityTypesClient.GetEntityTypeAsync(name, languageCode);
GetEntityTypeAsync(EntityTypeName, string, CancellationToken)
Retrieves the specified entity type.
Declaration
public virtual Task<EntityType> GetEntityTypeAsync(EntityTypeName name, string languageCode, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | name | Required. The name of the entity type.
Format: |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
EntityTypeName name = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
string languageCode = "";
// Make the request
EntityType response = await entityTypesClient.GetEntityTypeAsync(name, languageCode);
GetEntityTypeAsync(EntityTypeName, CancellationToken)
Retrieves the specified entity type.
Declaration
public virtual Task<EntityType> GetEntityTypeAsync(EntityTypeName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
EntityTypeName | name | Required. The name of the entity type.
Format: |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
EntityTypeName name = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]");
// Make the request
EntityType response = await entityTypesClient.GetEntityTypeAsync(name);
GetEntityTypeAsync(GetEntityTypeRequest, CallSettings)
Retrieves the specified entity type.
Declaration
public virtual Task<EntityType> GetEntityTypeAsync(GetEntityTypeRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetEntityTypeRequest | request | 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 |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
GetEntityTypeRequest request = new GetEntityTypeRequest
{
EntityTypeName = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]"),
LanguageCode = "",
};
// Make the request
EntityType response = await entityTypesClient.GetEntityTypeAsync(request);
GetEntityTypeAsync(GetEntityTypeRequest, CancellationToken)
Retrieves the specified entity type.
Declaration
public virtual Task<EntityType> GetEntityTypeAsync(GetEntityTypeRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
GetEntityTypeRequest | request | The request object containing all of the parameters for the API call. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
GetEntityTypeRequest request = new GetEntityTypeRequest
{
EntityTypeName = EntityTypeName.FromProjectEntityType("[PROJECT]", "[ENTITY_TYPE]"),
LanguageCode = "",
};
// Make the request
EntityType response = await entityTypesClient.GetEntityTypeAsync(request);
GetEntityTypeAsync(string, CallSettings)
Retrieves the specified entity type.
Declaration
public virtual Task<EntityType> GetEntityTypeAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the entity type.
Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
// Make the request
EntityType response = await entityTypesClient.GetEntityTypeAsync(name);
GetEntityTypeAsync(string, string, CallSettings)
Retrieves the specified entity type.
Declaration
public virtual Task<EntityType> GetEntityTypeAsync(string name, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the entity type.
Format: |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
string languageCode = "";
// Make the request
EntityType response = await entityTypesClient.GetEntityTypeAsync(name, languageCode);
GetEntityTypeAsync(string, string, CancellationToken)
Retrieves the specified entity type.
Declaration
public virtual Task<EntityType> GetEntityTypeAsync(string name, string languageCode, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the entity type.
Format: |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
string languageCode = "";
// Make the request
EntityType response = await entityTypesClient.GetEntityTypeAsync(name, languageCode);
GetEntityTypeAsync(string, CancellationToken)
Retrieves the specified entity type.
Declaration
public virtual Task<EntityType> GetEntityTypeAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the entity type.
Format: |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/entityTypes/[ENTITY_TYPE]";
// Make the request
EntityType response = await entityTypesClient.GetEntityTypeAsync(name);
ListEntityTypes(AgentName, string, int?, CallSettings)
Returns the list of all entity types in the specified agent.
Declaration
public virtual PagedEnumerable<ListEntityTypesResponse, EntityType> ListEntityTypes(AgentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to list all entity types from.
Format: |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | 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 |
---|---|
PagedEnumerable<ListEntityTypesResponse, EntityType> | A pageable sequence of EntityType resources. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
// Make the request
PagedEnumerable<ListEntityTypesResponse, EntityType> response = entityTypesClient.ListEntityTypes(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (EntityType 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 (ListEntityTypesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (EntityType 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<EntityType> 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 (EntityType 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;
ListEntityTypes(AgentName, string, string, int?, CallSettings)
Returns the list of all entity types in the specified agent.
Declaration
public virtual PagedEnumerable<ListEntityTypesResponse, EntityType> ListEntityTypes(AgentName parent, string languageCode, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to list all entity types from.
Format: |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | 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 |
---|---|
PagedEnumerable<ListEntityTypesResponse, EntityType> | A pageable sequence of EntityType resources. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
string languageCode = "";
// Make the request
PagedEnumerable<ListEntityTypesResponse, EntityType> response = entityTypesClient.ListEntityTypes(parent, languageCode: languageCode);
// Iterate over all response items, lazily performing RPCs as required
foreach (EntityType 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 (ListEntityTypesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (EntityType 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<EntityType> 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 (EntityType 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;
ListEntityTypes(ListEntityTypesRequest, CallSettings)
Returns the list of all entity types in the specified agent.
Declaration
public virtual PagedEnumerable<ListEntityTypesResponse, EntityType> ListEntityTypes(ListEntityTypesRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListEntityTypesRequest | request | 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 |
---|---|
PagedEnumerable<ListEntityTypesResponse, EntityType> | A pageable sequence of EntityType resources. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
ListEntityTypesRequest request = new ListEntityTypesRequest
{
ParentAsAgentName = AgentName.FromProject("[PROJECT]"),
LanguageCode = "",
};
// Make the request
PagedEnumerable<ListEntityTypesResponse, EntityType> response = entityTypesClient.ListEntityTypes(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (EntityType 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 (ListEntityTypesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (EntityType 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<EntityType> 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 (EntityType 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;
ListEntityTypes(string, string, int?, CallSettings)
Returns the list of all entity types in the specified agent.
Declaration
public virtual PagedEnumerable<ListEntityTypesResponse, EntityType> ListEntityTypes(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to list all entity types from.
Format: |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | 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 |
---|---|
PagedEnumerable<ListEntityTypesResponse, EntityType> | A pageable sequence of EntityType resources. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
// Make the request
PagedEnumerable<ListEntityTypesResponse, EntityType> response = entityTypesClient.ListEntityTypes(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (EntityType 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 (ListEntityTypesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (EntityType 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<EntityType> 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 (EntityType 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;
ListEntityTypes(string, string, string, int?, CallSettings)
Returns the list of all entity types in the specified agent.
Declaration
public virtual PagedEnumerable<ListEntityTypesResponse, EntityType> ListEntityTypes(string parent, string languageCode, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to list all entity types from.
Format: |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | 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 |
---|---|
PagedEnumerable<ListEntityTypesResponse, EntityType> | A pageable sequence of EntityType resources. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
string languageCode = "";
// Make the request
PagedEnumerable<ListEntityTypesResponse, EntityType> response = entityTypesClient.ListEntityTypes(parent, languageCode: languageCode);
// Iterate over all response items, lazily performing RPCs as required
foreach (EntityType 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 (ListEntityTypesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (EntityType 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<EntityType> 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 (EntityType 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;
ListEntityTypesAsync(AgentName, string, int?, CallSettings)
Returns the list of all entity types in the specified agent.
Declaration
public virtual PagedAsyncEnumerable<ListEntityTypesResponse, EntityType> ListEntityTypesAsync(AgentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to list all entity types from.
Format: |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | 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 |
---|---|
PagedAsyncEnumerable<ListEntityTypesResponse, EntityType> | A pageable asynchronous sequence of EntityType resources. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
// Make the request
PagedAsyncEnumerable<ListEntityTypesResponse, EntityType> response = entityTypesClient.ListEntityTypesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((EntityType 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((ListEntityTypesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (EntityType 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<EntityType> 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 (EntityType 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;
ListEntityTypesAsync(AgentName, string, string, int?, CallSettings)
Returns the list of all entity types in the specified agent.
Declaration
public virtual PagedAsyncEnumerable<ListEntityTypesResponse, EntityType> ListEntityTypesAsync(AgentName parent, string languageCode, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to list all entity types from.
Format: |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | 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 |
---|---|
PagedAsyncEnumerable<ListEntityTypesResponse, EntityType> | A pageable asynchronous sequence of EntityType resources. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProject("[PROJECT]");
string languageCode = "";
// Make the request
PagedAsyncEnumerable<ListEntityTypesResponse, EntityType> response = entityTypesClient.ListEntityTypesAsync(parent, languageCode: languageCode);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((EntityType 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((ListEntityTypesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (EntityType 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<EntityType> 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 (EntityType 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;
ListEntityTypesAsync(ListEntityTypesRequest, CallSettings)
Returns the list of all entity types in the specified agent.
Declaration
public virtual PagedAsyncEnumerable<ListEntityTypesResponse, EntityType> ListEntityTypesAsync(ListEntityTypesRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListEntityTypesRequest | request | 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 |
---|---|
PagedAsyncEnumerable<ListEntityTypesResponse, EntityType> | A pageable asynchronous sequence of EntityType resources. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
ListEntityTypesRequest request = new ListEntityTypesRequest
{
ParentAsAgentName = AgentName.FromProject("[PROJECT]"),
LanguageCode = "",
};
// Make the request
PagedAsyncEnumerable<ListEntityTypesResponse, EntityType> response = entityTypesClient.ListEntityTypesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((EntityType 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((ListEntityTypesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (EntityType 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<EntityType> 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 (EntityType 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;
ListEntityTypesAsync(string, string, int?, CallSettings)
Returns the list of all entity types in the specified agent.
Declaration
public virtual PagedAsyncEnumerable<ListEntityTypesResponse, EntityType> ListEntityTypesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to list all entity types from.
Format: |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | 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 |
---|---|
PagedAsyncEnumerable<ListEntityTypesResponse, EntityType> | A pageable asynchronous sequence of EntityType resources. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
// Make the request
PagedAsyncEnumerable<ListEntityTypesResponse, EntityType> response = entityTypesClient.ListEntityTypesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((EntityType 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((ListEntityTypesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (EntityType 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<EntityType> 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 (EntityType 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;
ListEntityTypesAsync(string, string, string, int?, CallSettings)
Returns the list of all entity types in the specified agent.
Declaration
public virtual PagedAsyncEnumerable<ListEntityTypesResponse, EntityType> ListEntityTypesAsync(string parent, string languageCode, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to list all entity types from.
Format: |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | 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 |
---|---|
PagedAsyncEnumerable<ListEntityTypesResponse, EntityType> | A pageable asynchronous sequence of EntityType resources. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
string languageCode = "";
// Make the request
PagedAsyncEnumerable<ListEntityTypesResponse, EntityType> response = entityTypesClient.ListEntityTypesAsync(parent, languageCode: languageCode);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((EntityType 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((ListEntityTypesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (EntityType 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<EntityType> 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 (EntityType 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;
PollOnceBatchCreateEntities(string, CallSettings)
Poll an operation once, using an operationName
from a previous invocation of BatchCreateEntities
.
Declaration
public virtual Operation<Empty, Struct> PollOnceBatchCreateEntities(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, Struct> | The result of polling the operation. |
PollOnceBatchCreateEntitiesAsync(string, CallSettings)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
BatchCreateEntities
.
Declaration
public virtual Task<Operation<Empty, Struct>> PollOnceBatchCreateEntitiesAsync(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A task representing the result of polling the operation. |
PollOnceBatchDeleteEntities(string, CallSettings)
Poll an operation once, using an operationName
from a previous invocation of BatchDeleteEntities
.
Declaration
public virtual Operation<Empty, Struct> PollOnceBatchDeleteEntities(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, Struct> | The result of polling the operation. |
PollOnceBatchDeleteEntitiesAsync(string, CallSettings)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
BatchDeleteEntities
.
Declaration
public virtual Task<Operation<Empty, Struct>> PollOnceBatchDeleteEntitiesAsync(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A task representing the result of polling the operation. |
PollOnceBatchDeleteEntityTypes(string, CallSettings)
Poll an operation once, using an operationName
from a previous invocation of
BatchDeleteEntityTypes
.
Declaration
public virtual Operation<Empty, Struct> PollOnceBatchDeleteEntityTypes(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, Struct> | The result of polling the operation. |
PollOnceBatchDeleteEntityTypesAsync(string, CallSettings)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
BatchDeleteEntityTypes
.
Declaration
public virtual Task<Operation<Empty, Struct>> PollOnceBatchDeleteEntityTypesAsync(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A task representing the result of polling the operation. |
PollOnceBatchUpdateEntities(string, CallSettings)
Poll an operation once, using an operationName
from a previous invocation of BatchUpdateEntities
.
Declaration
public virtual Operation<Empty, Struct> PollOnceBatchUpdateEntities(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, Struct> | The result of polling the operation. |
PollOnceBatchUpdateEntitiesAsync(string, CallSettings)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
BatchUpdateEntities
.
Declaration
public virtual Task<Operation<Empty, Struct>> PollOnceBatchUpdateEntitiesAsync(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, Struct>> | A task representing the result of polling the operation. |
PollOnceBatchUpdateEntityTypes(string, CallSettings)
Poll an operation once, using an operationName
from a previous invocation of
BatchUpdateEntityTypes
.
Declaration
public virtual Operation<BatchUpdateEntityTypesResponse, Struct> PollOnceBatchUpdateEntityTypes(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<BatchUpdateEntityTypesResponse, Struct> | The result of polling the operation. |
PollOnceBatchUpdateEntityTypesAsync(string, CallSettings)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
BatchUpdateEntityTypes
.
Declaration
public virtual Task<Operation<BatchUpdateEntityTypesResponse, Struct>> PollOnceBatchUpdateEntityTypesAsync(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<BatchUpdateEntityTypesResponse, Struct>> | A task representing the result of polling the operation. |
ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Declaration
public static Task ShutdownDefaultChannelsAsync()
Returns
Type | Description |
---|---|
Task | A task representing the asynchronous shutdown operation. |
Remarks
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.
UpdateEntityType(EntityType, CallSettings)
Updates the specified entity type.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual EntityType UpdateEntityType(EntityType entityType, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
EntityType | entityType | Required. The entity type to update. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
EntityType | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
EntityType entityType = new EntityType();
// Make the request
EntityType response = entityTypesClient.UpdateEntityType(entityType);
UpdateEntityType(EntityType, string, CallSettings)
Updates the specified entity type.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual EntityType UpdateEntityType(EntityType entityType, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
EntityType | entityType | Required. The entity type to update. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
EntityType | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
EntityType entityType = new EntityType();
string languageCode = "";
// Make the request
EntityType response = entityTypesClient.UpdateEntityType(entityType, languageCode);
UpdateEntityType(UpdateEntityTypeRequest, CallSettings)
Updates the specified entity type.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual EntityType UpdateEntityType(UpdateEntityTypeRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateEntityTypeRequest | request | 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 |
---|---|
EntityType | The RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = EntityTypesClient.Create();
// Initialize request argument(s)
UpdateEntityTypeRequest request = new UpdateEntityTypeRequest
{
EntityType = new EntityType(),
LanguageCode = "",
UpdateMask = new FieldMask(),
};
// Make the request
EntityType response = entityTypesClient.UpdateEntityType(request);
UpdateEntityTypeAsync(EntityType, CallSettings)
Updates the specified entity type.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<EntityType> UpdateEntityTypeAsync(EntityType entityType, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
EntityType | entityType | Required. The entity type to update. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
EntityType entityType = new EntityType();
// Make the request
EntityType response = await entityTypesClient.UpdateEntityTypeAsync(entityType);
UpdateEntityTypeAsync(EntityType, string, CallSettings)
Updates the specified entity type.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<EntityType> UpdateEntityTypeAsync(EntityType entityType, string languageCode, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
EntityType | entityType | Required. The entity type to update. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
EntityType entityType = new EntityType();
string languageCode = "";
// Make the request
EntityType response = await entityTypesClient.UpdateEntityTypeAsync(entityType, languageCode);
UpdateEntityTypeAsync(EntityType, string, CancellationToken)
Updates the specified entity type.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<EntityType> UpdateEntityTypeAsync(EntityType entityType, string languageCode, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
EntityType | entityType | Required. The entity type to update. |
string | languageCode | Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see Multilingual intent and entity data. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
EntityType entityType = new EntityType();
string languageCode = "";
// Make the request
EntityType response = await entityTypesClient.UpdateEntityTypeAsync(entityType, languageCode);
UpdateEntityTypeAsync(EntityType, CancellationToken)
Updates the specified entity type.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<EntityType> UpdateEntityTypeAsync(EntityType entityType, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
EntityType | entityType | Required. The entity type to update. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
EntityType entityType = new EntityType();
// Make the request
EntityType response = await entityTypesClient.UpdateEntityTypeAsync(entityType);
UpdateEntityTypeAsync(UpdateEntityTypeRequest, CallSettings)
Updates the specified entity type.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<EntityType> UpdateEntityTypeAsync(UpdateEntityTypeRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateEntityTypeRequest | request | 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 |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
UpdateEntityTypeRequest request = new UpdateEntityTypeRequest
{
EntityType = new EntityType(),
LanguageCode = "",
UpdateMask = new FieldMask(),
};
// Make the request
EntityType response = await entityTypesClient.UpdateEntityTypeAsync(request);
UpdateEntityTypeAsync(UpdateEntityTypeRequest, CancellationToken)
Updates the specified entity type.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Declaration
public virtual Task<EntityType> UpdateEntityTypeAsync(UpdateEntityTypeRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
UpdateEntityTypeRequest | request | The request object containing all of the parameters for the API call. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<EntityType> | A Task containing the RPC response. |
Sample code
// Create client
EntityTypesClient entityTypesClient = await EntityTypesClient.CreateAsync();
// Initialize request argument(s)
UpdateEntityTypeRequest request = new UpdateEntityTypeRequest
{
EntityType = new EntityType(),
LanguageCode = "",
UpdateMask = new FieldMask(),
};
// Make the request
EntityType response = await entityTypesClient.UpdateEntityTypeAsync(request);