Dialogflow v3 API - Class PagesClient (2.21.0)

public abstract class PagesClient

Reference documentation and code samples for the Dialogflow v3 API class PagesClient.

Pages client wrapper, for convenient use.

Inheritance

object > PagesClient

Derived Types

Namespace

Google.Cloud.Dialogflow.Cx.V3

Assembly

Google.Cloud.Dialogflow.Cx.V3.dll

Remarks

Service for managing [Pages][google.cloud.dialogflow.cx.v3.Page].

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the Pages 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 Pages scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

GrpcClient

public virtual Pages.PagesClient GrpcClient { get; }

The underlying gRPC Pages client

Property Value
Type Description
PagesPagesClient

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 PagesClient Create()

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

Returns
Type Description
PagesClient

The created PagesClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskPagesClient

The task representing the created PagesClient.

CreatePage(CreatePageRequest, CallSettings)

public virtual Page CreatePage(CreatePageRequest request, CallSettings callSettings = null)

Creates a page in the specified flow.

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

Parameters
Name Description
request CreatePageRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Page

The RPC response.

Example
// Create client
PagesClient pagesClient = PagesClient.Create();
// Initialize request argument(s)
CreatePageRequest request = new CreatePageRequest
{
    ParentAsFlowName = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
    Page = new Page(),
    LanguageCode = "",
};
// Make the request
Page response = pagesClient.CreatePage(request);

CreatePage(FlowName, Page, CallSettings)

public virtual Page CreatePage(FlowName parent, Page page, CallSettings callSettings = null)

Creates a page in the specified flow.

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

Parameters
Name Description
parent FlowName

Required. The flow to create a page for. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>.

page Page

Required. The page to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Page

The RPC response.

Example
// Create client
PagesClient pagesClient = PagesClient.Create();
// Initialize request argument(s)
FlowName parent = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
Page page = new Page();
// Make the request
Page response = pagesClient.CreatePage(parent, page);

CreatePage(string, Page, CallSettings)

public virtual Page CreatePage(string parent, Page page, CallSettings callSettings = null)

Creates a page in the specified flow.

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

Parameters
Name Description
parent string

Required. The flow to create a page for. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>.

page Page

Required. The page to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Page

The RPC response.

Example
// Create client
PagesClient pagesClient = PagesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]";
Page page = new Page();
// Make the request
Page response = pagesClient.CreatePage(parent, page);

CreatePageAsync(CreatePageRequest, CallSettings)

public virtual Task<Page> CreatePageAsync(CreatePageRequest request, CallSettings callSettings = null)

Creates a page in the specified flow.

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

Parameters
Name Description
request CreatePageRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPage

A Task containing the RPC response.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
CreatePageRequest request = new CreatePageRequest
{
    ParentAsFlowName = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
    Page = new Page(),
    LanguageCode = "",
};
// Make the request
Page response = await pagesClient.CreatePageAsync(request);

CreatePageAsync(CreatePageRequest, CancellationToken)

public virtual Task<Page> CreatePageAsync(CreatePageRequest request, CancellationToken cancellationToken)

Creates a page in the specified flow.

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

Parameters
Name Description
request CreatePageRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPage

A Task containing the RPC response.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
CreatePageRequest request = new CreatePageRequest
{
    ParentAsFlowName = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
    Page = new Page(),
    LanguageCode = "",
};
// Make the request
Page response = await pagesClient.CreatePageAsync(request);

CreatePageAsync(FlowName, Page, CallSettings)

public virtual Task<Page> CreatePageAsync(FlowName parent, Page page, CallSettings callSettings = null)

Creates a page in the specified flow.

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

Parameters
Name Description
parent FlowName

Required. The flow to create a page for. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>.

page Page

Required. The page to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPage

A Task containing the RPC response.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
FlowName parent = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
Page page = new Page();
// Make the request
Page response = await pagesClient.CreatePageAsync(parent, page);

