Google Cloud Speech v1 API - Class AdaptationClient (3.4.0)

public abstract class AdaptationClient

Reference documentation and code samples for the Google Cloud Speech v1 API class AdaptationClient.

Adaptation client wrapper, for convenient use.

Inheritance

object > AdaptationClient

Derived Types

Namespace

GoogleCloudGoogle.Cloud.SpeechV1

Assembly

Google.Cloud.Speech.V1.dll

Remarks

Service that implements Google Cloud Speech Adaptation API.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Adaptation scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

The default Adaptation scopes are:

GrpcClient

public virtual Adaptation.AdaptationClient GrpcClient { get; }

The underlying gRPC Adaptation client

Property Value
TypeDescription
AdaptationAdaptationClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

Create()

public static AdaptationClient Create()

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

Returns
TypeDescription
AdaptationClient

The created AdaptationClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskAdaptationClient

The task representing the created AdaptationClient.

CreateCustomClass(LocationName, CustomClass, string, CallSettings)

public virtual CustomClass CreateCustomClass(LocationName parent, CustomClass customClass, string customClassId, CallSettings callSettings = null)

Create a custom class.

Parameters
NameDescription
parentLocationName

Required. The parent resource where this custom class will be created. Format:

projects/{project}/locations/{location}/customClasses

Speech-to-Text supports three locations: global, us (US North America), and eu (Europe). If you are calling the speech.googleapis.com endpoint, use the global location. To specify a region, use a regional endpoint with matching us or eu location value.

customClassCustomClass

Required. The custom class to create.

customClassIdstring

Required. The ID to use for the custom class, which will become the final component of the custom class' resource name.

This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CustomClass

The RPC response.

Example
// Create client
AdaptationClient adaptationClient = AdaptationClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
CustomClass customClass = new CustomClass();
string customClassId = "";
// Make the request
CustomClass response = adaptationClient.CreateCustomClass(parent, customClass, customClassId);

CreateCustomClass(CreateCustomClassRequest, CallSettings)

public virtual CustomClass CreateCustomClass(CreateCustomClassRequest request, CallSettings callSettings = null)

Create a custom class.

Parameters
NameDescription
requestCreateCustomClassRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CustomClass

The RPC response.

Example
// Create client
AdaptationClient adaptationClient = AdaptationClient.Create();
// Initialize request argument(s)
CreateCustomClassRequest request = new CreateCustomClassRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    CustomClassId = "",
    CustomClass = new CustomClass(),
};
// Make the request
CustomClass response = adaptationClient.CreateCustomClass(request);

CreateCustomClass(string, CustomClass, string, CallSettings)

public virtual CustomClass CreateCustomClass(string parent, CustomClass customClass, string customClassId, CallSettings callSettings = null)

Create a custom class.

Parameters
NameDescription
parentstring

Required. The parent resource where this custom class will be created. Format:

projects/{project}/locations/{location}/customClasses

Speech-to-Text supports three locations: global, us (US North America), and eu (Europe). If you are calling the speech.googleapis.com endpoint, use the global location. To specify a region, use a regional endpoint with matching us or eu location value.

customClassCustomClass

Required. The custom class to create.

customClassIdstring

Required. The ID to use for the custom class, which will become the final component of the custom class' resource name.

This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CustomClass

The RPC response.

Example
// Create client
AdaptationClient adaptationClient = AdaptationClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
CustomClass customClass = new CustomClass();
string customClassId = "";
// Make the request
CustomClass response = adaptationClient.CreateCustomClass(parent, customClass, customClassId);

CreateCustomClassAsync(LocationName, CustomClass, string, CallSettings)

public virtual Task<CustomClass> CreateCustomClassAsync(LocationName parent, CustomClass customClass, string customClassId, CallSettings callSettings = null)

Create a custom class.

Parameters
NameDescription
parentLocationName

Required. The parent resource where this custom class will be created. Format:

projects/{project}/locations/{location}/customClasses

