Google Cloud Dialogflow v2 API - Class VersionsClient (4.20.0)

public abstract class VersionsClient

Reference documentation and code samples for the Google Cloud Dialogflow v2 API class VersionsClient.

Versions client wrapper, for convenient use.

Inheritance

object > VersionsClient

Derived Types

Namespace

Google.Cloud.Dialogflow.V2

Assembly

Google.Cloud.Dialogflow.V2.dll

Remarks

Service for managing [Versions][google.cloud.dialogflow.v2.Version].

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
IReadOnlyListstring
Remarks

GrpcClient

public virtual Versions.VersionsClient GrpcClient { get; }

The underlying gRPC Versions client

Property Value
Type Description
VersionsVersionsClient

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

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

Returns
Type Description
VersionsClient

The created VersionsClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskVersionsClient

The task representing the created VersionsClient.

CreateVersion(AgentName, Version, CallSettings)

public virtual Version CreateVersion(AgentName parent, Version version, CallSettings callSettings = null)

Creates an agent version.

The new version points to the agent instance in the "default" environment.

Parameters
Name Description
parent AgentName

Required. The agent to create a version for. Supported formats:

  • projects/<Project ID>/agent
  • projects/<Project ID>/locations/<Location ID>/agent
version Version

Required. The version to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Version

The RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = gcdv::VersionsClient.Create();
// Initialize request argument(s)
gcdv::AgentName parent = gcdv::AgentName.FromProject("[PROJECT]");
gcdv::Version version = new gcdv::Version();
// Make the request
gcdv::Version response = versionsClient.CreateVersion(parent, version);

CreateVersion(CreateVersionRequest, CallSettings)

public virtual Version CreateVersion(CreateVersionRequest request, CallSettings callSettings = null)

Creates an agent version.

The new version points to the agent instance in the "default" environment.

Parameters
Name Description
request CreateVersionRequest

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
Version

The RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = gcdv::VersionsClient.Create();
// Initialize request argument(s)
gcdv::CreateVersionRequest request = new gcdv::CreateVersionRequest
{
    ParentAsAgentName = gcdv::AgentName.FromProject("[PROJECT]"),
    Version = new gcdv::Version(),
};
// Make the request
gcdv::Version response = versionsClient.CreateVersion(request);

CreateVersion(string, Version, CallSettings)

public virtual Version CreateVersion(string parent, Version version, CallSettings callSettings = null)

Creates an agent version.

The new version points to the agent instance in the "default" environment.

Parameters
Name Description
parent string

Required. The agent to create a version for. Supported formats:

  • projects/<Project ID>/agent
  • projects/<Project ID>/locations/<Location ID>/agent
version Version

Required. The version to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Version

The RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = gcdv::VersionsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
gcdv::Version version = new gcdv::Version();
// Make the request
gcdv::Version response = versionsClient.CreateVersion(parent, version);

CreateVersionAsync(AgentName, Version, CallSettings)

public virtual Task<Version> CreateVersionAsync(AgentName parent, Version version, CallSettings callSettings = null)

Creates an agent version.

The new version points to the agent instance in the "default" environment.

Parameters
Name Description
parent AgentName

Required. The agent to create a version for. Supported formats:

  • projects/<Project ID>/agent
  • projects/<Project ID>/locations/<Location ID>/agent
version Version

Required. The version to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskVersion

A Task containing the RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcdv::AgentName parent = gcdv::AgentName.FromProject("[PROJECT]");
gcdv::Version version = new gcdv::Version();
// Make the request
gcdv::Version response = await versionsClient.CreateVersionAsync(parent, version);

CreateVersionAsync(AgentName, Version, CancellationToken)

public virtual Task<Version> CreateVersionAsync(AgentName parent, Version version, CancellationToken cancellationToken)

Creates an agent version.

The new version points to the agent instance in the "default" environment.

Parameters
Name Description
parent AgentName

Required. The agent to create a version for. Supported formats:

  • projects/<Project ID>/agent
  • projects/<Project ID>/locations/<Location ID>/agent
version Version

Required. The version to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskVersion

A Task containing the RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcdv::AgentName parent = gcdv::AgentName.FromProject("[PROJECT]");
gcdv::Version version = new gcdv::Version();
// Make the request
gcdv::Version response = await versionsClient.CreateVersionAsync(parent, version);

CreateVersionAsync(CreateVersionRequest, CallSettings)

public virtual Task<Version> CreateVersionAsync(CreateVersionRequest request, CallSettings callSettings = null)

Creates an agent version.

The new version points to the agent instance in the "default" environment.

Parameters
Name Description
request CreateVersionRequest

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
TaskVersion

A Task containing the RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcdv::CreateVersionRequest request = new gcdv::CreateVersionRequest
{
    ParentAsAgentName = gcdv::AgentName.FromProject("[PROJECT]"),
    Version = new gcdv::Version(),
};
// Make the request
gcdv::Version response = await versionsClient.CreateVersionAsync(request);

CreateVersionAsync(CreateVersionRequest, CancellationToken)

public virtual Task<Version> CreateVersionAsync(CreateVersionRequest request, CancellationToken cancellationToken)

Creates an agent version.

The new version points to the agent instance in the "default" environment.

Parameters
Name Description
request CreateVersionRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskVersion

A Task containing the RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcdv::CreateVersionRequest request = new gcdv::CreateVersionRequest
{
    ParentAsAgentName = gcdv::AgentName.FromProject("[PROJECT]"),
    Version = new gcdv::Version(),
};
// Make the request
gcdv::Version response = await versionsClient.CreateVersionAsync(request);

CreateVersionAsync(string, Version, CallSettings)

public virtual Task<Version> CreateVersionAsync(string parent, Version version, CallSettings callSettings = null)

Creates an agent version.

The new version points to the agent instance in the "default" environment.

Parameters
Name Description
parent string

Required. The agent to create a version for. Supported formats:

  • projects/<Project ID>/agent
  • projects/<Project ID>/locations/<Location ID>/agent
version Version

Required. The version to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskVersion

A Task containing the RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
gcdv::Version version = new gcdv::Version();
// Make the request
gcdv::Version response = await versionsClient.CreateVersionAsync(parent, version);

CreateVersionAsync(string, Version, CancellationToken)

public virtual Task<Version> CreateVersionAsync(string parent, Version version, CancellationToken cancellationToken)

Creates an agent version.

The new version points to the agent instance in the "default" environment.

Parameters
Name Description
parent string

Required. The agent to create a version for. Supported formats:

  • projects/<Project ID>/agent
  • projects/<Project ID>/locations/<Location ID>/agent
version Version

Required. The version to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskVersion

A Task containing the RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
gcdv::Version version = new gcdv::Version();
// Make the request
gcdv::Version response = await versionsClient.CreateVersionAsync(parent, version);

DeleteVersion(DeleteVersionRequest, CallSettings)

public virtual void DeleteVersion(DeleteVersionRequest request, CallSettings callSettings = null)

Delete the specified agent version.

Parameters
Name Description
request DeleteVersionRequest

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
gcdv::VersionsClient versionsClient = gcdv::VersionsClient.Create();
// Initialize request argument(s)
gcdv::DeleteVersionRequest request = new gcdv::DeleteVersionRequest
{
    VersionName = gcdv::VersionName.FromProjectVersion("[PROJECT]", "[VERSION]"),
};
// Make the request
versionsClient.DeleteVersion(request);

DeleteVersion(VersionName, CallSettings)

public virtual void DeleteVersion(VersionName name, CallSettings callSettings = null)

Delete the specified agent version.

Parameters
Name Description
name VersionName

Required. The name of the version to delete. Supported formats:

  • projects/<Project ID>/agent/versions/<Version ID>
  • projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID>
callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
gcdv::VersionsClient versionsClient = gcdv::VersionsClient.Create();
// Initialize request argument(s)
gcdv::VersionName name = gcdv::VersionName.FromProjectVersion("[PROJECT]", "[VERSION]");
// Make the request
versionsClient.DeleteVersion(name);

DeleteVersion(string, CallSettings)

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

Delete the specified agent version.

Parameters
Name Description
name string