CreatePageAsync(FlowName, Page, CancellationToken)

public virtual Task<Page> CreatePageAsync(FlowName parent, Page page, CancellationToken cancellationToken)

Creates a page in the specified flow.

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

Parameters
Name Description
parent FlowName

Required. The flow to create a page for. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>.

page Page

Required. The page to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPage

A Task containing the RPC response.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
FlowName parent = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
Page page = new Page();
// Make the request
Page response = await pagesClient.CreatePageAsync(parent, page);

CreatePageAsync(string, Page, CallSettings)

public virtual Task<Page> CreatePageAsync(string parent, Page page, CallSettings callSettings = null)

Creates a page in the specified flow.

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

Parameters
Name Description
parent string

Required. The flow to create a page for. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>.

page Page

Required. The page to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPage

A Task containing the RPC response.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]";
Page page = new Page();
// Make the request
Page response = await pagesClient.CreatePageAsync(parent, page);

CreatePageAsync(string, Page, CancellationToken)

public virtual Task<Page> CreatePageAsync(string parent, Page page, CancellationToken cancellationToken)

Creates a page in the specified flow.

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

Parameters
Name Description
parent string

Required. The flow to create a page for. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>.

page Page

Required. The page to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPage

A Task containing the RPC response.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]";
Page page = new Page();
// Make the request
Page response = await pagesClient.CreatePageAsync(parent, page);

DeletePage(DeletePageRequest, CallSettings)

public virtual void DeletePage(DeletePageRequest request, CallSettings callSettings = null)

Deletes the specified page.

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

Parameters
Name Description
request DeletePageRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
PagesClient pagesClient = PagesClient.Create();
// Initialize request argument(s)
DeletePageRequest request = new DeletePageRequest
{
    PageName = PageName.FromProjectLocationAgentFlowPage("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]"),
    Force = false,
};
// Make the request
pagesClient.DeletePage(request);

DeletePage(PageName, CallSettings)

public virtual void DeletePage(PageName name, CallSettings callSettings = null)

Deletes the specified page.

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

Parameters
Name Description
name PageName

Required. The name of the page to delete. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/Flows/<flowID>/pages/<PageID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
PagesClient pagesClient = PagesClient.Create();
// Initialize request argument(s)
PageName name = PageName.FromProjectLocationAgentFlowPage("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]");
// Make the request
pagesClient.DeletePage(name);

DeletePage(string, CallSettings)

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

Deletes the specified page.

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

Parameters
Name Description
name string

Required. The name of the page to delete. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/Flows/<flowID>/pages/<PageID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
PagesClient pagesClient = PagesClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]/pages/[PAGE]";
// Make the request
pagesClient.DeletePage(name);

DeletePageAsync(DeletePageRequest, CallSettings)

public virtual Task DeletePageAsync(DeletePageRequest request, CallSettings callSettings = null)

Deletes the specified page.

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

Parameters
Name Description
request DeletePageRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
DeletePageRequest request = new DeletePageRequest
{
    PageName = PageName.FromProjectLocationAgentFlowPage("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]"),
    Force = false,
};
// Make the request
await pagesClient.DeletePageAsync(request);

DeletePageAsync(DeletePageRequest, CancellationToken)

public virtual Task DeletePageAsync(DeletePageRequest request, CancellationToken cancellationToken)

Deletes the specified page.

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

Parameters
Name Description
request DeletePageRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
DeletePageRequest request = new DeletePageRequest
{
    PageName = PageName.FromProjectLocationAgentFlowPage("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]"),
    Force = false,
};
// Make the request
await pagesClient.DeletePageAsync(request);

DeletePageAsync(PageName, CallSettings)

public virtual Task DeletePageAsync(PageName name, CallSettings callSettings = null)

Deletes the specified page.

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

Parameters
Name Description
name PageName

Required. The name of the page to delete. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/Flows/<flowID>/pages/<PageID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
PageName name = PageName.FromProjectLocationAgentFlowPage("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]");
// Make the request
await pagesClient.DeletePageAsync(name);