Speech-to-Text supports three locations: global, us (US North America), and eu (Europe). If you are calling the speech.googleapis.com endpoint, use the global location. To specify a region, use a regional endpoint with matching us or eu location value.

customClassCustomClass

Required. The custom class to create.

customClassIdstring

Required. The ID to use for the custom class, which will become the final component of the custom class' resource name.

This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskCustomClass

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
CustomClass customClass = new CustomClass();
string customClassId = "";
// Make the request
CustomClass response = await adaptationClient.CreateCustomClassAsync(parent, customClass, customClassId);

CreateCustomClassAsync(LocationName, CustomClass, string, CancellationToken)

public virtual Task<CustomClass> CreateCustomClassAsync(LocationName parent, CustomClass customClass, string customClassId, CancellationToken cancellationToken)

Create a custom class.

Parameters
NameDescription
parentLocationName

Required. The parent resource where this custom class will be created. Format:

projects/{project}/locations/{location}/customClasses

Speech-to-Text supports three locations: global, us (US North America), and eu (Europe). If you are calling the speech.googleapis.com endpoint, use the global location. To specify a region, use a regional endpoint with matching us or eu location value.

customClassCustomClass

Required. The custom class to create.

customClassIdstring

Required. The ID to use for the custom class, which will become the final component of the custom class' resource name.

This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskCustomClass

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
CustomClass customClass = new CustomClass();
string customClassId = "";
// Make the request
CustomClass response = await adaptationClient.CreateCustomClassAsync(parent, customClass, customClassId);

CreateCustomClassAsync(CreateCustomClassRequest, CallSettings)

public virtual Task<CustomClass> CreateCustomClassAsync(CreateCustomClassRequest request, CallSettings callSettings = null)

Create a custom class.

Parameters
NameDescription
requestCreateCustomClassRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskCustomClass

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
CreateCustomClassRequest request = new CreateCustomClassRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    CustomClassId = "",
    CustomClass = new CustomClass(),
};
// Make the request
CustomClass response = await adaptationClient.CreateCustomClassAsync(request);

CreateCustomClassAsync(CreateCustomClassRequest, CancellationToken)

public virtual Task<CustomClass> CreateCustomClassAsync(CreateCustomClassRequest request, CancellationToken cancellationToken)

Create a custom class.

Parameters
NameDescription
requestCreateCustomClassRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskCustomClass

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
CreateCustomClassRequest request = new CreateCustomClassRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    CustomClassId = "",
    CustomClass = new CustomClass(),
};
// Make the request
CustomClass response = await adaptationClient.CreateCustomClassAsync(request);

CreateCustomClassAsync(string, CustomClass, string, CallSettings)

public virtual Task<CustomClass> CreateCustomClassAsync(string parent, CustomClass customClass, string customClassId, CallSettings callSettings = null)

Create a custom class.

Parameters
NameDescription
parentstring

Required. The parent resource where this custom class will be created. Format:

projects/{project}/locations/{location}/customClasses

Speech-to-Text supports three locations: global, us (US North America), and eu (Europe). If you are calling the speech.googleapis.com endpoint, use the global location. To specify a region, use a regional endpoint with matching us or eu location value.

customClassCustomClass

Required. The custom class to create.

customClassIdstring

Required. The ID to use for the custom class, which will become the final component of the custom class' resource name.

This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskCustomClass

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
CustomClass customClass = new CustomClass();
string customClassId = "";
// Make the request
CustomClass response = await adaptationClient.CreateCustomClassAsync(parent, customClass, customClassId);

CreateCustomClassAsync(string, CustomClass, string, CancellationToken)

public virtual Task<CustomClass> CreateCustomClassAsync(string parent, CustomClass customClass, string customClassId, CancellationToken cancellationToken)

Create a custom class.

Parameters
NameDescription
parentstring

Required. The parent resource where this custom class will be created. Format:

projects/{project}/locations/{location}/customClasses

Speech-to-Text supports three locations: global, us (US North America), and eu (Europe). If you are calling the speech.googleapis.com endpoint, use the global location. To specify a region, use a regional endpoint with matching us or eu location value.

