Class IntentsClient (1.9.0)

public abstract class IntentsClient

Intents client wrapper, for convenient use.

Inheritance

Object > IntentsClient

Derived Types

Namespace

Google.Cloud.Dialogflow.Cx.V3

Assembly

Google.Cloud.Dialogflow.Cx.V3.dll

Remarks

Service for managing [Intents][google.cloud.dialogflow.cx.v3.Intent].

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Intents scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

GrpcClient

public virtual Intents.IntentsClient GrpcClient { get; }

The underlying gRPC Intents client

Property Value
TypeDescription
Intents.IntentsClient

Methods

Create()

public static IntentsClient Create()

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

Returns
TypeDescription
IntentsClient

The created IntentsClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<IntentsClient>

The task representing the created IntentsClient.

CreateIntent(AgentName, Intent, CallSettings)

public virtual Intent CreateIntent(AgentName parent, Intent intent, CallSettings callSettings = null)

Creates an intent in the specified agent.

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

Parameters
NameDescription
parentAgentName

Required. The agent to create an intent for. Format: projects/&amp;lt;Project ID&amp;gt;/locations/&amp;lt;Location ID&amp;gt;/agents/&amp;lt;Agent ID&amp;gt;.

intentIntent

Required. The intent to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Intent

The RPC response.

Example
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
Intent intent = new Intent();
// Make the request
Intent response = intentsClient.CreateIntent(parent, intent);

CreateIntent(CreateIntentRequest, CallSettings)

public virtual Intent CreateIntent(CreateIntentRequest request, CallSettings callSettings = null)

Creates an intent in the specified agent.

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

Parameters
NameDescription
requestCreateIntentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Intent

The RPC response.

Example
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
CreateIntentRequest request = new CreateIntentRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    Intent = new Intent(),
    LanguageCode = "",
};
// Make the request
Intent response = intentsClient.CreateIntent(request);

CreateIntent(String, Intent, CallSettings)

public virtual Intent CreateIntent(string parent, Intent intent, CallSettings callSettings = null)

Creates an intent in the specified agent.

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

Parameters
NameDescription
parentString

Required. The agent to create an intent for. Format: projects/&amp;lt;Project ID&amp;gt;/locations/&amp;lt;Location ID&amp;gt;/agents/&amp;lt;Agent ID&amp;gt;.

intentIntent

Required. The intent to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Intent

The RPC response.

Example
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
Intent intent = new Intent();
// Make the request
Intent response = intentsClient.CreateIntent(parent, intent);

CreateIntentAsync(AgentName, Intent, CallSettings)

public virtual Task<Intent> CreateIntentAsync(AgentName parent, Intent intent, CallSettings callSettings = null)

Creates an intent in the specified agent.

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

Parameters
NameDescription
parentAgentName

Required. The agent to create an intent for. Format: projects/&amp;lt;Project ID&amp;gt;/locations/&amp;lt;Location ID&amp;gt;/agents/&amp;lt;Agent ID&amp;gt;.

intentIntent

Required. The intent to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Intent>

A Task containing the RPC response.

Example
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
Intent intent = new Intent();
// Make the request
Intent response = await intentsClient.CreateIntentAsync(parent, intent);

CreateIntentAsync(AgentName, Intent, CancellationToken)

public virtual Task<Intent> CreateIntentAsync(AgentName parent, Intent intent, CancellationToken cancellationToken)

Creates an intent in the specified agent.

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

Parameters
NameDescription
parentAgentName

Required. The agent to create an intent for. Format: projects/&amp;lt;Project ID&amp;gt;/locations/&amp;lt;Location ID&amp;gt;/agents/&amp;lt;Agent ID&amp;gt;.

intentIntent

Required. The intent to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Intent>

A Task containing the RPC response.

Example
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
Intent intent = new Intent();
// Make the request
Intent response = await intentsClient.CreateIntentAsync(parent, intent);

CreateIntentAsync(CreateIntentRequest, CallSettings)

public virtual Task<Intent> CreateIntentAsync(CreateIntentRequest request, CallSettings callSettings = null)