Required. The name of the version to delete. Supported formats:

  • projects/<Project ID>/agent/versions/<Version ID>
  • projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID>
callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
gcdv::VersionsClient versionsClient = gcdv::VersionsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/versions/[VERSION]";
// Make the request
versionsClient.DeleteVersion(name);

DeleteVersionAsync(DeleteVersionRequest, CallSettings)

public virtual Task DeleteVersionAsync(DeleteVersionRequest request, CallSettings callSettings = null)

Delete the specified agent version.

Parameters
Name Description
request DeleteVersionRequest

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
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcdv::DeleteVersionRequest request = new gcdv::DeleteVersionRequest
{
    VersionName = gcdv::VersionName.FromProjectVersion("[PROJECT]", "[VERSION]"),
};
// Make the request
await versionsClient.DeleteVersionAsync(request);

DeleteVersionAsync(DeleteVersionRequest, CancellationToken)

public virtual Task DeleteVersionAsync(DeleteVersionRequest request, CancellationToken cancellationToken)

Delete the specified agent version.

Parameters
Name Description
request DeleteVersionRequest

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
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcdv::DeleteVersionRequest request = new gcdv::DeleteVersionRequest
{
    VersionName = gcdv::VersionName.FromProjectVersion("[PROJECT]", "[VERSION]"),
};
// Make the request
await versionsClient.DeleteVersionAsync(request);

DeleteVersionAsync(VersionName, CallSettings)

public virtual Task DeleteVersionAsync(VersionName name, CallSettings callSettings = null)

Delete the specified agent version.

Parameters
Name Description
name VersionName

Required. The name of the version to delete. Supported formats:

  • projects/<Project ID>/agent/versions/<Version ID>
  • projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID>
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcdv::VersionName name = gcdv::VersionName.FromProjectVersion("[PROJECT]", "[VERSION]");
// Make the request
await versionsClient.DeleteVersionAsync(name);

DeleteVersionAsync(VersionName, CancellationToken)

public virtual Task DeleteVersionAsync(VersionName name, CancellationToken cancellationToken)

Delete the specified agent version.

Parameters
Name Description
name VersionName

Required. The name of the version to delete. Supported formats:

  • projects/<Project ID>/agent/versions/<Version ID>
  • projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID>
cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcdv::VersionName name = gcdv::VersionName.FromProjectVersion("[PROJECT]", "[VERSION]");
// Make the request
await versionsClient.DeleteVersionAsync(name);

DeleteVersionAsync(string, CallSettings)

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

Delete the specified agent version.

Parameters
Name Description
name string

Required. The name of the version to delete. Supported formats:

  • projects/<Project ID>/agent/versions/<Version ID>
  • projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID>
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/versions/[VERSION]";
// Make the request
await versionsClient.DeleteVersionAsync(name);

DeleteVersionAsync(string, CancellationToken)

public virtual Task DeleteVersionAsync(string name, CancellationToken cancellationToken)

Delete the specified agent version.

Parameters
Name Description
name string

Required. The name of the version to delete. Supported formats:

  • projects/<Project ID>/agent/versions/<Version ID>
  • projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID>
cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/versions/[VERSION]";
// Make the request
await versionsClient.DeleteVersionAsync(name);

GetVersion(GetVersionRequest, CallSettings)

public virtual Version GetVersion(GetVersionRequest request, CallSettings callSettings = null)

Retrieves the specified agent version.

Parameters
Name Description
request GetVersionRequest

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
Version

The RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = gcdv::VersionsClient.Create();
// Initialize request argument(s)
gcdv::GetVersionRequest request = new gcdv::GetVersionRequest
{
    VersionName = gcdv::VersionName.FromProjectVersion("[PROJECT]", "[VERSION]"),
};
// Make the request
gcdv::Version response = versionsClient.GetVersion(request);

GetVersion(VersionName, CallSettings)

public virtual Version GetVersion(VersionName name, CallSettings callSettings = null)

Retrieves the specified agent version.

Parameters
Name Description
name VersionName