customClassCustomClass

Required. The custom class to create.

customClassIdstring

Required. The ID to use for the custom class, which will become the final component of the custom class' resource name.

This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskCustomClass

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
CustomClass customClass = new CustomClass();
string customClassId = "";
// Make the request
CustomClass response = await adaptationClient.CreateCustomClassAsync(parent, customClass, customClassId);

CreatePhraseSet(LocationName, PhraseSet, string, CallSettings)

public virtual PhraseSet CreatePhraseSet(LocationName parent, PhraseSet phraseSet, string phraseSetId, CallSettings callSettings = null)

Create a set of phrase hints. Each item in the set can be a single word or a multi-word phrase. The items in the PhraseSet are favored by the recognition model when you send a call that includes the PhraseSet.

Parameters
NameDescription
parentLocationName

Required. The parent resource where this phrase set will be created. Format:

projects/{project}/locations/{location}/phraseSets

Speech-to-Text supports three locations: global, us (US North America), and eu (Europe). If you are calling the speech.googleapis.com endpoint, use the global location. To specify a region, use a regional endpoint with matching us or eu location value.

phraseSetPhraseSet

Required. The phrase set to create.

phraseSetIdstring

Required. The ID to use for the phrase set, which will become the final component of the phrase set's resource name.

This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PhraseSet

The RPC response.

Example
// Create client
AdaptationClient adaptationClient = AdaptationClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
PhraseSet phraseSet = new PhraseSet();
string phraseSetId = "";
// Make the request
PhraseSet response = adaptationClient.CreatePhraseSet(parent, phraseSet, phraseSetId);

CreatePhraseSet(CreatePhraseSetRequest, CallSettings)

public virtual PhraseSet CreatePhraseSet(CreatePhraseSetRequest request, CallSettings callSettings = null)

Create a set of phrase hints. Each item in the set can be a single word or a multi-word phrase. The items in the PhraseSet are favored by the recognition model when you send a call that includes the PhraseSet.

Parameters
NameDescription
requestCreatePhraseSetRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PhraseSet

The RPC response.

Example
// Create client
AdaptationClient adaptationClient = AdaptationClient.Create();
// Initialize request argument(s)
CreatePhraseSetRequest request = new CreatePhraseSetRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    PhraseSetId = "",
    PhraseSet = new PhraseSet(),
};
// Make the request
PhraseSet response = adaptationClient.CreatePhraseSet(request);

CreatePhraseSet(string, PhraseSet, string, CallSettings)

public virtual PhraseSet CreatePhraseSet(string parent, PhraseSet phraseSet, string phraseSetId, CallSettings callSettings = null)

Create a set of phrase hints. Each item in the set can be a single word or a multi-word phrase. The items in the PhraseSet are favored by the recognition model when you send a call that includes the PhraseSet.

Parameters
NameDescription
parentstring

Required. The parent resource where this phrase set will be created. Format:

projects/{project}/locations/{location}/phraseSets

Speech-to-Text supports three locations: global, us (US North America), and eu (Europe). If you are calling the speech.googleapis.com endpoint, use the global location. To specify a region, use a regional endpoint with matching us or eu location value.

phraseSetPhraseSet

Required. The phrase set to create.

phraseSetIdstring

Required. The ID to use for the phrase set, which will become the final component of the phrase set's resource name.

This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PhraseSet

The RPC response.

Example
// Create client
AdaptationClient adaptationClient = AdaptationClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
PhraseSet phraseSet = new PhraseSet();
string phraseSetId = "";
// Make the request
PhraseSet response = adaptationClient.CreatePhraseSet(parent, phraseSet, phraseSetId);

CreatePhraseSetAsync(LocationName, PhraseSet, string, CallSettings)

public virtual Task<PhraseSet> CreatePhraseSetAsync(LocationName parent, PhraseSet phraseSet, string phraseSetId, CallSettings callSettings = null)

Create a set of phrase hints. Each item in the set can be a single word or a multi-word phrase. The items in the PhraseSet are favored by the recognition model when you send a call that includes the PhraseSet.