Creates an intent in the specified agent.

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

Parameters
NameDescription
requestCreateIntentRequest

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

A Task containing the RPC response.

Example
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
CreateIntentRequest request = new CreateIntentRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    Intent = new Intent(),
    LanguageCode = "",
};
// Make the request
Intent response = await intentsClient.CreateIntentAsync(request);

CreateIntentAsync(CreateIntentRequest, CancellationToken)

public virtual Task<Intent> CreateIntentAsync(CreateIntentRequest request, CancellationToken cancellationToken)

Creates an intent in the specified agent.

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

Parameters
NameDescription
requestCreateIntentRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Intent>

A Task containing the RPC response.

Example
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
CreateIntentRequest request = new CreateIntentRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    Intent = new Intent(),
    LanguageCode = "",
};
// Make the request
Intent response = await intentsClient.CreateIntentAsync(request);

CreateIntentAsync(String, Intent, CallSettings)

public virtual Task<Intent> CreateIntentAsync(string parent, Intent intent, CallSettings callSettings = null)

Creates an intent in the specified agent.

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

Parameters
NameDescription
parentString

Required. The agent to create an intent for. Format: projects/&amp;lt;Project ID&amp;gt;/locations/&amp;lt;Location ID&amp;gt;/agents/&amp;lt;Agent ID&amp;gt;.

intentIntent

Required. The intent to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Intent>

A Task containing the RPC response.

Example
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
Intent intent = new Intent();
// Make the request
Intent response = await intentsClient.CreateIntentAsync(parent, intent);

CreateIntentAsync(String, Intent, CancellationToken)

public virtual Task<Intent> CreateIntentAsync(string parent, Intent intent, CancellationToken cancellationToken)

Creates an intent in the specified agent.

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

Parameters
NameDescription
parentString

Required. The agent to create an intent for. Format: projects/&amp;lt;Project ID&amp;gt;/locations/&amp;lt;Location ID&amp;gt;/agents/&amp;lt;Agent ID&amp;gt;.

intentIntent

Required. The intent to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Intent>

A Task containing the RPC response.

Example
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
Intent intent = new Intent();
// Make the request
Intent response = await intentsClient.CreateIntentAsync(parent, intent);

DeleteIntent(DeleteIntentRequest, CallSettings)

public virtual void DeleteIntent(DeleteIntentRequest request, CallSettings callSettings = null)

Deletes the specified intent.

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

Parameters
NameDescription
requestDeleteIntentRequest

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
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
DeleteIntentRequest request = new DeleteIntentRequest
{
    IntentName = IntentName.FromProjectLocationAgentIntent("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]"),
};
// Make the request
intentsClient.DeleteIntent(request);

DeleteIntent(IntentName, CallSettings)

public virtual void DeleteIntent(IntentName name, CallSettings callSettings = null)

Deletes the specified intent.

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

Parameters
NameDescription
nameIntentName

Required. The name of the intent to delete. Format: projects/&amp;lt;Project ID&amp;gt;/locations/&amp;lt;Location ID&amp;gt;/agents/&amp;lt;Agent ID&amp;gt;/intents/&amp;lt;Intent ID&amp;gt;.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
IntentName name = IntentName.FromProjectLocationAgentIntent("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]");
// Make the request
intentsClient.DeleteIntent(name);

DeleteIntent(String, CallSettings)

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

Deletes the specified intent.

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

Parameters
NameDescription
nameString

Required. The name of the intent to delete. Format: projects/&amp;lt;Project ID&amp;gt;/locations/&amp;lt;Location ID&amp;gt;/agents/&amp;lt;Agent ID&amp;gt;/intents/&amp;lt;Intent ID&amp;gt;.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/intents/[INTENT]";
// Make the request
intentsClient.DeleteIntent(name);

DeleteIntentAsync(DeleteIntentRequest, CallSettings)

public virtual Task DeleteIntentAsync(DeleteIntentRequest request, CallSettings callSettings = null)

Deletes the specified intent.

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

