public abstract class ExamplesClientReference documentation and code samples for the Dialogflow v3 API class ExamplesClient.
Examples client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Dialogflow.Cx.V3Assembly
Google.Cloud.Dialogflow.Cx.V3.dll
Remarks
Service for managing [Examples][google.cloud.dialogflow.cx.v3.Example].
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }The default endpoint for the Examples service, which is a host of "dialogflow.googleapis.com" and a port of 443.
| Property Value | |
|---|---|
| Type | Description |
string |
|
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }The default Examples scopes.
| Property Value | |
|---|---|
| Type | Description |
IReadOnlyListstring |
|
The default Examples scopes are:
GrpcClient
public virtual Examples.ExamplesClient GrpcClient { get; }The underlying gRPC Examples client
| Property Value | |
|---|---|
| Type | Description |
ExamplesExamplesClient |
|
LocationsClient
public virtual LocationsClient LocationsClient { get; }The LocationsClient associated with this client.
| Property Value | |
|---|---|
| Type | Description |
LocationsClient |
|
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }The service metadata associated with this client type.
| Property Value | |
|---|---|
| Type | Description |
ServiceMetadata |
|
Methods
Create()
public static ExamplesClient Create()Synchronously creates a ExamplesClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ExamplesClientBuilder.
| Returns | |
|---|---|
| Type | Description |
ExamplesClient |
The created ExamplesClient. |
CreateAsync(CancellationToken)
public static Task<ExamplesClient> CreateAsync(CancellationToken cancellationToken = default)Asynchronously creates a ExamplesClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ExamplesClientBuilder.
| Parameter | |
|---|---|
| Name | Description |
cancellationToken |
CancellationTokenThe CancellationToken to use while creating the client. |
| Returns | |
|---|---|
| Type | Description |
TaskExamplesClient |
The task representing the created ExamplesClient. |
CreateExample(CreateExampleRequest, CallSettings)
public virtual Example CreateExample(CreateExampleRequest request, CallSettings callSettings = null)Creates an example in the specified playbook.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateExampleRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Example |
The RPC response. |
// Create client
ExamplesClient examplesClient = ExamplesClient.Create();
// Initialize request argument(s)
CreateExampleRequest request = new CreateExampleRequest
{
ParentAsPlaybookName = PlaybookName.FromProjectLocationAgentPlaybook("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"),
Example = new Example(),
};
// Make the request
Example response = examplesClient.CreateExample(request);
CreateExample(PlaybookName, Example, CallSettings)
public virtual Example CreateExample(PlaybookName parent, Example example, CallSettings callSettings = null)Creates an example in the specified playbook.
| Parameters | |
|---|---|
| Name | Description |
parent |
PlaybookNameRequired. The playbook to create an example for.
Format:
|
example |
ExampleRequired. The example to create. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Example |
The RPC response. |
// Create client
ExamplesClient examplesClient = ExamplesClient.Create();
// Initialize request argument(s)
PlaybookName parent = PlaybookName.FromProjectLocationAgentPlaybook("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]");
Example example = new Example();
// Make the request
Example response = examplesClient.CreateExample(parent, example);
CreateExample(string, Example, CallSettings)
public virtual Example CreateExample(string parent, Example example, CallSettings callSettings = null)Creates an example in the specified playbook.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. The playbook to create an example for.
Format:
|
example |
ExampleRequired. The example to create. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Example |
The RPC response. |
// Create client
ExamplesClient examplesClient = ExamplesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/playbooks/[PLAYBOOK]";
Example example = new Example();
// Make the request
Example response = examplesClient.CreateExample(parent, example);
CreateExampleAsync(CreateExampleRequest, CallSettings)
public virtual Task<Example> CreateExampleAsync(CreateExampleRequest request, CallSettings callSettings = null)Creates an example in the specified playbook.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateExampleRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskExample |
A Task containing the RPC response. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
CreateExampleRequest request = new CreateExampleRequest
{
ParentAsPlaybookName = PlaybookName.FromProjectLocationAgentPlaybook("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"),
Example = new Example(),
};
// Make the request
Example response = await examplesClient.CreateExampleAsync(request);
CreateExampleAsync(CreateExampleRequest, CancellationToken)
public virtual Task<Example> CreateExampleAsync(CreateExampleRequest request, CancellationToken cancellationToken)Creates an example in the specified playbook.
| Parameters | |
|---|---|
| Name | Description |
request |
CreateExampleRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskExample |
A Task containing the RPC response. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
CreateExampleRequest request = new CreateExampleRequest
{
ParentAsPlaybookName = PlaybookName.FromProjectLocationAgentPlaybook("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"),
Example = new Example(),
};
// Make the request
Example response = await examplesClient.CreateExampleAsync(request);
CreateExampleAsync(PlaybookName, Example, CallSettings)
public virtual Task<Example> CreateExampleAsync(PlaybookName parent, Example example, CallSettings callSettings = null)Creates an example in the specified playbook.
| Parameters | |
|---|---|
| Name | Description |
parent |
PlaybookNameRequired. The playbook to create an example for.
Format:
|
example |
ExampleRequired. The example to create. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskExample |
A Task containing the RPC response. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
PlaybookName parent = PlaybookName.FromProjectLocationAgentPlaybook("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]");
Example example = new Example();
// Make the request
Example response = await examplesClient.CreateExampleAsync(parent, example);
CreateExampleAsync(PlaybookName, Example, CancellationToken)
public virtual Task<Example> CreateExampleAsync(PlaybookName parent, Example example, CancellationToken cancellationToken)Creates an example in the specified playbook.
| Parameters | |
|---|---|
| Name | Description |
parent |
PlaybookNameRequired. The playbook to create an example for.
Format:
|
example |
ExampleRequired. The example to create. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskExample |
A Task containing the RPC response. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
PlaybookName parent = PlaybookName.FromProjectLocationAgentPlaybook("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]");
Example example = new Example();
// Make the request
Example response = await examplesClient.CreateExampleAsync(parent, example);
CreateExampleAsync(string, Example, CallSettings)
public virtual Task<Example> CreateExampleAsync(string parent, Example example, CallSettings callSettings = null)Creates an example in the specified playbook.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. The playbook to create an example for.
Format:
|
example |
ExampleRequired. The example to create. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskExample |
A Task containing the RPC response. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/playbooks/[PLAYBOOK]";
Example example = new Example();
// Make the request
Example response = await examplesClient.CreateExampleAsync(parent, example);
CreateExampleAsync(string, Example, CancellationToken)
public virtual Task<Example> CreateExampleAsync(string parent, Example example, CancellationToken cancellationToken)Creates an example in the specified playbook.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. The playbook to create an example for.
Format:
|
example |
ExampleRequired. The example to create. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskExample |
A Task containing the RPC response. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/playbooks/[PLAYBOOK]";
Example example = new Example();
// Make the request
Example response = await examplesClient.CreateExampleAsync(parent, example);
DeleteExample(DeleteExampleRequest, CallSettings)
public virtual void DeleteExample(DeleteExampleRequest request, CallSettings callSettings = null)Deletes the specified example.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteExampleRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
// Create client
ExamplesClient examplesClient = ExamplesClient.Create();
// Initialize request argument(s)
DeleteExampleRequest request = new DeleteExampleRequest
{
ExampleName = ExampleName.FromProjectLocationAgentPlaybookExample("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"),
};
// Make the request
examplesClient.DeleteExample(request);
DeleteExample(ExampleName, CallSettings)
public virtual void DeleteExample(ExampleName name, CallSettings callSettings = null)Deletes the specified example.
| Parameters | |
|---|---|
| Name | Description |
name |
ExampleNameRequired. The name of the example to delete.
Format:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
// Create client
ExamplesClient examplesClient = ExamplesClient.Create();
// Initialize request argument(s)
ExampleName name = ExampleName.FromProjectLocationAgentPlaybookExample("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]");
// Make the request
examplesClient.DeleteExample(name);
DeleteExample(string, CallSettings)
public virtual void DeleteExample(string name, CallSettings callSettings = null)Deletes the specified example.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the example to delete.
Format:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
// Create client
ExamplesClient examplesClient = ExamplesClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/playbooks/[PLAYBOOK]/examples/[EXAMPLE]";
// Make the request
examplesClient.DeleteExample(name);
DeleteExampleAsync(DeleteExampleRequest, CallSettings)
public virtual Task DeleteExampleAsync(DeleteExampleRequest request, CallSettings callSettings = null)Deletes the specified example.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteExampleRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
DeleteExampleRequest request = new DeleteExampleRequest
{
ExampleName = ExampleName.FromProjectLocationAgentPlaybookExample("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"),
};
// Make the request
await examplesClient.DeleteExampleAsync(request);
DeleteExampleAsync(DeleteExampleRequest, CancellationToken)
public virtual Task DeleteExampleAsync(DeleteExampleRequest request, CancellationToken cancellationToken)Deletes the specified example.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteExampleRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
DeleteExampleRequest request = new DeleteExampleRequest
{
ExampleName = ExampleName.FromProjectLocationAgentPlaybookExample("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"),
};
// Make the request
await examplesClient.DeleteExampleAsync(request);
DeleteExampleAsync(ExampleName, CallSettings)
public virtual Task DeleteExampleAsync(ExampleName name, CallSettings callSettings = null)Deletes the specified example.
| Parameters | |
|---|---|
| Name | Description |
name |
ExampleNameRequired. The name of the example to delete.
Format:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
ExampleName name = ExampleName.FromProjectLocationAgentPlaybookExample("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]");
// Make the request
await examplesClient.DeleteExampleAsync(name);
DeleteExampleAsync(ExampleName, CancellationToken)
public virtual Task DeleteExampleAsync(ExampleName name, CancellationToken cancellationToken)Deletes the specified example.
| Parameters | |
|---|---|
| Name | Description |
name |
ExampleNameRequired. The name of the example to delete.
Format:
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
ExampleName name = ExampleName.FromProjectLocationAgentPlaybookExample("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]");
// Make the request
await examplesClient.DeleteExampleAsync(name);
DeleteExampleAsync(string, CallSettings)
public virtual Task DeleteExampleAsync(string name, CallSettings callSettings = null)Deletes the specified example.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the example to delete.
Format:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/playbooks/[PLAYBOOK]/examples/[EXAMPLE]";
// Make the request
await examplesClient.DeleteExampleAsync(name);
DeleteExampleAsync(string, CancellationToken)
public virtual Task DeleteExampleAsync(string name, CancellationToken cancellationToken)Deletes the specified example.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the example to delete.
Format:
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
Task |
A Task containing the RPC response. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/playbooks/[PLAYBOOK]/examples/[EXAMPLE]";
// Make the request
await examplesClient.DeleteExampleAsync(name);
GetExample(ExampleName, CallSettings)
public virtual Example GetExample(ExampleName name, CallSettings callSettings = null)Retrieves the specified example.
| Parameters | |
|---|---|
| Name | Description |
name |
ExampleNameRequired. The name of the example.
Format:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Example |
The RPC response. |
// Create client
ExamplesClient examplesClient = ExamplesClient.Create();
// Initialize request argument(s)
ExampleName name = ExampleName.FromProjectLocationAgentPlaybookExample("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]");
// Make the request
Example response = examplesClient.GetExample(name);
GetExample(GetExampleRequest, CallSettings)
public virtual Example GetExample(GetExampleRequest request, CallSettings callSettings = null)Retrieves the specified example.
| Parameters | |
|---|---|
| Name | Description |
request |
GetExampleRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Example |
The RPC response. |
// Create client
ExamplesClient examplesClient = ExamplesClient.Create();
// Initialize request argument(s)
GetExampleRequest request = new GetExampleRequest
{
ExampleName = ExampleName.FromProjectLocationAgentPlaybookExample("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"),
};
// Make the request
Example response = examplesClient.GetExample(request);
GetExample(string, CallSettings)
public virtual Example GetExample(string name, CallSettings callSettings = null)Retrieves the specified example.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the example.
Format:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Example |
The RPC response. |
// Create client
ExamplesClient examplesClient = ExamplesClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/playbooks/[PLAYBOOK]/examples/[EXAMPLE]";
// Make the request
Example response = examplesClient.GetExample(name);
GetExampleAsync(ExampleName, CallSettings)
public virtual Task<Example> GetExampleAsync(ExampleName name, CallSettings callSettings = null)Retrieves the specified example.
| Parameters | |
|---|---|
| Name | Description |
name |
ExampleNameRequired. The name of the example.
Format:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskExample |
A Task containing the RPC response. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
ExampleName name = ExampleName.FromProjectLocationAgentPlaybookExample("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]");
// Make the request
Example response = await examplesClient.GetExampleAsync(name);
GetExampleAsync(ExampleName, CancellationToken)
public virtual Task<Example> GetExampleAsync(ExampleName name, CancellationToken cancellationToken)Retrieves the specified example.
| Parameters | |
|---|---|
| Name | Description |
name |
ExampleNameRequired. The name of the example.
Format:
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskExample |
A Task containing the RPC response. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
ExampleName name = ExampleName.FromProjectLocationAgentPlaybookExample("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]");
// Make the request
Example response = await examplesClient.GetExampleAsync(name);
GetExampleAsync(GetExampleRequest, CallSettings)
public virtual Task<Example> GetExampleAsync(GetExampleRequest request, CallSettings callSettings = null)Retrieves the specified example.
| Parameters | |
|---|---|
| Name | Description |
request |
GetExampleRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskExample |
A Task containing the RPC response. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
GetExampleRequest request = new GetExampleRequest
{
ExampleName = ExampleName.FromProjectLocationAgentPlaybookExample("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"),
};
// Make the request
Example response = await examplesClient.GetExampleAsync(request);
GetExampleAsync(GetExampleRequest, CancellationToken)
public virtual Task<Example> GetExampleAsync(GetExampleRequest request, CancellationToken cancellationToken)Retrieves the specified example.
| Parameters | |
|---|---|
| Name | Description |
request |
GetExampleRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskExample |
A Task containing the RPC response. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
GetExampleRequest request = new GetExampleRequest
{
ExampleName = ExampleName.FromProjectLocationAgentPlaybookExample("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"),
};
// Make the request
Example response = await examplesClient.GetExampleAsync(request);
GetExampleAsync(string, CallSettings)
public virtual Task<Example> GetExampleAsync(string name, CallSettings callSettings = null)Retrieves the specified example.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the example.
Format:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskExample |
A Task containing the RPC response. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/playbooks/[PLAYBOOK]/examples/[EXAMPLE]";
// Make the request
Example response = await examplesClient.GetExampleAsync(name);
GetExampleAsync(string, CancellationToken)
public virtual Task<Example> GetExampleAsync(string name, CancellationToken cancellationToken)Retrieves the specified example.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the example.
Format:
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskExample |
A Task containing the RPC response. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/playbooks/[PLAYBOOK]/examples/[EXAMPLE]";
// Make the request
Example response = await examplesClient.GetExampleAsync(name);
ListExamples(ListExamplesRequest, CallSettings)
public virtual PagedEnumerable<ListExamplesResponse, Example> ListExamples(ListExamplesRequest request, CallSettings callSettings = null)Returns a list of examples in the specified playbook.
| Parameters | |
|---|---|
| Name | Description |
request |
ListExamplesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListExamplesResponseExample |
A pageable sequence of Example resources. |
// Create client
ExamplesClient examplesClient = ExamplesClient.Create();
// Initialize request argument(s)
ListExamplesRequest request = new ListExamplesRequest
{
ParentAsPlaybookName = PlaybookName.FromProjectLocationAgentPlaybook("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"),
LanguageCode = "",
};
// Make the request
PagedEnumerable<ListExamplesResponse, Example> response = examplesClient.ListExamples(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Example 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 (ListExamplesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Example 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<Example> 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 (Example 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;
ListExamples(PlaybookName, string, int?, CallSettings)
public virtual PagedEnumerable<ListExamplesResponse, Example> ListExamples(PlaybookName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Returns a list of examples in the specified playbook.
| Parameters | |
|---|---|
| Name | Description |
parent |
PlaybookNameRequired. The playbook to list the examples from.
Format:
|
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListExamplesResponseExample |
A pageable sequence of Example resources. |
// Create client
ExamplesClient examplesClient = ExamplesClient.Create();
// Initialize request argument(s)
PlaybookName parent = PlaybookName.FromProjectLocationAgentPlaybook("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]");
// Make the request
PagedEnumerable<ListExamplesResponse, Example> response = examplesClient.ListExamples(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Example 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 (ListExamplesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Example 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<Example> 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 (Example 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;
ListExamples(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListExamplesResponse, Example> ListExamples(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Returns a list of examples in the specified playbook.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. The playbook to list the examples from.
Format:
|
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListExamplesResponseExample |
A pageable sequence of Example resources. |
// Create client
ExamplesClient examplesClient = ExamplesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/playbooks/[PLAYBOOK]";
// Make the request
PagedEnumerable<ListExamplesResponse, Example> response = examplesClient.ListExamples(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Example 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 (ListExamplesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Example 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<Example> 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 (Example 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;
ListExamplesAsync(ListExamplesRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListExamplesResponse, Example> ListExamplesAsync(ListExamplesRequest request, CallSettings callSettings = null)Returns a list of examples in the specified playbook.
| Parameters | |
|---|---|
| Name | Description |
request |
ListExamplesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListExamplesResponseExample |
A pageable asynchronous sequence of Example resources. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
ListExamplesRequest request = new ListExamplesRequest
{
ParentAsPlaybookName = PlaybookName.FromProjectLocationAgentPlaybook("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"),
LanguageCode = "",
};
// Make the request
PagedAsyncEnumerable<ListExamplesResponse, Example> response = examplesClient.ListExamplesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await foreach (Example item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListExamplesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Example 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<Example> 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 (Example 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;
ListExamplesAsync(PlaybookName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListExamplesResponse, Example> ListExamplesAsync(PlaybookName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Returns a list of examples in the specified playbook.
| Parameters | |
|---|---|
| Name | Description |
parent |
PlaybookNameRequired. The playbook to list the examples from.
Format:
|
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListExamplesResponseExample |
A pageable asynchronous sequence of Example resources. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
PlaybookName parent = PlaybookName.FromProjectLocationAgentPlaybook("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]");
// Make the request
PagedAsyncEnumerable<ListExamplesResponse, Example> response = examplesClient.ListExamplesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await foreach (Example item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListExamplesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Example 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<Example> 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 (Example 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;
ListExamplesAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListExamplesResponse, Example> ListExamplesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Returns a list of examples in the specified playbook.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. The playbook to list the examples from.
Format:
|
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListExamplesResponseExample |
A pageable asynchronous sequence of Example resources. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/playbooks/[PLAYBOOK]";
// Make the request
PagedAsyncEnumerable<ListExamplesResponse, Example> response = examplesClient.ListExamplesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await foreach (Example item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListExamplesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Example 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<Example> 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 (Example 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 | |
|---|---|
| Type | Description |
Task |
A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.
UpdateExample(Example, FieldMask, CallSettings)
public virtual Example UpdateExample(Example example, FieldMask updateMask, CallSettings callSettings = null)Update the specified example.
| Parameters | |
|---|---|
| Name | Description |
example |
ExampleRequired. The example to update. |
updateMask |
FieldMaskOptional. The mask to control which fields get updated. If the mask is not present, all fields will be updated. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Example |
The RPC response. |
// Create client
ExamplesClient examplesClient = ExamplesClient.Create();
// Initialize request argument(s)
Example example = new Example();
FieldMask updateMask = new FieldMask();
// Make the request
Example response = examplesClient.UpdateExample(example, updateMask);
UpdateExample(UpdateExampleRequest, CallSettings)
public virtual Example UpdateExample(UpdateExampleRequest request, CallSettings callSettings = null)Update the specified example.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateExampleRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Example |
The RPC response. |
// Create client
ExamplesClient examplesClient = ExamplesClient.Create();
// Initialize request argument(s)
UpdateExampleRequest request = new UpdateExampleRequest
{
Example = new Example(),
UpdateMask = new FieldMask(),
};
// Make the request
Example response = examplesClient.UpdateExample(request);
UpdateExampleAsync(Example, FieldMask, CallSettings)
public virtual Task<Example> UpdateExampleAsync(Example example, FieldMask updateMask, CallSettings callSettings = null)Update the specified example.
| Parameters | |
|---|---|
| Name | Description |
example |
ExampleRequired. The example to update. |
updateMask |
FieldMaskOptional. The mask to control which fields get updated. If the mask is not present, all fields will be updated. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskExample |
A Task containing the RPC response. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
Example example = new Example();
FieldMask updateMask = new FieldMask();
// Make the request
Example response = await examplesClient.UpdateExampleAsync(example, updateMask);
UpdateExampleAsync(Example, FieldMask, CancellationToken)
public virtual Task<Example> UpdateExampleAsync(Example example, FieldMask updateMask, CancellationToken cancellationToken)Update the specified example.
| Parameters | |
|---|---|
| Name | Description |
example |
ExampleRequired. The example to update. |
updateMask |
FieldMaskOptional. The mask to control which fields get updated. If the mask is not present, all fields will be updated. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskExample |
A Task containing the RPC response. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
Example example = new Example();
FieldMask updateMask = new FieldMask();
// Make the request
Example response = await examplesClient.UpdateExampleAsync(example, updateMask);
UpdateExampleAsync(UpdateExampleRequest, CallSettings)
public virtual Task<Example> UpdateExampleAsync(UpdateExampleRequest request, CallSettings callSettings = null)Update the specified example.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateExampleRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskExample |
A Task containing the RPC response. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
UpdateExampleRequest request = new UpdateExampleRequest
{
Example = new Example(),
UpdateMask = new FieldMask(),
};
// Make the request
Example response = await examplesClient.UpdateExampleAsync(request);
UpdateExampleAsync(UpdateExampleRequest, CancellationToken)
public virtual Task<Example> UpdateExampleAsync(UpdateExampleRequest request, CancellationToken cancellationToken)Update the specified example.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateExampleRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskExample |
A Task containing the RPC response. |
// Create client
ExamplesClient examplesClient = await ExamplesClient.CreateAsync();
// Initialize request argument(s)
UpdateExampleRequest request = new UpdateExampleRequest
{
Example = new Example(),
UpdateMask = new FieldMask(),
};
// Make the request
Example response = await examplesClient.UpdateExampleAsync(request);