Parameters
NameDescription
parentLocationName

Required. The parent resource where this phrase set will be created. Format:

projects/{project}/locations/{location}/phraseSets

Speech-to-Text supports three locations: global, us (US North America), and eu (Europe). If you are calling the speech.googleapis.com endpoint, use the global location. To specify a region, use a regional endpoint with matching us or eu location value.

phraseSetPhraseSet

Required. The phrase set to create.

phraseSetIdstring

Required. The ID to use for the phrase set, which will become the final component of the phrase set's resource name.

This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPhraseSet

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
PhraseSet phraseSet = new PhraseSet();
string phraseSetId = "";
// Make the request
PhraseSet response = await adaptationClient.CreatePhraseSetAsync(parent, phraseSet, phraseSetId);

CreatePhraseSetAsync(LocationName, PhraseSet, string, CancellationToken)

public virtual Task<PhraseSet> CreatePhraseSetAsync(LocationName parent, PhraseSet phraseSet, string phraseSetId, CancellationToken cancellationToken)

Create a set of phrase hints. Each item in the set can be a single word or a multi-word phrase. The items in the PhraseSet are favored by the recognition model when you send a call that includes the PhraseSet.

Parameters
NameDescription
parentLocationName

Required. The parent resource where this phrase set will be created. Format:

projects/{project}/locations/{location}/phraseSets

Speech-to-Text supports three locations: global, us (US North America), and eu (Europe). If you are calling the speech.googleapis.com endpoint, use the global location. To specify a region, use a regional endpoint with matching us or eu location value.

phraseSetPhraseSet

Required. The phrase set to create.

phraseSetIdstring

Required. The ID to use for the phrase set, which will become the final component of the phrase set's resource name.

This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPhraseSet

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
PhraseSet phraseSet = new PhraseSet();
string phraseSetId = "";
// Make the request
PhraseSet response = await adaptationClient.CreatePhraseSetAsync(parent, phraseSet, phraseSetId);

CreatePhraseSetAsync(CreatePhraseSetRequest, CallSettings)

public virtual Task<PhraseSet> CreatePhraseSetAsync(CreatePhraseSetRequest request, CallSettings callSettings = null)

Create a set of phrase hints. Each item in the set can be a single word or a multi-word phrase. The items in the PhraseSet are favored by the recognition model when you send a call that includes the PhraseSet.

Parameters
NameDescription
requestCreatePhraseSetRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPhraseSet

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
CreatePhraseSetRequest request = new CreatePhraseSetRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    PhraseSetId = "",
    PhraseSet = new PhraseSet(),
};
// Make the request
PhraseSet response = await adaptationClient.CreatePhraseSetAsync(request);

CreatePhraseSetAsync(CreatePhraseSetRequest, CancellationToken)

public virtual Task<PhraseSet> CreatePhraseSetAsync(CreatePhraseSetRequest request, CancellationToken cancellationToken)

Create a set of phrase hints. Each item in the set can be a single word or a multi-word phrase. The items in the PhraseSet are favored by the recognition model when you send a call that includes the PhraseSet.

Parameters
NameDescription
requestCreatePhraseSetRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPhraseSet

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
CreatePhraseSetRequest request = new CreatePhraseSetRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    PhraseSetId = "",
    PhraseSet = new PhraseSet(),
};
// Make the request
PhraseSet response = await adaptationClient.CreatePhraseSetAsync(request);

CreatePhraseSetAsync(string, PhraseSet, string, CallSettings)

public virtual Task<PhraseSet> CreatePhraseSetAsync(string parent, PhraseSet phraseSet, string phraseSetId, CallSettings callSettings = null)

Create a set of phrase hints. Each item in the set can be a single word or a multi-word phrase. The items in the PhraseSet are favored by the recognition model when you send a call that includes the PhraseSet.

Parameters
NameDescription
parentstring

Required. The parent resource where this phrase set will be created. Format:

projects/{project}/locations/{location}/phraseSets

