Google Cloud Dialogflow v2beta1 API - Class EntityTypesClient (1.0.0-beta16)

public abstract class EntityTypesClient

Reference documentation and code samples for the Google Cloud Dialogflow v2beta1 API class EntityTypesClient.

EntityTypes client wrapper, for convenient use.

Inheritance

object > EntityTypesClient

Derived Types

Namespace

Google.Cloud.Dialogflow.V2Beta1

Assembly

Google.Cloud.Dialogflow.V2Beta1.dll

Remarks

Service for managing [EntityTypes][google.cloud.dialogflow.v2beta1.EntityType].

Properties

BatchCreateEntitiesOperationsClient

public virtual OperationsClient BatchCreateEntitiesOperationsClient { get; }

The long-running operations client for BatchCreateEntities.

Property Value
Type Description
OperationsClient

BatchDeleteEntitiesOperationsClient

public virtual OperationsClient BatchDeleteEntitiesOperationsClient { get; }

The long-running operations client for BatchDeleteEntities.

Property Value
Type Description
OperationsClient

BatchDeleteEntityTypesOperationsClient

public virtual OperationsClient BatchDeleteEntityTypesOperationsClient { get; }

The long-running operations client for BatchDeleteEntityTypes.

Property Value
Type Description
OperationsClient

BatchUpdateEntitiesOperationsClient

public virtual OperationsClient BatchUpdateEntitiesOperationsClient { get; }

The long-running operations client for BatchUpdateEntities.

Property Value
Type Description
OperationsClient

BatchUpdateEntityTypesOperationsClient

public virtual OperationsClient BatchUpdateEntityTypesOperationsClient { get; }

The long-running operations client for BatchUpdateEntityTypes.

Property Value
Type Description
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default EntityTypes scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

GrpcClient

public virtual EntityTypes.EntityTypesClient GrpcClient { get; }

The underlying gRPC EntityTypes client

Property Value
Type Description
EntityTypesEntityTypesClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

BatchCreateEntities(BatchCreateEntitiesRequest, CallSettings)

public virtual Operation<Empty, Struct> BatchCreateEntities(BatchCreateEntitiesRequest request, CallSettings callSettings = null)

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:

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
request BatchCreateEntitiesRequest

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
OperationEmptyStruct

The RPC response.

Example
// 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)

public virtual Operation<Empty, Struct> BatchCreateEntities(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, CallSettings callSettings = null)

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:

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent EntityTypeName

Required. The name of the entity type to create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyStruct

The RPC response.

Example
// 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)

public virtual Operation<Empty, Struct> BatchCreateEntities(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CallSettings callSettings = null)

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:

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent EntityTypeName

Required. The name of the entity type to create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to create.

languageCode string

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
OperationEmptyStruct

The RPC response.

Example
// 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)

public virtual Operation<Empty, Struct> BatchCreateEntities(string parent, IEnumerable<EntityType.Types.Entity> entities, CallSettings callSettings = null)

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:

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent string

Required. The name of the entity type to create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyStruct

The RPC response.

Example
// 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)

public virtual Operation<Empty, Struct> BatchCreateEntities(string parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CallSettings callSettings = null)

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:

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent string

Required. The name of the entity type to create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to create.

languageCode string

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
OperationEmptyStruct

The RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchCreateEntitiesAsync(BatchCreateEntitiesRequest request, CallSettings callSettings = null)

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:

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
request BatchCreateEntitiesRequest

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
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchCreateEntitiesAsync(BatchCreateEntitiesRequest request, CancellationToken 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:

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
request BatchCreateEntitiesRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchCreateEntitiesAsync(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, CallSettings callSettings = null)

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:

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent EntityTypeName

Required. The name of the entity type to create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchCreateEntitiesAsync(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CallSettings callSettings = null)

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:

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent EntityTypeName

Required. The name of the entity type to create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to create.

languageCode string

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
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchCreateEntitiesAsync(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CancellationToken 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:

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent EntityTypeName

Required. The name of the entity type to create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to create.

languageCode string

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
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchCreateEntitiesAsync(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, CancellationToken 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:

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent EntityTypeName

Required. The name of the entity type to create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchCreateEntitiesAsync(string parent, IEnumerable<EntityType.Types.Entity> entities, CallSettings callSettings = null)

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:

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent string

Required. The name of the entity type to create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchCreateEntitiesAsync(string parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CallSettings callSettings = null)

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:

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent string

Required. The name of the entity type to create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to create.

languageCode string

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
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchCreateEntitiesAsync(string parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CancellationToken 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:

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent string

Required. The name of the entity type to create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to create.

languageCode string

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
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchCreateEntitiesAsync(string parent, IEnumerable<EntityType.Types.Entity> entities, CancellationToken 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:

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent string

Required. The name of the entity type to create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Operation<Empty, Struct> BatchDeleteEntities(BatchDeleteEntitiesRequest request, CallSettings callSettings = null)

Deletes entities in the specified entity type.

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

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
request BatchDeleteEntitiesRequest

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
OperationEmptyStruct

The RPC response.

Example
// 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)

public virtual Operation<Empty, Struct> BatchDeleteEntities(EntityTypeName parent, IEnumerable<string> entityValues, CallSettings callSettings = null)

Deletes entities in the specified entity type.

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

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent EntityTypeName

Required. The name of the entity type to delete entries for. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entityValues IEnumerablestring

Required. The reference values of the entities to delete. Note that these are not fully-qualified names, i.e. they don't start with projects/<Project ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyStruct

The RPC response.

Example
// 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)

public virtual Operation<Empty, Struct> BatchDeleteEntities(EntityTypeName parent, IEnumerable<string> entityValues, string languageCode, CallSettings callSettings = null)

Deletes entities in the specified entity type.

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

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent EntityTypeName

Required. The name of the entity type to delete entries for. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entityValues IEnumerablestring

Required. The reference values of the entities to delete. Note that these are not fully-qualified names, i.e. they don't start with projects/<Project ID>.

languageCode string

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
OperationEmptyStruct

The RPC response.

Example
// 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)

public virtual Operation<Empty, Struct> BatchDeleteEntities(string parent, IEnumerable<string> entityValues, CallSettings callSettings = null)

Deletes entities in the specified entity type.

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

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent string

Required. The name of the entity type to delete entries for. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entityValues IEnumerablestring

Required. The reference values of the entities to delete. Note that these are not fully-qualified names, i.e. they don't start with projects/<Project ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyStruct

The RPC response.

Example
// 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)

public virtual Operation<Empty, Struct> BatchDeleteEntities(string parent, IEnumerable<string> entityValues, string languageCode, CallSettings callSettings = null)

Deletes entities in the specified entity type.

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

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent string

Required. The name of the entity type to delete entries for. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entityValues IEnumerablestring

Required. The reference values of the entities to delete. Note that these are not fully-qualified names, i.e. they don't start with projects/<Project ID>.

languageCode string

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
OperationEmptyStruct

The RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchDeleteEntitiesAsync(BatchDeleteEntitiesRequest request, CallSettings callSettings = null)

Deletes entities in the specified entity type.

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

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
request BatchDeleteEntitiesRequest

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
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchDeleteEntitiesAsync(BatchDeleteEntitiesRequest request, CancellationToken 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:

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
request BatchDeleteEntitiesRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchDeleteEntitiesAsync(EntityTypeName parent, IEnumerable<string> entityValues, CallSettings callSettings = null)

Deletes entities in the specified entity type.

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

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent EntityTypeName

Required. The name of the entity type to delete entries for. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entityValues IEnumerablestring

Required. The reference values of the entities to delete. Note that these are not fully-qualified names, i.e. they don't start with projects/<Project ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchDeleteEntitiesAsync(EntityTypeName parent, IEnumerable<string> entityValues, string languageCode, CallSettings callSettings = null)

Deletes entities in the specified entity type.

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

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent EntityTypeName

Required. The name of the entity type to delete entries for. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entityValues IEnumerablestring

Required. The reference values of the entities to delete. Note that these are not fully-qualified names, i.e. they don't start with projects/<Project ID>.

languageCode string

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
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchDeleteEntitiesAsync(EntityTypeName parent, IEnumerable<string> entityValues, string languageCode, CancellationToken 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:

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent EntityTypeName

Required. The name of the entity type to delete entries for. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entityValues IEnumerablestring

Required. The reference values of the entities to delete. Note that these are not fully-qualified names, i.e. they don't start with projects/<Project ID>.

languageCode string

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
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchDeleteEntitiesAsync(EntityTypeName parent, IEnumerable<string> entityValues, CancellationToken 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:

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent EntityTypeName

Required. The name of the entity type to delete entries for. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entityValues IEnumerablestring

Required. The reference values of the entities to delete. Note that these are not fully-qualified names, i.e. they don't start with projects/<Project ID>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchDeleteEntitiesAsync(string parent, IEnumerable<string> entityValues, CallSettings callSettings = null)

Deletes entities in the specified entity type.

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

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent string

Required. The name of the entity type to delete entries for. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entityValues IEnumerablestring

Required. The reference values of the entities to delete. Note that these are not fully-qualified names, i.e. they don't start with projects/<Project ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchDeleteEntitiesAsync(string parent, IEnumerable<string> entityValues, string languageCode, CallSettings callSettings = null)

Deletes entities in the specified entity type.

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

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent string

Required. The name of the entity type to delete entries for. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entityValues IEnumerablestring

Required. The reference values of the entities to delete. Note that these are not fully-qualified names, i.e. they don't start with projects/<Project ID>.

languageCode string

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
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchDeleteEntitiesAsync(string parent, IEnumerable<string> entityValues, string languageCode, CancellationToken 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:

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent string

Required. The name of the entity type to delete entries for. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entityValues IEnumerablestring

Required. The reference values of the entities to delete. Note that these are not fully-qualified names, i.e. they don't start with projects/<Project ID>.

languageCode string

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
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchDeleteEntitiesAsync(string parent, IEnumerable<string> entityValues, CancellationToken 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:

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent string

Required. The name of the entity type to delete entries for. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entityValues IEnumerablestring

Required. The reference values of the entities to delete. Note that these are not fully-qualified names, i.e. they don't start with projects/<Project ID>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Operation<Empty, Struct> BatchDeleteEntityTypes(AgentName parent, IEnumerable<string> entityTypeNames, CallSettings callSettings = null)

Deletes entity types in the specified agent.

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

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent AgentName

Required. The name of the agent to delete all entities types for. Supported formats:

  • projects/<Project ID>/agent,
  • projects/<Project ID>/locations/<Location ID>/agent.
entityTypeNames IEnumerablestring

Required. The names entity types to delete. All names must point to the same agent as parent.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyStruct

The RPC response.

Example
// 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)

public virtual Operation<Empty, Struct> BatchDeleteEntityTypes(BatchDeleteEntityTypesRequest request, CallSettings callSettings = null)

Deletes entity types in the specified agent.

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

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
request BatchDeleteEntityTypesRequest

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
OperationEmptyStruct

The RPC response.

Example
// 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)

public virtual Operation<Empty, Struct> BatchDeleteEntityTypes(string parent, IEnumerable<string> entityTypeNames, CallSettings callSettings = null)

Deletes entity types in the specified agent.

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

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent string

Required. The name of the agent to delete all entities types for. Supported formats:

  • projects/<Project ID>/agent,
  • projects/<Project ID>/locations/<Location ID>/agent.
entityTypeNames IEnumerablestring

Required. The names entity types to delete. All names must point to the same agent as parent.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyStruct

The RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchDeleteEntityTypesAsync(AgentName parent, IEnumerable<string> entityTypeNames, CallSettings callSettings = null)

Deletes entity types in the specified agent.

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

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent AgentName

Required. The name of the agent to delete all entities types for. Supported formats:

  • projects/<Project ID>/agent,
  • projects/<Project ID>/locations/<Location ID>/agent.
entityTypeNames IEnumerablestring

Required. The names entity types to delete. All names must point to the same agent as parent.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchDeleteEntityTypesAsync(AgentName parent, IEnumerable<string> entityTypeNames, CancellationToken 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:

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent AgentName

Required. The name of the agent to delete all entities types for. Supported formats:

  • projects/<Project ID>/agent,
  • projects/<Project ID>/locations/<Location ID>/agent.
entityTypeNames IEnumerablestring

Required. The names entity types to delete. All names must point to the same agent as parent.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchDeleteEntityTypesAsync(BatchDeleteEntityTypesRequest request, CallSettings callSettings = null)

Deletes entity types in the specified agent.

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

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
request BatchDeleteEntityTypesRequest

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
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchDeleteEntityTypesAsync(BatchDeleteEntityTypesRequest request, CancellationToken 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:

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
request BatchDeleteEntityTypesRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchDeleteEntityTypesAsync(string parent, IEnumerable<string> entityTypeNames, CallSettings callSettings = null)

Deletes entity types in the specified agent.

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

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent string

Required. The name of the agent to delete all entities types for. Supported formats:

  • projects/<Project ID>/agent,
  • projects/<Project ID>/locations/<Location ID>/agent.
entityTypeNames IEnumerablestring

Required. The names entity types to delete. All names must point to the same agent as parent.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchDeleteEntityTypesAsync(string parent, IEnumerable<string> entityTypeNames, CancellationToken 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:

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent string

Required. The name of the agent to delete all entities types for. Supported formats:

  • projects/<Project ID>/agent,
  • projects/<Project ID>/locations/<Location ID>/agent.
entityTypeNames IEnumerablestring

Required. The names entity types to delete. All names must point to the same agent as parent.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Operation<Empty, Struct> BatchUpdateEntities(BatchUpdateEntitiesRequest request, CallSettings callSettings = null)

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.

Note: You should always train an agent prior to sending it queries. See the training documentation.

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

Parameters
Name Description
request BatchUpdateEntitiesRequest

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
OperationEmptyStruct

The RPC response.

Example
// 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)

public virtual Operation<Empty, Struct> BatchUpdateEntities(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, CallSettings callSettings = null)

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.

Note: You should always train an agent prior to sending it queries. See the training documentation.

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

Parameters
Name Description
parent EntityTypeName

Required. The name of the entity type to update or create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to update or create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyStruct

The RPC response.

Example
// 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)

public virtual Operation<Empty, Struct> BatchUpdateEntities(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CallSettings callSettings = null)

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.

Note: You should always train an agent prior to sending it queries. See the training documentation.

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

Parameters
Name Description
parent EntityTypeName

Required. The name of the entity type to update or create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to update or create.

languageCode string

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
OperationEmptyStruct

The RPC response.

Example
// 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)

public virtual Operation<Empty, Struct> BatchUpdateEntities(string parent, IEnumerable<EntityType.Types.Entity> entities, CallSettings callSettings = null)

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.

Note: You should always train an agent prior to sending it queries. See the training documentation.

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

Parameters
Name Description
parent string

Required. The name of the entity type to update or create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to update or create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyStruct

The RPC response.

Example
// 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)

public virtual Operation<Empty, Struct> BatchUpdateEntities(string parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CallSettings callSettings = null)

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.

Note: You should always train an agent prior to sending it queries. See the training documentation.

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

Parameters
Name Description
parent string

Required. The name of the entity type to update or create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to update or create.

languageCode string

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
OperationEmptyStruct

The RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchUpdateEntitiesAsync(BatchUpdateEntitiesRequest request, CallSettings callSettings = null)

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.

Note: You should always train an agent prior to sending it queries. See the training documentation.

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

Parameters
Name Description
request BatchUpdateEntitiesRequest

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
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchUpdateEntitiesAsync(BatchUpdateEntitiesRequest request, CancellationToken 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.

Note: You should always train an agent prior to sending it queries. See the training documentation.

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

Parameters
Name Description
request BatchUpdateEntitiesRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchUpdateEntitiesAsync(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, CallSettings callSettings = null)

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.

Note: You should always train an agent prior to sending it queries. See the training documentation.

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

Parameters
Name Description
parent EntityTypeName

Required. The name of the entity type to update or create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to update or create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchUpdateEntitiesAsync(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CallSettings callSettings = null)

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.

Note: You should always train an agent prior to sending it queries. See the training documentation.

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

Parameters
Name Description
parent EntityTypeName

Required. The name of the entity type to update or create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to update or create.

languageCode string

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
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchUpdateEntitiesAsync(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CancellationToken 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.

Note: You should always train an agent prior to sending it queries. See the training documentation.

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

Parameters
Name Description
parent EntityTypeName

Required. The name of the entity type to update or create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to update or create.

languageCode string

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
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchUpdateEntitiesAsync(EntityTypeName parent, IEnumerable<EntityType.Types.Entity> entities, CancellationToken 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.

Note: You should always train an agent prior to sending it queries. See the training documentation.

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

Parameters
Name Description
parent EntityTypeName

Required. The name of the entity type to update or create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to update or create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchUpdateEntitiesAsync(string parent, IEnumerable<EntityType.Types.Entity> entities, CallSettings callSettings = null)

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.

Note: You should always train an agent prior to sending it queries. See the training documentation.

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

Parameters
Name Description
parent string

Required. The name of the entity type to update or create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to update or create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchUpdateEntitiesAsync(string parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CallSettings callSettings = null)

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.

Note: You should always train an agent prior to sending it queries. See the training documentation.

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

Parameters
Name Description
parent string

Required. The name of the entity type to update or create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to update or create.

languageCode string

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
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchUpdateEntitiesAsync(string parent, IEnumerable<EntityType.Types.Entity> entities, string languageCode, CancellationToken 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.

Note: You should always train an agent prior to sending it queries. See the training documentation.

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

Parameters
Name Description
parent string

Required. The name of the entity type to update or create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to update or create.

languageCode string

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
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<Empty, Struct>> BatchUpdateEntitiesAsync(string parent, IEnumerable<EntityType.Types.Entity> entities, CancellationToken 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.

Note: You should always train an agent prior to sending it queries. See the training documentation.

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

Parameters
Name Description
parent string

Required. The name of the entity type to update or create entities in. Supported formats:

  • projects/<Project ID>/agent/entityTypes/<Entity Type ID>
  • projects/<Project ID>/locations/<Location ID>/agent/entityTypes/<Entity Type ID>
entities IEnumerableEntityTypeTypesEntity

Required. The entities to update or create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyStruct

A Task containing the RPC response.

Example
// 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)

public virtual Operation<BatchUpdateEntityTypesResponse, Struct> BatchUpdateEntityTypes(BatchUpdateEntityTypesRequest request, CallSettings callSettings = null)

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 message
  • response: [BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse]

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
request BatchUpdateEntityTypesRequest

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
OperationBatchUpdateEntityTypesResponseStruct

The RPC response.

Example
// 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)

public virtual Task<Operation<BatchUpdateEntityTypesResponse, Struct>> BatchUpdateEntityTypesAsync(BatchUpdateEntityTypesRequest request, CallSettings callSettings = null)

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 message
  • response: [BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse]

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
request BatchUpdateEntityTypesRequest

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
TaskOperationBatchUpdateEntityTypesResponseStruct

A Task containing the RPC response.

Example
// 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)

public virtual Task<Operation<BatchUpdateEntityTypesResponse, Struct>> BatchUpdateEntityTypesAsync(BatchUpdateEntityTypesRequest request, CancellationToken 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 message
  • response: [BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse]

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
request BatchUpdateEntityTypesRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBatchUpdateEntityTypesResponseStruct

A Task containing the RPC response.

Example
// 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()

public static EntityTypesClient Create()

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

Returns
Type Description
EntityTypesClient

The created EntityTypesClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskEntityTypesClient

The task representing the created EntityTypesClient.

CreateEntityType(AgentName, EntityType, CallSettings)

public virtual EntityType CreateEntityType(AgentName parent, EntityType entityType, CallSettings callSettings = null)

Creates an entity type in the specified agent.

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent AgentName

Required. The agent to create a entity type for. Supported formats:

  • projects/<Project ID>/agent
  • projects/<Project ID>/locations/<Location ID>/agent
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.

Example
// 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)

public virtual EntityType CreateEntityType(AgentName parent, EntityType entityType, string languageCode, CallSettings callSettings = null)

Creates an entity type in the specified agent.

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent AgentName

Required. The agent to create a entity type for. Supported formats:

  • projects/<Project ID>/agent
  • projects/<Project ID>/locations/<Location ID>/agent
entityType EntityType

Required. The entity type to create.

languageCode string

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.

Example
// 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)

public virtual EntityType CreateEntityType(CreateEntityTypeRequest request, CallSettings callSettings = null)

Creates an entity type in the specified agent.

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
request CreateEntityTypeRequest

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.

Example
// 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)

public virtual EntityType CreateEntityType(string parent, EntityType entityType, CallSettings callSettings = null)

Creates an entity type in the specified agent.

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent string

Required. The agent to create a entity type for. Supported formats:

  • projects/<Project ID>/agent
  • projects/<Project ID>/locations/<Location ID>/agent
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.

Example
// 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)

public virtual EntityType CreateEntityType(string parent, EntityType entityType, string languageCode, CallSettings callSettings = null)

Creates an entity type in the specified agent.

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent string

Required. The agent to create a entity type for. Supported formats:

  • projects/<Project ID>/agent
  • projects/<Project ID>/locations/<Location ID>/agent
entityType EntityType

Required. The entity type to create.

languageCode string

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.

Example
// 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)

public virtual Task<EntityType> CreateEntityTypeAsync(AgentName parent, EntityType entityType, CallSettings callSettings = null)

Creates an entity type in the specified agent.

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent AgentName

Required. The agent to create a entity type for. Supported formats:

  • projects/<Project ID>/agent
  • projects/<Project ID>/locations/<Location ID>/agent
entityType EntityType

Required. The entity type to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskEntityType

A Task containing the RPC response.

Example
// 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)

public virtual Task<EntityType> CreateEntityTypeAsync(AgentName parent, EntityType entityType, string languageCode, CallSettings callSettings = null)

Creates an entity type in the specified agent.

Note: You should always train an agent prior to sending it queries. See the training documentation.

Parameters
Name Description
parent AgentName

Required. The agent to create a entity type for. Supported formats:

  • projects/<Project ID>/agent
  • projects/<Project ID>/locations/<Location ID>/agent
entityType EntityType

Required. The entity type to create.

languageCode string

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
TaskEntityType

A Task containing the RPC response.

Example
// 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)

public virtual Task<EntityType> CreateEntityTypeAsync(AgentName parent, EntityType entityType, string languageCode, CancellationToken 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.

Parameters
Name Description
parent