Class VersionsClient
Versions client wrapper, for convenient use.
Namespace: Google.Cloud.Dialogflow.V2
Assembly: Google.Cloud.Dialogflow.V2.dll
Syntax
public abstract class VersionsClient
Remarks
Service for managing [Versions][google.cloud.dialogflow.v2.Version].
Properties
DefaultEndpoint
The default endpoint for the Versions service, which is a host of "dialogflow.googleapis.com" and a port of 443.
Declaration
public static string DefaultEndpoint { get; }
Property Value
Type | Description |
---|---|
string |
DefaultScopes
The default Versions scopes.
Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<string> |
Remarks
The default Versions scopes are:
- https://www.googleapis.com/auth/cloud-platform
- https://www.googleapis.com/auth/dialogflow
GrpcClient
The underlying gRPC Versions client
Declaration
public virtual Versions.VersionsClient GrpcClient { get; }
Property Value
Type | Description |
---|---|
Versions.VersionsClient |
LocationsClient
The Google.Cloud.Location.LocationsClient associated with this client.
Declaration
public virtual LocationsClient LocationsClient { get; }
Property Value
Type | Description |
---|---|
LocationsClient |
ServiceMetadata
The service metadata associated with this client type.
Declaration
public static ServiceMetadata ServiceMetadata { get; }
Property Value
Type | Description |
---|---|
ServiceMetadata |
Methods
Create()
Synchronously creates a VersionsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use VersionsClientBuilder.
Declaration
public static VersionsClient Create()
Returns
Type | Description |
---|---|
VersionsClient | The created VersionsClient. |
CreateAsync(CancellationToken)
Asynchronously creates a VersionsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use VersionsClientBuilder.
Declaration
public static Task<VersionsClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The CancellationToken to use while creating the client. |
Returns
Type | Description |
---|---|
Task<VersionsClient> | The task representing the created VersionsClient. |
CreateVersion(AgentName, Version, CallSettings)
Creates an agent version.
The new version points to the agent instance in the "default" environment.
Declaration
public virtual Version CreateVersion(AgentName parent, Version version, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to create a version for. Supported formats:
|
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. |
Sample code
// 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)
Creates an agent version.
The new version points to the agent instance in the "default" environment.
Declaration
public virtual Version CreateVersion(CreateVersionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
CreateVersionRequest | request | 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. |
Sample code
// 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)
Creates an agent version.
The new version points to the agent instance in the "default" environment.
Declaration
public virtual Version CreateVersion(string parent, Version version, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to create a version for. Supported formats:
|
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. |
Sample code
// 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)
Creates an agent version.
The new version points to the agent instance in the "default" environment.
Declaration
public virtual Task<Version> CreateVersionAsync(AgentName parent, Version version, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to create a version for. Supported formats:
|
Version | version | Required. The version to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Version> | A Task containing the RPC response. |
Sample code
// 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)
Creates an agent version.
The new version points to the agent instance in the "default" environment.
Declaration
public virtual Task<Version> CreateVersionAsync(AgentName parent, Version version, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to create a version for. Supported formats:
|
Version | version | Required. The version to create. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Version> | A Task containing the RPC response. |
Sample code
// 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)
Creates an agent version.
The new version points to the agent instance in the "default" environment.
Declaration
public virtual Task<Version> CreateVersionAsync(CreateVersionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
CreateVersionRequest | request | 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<Version> | A Task containing the RPC response. |
Sample code
// 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)
Creates an agent version.
The new version points to the agent instance in the "default" environment.
Declaration
public virtual Task<Version> CreateVersionAsync(CreateVersionRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CreateVersionRequest | request | 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<Version> | A Task containing the RPC response. |
Sample code
// 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)
Creates an agent version.
The new version points to the agent instance in the "default" environment.
Declaration
public virtual Task<Version> CreateVersionAsync(string parent, Version version, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to create a version for. Supported formats:
|
Version | version | Required. The version to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Version> | A Task containing the RPC response. |
Sample code
// 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)
Creates an agent version.
The new version points to the agent instance in the "default" environment.
Declaration
public virtual Task<Version> CreateVersionAsync(string parent, Version version, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to create a version for. Supported formats:
|
Version | version | Required. The version to create. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Version> | A Task containing the RPC response. |
Sample code
// 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)
Delete the specified agent version.
Declaration
public virtual void DeleteVersion(DeleteVersionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeleteVersionRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Sample code
// 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)
Delete the specified agent version.
Declaration
public virtual void DeleteVersion(VersionName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
VersionName | name | Required. The name of the version to delete. Supported formats:
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Sample code
// 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)
Delete the specified agent version.
Declaration
public virtual void DeleteVersion(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the version to delete. Supported formats:
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Sample code
// 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)
Delete the specified agent version.
Declaration
public virtual Task DeleteVersionAsync(DeleteVersionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeleteVersionRequest | request | 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. |
Sample code
// 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)
Delete the specified agent version.
Declaration
public virtual Task DeleteVersionAsync(DeleteVersionRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DeleteVersionRequest | request | 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. |
Sample code
// 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)
Delete the specified agent version.
Declaration
public virtual Task DeleteVersionAsync(VersionName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
VersionName | name | Required. The name of the version to delete. Supported formats:
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task | A Task containing the RPC response. |
Sample code
// 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)
Delete the specified agent version.
Declaration
public virtual Task DeleteVersionAsync(VersionName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
VersionName | name | Required. The name of the version to delete. Supported formats:
|
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task | A Task containing the RPC response. |
Sample code
// 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)
Delete the specified agent version.
Declaration
public virtual Task DeleteVersionAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the version to delete. Supported formats:
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task | A Task containing the RPC response. |
Sample code
// 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)
Delete the specified agent version.
Declaration
public virtual Task DeleteVersionAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the version to delete. Supported formats:
|
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task | A Task containing the RPC response. |
Sample code
// 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)
Retrieves the specified agent version.
Declaration
public virtual Version GetVersion(GetVersionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetVersionRequest | request | 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. |
Sample code
// 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)
Retrieves the specified agent version.
Declaration
public virtual Version GetVersion(VersionName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
VersionName | name | Required. The name of the version. Supported formats:
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Version | The RPC response. |
Sample code
// 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)
Retrieves the specified agent version.
Declaration
public virtual Version GetVersion(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the version. Supported formats:
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Version | The RPC response. |
Sample code
// 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)
Retrieves the specified agent version.
Declaration
public virtual Task<Version> GetVersionAsync(GetVersionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetVersionRequest | request | 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<Version> | A Task containing the RPC response. |
Sample code
// 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)
Retrieves the specified agent version.
Declaration
public virtual Task<Version> GetVersionAsync(GetVersionRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
GetVersionRequest | request | 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<Version> | A Task containing the RPC response. |
Sample code
// 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)
Retrieves the specified agent version.
Declaration
public virtual Task<Version> GetVersionAsync(VersionName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
VersionName | name | Required. The name of the version. Supported formats:
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Version> | A Task containing the RPC response. |
Sample code
// 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)
Retrieves the specified agent version.
Declaration
public virtual Task<Version> GetVersionAsync(VersionName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
VersionName | name | Required. The name of the version. Supported formats:
|
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Version> | A Task containing the RPC response. |
Sample code
// 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)
Retrieves the specified agent version.
Declaration
public virtual Task<Version> GetVersionAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the version. Supported formats:
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Version> | A Task containing the RPC response. |
Sample code
// 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)
Retrieves the specified agent version.
Declaration
public virtual Task<Version> GetVersionAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the version. Supported formats:
|
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Version> | A Task containing the RPC response. |
Sample code
// 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)
Returns the list of all versions of the specified agent.
Declaration
public virtual PagedEnumerable<ListVersionsResponse, Version> ListVersions(AgentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to list all versions from. Supported formats:
|
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedEnumerable<ListVersionsResponse, Version> | A pageable sequence of Version resources. |
Sample code
// 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)
Returns the list of all versions of the specified agent.
Declaration
public virtual PagedEnumerable<ListVersionsResponse, Version> ListVersions(ListVersionsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListVersionsRequest | request | 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 |
---|---|
PagedEnumerable<ListVersionsResponse, Version> | A pageable sequence of Version resources. |
Sample code
// 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)
Returns the list of all versions of the specified agent.
Declaration
public virtual PagedEnumerable<ListVersionsResponse, Version> ListVersions(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to list all versions from. Supported formats:
|
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedEnumerable<ListVersionsResponse, Version> | A pageable sequence of Version resources. |
Sample code
// 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)
Returns the list of all versions of the specified agent.
Declaration
public virtual PagedAsyncEnumerable<ListVersionsResponse, Version> ListVersionsAsync(AgentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AgentName | parent | Required. The agent to list all versions from. Supported formats:
|
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedAsyncEnumerable<ListVersionsResponse, Version> | A pageable asynchronous sequence of Version resources. |
Sample code
// 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)
Returns the list of all versions of the specified agent.
Declaration
public virtual PagedAsyncEnumerable<ListVersionsResponse, Version> ListVersionsAsync(ListVersionsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListVersionsRequest | request | 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 |
---|---|
PagedAsyncEnumerable<ListVersionsResponse, Version> | A pageable asynchronous sequence of Version resources. |
Sample code
// 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)
Returns the list of all versions of the specified agent.
Declaration
public virtual PagedAsyncEnumerable<ListVersionsResponse, Version> ListVersionsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The agent to list all versions from. Supported formats:
|
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedAsyncEnumerable<ListVersionsResponse, Version> | A pageable asynchronous sequence of Version resources. |
Sample code
// 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()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Declaration
public static Task ShutdownDefaultChannelsAsync()
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)
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.
Declaration
public virtual Version UpdateVersion(UpdateVersionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateVersionRequest | request | 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. |
Sample code
// 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)
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.
Declaration
public virtual Version UpdateVersion(Version version, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
Version | version | Required. The version to update. Supported formats:
|
FieldMask | updateMask | 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. |
Sample code
// 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)
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.
Declaration
public virtual Task<Version> UpdateVersionAsync(UpdateVersionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateVersionRequest | request | 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<Version> | A Task containing the RPC response. |
Sample code
// 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)
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.
Declaration
public virtual Task<Version> UpdateVersionAsync(UpdateVersionRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
UpdateVersionRequest | request | 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<Version> | A Task containing the RPC response. |
Sample code
// 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)
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.
Declaration
public virtual Task<Version> UpdateVersionAsync(Version version, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
Version | version | Required. The version to update. Supported formats:
|
FieldMask | updateMask | Required. The mask to control which fields get updated. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Version> | A Task containing the RPC response. |
Sample code
// 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)
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.
Declaration
public virtual Task<Version> UpdateVersionAsync(Version version, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Version | version | Required. The version to update. Supported formats:
|
FieldMask | updateMask | Required. The mask to control which fields get updated. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Version> | A Task containing the RPC response. |
Sample code
// 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);