Required. The name of the version. Supported formats:

  • projects/<Project ID>/agent/versions/<Version ID>
  • projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID>
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Version

The RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = gcdv::VersionsClient.Create();
// Initialize request argument(s)
gcdv::VersionName name = gcdv::VersionName.FromProjectVersion("[PROJECT]", "[VERSION]");
// Make the request
gcdv::Version response = versionsClient.GetVersion(name);

GetVersion(string, CallSettings)

public virtual Version GetVersion(string name, CallSettings callSettings = null)

Retrieves the specified agent version.

Parameters
Name Description
name string

Required. The name of the version. Supported formats:

  • projects/<Project ID>/agent/versions/<Version ID>
  • projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID>
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Version

The RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = gcdv::VersionsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/versions/[VERSION]";
// Make the request
gcdv::Version response = versionsClient.GetVersion(name);

GetVersionAsync(GetVersionRequest, CallSettings)

public virtual Task<Version> GetVersionAsync(GetVersionRequest request, CallSettings callSettings = null)

Retrieves the specified agent version.

Parameters
Name Description
request GetVersionRequest

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
TaskVersion

A Task containing the RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcdv::GetVersionRequest request = new gcdv::GetVersionRequest
{
    VersionName = gcdv::VersionName.FromProjectVersion("[PROJECT]", "[VERSION]"),
};
// Make the request
gcdv::Version response = await versionsClient.GetVersionAsync(request);

GetVersionAsync(GetVersionRequest, CancellationToken)

public virtual Task<Version> GetVersionAsync(GetVersionRequest request, CancellationToken cancellationToken)

Retrieves the specified agent version.

Parameters
Name Description
request GetVersionRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskVersion

A Task containing the RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcdv::GetVersionRequest request = new gcdv::GetVersionRequest
{
    VersionName = gcdv::VersionName.FromProjectVersion("[PROJECT]", "[VERSION]"),
};
// Make the request
gcdv::Version response = await versionsClient.GetVersionAsync(request);

GetVersionAsync(VersionName, CallSettings)

public virtual Task<Version> GetVersionAsync(VersionName name, CallSettings callSettings = null)

Retrieves the specified agent version.

Parameters
Name Description
name VersionName

Required. The name of the version. Supported formats:

  • projects/<Project ID>/agent/versions/<Version ID>
  • projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID>
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskVersion

A Task containing the RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcdv::VersionName name = gcdv::VersionName.FromProjectVersion("[PROJECT]", "[VERSION]");
// Make the request
gcdv::Version response = await versionsClient.GetVersionAsync(name);

GetVersionAsync(VersionName, CancellationToken)

public virtual Task<Version> GetVersionAsync(VersionName name, CancellationToken cancellationToken)

Retrieves the specified agent version.

Parameters
Name Description
name VersionName

Required. The name of the version. Supported formats:

  • projects/<Project ID>/agent/versions/<Version ID>
  • projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID>
cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskVersion

A Task containing the RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcdv::VersionName name = gcdv::VersionName.FromProjectVersion("[PROJECT]", "[VERSION]");
// Make the request
gcdv::Version response = await versionsClient.GetVersionAsync(name);

GetVersionAsync(string, CallSettings)

public virtual Task<Version> GetVersionAsync(string name, CallSettings callSettings = null)

Retrieves the specified agent version.

Parameters
Name Description
name string

Required. The name of the version. Supported formats:

  • projects/<Project ID>/agent/versions/<Version ID>
  • projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID>
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskVersion

A Task containing the RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/versions/[VERSION]";
// Make the request
gcdv::Version response = await versionsClient.GetVersionAsync(name);

GetVersionAsync(string, CancellationToken)

public virtual Task<Version> GetVersionAsync(string name, CancellationToken cancellationToken)

Retrieves the specified agent version.

Parameters
Name Description
name string

Required. The name of the version. Supported formats:

  • projects/<Project ID>/agent/versions/<Version ID>
  • projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID>
cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskVersion

A Task containing the RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/versions/[VERSION]";
// Make the request
gcdv::Version response = await versionsClient.GetVersionAsync(name);