DeletePageAsync(PageName, CancellationToken)

public virtual Task DeletePageAsync(PageName name, CancellationToken cancellationToken)

Deletes the specified page.

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

Parameters
Name Description
name PageName

Required. The name of the page to delete. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/Flows/<flowID>/pages/<PageID>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
PageName name = PageName.FromProjectLocationAgentFlowPage("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]");
// Make the request
await pagesClient.DeletePageAsync(name);

DeletePageAsync(string, CallSettings)

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

Deletes the specified page.

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

Parameters
Name Description
name string

Required. The name of the page to delete. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/Flows/<flowID>/pages/<PageID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]/pages/[PAGE]";
// Make the request
await pagesClient.DeletePageAsync(name);

DeletePageAsync(string, CancellationToken)

public virtual Task DeletePageAsync(string name, CancellationToken cancellationToken)

Deletes the specified page.

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

Parameters
Name Description
name string

Required. The name of the page to delete. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/Flows/<flowID>/pages/<PageID>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]/pages/[PAGE]";
// Make the request
await pagesClient.DeletePageAsync(name);

GetPage(GetPageRequest, CallSettings)

public virtual Page GetPage(GetPageRequest request, CallSettings callSettings = null)

Retrieves the specified page.

Parameters
Name Description
request GetPageRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Page

The RPC response.

Example
// Create client
PagesClient pagesClient = PagesClient.Create();
// Initialize request argument(s)
GetPageRequest request = new GetPageRequest
{
    PageName = PageName.FromProjectLocationAgentFlowPage("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]"),
    LanguageCode = "",
};
// Make the request
Page response = pagesClient.GetPage(request);

GetPage(PageName, CallSettings)

public virtual Page GetPage(PageName name, CallSettings callSettings = null)

Retrieves the specified page.

Parameters
Name Description
name PageName

Required. The name of the page. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Page

The RPC response.

Example
// Create client
PagesClient pagesClient = PagesClient.Create();
// Initialize request argument(s)
PageName name = PageName.FromProjectLocationAgentFlowPage("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]");
// Make the request
Page response = pagesClient.GetPage(name);

GetPage(string, CallSettings)

public virtual Page GetPage(string name, CallSettings callSettings = null)

Retrieves the specified page.

Parameters
Name Description
name string

Required. The name of the page. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Page

The RPC response.

Example
// Create client
PagesClient pagesClient = PagesClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]/pages/[PAGE]";
// Make the request
Page response = pagesClient.GetPage(name);

GetPageAsync(GetPageRequest, CallSettings)

public virtual Task<Page> GetPageAsync(GetPageRequest request, CallSettings callSettings = null)

Retrieves the specified page.

Parameters
Name Description
request GetPageRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPage

A Task containing the RPC response.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
GetPageRequest request = new GetPageRequest
{
    PageName = PageName.FromProjectLocationAgentFlowPage("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]"),
    LanguageCode = "",
};
// Make the request
Page response = await pagesClient.GetPageAsync(request);

GetPageAsync(GetPageRequest, CancellationToken)

public virtual Task<Page> GetPageAsync(GetPageRequest request, CancellationToken cancellationToken)

Retrieves the specified page.

Parameters
Name Description
request GetPageRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPage

A Task containing the RPC response.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
GetPageRequest request = new GetPageRequest
{
    PageName = PageName.FromProjectLocationAgentFlowPage("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]"),
    LanguageCode = "",
};
// Make the request
Page response = await pagesClient.GetPageAsync(request);

GetPageAsync(PageName, CallSettings)

public virtual Task<Page> GetPageAsync(PageName name, CallSettings callSettings = null)

Retrieves the specified page.

Parameters
Name Description
name PageName

Required. The name of the page. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPage

A Task containing the RPC response.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
PageName name = PageName.FromProjectLocationAgentFlowPage("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]");
// Make the request
Page response = await pagesClient.GetPageAsync(name);

GetPageAsync(PageName, CancellationToken)

public virtual Task<Page> GetPageAsync(PageName name, CancellationToken cancellationToken)

Retrieves the specified page.

Parameters
Name Description
name PageName

Required. The name of the page. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPage

A Task containing the RPC response.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
PageName name = PageName.FromProjectLocationAgentFlowPage("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]");
// Make the request
Page response = await pagesClient.GetPageAsync(name);

GetPageAsync(string, CallSettings)

public virtual Task<Page> GetPageAsync(string name, CallSettings callSettings = null)

Retrieves the specified page.

Parameters
Name Description
name string

Required. The name of the page. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPage

A Task containing the RPC response.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]/pages/[PAGE]";
// Make the request
Page response = await pagesClient.GetPageAsync(name);

GetPageAsync(string, CancellationToken)

public virtual Task<Page> GetPageAsync(string name, CancellationToken cancellationToken)

Retrieves the specified page.

Parameters
Name Description
name string

Required. The name of the page. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPage

A Task containing the RPC response.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]/pages/[PAGE]";
// Make the request
Page response = await pagesClient.GetPageAsync(name);

ListPages(FlowName, string, int?, CallSettings)