Parameters
NameDescription
requestDeleteIntentRequest

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
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
DeleteIntentRequest request = new DeleteIntentRequest
{
    IntentName = IntentName.FromProjectLocationAgentIntent("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]"),
};
// Make the request
await intentsClient.DeleteIntentAsync(request);

DeleteIntentAsync(DeleteIntentRequest, CancellationToken)

public virtual Task DeleteIntentAsync(DeleteIntentRequest request, CancellationToken cancellationToken)

Deletes the specified intent.

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

Parameters
NameDescription
requestDeleteIntentRequest

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
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
DeleteIntentRequest request = new DeleteIntentRequest
{
    IntentName = IntentName.FromProjectLocationAgentIntent("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]"),
};
// Make the request
await intentsClient.DeleteIntentAsync(request);

DeleteIntentAsync(IntentName, CallSettings)

public virtual Task DeleteIntentAsync(IntentName name, CallSettings callSettings = null)

Deletes the specified intent.

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

Parameters
NameDescription
nameIntentName

Required. The name of the intent to delete. Format: projects/&amp;lt;Project ID&amp;gt;/locations/&amp;lt;Location ID&amp;gt;/agents/&amp;lt;Agent ID&amp;gt;/intents/&amp;lt;Intent ID&amp;gt;.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
IntentName name = IntentName.FromProjectLocationAgentIntent("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]");
// Make the request
await intentsClient.DeleteIntentAsync(name);

DeleteIntentAsync(IntentName, CancellationToken)

public virtual Task DeleteIntentAsync(IntentName name, CancellationToken cancellationToken)

Deletes the specified intent.

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

Parameters
NameDescription
nameIntentName

Required. The name of the intent to delete. Format: projects/&amp;lt;Project ID&amp;gt;/locations/&amp;lt;Location ID&amp;gt;/agents/&amp;lt;Agent ID&amp;gt;/intents/&amp;lt;Intent ID&amp;gt;.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
IntentName name = IntentName.FromProjectLocationAgentIntent("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]");
// Make the request
await intentsClient.DeleteIntentAsync(name);

DeleteIntentAsync(String, CallSettings)

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

Deletes the specified intent.

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

Parameters
NameDescription
nameString

Required. The name of the intent to delete. Format: projects/&amp;lt;Project ID&amp;gt;/locations/&amp;lt;Location ID&amp;gt;/agents/&amp;lt;Agent ID&amp;gt;/intents/&amp;lt;Intent ID&amp;gt;.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/intents/[INTENT]";
// Make the request
await intentsClient.DeleteIntentAsync(name);

DeleteIntentAsync(String, CancellationToken)

public virtual Task DeleteIntentAsync(string name, CancellationToken cancellationToken)

Deletes the specified intent.

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

Parameters
NameDescription
nameString

Required. The name of the intent to delete. Format: projects/&amp;lt;Project ID&amp;gt;/locations/&amp;lt;Location ID&amp;gt;/agents/&amp;lt;Agent ID&amp;gt;/intents/&amp;lt;Intent ID&amp;gt;.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/intents/[INTENT]";
// Make the request
await intentsClient.DeleteIntentAsync(name);

GetIntent(GetIntentRequest, CallSettings)

public virtual Intent GetIntent(GetIntentRequest request, CallSettings callSettings = null)

Retrieves the specified intent.

Parameters
NameDescription
requestGetIntentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Intent

The RPC response.

Example
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
GetIntentRequest request = new GetIntentRequest
{
    IntentName = IntentName.FromProjectLocationAgentIntent("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]"),
    LanguageCode = "",
};
// Make the request
Intent response = intentsClient.GetIntent(request);

GetIntent(IntentName, CallSettings)

public virtual Intent GetIntent(IntentName name, CallSettings callSettings = null)

Retrieves the specified intent.

Parameters
NameDescription
nameIntentName

Required. The name of the intent. Format: projects/&amp;lt;Project ID&amp;gt;/locations/&amp;lt;Location ID&amp;gt;/agents/&amp;lt;Agent ID&amp;gt;/intents/&amp;lt;Intent ID&amp;gt;.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Intent

The RPC response.