Speech-to-Text supports three locations: global, us (US North America), and eu (Europe). If you are calling the speech.googleapis.com endpoint, use the global location. To specify a region, use a regional endpoint with matching us or eu location value.

phraseSetPhraseSet

Required. The phrase set to create.

phraseSetIdstring

Required. The ID to use for the phrase set, which will become the final component of the phrase set's resource name.

This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPhraseSet

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
PhraseSet phraseSet = new PhraseSet();
string phraseSetId = "";
// Make the request
PhraseSet response = await adaptationClient.CreatePhraseSetAsync(parent, phraseSet, phraseSetId);

CreatePhraseSetAsync(string, PhraseSet, string, CancellationToken)

public virtual Task<PhraseSet> CreatePhraseSetAsync(string parent, PhraseSet phraseSet, string phraseSetId, CancellationToken cancellationToken)

Create a set of phrase hints. Each item in the set can be a single word or a multi-word phrase. The items in the PhraseSet are favored by the recognition model when you send a call that includes the PhraseSet.

Parameters
NameDescription
parentstring

Required. The parent resource where this phrase set will be created. Format:

projects/{project}/locations/{location}/phraseSets

Speech-to-Text supports three locations: global, us (US North America), and eu (Europe). If you are calling the speech.googleapis.com endpoint, use the global location. To specify a region, use a regional endpoint with matching us or eu location value.

phraseSetPhraseSet

Required. The phrase set to create.

phraseSetIdstring

Required. The ID to use for the phrase set, which will become the final component of the phrase set's resource name.

This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPhraseSet

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
PhraseSet phraseSet = new PhraseSet();
string phraseSetId = "";
// Make the request
PhraseSet response = await adaptationClient.CreatePhraseSetAsync(parent, phraseSet, phraseSetId);

DeleteCustomClass(CustomClassName, CallSettings)

public virtual void DeleteCustomClass(CustomClassName name, CallSettings callSettings = null)

Delete a custom class.

Parameters
NameDescription
nameCustomClassName

Required. The name of the custom class to delete. Format:

projects/{project}/locations/{location}/customClasses/{custom_class}

Speech-to-Text supports three locations: global, us (US North America), and eu (Europe). If you are calling the speech.googleapis.com endpoint, use the global location. To specify a region, use a regional endpoint with matching us or eu location value.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
AdaptationClient adaptationClient = AdaptationClient.Create();
// Initialize request argument(s)
CustomClassName name = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]");
// Make the request
adaptationClient.DeleteCustomClass(name);

DeleteCustomClass(DeleteCustomClassRequest, CallSettings)

public virtual void DeleteCustomClass(DeleteCustomClassRequest request, CallSettings callSettings = null)

Delete a custom class.

Parameters
NameDescription
requestDeleteCustomClassRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
AdaptationClient adaptationClient = AdaptationClient.Create();
// Initialize request argument(s)
DeleteCustomClassRequest request = new DeleteCustomClassRequest
{
    CustomClassName = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]"),
};
// Make the request
adaptationClient.DeleteCustomClass(request);

DeleteCustomClass(string, CallSettings)

public virtual void DeleteCustomClass(string name, CallSettings callSettings = null)

Delete a custom class.

Parameters
NameDescription
namestring

Required. The name of the custom class to delete. Format:

projects/{project}/locations/{location}/customClasses/{custom_class}

Speech-to-Text supports three locations: global, us (US North America), and eu (Europe). If you are calling the speech.googleapis.com endpoint, use the global location. To specify a region, use a regional endpoint with matching us or eu location value.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
AdaptationClient adaptationClient = AdaptationClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/customClasses/[CUSTOM_CLASS]";
// Make the request
adaptationClient.DeleteCustomClass(name);

DeleteCustomClassAsync(CustomClassName, CallSettings)

public virtual Task DeleteCustomClassAsync(CustomClassName name, CallSettings callSettings = null)

Delete a custom class.

Parameters
NameDescription
nameCustomClassName

Required. The name of the custom class to delete. Format:

projects/{project}/locations/{location}/customClasses/{custom_class}