ListVersions(AgentName, string, int?, CallSettings)

public virtual PagedEnumerable<ListVersionsResponse, Version> ListVersions(AgentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all versions of the specified agent.

Parameters
Name Description
parent AgentName

Required. The agent to list all versions from. Supported formats:

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

A pageable sequence of Version resources.

Example
// Create client
gcdv::VersionsClient versionsClient = gcdv::VersionsClient.Create();
// Initialize request argument(s)
gcdv::AgentName parent = gcdv::AgentName.FromProject("[PROJECT]");
// Make the request
PagedEnumerable<gcdv::ListVersionsResponse, gcdv::Version> response = versionsClient.ListVersions(parent);

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

ListVersions(ListVersionsRequest, CallSettings)

public virtual PagedEnumerable<ListVersionsResponse, Version> ListVersions(ListVersionsRequest request, CallSettings callSettings = null)

Returns the list of all versions of the specified agent.

Parameters
Name Description
request ListVersionsRequest

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
PagedEnumerableListVersionsResponseVersion

A pageable sequence of Version resources.

Example
// Create client
gcdv::VersionsClient versionsClient = gcdv::VersionsClient.Create();
// Initialize request argument(s)
gcdv::ListVersionsRequest request = new gcdv::ListVersionsRequest
{
    ParentAsAgentName = gcdv::AgentName.FromProject("[PROJECT]"),
};
// Make the request
PagedEnumerable<gcdv::ListVersionsResponse, gcdv::Version> response = versionsClient.ListVersions(request);

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

ListVersions(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListVersionsResponse, Version> ListVersions(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all versions of the specified agent.

Parameters
Name Description
parent string

Required. The agent to list all versions from. Supported formats:

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

A pageable sequence of Version resources.

Example
// Create client
gcdv::VersionsClient versionsClient = gcdv::VersionsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
// Make the request
PagedEnumerable<gcdv::ListVersionsResponse, gcdv::Version> response = versionsClient.ListVersions(parent);

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

ListVersionsAsync(AgentName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListVersionsResponse, Version> ListVersionsAsync(AgentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all versions of the specified agent.

Parameters
Name Description
parent AgentName

Required. The agent to list all versions from. Supported formats:

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

A pageable asynchronous sequence of Version resources.

Example
// Create client
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcdv::AgentName parent = gcdv::AgentName.FromProject("[PROJECT]");
// Make the request
PagedAsyncEnumerable<gcdv::ListVersionsResponse, gcdv::Version> response = versionsClient.ListVersionsAsync(parent);

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

ListVersionsAsync(ListVersionsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListVersionsResponse, Version> ListVersionsAsync(ListVersionsRequest request, CallSettings callSettings = null)

Returns the list of all versions of the specified agent.

Parameters
Name Description
request ListVersionsRequest

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
PagedAsyncEnumerableListVersionsResponseVersion

A pageable asynchronous sequence of Version resources.

Example
// Create client
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcdv::ListVersionsRequest request = new gcdv::ListVersionsRequest
{
    ParentAsAgentName = gcdv::AgentName.FromProject("[PROJECT]"),
};
// Make the request
PagedAsyncEnumerable<gcdv::ListVersionsResponse, gcdv::Version> response = versionsClient.ListVersionsAsync(request);

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

ListVersionsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListVersionsResponse, Version> ListVersionsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns the list of all versions of the specified agent.

Parameters
Name Description
parent string

Required. The agent to list all versions from. Supported formats:

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

A pageable asynchronous sequence of Version resources.

Example
// Create client
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/agent";
// Make the request
PagedAsyncEnumerable<gcdv::ListVersionsResponse, gcdv::Version> response = versionsClient.ListVersionsAsync(parent);

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

UpdateVersion(UpdateVersionRequest, CallSettings)

public virtual Version UpdateVersion(UpdateVersionRequest request, CallSettings callSettings = null)

Updates the specified agent version.

Note that this method does not allow you to update the state of the agent the given version points to. It allows you to update only mutable properties of the version resource.

Parameters
Name Description
request UpdateVersionRequest

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
Version

The RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = gcdv::VersionsClient.Create();
// Initialize request argument(s)
gcdv::UpdateVersionRequest request = new gcdv::UpdateVersionRequest
{
    Version = new gcdv::Version(),
    UpdateMask = new FieldMask(),
};
// Make the request
gcdv::Version response = versionsClient.UpdateVersion(request);

UpdateVersion(Version, FieldMask, CallSettings)

public virtual Version UpdateVersion(Version version, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified agent version.

Note that this method does not allow you to update the state of the agent the given version points to. It allows you to update only mutable properties of the version resource.

Parameters
Name Description
version Version

Required. The version to update. Supported formats:

  • projects/<Project ID>/agent/versions/<Version ID>
  • projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID>
updateMask FieldMask

Required. The mask to control which fields get updated.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Version

The RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = gcdv::VersionsClient.Create();
// Initialize request argument(s)
gcdv::Version version = new gcdv::Version();
FieldMask updateMask = new FieldMask();
// Make the request
gcdv::Version response = versionsClient.UpdateVersion(version, updateMask);

UpdateVersionAsync(UpdateVersionRequest, CallSettings)

public virtual Task<Version> UpdateVersionAsync(UpdateVersionRequest request, CallSettings callSettings = null)

Updates the specified agent version.

Note that this method does not allow you to update the state of the agent the given version points to. It allows you to update only mutable properties of the version resource.

Parameters
Name Description
request UpdateVersionRequest

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
TaskVersion

A Task containing the RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcdv::UpdateVersionRequest request = new gcdv::UpdateVersionRequest
{
    Version = new gcdv::Version(),
    UpdateMask = new FieldMask(),
};
// Make the request
gcdv::Version response = await versionsClient.UpdateVersionAsync(request);

UpdateVersionAsync(UpdateVersionRequest, CancellationToken)

public virtual Task<Version> UpdateVersionAsync(UpdateVersionRequest request, CancellationToken cancellationToken)

Updates the specified agent version.

Note that this method does not allow you to update the state of the agent the given version points to. It allows you to update only mutable properties of the version resource.

Parameters
Name Description
request UpdateVersionRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskVersion

A Task containing the RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcdv::UpdateVersionRequest request = new gcdv::UpdateVersionRequest
{
    Version = new gcdv::Version(),
    UpdateMask = new FieldMask(),
};
// Make the request
gcdv::Version response = await versionsClient.UpdateVersionAsync(request);

UpdateVersionAsync(Version, FieldMask, CallSettings)

public virtual Task<Version> UpdateVersionAsync(Version version, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified agent version.

Note that this method does not allow you to update the state of the agent the given version points to. It allows you to update only mutable properties of the version resource.

Parameters
Name Description
version Version

Required. The version to update. Supported formats:

  • projects/<Project ID>/agent/versions/<Version ID>
  • projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID>
updateMask FieldMask

Required. The mask to control which fields get updated.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskVersion

A Task containing the RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcdv::Version version = new gcdv::Version();
FieldMask updateMask = new FieldMask();
// Make the request
gcdv::Version response = await versionsClient.UpdateVersionAsync(version, updateMask);

UpdateVersionAsync(Version, FieldMask, CancellationToken)

public virtual Task<Version> UpdateVersionAsync(Version version, FieldMask updateMask, CancellationToken cancellationToken)

Updates the specified agent version.

Note that this method does not allow you to update the state of the agent the given version points to. It allows you to update only mutable properties of the version resource.

Parameters
Name Description
version Version

Required. The version to update. Supported formats:

  • projects/<Project ID>/agent/versions/<Version ID>
  • projects/<Project ID>/locations/<Location ID>/agent/versions/<Version ID>
updateMask FieldMask

Required. The mask to control which fields get updated.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskVersion

A Task containing the RPC response.

Example
// Create client
gcdv::VersionsClient versionsClient = await gcdv::VersionsClient.CreateAsync();
// Initialize request argument(s)
gcdv::Version version = new gcdv::Version();
FieldMask updateMask = new FieldMask();
// Make the request
gcdv::Version response = await versionsClient.UpdateVersionAsync(version, updateMask);