public virtual PagedEnumerable<ListPagesResponse, Page> ListPages(FlowName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all pages in the specified flow.

Parameters
Name Description
parent FlowName

Required. The flow to list all pages for. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListPagesResponsePage

A pageable sequence of Page resources.

Example
// Create client
PagesClient pagesClient = PagesClient.Create();
// Initialize request argument(s)
FlowName parent = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
// Make the request
PagedEnumerable<ListPagesResponse, Page> response = pagesClient.ListPages(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Page 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 (ListPagesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Page 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<Page> 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 (Page 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;

ListPages(ListPagesRequest, CallSettings)

public virtual PagedEnumerable<ListPagesResponse, Page> ListPages(ListPagesRequest request, CallSettings callSettings = null)

Returns the list of all pages in the specified flow.

Parameters
Name Description
request ListPagesRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListPagesResponsePage

A pageable sequence of Page resources.

Example
// Create client
PagesClient pagesClient = PagesClient.Create();
// Initialize request argument(s)
ListPagesRequest request = new ListPagesRequest
{
    ParentAsFlowName = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
    LanguageCode = "",
};
// Make the request
PagedEnumerable<ListPagesResponse, Page> response = pagesClient.ListPages(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Page 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 (ListPagesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Page 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<Page> 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 (Page 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;

ListPages(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListPagesResponse, Page> ListPages(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all pages in the specified flow.

Parameters
Name Description
parent string

Required. The flow to list all pages for. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListPagesResponsePage

A pageable sequence of Page resources.

Example
// Create client
PagesClient pagesClient = PagesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]";
// Make the request
PagedEnumerable<ListPagesResponse, Page> response = pagesClient.ListPages(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Page 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 (ListPagesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Page 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<Page> 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 (Page 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;

ListPagesAsync(FlowName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListPagesResponse, Page> ListPagesAsync(FlowName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all pages in the specified flow.

Parameters
Name Description
parent FlowName

Required. The flow to list all pages for. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListPagesResponsePage

A pageable asynchronous sequence of Page resources.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
FlowName parent = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]");
// Make the request
PagedAsyncEnumerable<ListPagesResponse, Page> response = pagesClient.ListPagesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Page 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((ListPagesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Page 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<Page> 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 (Page 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;

ListPagesAsync(ListPagesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListPagesResponse, Page> ListPagesAsync(ListPagesRequest request, CallSettings callSettings = null)

Returns the list of all pages in the specified flow.

Parameters
Name Description
request ListPagesRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListPagesResponsePage

A pageable asynchronous sequence of Page resources.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
ListPagesRequest request = new ListPagesRequest
{
    ParentAsFlowName = FlowName.FromProjectLocationAgentFlow("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]"),
    LanguageCode = "",
};
// Make the request
PagedAsyncEnumerable<ListPagesResponse, Page> response = pagesClient.ListPagesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Page 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((ListPagesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Page 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<Page> 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 (Page 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;

ListPagesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListPagesResponse, Page> ListPagesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all pages in the specified flow.

Parameters
Name Description
parent string

Required. The flow to list all pages for. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListPagesResponsePage

A pageable asynchronous sequence of Page resources.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/flows/[FLOW]";
// Make the request
PagedAsyncEnumerable<ListPagesResponse, Page> response = pagesClient.ListPagesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Page 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((ListPagesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Page 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<Page> 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 (Page 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.

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.

UpdatePage(Page, FieldMask, CallSettings)

public virtual Page UpdatePage(Page page, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified page.

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

Parameters
Name Description
page Page

Required. The page to update.

updateMask FieldMask

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Page

The RPC response.

Example
// Create client
PagesClient pagesClient = PagesClient.Create();
// Initialize request argument(s)
Page page = new Page();
FieldMask updateMask = new FieldMask();
// Make the request
Page response = pagesClient.UpdatePage(page, updateMask);

UpdatePage(UpdatePageRequest, CallSettings)

public virtual Page UpdatePage(UpdatePageRequest request, CallSettings callSettings = null)

Updates the specified page.

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

Parameters
Name Description
request UpdatePageRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Page

The RPC response.

Example
// Create client
PagesClient pagesClient = PagesClient.Create();
// Initialize request argument(s)
UpdatePageRequest request = new UpdatePageRequest
{
    Page = new Page(),
    LanguageCode = "",
    UpdateMask = new FieldMask(),
};
// Make the request
Page response = pagesClient.UpdatePage(request);

UpdatePageAsync(Page, FieldMask, CallSettings)

public virtual Task<Page> UpdatePageAsync(Page page, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified page.

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

Parameters
Name Description
page Page

Required. The page to update.

updateMask FieldMask

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPage

A Task containing the RPC response.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
Page page = new Page();
FieldMask updateMask = new FieldMask();
// Make the request
Page response = await pagesClient.UpdatePageAsync(page, updateMask);

UpdatePageAsync(Page, FieldMask, CancellationToken)

public virtual Task<Page> UpdatePageAsync(Page page, FieldMask updateMask, CancellationToken cancellationToken)

Updates the specified page.

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

Parameters
Name Description
page Page

Required. The page to update.

updateMask FieldMask

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPage

A Task containing the RPC response.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
Page page = new Page();
FieldMask updateMask = new FieldMask();
// Make the request
Page response = await pagesClient.UpdatePageAsync(page, updateMask);

UpdatePageAsync(UpdatePageRequest, CallSettings)

public virtual Task<Page> UpdatePageAsync(UpdatePageRequest request, CallSettings callSettings = null)

Updates the specified page.

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

Parameters
Name Description
request UpdatePageRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPage

A Task containing the RPC response.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
UpdatePageRequest request = new UpdatePageRequest
{
    Page = new Page(),
    LanguageCode = "",
    UpdateMask = new FieldMask(),
};
// Make the request
Page response = await pagesClient.UpdatePageAsync(request);

UpdatePageAsync(UpdatePageRequest, CancellationToken)

public virtual Task<Page> UpdatePageAsync(UpdatePageRequest request, CancellationToken cancellationToken)

Updates the specified page.

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

Parameters
Name Description
request UpdatePageRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPage

A Task containing the RPC response.

Example
// Create client
PagesClient pagesClient = await PagesClient.CreateAsync();
// Initialize request argument(s)
UpdatePageRequest request = new UpdatePageRequest
{
    Page = new Page(),
    LanguageCode = "",
    UpdateMask = new FieldMask(),
};
// Make the request
Page response = await pagesClient.UpdatePageAsync(request);