Example
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
IntentName name = IntentName.FromProjectLocationAgentIntent("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]");
// Make the request
Intent response = intentsClient.GetIntent(name);

GetIntent(String, CallSettings)

public virtual Intent GetIntent(string name, CallSettings callSettings = null)

Retrieves the specified intent.

Parameters
NameDescription
nameString

Required. The name of the intent. Format: projects/&amp;lt;Project ID&amp;gt;/locations/&amp;lt;Location ID&amp;gt;/agents/&amp;lt;Agent ID&amp;gt;/intents/&amp;lt;Intent ID&amp;gt;.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Intent

The RPC response.

Example
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/intents/[INTENT]";
// Make the request
Intent response = intentsClient.GetIntent(name);

GetIntentAsync(GetIntentRequest, CallSettings)

public virtual Task<Intent> GetIntentAsync(GetIntentRequest request, CallSettings callSettings = null)

Retrieves the specified intent.

Parameters
NameDescription
requestGetIntentRequest

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

A Task containing the RPC response.

Example
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
GetIntentRequest request = new GetIntentRequest
{
    IntentName = IntentName.FromProjectLocationAgentIntent("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]"),
    LanguageCode = "",
};
// Make the request
Intent response = await intentsClient.GetIntentAsync(request);

GetIntentAsync(GetIntentRequest, CancellationToken)

public virtual Task<Intent> GetIntentAsync(GetIntentRequest request, CancellationToken cancellationToken)

Retrieves the specified intent.

Parameters
NameDescription
requestGetIntentRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Intent>

A Task containing the RPC response.

Example
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
GetIntentRequest request = new GetIntentRequest
{
    IntentName = IntentName.FromProjectLocationAgentIntent("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]"),
    LanguageCode = "",
};
// Make the request
Intent response = await intentsClient.GetIntentAsync(request);

GetIntentAsync(IntentName, CallSettings)

public virtual Task<Intent> GetIntentAsync(IntentName name, CallSettings callSettings = null)

Retrieves the specified intent.

Parameters
NameDescription
nameIntentName

Required. The name of the intent. Format: projects/&amp;lt;Project ID&amp;gt;/locations/&amp;lt;Location ID&amp;gt;/agents/&amp;lt;Agent ID&amp;gt;/intents/&amp;lt;Intent ID&amp;gt;.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Intent>

A Task containing the RPC response.

Example
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
IntentName name = IntentName.FromProjectLocationAgentIntent("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]");
// Make the request
Intent response = await intentsClient.GetIntentAsync(name);

GetIntentAsync(IntentName, CancellationToken)

public virtual Task<Intent> GetIntentAsync(IntentName name, CancellationToken cancellationToken)

Retrieves the specified intent.

Parameters
NameDescription
nameIntentName

Required. The name of the intent. Format: projects/&amp;lt;Project ID&amp;gt;/locations/&amp;lt;Location ID&amp;gt;/agents/&amp;lt;Agent ID&amp;gt;/intents/&amp;lt;Intent ID&amp;gt;.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Intent>

A Task containing the RPC response.

Example
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
IntentName name = IntentName.FromProjectLocationAgentIntent("[PROJECT]", "[LOCATION]", "[AGENT]", "[INTENT]");
// Make the request
Intent response = await intentsClient.GetIntentAsync(name);

GetIntentAsync(String, CallSettings)

public virtual Task<Intent> GetIntentAsync(string name, CallSettings callSettings = null)

Retrieves the specified intent.

Parameters
NameDescription
nameString

Required. The name of the intent. Format: projects/&amp;lt;Project ID&amp;gt;/locations/&amp;lt;Location ID&amp;gt;/agents/&amp;lt;Agent ID&amp;gt;/intents/&amp;lt;Intent ID&amp;gt;.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Intent>

A Task containing the RPC response.

Example
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/intents/[INTENT]";
// Make the request
Intent response = await intentsClient.GetIntentAsync(name);

GetIntentAsync(String, CancellationToken)

public virtual Task<Intent> GetIntentAsync(string name, CancellationToken cancellationToken)

Retrieves the specified intent.

Parameters
NameDescription
nameString