Speech-to-Text supports three locations: global, us (US North America), and eu (Europe). If you are calling the speech.googleapis.com endpoint, use the global location. To specify a region, use a regional endpoint with matching us or eu location value.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
CustomClassName name = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]");
// Make the request
await adaptationClient.DeleteCustomClassAsync(name);

DeleteCustomClassAsync(CustomClassName, CancellationToken)

public virtual Task DeleteCustomClassAsync(CustomClassName name, CancellationToken cancellationToken)

Delete a custom class.

Parameters
NameDescription
nameCustomClassName

Required. The name of the custom class to delete. Format:

projects/{project}/locations/{location}/customClasses/{custom_class}

Speech-to-Text supports three locations: global, us (US North America), and eu (Europe). If you are calling the speech.googleapis.com endpoint, use the global location. To specify a region, use a regional endpoint with matching us or eu location value.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
CustomClassName name = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]");
// Make the request
await adaptationClient.DeleteCustomClassAsync(name);

DeleteCustomClassAsync(DeleteCustomClassRequest, CallSettings)

public virtual Task DeleteCustomClassAsync(DeleteCustomClassRequest request, CallSettings callSettings = null)

Delete a custom class.

Parameters
NameDescription
requestDeleteCustomClassRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
DeleteCustomClassRequest request = new DeleteCustomClassRequest
{
    CustomClassName = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]"),
};
// Make the request
await adaptationClient.DeleteCustomClassAsync(request);

DeleteCustomClassAsync(DeleteCustomClassRequest, CancellationToken)

public virtual Task DeleteCustomClassAsync(DeleteCustomClassRequest request, CancellationToken cancellationToken)

Delete a custom class.

Parameters
NameDescription
requestDeleteCustomClassRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
DeleteCustomClassRequest request = new DeleteCustomClassRequest
{
    CustomClassName = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]"),
};
// Make the request
await adaptationClient.DeleteCustomClassAsync(request);

DeleteCustomClassAsync(string, CallSettings)

public virtual Task DeleteCustomClassAsync(string name, CallSettings callSettings = null)

Delete a custom class.

Parameters
NameDescription
namestring

Required. The name of the custom class to delete. Format:

projects/{project}/locations/{location}/customClasses/{custom_class}

Speech-to-Text supports three locations: global, us (US North America), and eu (Europe). If you are calling the speech.googleapis.com endpoint, use the global location. To specify a region, use a regional endpoint with matching us or eu location value.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/customClasses/[CUSTOM_CLASS]";
// Make the request
await adaptationClient.DeleteCustomClassAsync(name);

DeleteCustomClassAsync(string, CancellationToken)

public virtual Task DeleteCustomClassAsync(string name, CancellationToken cancellationToken)

Delete a custom class.

Parameters
NameDescription
namestring

Required. The name of the custom class to delete. Format:

projects/{project}/locations/{location}/customClasses/{custom_class}

Speech-to-Text supports three locations: global, us (US North America), and eu (Europe). If you are calling the speech.googleapis.com endpoint, use the global location. To specify a region, use a regional endpoint with matching us or eu location value.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/customClasses/[CUSTOM_CLASS]";
// Make the request
await adaptationClient.DeleteCustomClassAsync(name);

DeletePhraseSet(DeletePhraseSetRequest, CallSettings)

public virtual void DeletePhraseSet(DeletePhraseSetRequest request, CallSettings callSettings = null)

Delete a phrase set.

Parameters
NameDescription
requestDeletePhraseSetRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
AdaptationClient adaptationClient = AdaptationClient.Create();
// Initialize request argument(s)
DeletePhraseSetRequest request = new DeletePhraseSetRequest
{
    PhraseSetName = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]"),
};
// Make the request
adaptationClient.DeletePhraseSet(request);

DeletePhraseSet(PhraseSetName, CallSettings)

public virtual void DeletePhraseSet(PhraseSetName name, CallSettings callSettings = null)

Delete a phrase set.

Parameters
NameDescription
namePhraseSetName

Required. The name of the phrase set to delete. Format:

projects/{project}/locations/{location}/phraseSets/{phrase_set}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
AdaptationClient adaptationClient = AdaptationClient.Create();
// Initialize request argument(s)
PhraseSetName name = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]");
// Make the request
adaptationClient.DeletePhraseSet(name);

DeletePhraseSet(string, CallSettings)

public virtual void DeletePhraseSet(string name, CallSettings callSettings = null)

Delete a phrase set.

Parameters
NameDescription
namestring

Required. The name of the phrase set to delete. Format:

projects/{project}/locations/{location}/phraseSets/{phrase_set}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
AdaptationClient adaptationClient = AdaptationClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/phraseSets/[PHRASE_SET]";
// Make the request
adaptationClient.DeletePhraseSet(name);

DeletePhraseSetAsync(DeletePhraseSetRequest, CallSettings)

public virtual Task DeletePhraseSetAsync(DeletePhraseSetRequest request, CallSettings callSettings = null)

Delete a phrase set.

Parameters
NameDescription
requestDeletePhraseSetRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
DeletePhraseSetRequest request = new DeletePhraseSetRequest
{
    PhraseSetName = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]"),
};
// Make the request
await adaptationClient.DeletePhraseSetAsync(request);

DeletePhraseSetAsync(DeletePhraseSetRequest, CancellationToken)

public virtual Task DeletePhraseSetAsync(DeletePhraseSetRequest request, CancellationToken cancellationToken)

Delete a phrase set.

Parameters
NameDescription
requestDeletePhraseSetRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
DeletePhraseSetRequest request = new DeletePhraseSetRequest
{
    PhraseSetName = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]"),
};
// Make the request
await adaptationClient.DeletePhraseSetAsync(request);

DeletePhraseSetAsync(PhraseSetName, CallSettings)

public virtual Task DeletePhraseSetAsync(PhraseSetName name, CallSettings callSettings = null)

Delete a phrase set.

Parameters
NameDescription
namePhraseSetName

Required. The name of the phrase set to delete. Format:

projects/{project}/locations/{location}/phraseSets/{phrase_set}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
PhraseSetName name = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]");
// Make the request
await adaptationClient.DeletePhraseSetAsync(name);

DeletePhraseSetAsync(PhraseSetName, CancellationToken)

public virtual Task DeletePhraseSetAsync(PhraseSetName name, CancellationToken cancellationToken)

Delete a phrase set.

Parameters
NameDescription
namePhraseSetName

Required. The name of the phrase set to delete. Format:

projects/{project}/locations/{location}/phraseSets/{phrase_set}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
PhraseSetName name = PhraseSetName.FromProjectLocationPhraseSet("[PROJECT]", "[LOCATION]", "[PHRASE_SET]");
// Make the request
await adaptationClient.DeletePhraseSetAsync(name);

DeletePhraseSetAsync(string, CallSettings)

public virtual Task DeletePhraseSetAsync(string name, CallSettings callSettings = null)

Delete a phrase set.

Parameters
NameDescription
namestring

Required. The name of the phrase set to delete. Format:

projects/{project}/locations/{location}/phraseSets/{phrase_set}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/phraseSets/[PHRASE_SET]";
// Make the request
await adaptationClient.DeletePhraseSetAsync(name);

DeletePhraseSetAsync(string, CancellationToken)

public virtual Task DeletePhraseSetAsync(string name, CancellationToken cancellationToken)

Delete a phrase set.

Parameters
NameDescription
namestring

Required. The name of the phrase set to delete. Format:

projects/{project}/locations/{location}/phraseSets/{phrase_set}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/phraseSets/[PHRASE_SET]";
// Make the request
await adaptationClient.DeletePhraseSetAsync(name);

GetCustomClass(CustomClassName, CallSettings)

public virtual CustomClass GetCustomClass(CustomClassName name, CallSettings callSettings = null)

Get a custom class.

Parameters
NameDescription
nameCustomClassName

Required. The name of the custom class to retrieve. Format:

projects/{project}/locations/{location}/customClasses/{custom_class}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CustomClass

The RPC response.

Example
// Create client
AdaptationClient adaptationClient = AdaptationClient.Create();
// Initialize request argument(s)
CustomClassName name = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]");
// Make the request
CustomClass response = adaptationClient.GetCustomClass(name);

GetCustomClass(GetCustomClassRequest, CallSettings)

public virtual CustomClass GetCustomClass(GetCustomClassRequest request, CallSettings callSettings = null)

Get a custom class.

Parameters
NameDescription
requestGetCustomClassRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CustomClass

The RPC response.

Example
// Create client
AdaptationClient adaptationClient = AdaptationClient.Create();
// Initialize request argument(s)
GetCustomClassRequest request = new GetCustomClassRequest
{
    CustomClassName = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]"),
};
// Make the request
CustomClass response = adaptationClient.GetCustomClass(request);

GetCustomClass(string, CallSettings)

public virtual CustomClass GetCustomClass(string name, CallSettings callSettings = null)

Get a custom class.

Parameters
NameDescription
namestring

Required. The name of the custom class to retrieve. Format:

projects/{project}/locations/{location}/customClasses/{custom_class}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CustomClass

The RPC response.

Example
// Create client
AdaptationClient adaptationClient = AdaptationClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/customClasses/[CUSTOM_CLASS]";
// Make the request
CustomClass response = adaptationClient.GetCustomClass(name);

GetCustomClassAsync(CustomClassName, CallSettings)

public virtual Task<CustomClass> GetCustomClassAsync(CustomClassName name, CallSettings callSettings = null)

Get a custom class.

Parameters
NameDescription
nameCustomClassName

Required. The name of the custom class to retrieve. Format:

projects/{project}/locations/{location}/customClasses/{custom_class}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskCustomClass

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
CustomClassName name = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]");
// Make the request
CustomClass response = await adaptationClient.GetCustomClassAsync(name);

GetCustomClassAsync(CustomClassName, CancellationToken)

public virtual Task<CustomClass> GetCustomClassAsync(CustomClassName name, CancellationToken cancellationToken)

Get a custom class.

Parameters
NameDescription
nameCustomClassName

Required. The name of the custom class to retrieve. Format:

projects/{project}/locations/{location}/customClasses/{custom_class}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskCustomClass

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
CustomClassName name = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]");
// Make the request
CustomClass response = await adaptationClient.GetCustomClassAsync(name);

GetCustomClassAsync(GetCustomClassRequest, CallSettings)

public virtual Task<CustomClass> GetCustomClassAsync(GetCustomClassRequest request, CallSettings callSettings = null)

Get a custom class.

Parameters
NameDescription
requestGetCustomClassRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskCustomClass

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
GetCustomClassRequest request = new GetCustomClassRequest
{
    CustomClassName = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]"),
};
// Make the request
CustomClass response = await adaptationClient.GetCustomClassAsync(request);

GetCustomClassAsync(GetCustomClassRequest, CancellationToken)

public virtual Task<CustomClass> GetCustomClassAsync(GetCustomClassRequest request, CancellationToken cancellationToken)

Get a custom class.

Parameters
NameDescription
requestGetCustomClassRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskCustomClass

A Task containing the RPC response.

Example
// Create client
AdaptationClient adaptationClient = await AdaptationClient.CreateAsync();
// Initialize request argument(s)
GetCustomClassRequest request = new GetCustomClassRequest
{
    CustomClassName = CustomClassName.FromProjectLocationCustomClass("[PROJECT]", "[LOCATION]", "[CUSTOM_CLASS]"),
};
// Make the request
CustomClass response = await adaptationClient.GetCustomClassAsync(request);

GetCustomClassAsync(string, CallSettings)

public virtual Task<CustomClass> GetCustomClassAsync(string name, CallSettings callSettings = null)

Get a custom class.

Parameters
NameDescription
namestring

Required. The name of the custom class to retrieve. Format:

projects/{project}/locations/{location}/customClasses/{custom_class}

callSettings