Required. The name of the intent. Format: projects/&amp;lt;Project ID&amp;gt;/locations/&amp;lt;Location ID&amp;gt;/agents/&amp;lt;Agent ID&amp;gt;/intents/&amp;lt;Intent ID&amp;gt;.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Intent>

A Task containing the RPC response.

Example
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/intents/[INTENT]";
// Make the request
Intent response = await intentsClient.GetIntentAsync(name);

ListIntents(AgentName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListIntentsResponse, Intent> ListIntents(AgentName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Returns the list of all intents in the specified agent.

Parameters
NameDescription
parentAgentName

Required. The agent to list all intents for. Format: projects/&amp;lt;Project ID&amp;gt;/locations/&amp;lt;Location ID&amp;gt;/agents/&amp;lt;Agent ID&amp;gt;.

pageTokenString

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

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListIntentsResponse, Intent>

A pageable sequence of Intent resources.

Example
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
// Make the request
PagedEnumerable<ListIntentsResponse, Intent> response = intentsClient.ListIntents(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Intent item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListIntentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Intent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Intent> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Intent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListIntents(ListIntentsRequest, CallSettings)

public virtual PagedEnumerable<ListIntentsResponse, Intent> ListIntents(ListIntentsRequest request, CallSettings callSettings = null)

Returns the list of all intents in the specified agent.

Parameters
NameDescription
requestListIntentsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListIntentsResponse, Intent>

A pageable sequence of Intent resources.

Example
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
ListIntentsRequest request = new ListIntentsRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    LanguageCode = "",
    IntentView = IntentView.Unspecified,
};
// Make the request
PagedEnumerable<ListIntentsResponse, Intent> response = intentsClient.ListIntents(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Intent item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListIntentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Intent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Intent> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Intent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

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

public virtual PagedEnumerable<ListIntentsResponse, Intent> ListIntents(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Returns the list of all intents in the specified agent.

Parameters
NameDescription
parentString

Required. The agent to list all intents for. Format: projects/&amp;lt;Project ID&amp;gt;/locations/&amp;lt;Location ID&amp;gt;/agents/&amp;lt;Agent ID&amp;gt;.

pageTokenString

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

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListIntentsResponse, Intent>

A pageable sequence of Intent resources.

Example
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
// Make the request
PagedEnumerable<ListIntentsResponse, Intent> response = intentsClient.ListIntents(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Intent item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListIntentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Intent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Intent> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Intent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListIntentsAsync(AgentName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListIntentsResponse, Intent> ListIntentsAsync(AgentName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Returns the list of all intents in the specified agent.

Parameters
NameDescription
parentAgentName

Required. The agent to list all intents for. Format: projects/&amp;lt;Project ID&amp;gt;/locations/&amp;lt;Location ID&amp;gt;/agents/&amp;lt;Agent ID&amp;gt;.

pageTokenString

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

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListIntentsResponse, Intent>

A pageable asynchronous sequence of Intent resources.

Example
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
AgentName parent = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
// Make the request
PagedAsyncEnumerable<ListIntentsResponse, Intent> response = intentsClient.ListIntentsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Intent item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListIntentsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Intent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Intent> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Intent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListIntentsAsync(ListIntentsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListIntentsResponse, Intent> ListIntentsAsync(ListIntentsRequest request, CallSettings callSettings = null)

Returns the list of all intents in the specified agent.

Parameters
NameDescription
requestListIntentsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListIntentsResponse, Intent>

A pageable asynchronous sequence of Intent resources.

Example
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
ListIntentsRequest request = new ListIntentsRequest
{
    ParentAsAgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
    LanguageCode = "",
    IntentView = IntentView.Unspecified,
};
// Make the request
PagedAsyncEnumerable<ListIntentsResponse, Intent> response = intentsClient.ListIntentsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Intent item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListIntentsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Intent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Intent> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Intent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

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

public virtual PagedAsyncEnumerable<ListIntentsResponse, Intent> ListIntentsAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Returns the list of all intents in the specified agent.

Parameters
NameDescription
parentString

Required. The agent to list all intents for. Format: projects/&amp;lt;Project ID&amp;gt;/locations/&amp;lt;Location ID&amp;gt;/agents/&amp;lt;Agent ID&amp;gt;.

pageTokenString

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

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListIntentsResponse, Intent>

A pageable asynchronous sequence of Intent resources.

Example
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
// Make the request
PagedAsyncEnumerable<ListIntentsResponse, Intent> response = intentsClient.ListIntentsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Intent item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListIntentsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Intent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Intent> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Intent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

UpdateIntent(Intent, FieldMask, CallSettings)

public virtual Intent UpdateIntent(Intent intent, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified intent.

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

Parameters
NameDescription
intentIntent

Required. The intent to update.

updateMaskFieldMask

The mask to control which fields get updated. If the mask is not present, all fields will be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Intent

The RPC response.

Example
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
Intent intent = new Intent();
FieldMask updateMask = new FieldMask();
// Make the request
Intent response = intentsClient.UpdateIntent(intent, updateMask);

UpdateIntent(UpdateIntentRequest, CallSettings)

public virtual Intent UpdateIntent(UpdateIntentRequest request, CallSettings callSettings = null)

Updates the specified intent.

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

Parameters
NameDescription
requestUpdateIntentRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Intent

The RPC response.

Example
// Create client
IntentsClient intentsClient = IntentsClient.Create();
// Initialize request argument(s)
UpdateIntentRequest request = new UpdateIntentRequest
{
    Intent = new Intent(),
    LanguageCode = "",
    UpdateMask = new FieldMask(),
};
// Make the request
Intent response = intentsClient.UpdateIntent(request);

UpdateIntentAsync(Intent, FieldMask, CallSettings)

public virtual Task<Intent> UpdateIntentAsync(Intent intent, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified intent.

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

Parameters
NameDescription
intentIntent

Required. The intent to update.

updateMaskFieldMask

The mask to control which fields get updated. If the mask is not present, all fields will be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Intent>

A Task containing the RPC response.

Example
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
Intent intent = new Intent();
FieldMask updateMask = new FieldMask();
// Make the request
Intent response = await intentsClient.UpdateIntentAsync(intent, updateMask);

UpdateIntentAsync(Intent, FieldMask, CancellationToken)

public virtual Task<Intent> UpdateIntentAsync(Intent intent, FieldMask updateMask, CancellationToken cancellationToken)

Updates the specified intent.

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

Parameters
NameDescription
intentIntent

Required. The intent to update.

updateMaskFieldMask

The mask to control which fields get updated. If the mask is not present, all fields will be updated.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Intent>

A Task containing the RPC response.

Example
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
Intent intent = new Intent();
FieldMask updateMask = new FieldMask();
// Make the request
Intent response = await intentsClient.UpdateIntentAsync(intent, updateMask);

UpdateIntentAsync(UpdateIntentRequest, CallSettings)

public virtual Task<Intent> UpdateIntentAsync(UpdateIntentRequest request, CallSettings callSettings = null)

Updates the specified intent.

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

Parameters
NameDescription
requestUpdateIntentRequest

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

A Task containing the RPC response.

Example
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
UpdateIntentRequest request = new UpdateIntentRequest
{
    Intent = new Intent(),
    LanguageCode = "",
    UpdateMask = new FieldMask(),
};
// Make the request
Intent response = await intentsClient.UpdateIntentAsync(request);

UpdateIntentAsync(UpdateIntentRequest, CancellationToken)

public virtual Task<Intent> UpdateIntentAsync(UpdateIntentRequest request, CancellationToken cancellationToken)

Updates the specified intent.

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

Parameters
NameDescription
requestUpdateIntentRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Intent>

A Task containing the RPC response.

Example
// Create client
IntentsClient intentsClient = await IntentsClient.CreateAsync();
// Initialize request argument(s)
UpdateIntentRequest request = new UpdateIntentRequest
{
    Intent = new Intent(),
    LanguageCode = "",
    UpdateMask = new FieldMask(),
};
// Make the request
Intent response = await intentsClient.UpdateIntentAsync(request);