public abstract class DeploymentsClient
Deployments client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Dialogflow.Cx.V3Assembly
Google.Cloud.Dialogflow.Cx.V3.dll
Remarks
Service for managing [Deployments][google.cloud.dialogflow.cx.v3.Deployment].
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the Deployments 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 Deployments scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default Deployments scopes are:
GrpcClient
public virtual Deployments.DeploymentsClient GrpcClient { get; }
The underlying gRPC Deployments client
Property Value | |
---|---|
Type | Description |
Deployments.DeploymentsClient |
Methods
Create()
public static DeploymentsClient Create()
Synchronously creates a DeploymentsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use DeploymentsClientBuilder.
Returns | |
---|---|
Type | Description |
DeploymentsClient | The created DeploymentsClient. |
CreateAsync(CancellationToken)
public static Task<DeploymentsClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a DeploymentsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use DeploymentsClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
Task<DeploymentsClient> | The task representing the created DeploymentsClient. |
GetDeployment(DeploymentName, CallSettings)
public virtual Deployment GetDeployment(DeploymentName name, CallSettings callSettings = null)
Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3.Deployment].
Parameters | |
---|---|
Name | Description |
name | DeploymentName Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3.Deployment].
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Deployment | The RPC response. |
// Create client
DeploymentsClient deploymentsClient = DeploymentsClient.Create();
// Initialize request argument(s)
DeploymentName name = DeploymentName.FromProjectLocationAgentEnvironmentDeployment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]");
// Make the request
Deployment response = deploymentsClient.GetDeployment(name);
GetDeployment(GetDeploymentRequest, CallSettings)
public virtual Deployment GetDeployment(GetDeploymentRequest request, CallSettings callSettings = null)
Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3.Deployment].
Parameters | |
---|---|
Name | Description |
request | GetDeploymentRequest 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 |
Deployment | The RPC response. |
// Create client
DeploymentsClient deploymentsClient = DeploymentsClient.Create();
// Initialize request argument(s)
GetDeploymentRequest request = new GetDeploymentRequest
{
DeploymentName = DeploymentName.FromProjectLocationAgentEnvironmentDeployment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]"),
};
// Make the request
Deployment response = deploymentsClient.GetDeployment(request);
GetDeployment(String, CallSettings)
public virtual Deployment GetDeployment(string name, CallSettings callSettings = null)
Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3.Deployment].
Parameters | |
---|---|
Name | Description |
name | String Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3.Deployment].
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Deployment | The RPC response. |
// Create client
DeploymentsClient deploymentsClient = DeploymentsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]/deployments/[DEPLOYMENT]";
// Make the request
Deployment response = deploymentsClient.GetDeployment(name);
GetDeploymentAsync(DeploymentName, CallSettings)
public virtual Task<Deployment> GetDeploymentAsync(DeploymentName name, CallSettings callSettings = null)
Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3.Deployment].
Parameters | |
---|---|
Name | Description |
name | DeploymentName Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3.Deployment].
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Deployment> | A Task containing the RPC response. |
// Create client
DeploymentsClient deploymentsClient = await DeploymentsClient.CreateAsync();
// Initialize request argument(s)
DeploymentName name = DeploymentName.FromProjectLocationAgentEnvironmentDeployment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]");
// Make the request
Deployment response = await deploymentsClient.GetDeploymentAsync(name);
GetDeploymentAsync(DeploymentName, CancellationToken)
public virtual Task<Deployment> GetDeploymentAsync(DeploymentName name, CancellationToken cancellationToken)
Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3.Deployment].
Parameters | |
---|---|
Name | Description |
name | DeploymentName Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3.Deployment].
Format: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Deployment> | A Task containing the RPC response. |
// Create client
DeploymentsClient deploymentsClient = await DeploymentsClient.CreateAsync();
// Initialize request argument(s)
DeploymentName name = DeploymentName.FromProjectLocationAgentEnvironmentDeployment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]");
// Make the request
Deployment response = await deploymentsClient.GetDeploymentAsync(name);
GetDeploymentAsync(GetDeploymentRequest, CallSettings)
public virtual Task<Deployment> GetDeploymentAsync(GetDeploymentRequest request, CallSettings callSettings = null)
Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3.Deployment].
Parameters | |
---|---|
Name | Description |
request | GetDeploymentRequest 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<Deployment> | A Task containing the RPC response. |
// Create client
DeploymentsClient deploymentsClient = await DeploymentsClient.CreateAsync();
// Initialize request argument(s)
GetDeploymentRequest request = new GetDeploymentRequest
{
DeploymentName = DeploymentName.FromProjectLocationAgentEnvironmentDeployment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]"),
};
// Make the request
Deployment response = await deploymentsClient.GetDeploymentAsync(request);
GetDeploymentAsync(GetDeploymentRequest, CancellationToken)
public virtual Task<Deployment> GetDeploymentAsync(GetDeploymentRequest request, CancellationToken cancellationToken)
Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3.Deployment].
Parameters | |
---|---|
Name | Description |
request | GetDeploymentRequest 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<Deployment> | A Task containing the RPC response. |
// Create client
DeploymentsClient deploymentsClient = await DeploymentsClient.CreateAsync();
// Initialize request argument(s)
GetDeploymentRequest request = new GetDeploymentRequest
{
DeploymentName = DeploymentName.FromProjectLocationAgentEnvironmentDeployment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[DEPLOYMENT]"),
};
// Make the request
Deployment response = await deploymentsClient.GetDeploymentAsync(request);
GetDeploymentAsync(String, CallSettings)
public virtual Task<Deployment> GetDeploymentAsync(string name, CallSettings callSettings = null)
Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3.Deployment].
Parameters | |
---|---|
Name | Description |
name | String Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3.Deployment].
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Deployment> | A Task containing the RPC response. |
// Create client
DeploymentsClient deploymentsClient = await DeploymentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]/deployments/[DEPLOYMENT]";
// Make the request
Deployment response = await deploymentsClient.GetDeploymentAsync(name);
GetDeploymentAsync(String, CancellationToken)
public virtual Task<Deployment> GetDeploymentAsync(string name, CancellationToken cancellationToken)
Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3.Deployment].
Parameters | |
---|---|
Name | Description |
name | String Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3.Deployment].
Format: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Deployment> | A Task containing the RPC response. |
// Create client
DeploymentsClient deploymentsClient = await DeploymentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]/deployments/[DEPLOYMENT]";
// Make the request
Deployment response = await deploymentsClient.GetDeploymentAsync(name);
ListDeployments(EnvironmentName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListDeploymentsResponse, Deployment> ListDeployments(EnvironmentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Returns the list of all deployments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
Parameters | |
---|---|
Name | Description |
parent | EnvironmentName Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for.
Format: |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> 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<ListDeploymentsResponse, Deployment> | A pageable sequence of Deployment resources. |
// Create client
DeploymentsClient deploymentsClient = DeploymentsClient.Create();
// Initialize request argument(s)
EnvironmentName parent = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
// Make the request
PagedEnumerable<ListDeploymentsResponse, Deployment> response = deploymentsClient.ListDeployments(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Deployment 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 (ListDeploymentsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Deployment 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<Deployment> 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 (Deployment 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;
ListDeployments(ListDeploymentsRequest, CallSettings)
public virtual PagedEnumerable<ListDeploymentsResponse, Deployment> ListDeployments(ListDeploymentsRequest request, CallSettings callSettings = null)
Returns the list of all deployments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
Parameters | |
---|---|
Name | Description |
request | ListDeploymentsRequest 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<ListDeploymentsResponse, Deployment> | A pageable sequence of Deployment resources. |
// Create client
DeploymentsClient deploymentsClient = DeploymentsClient.Create();
// Initialize request argument(s)
ListDeploymentsRequest request = new ListDeploymentsRequest
{
ParentAsEnvironmentName = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"),
};
// Make the request
PagedEnumerable<ListDeploymentsResponse, Deployment> response = deploymentsClient.ListDeployments(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Deployment 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 (ListDeploymentsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Deployment 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<Deployment> 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 (Deployment 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;
ListDeployments(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListDeploymentsResponse, Deployment> ListDeployments(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Returns the list of all deployments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
Parameters | |
---|---|
Name | Description |
parent | String Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for.
Format: |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> 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<ListDeploymentsResponse, Deployment> | A pageable sequence of Deployment resources. |
// Create client
DeploymentsClient deploymentsClient = DeploymentsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]";
// Make the request
PagedEnumerable<ListDeploymentsResponse, Deployment> response = deploymentsClient.ListDeployments(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Deployment 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 (ListDeploymentsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Deployment 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<Deployment> 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 (Deployment 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;
ListDeploymentsAsync(EnvironmentName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListDeploymentsResponse, Deployment> ListDeploymentsAsync(EnvironmentName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Returns the list of all deployments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
Parameters | |
---|---|
Name | Description |
parent | EnvironmentName Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for.
Format: |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> 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<ListDeploymentsResponse, Deployment> | A pageable asynchronous sequence of Deployment resources. |
// Create client
DeploymentsClient deploymentsClient = await DeploymentsClient.CreateAsync();
// Initialize request argument(s)
EnvironmentName parent = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
// Make the request
PagedAsyncEnumerable<ListDeploymentsResponse, Deployment> response = deploymentsClient.ListDeploymentsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Deployment 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((ListDeploymentsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Deployment 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<Deployment> 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 (Deployment 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;
ListDeploymentsAsync(ListDeploymentsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListDeploymentsResponse, Deployment> ListDeploymentsAsync(ListDeploymentsRequest request, CallSettings callSettings = null)
Returns the list of all deployments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
Parameters | |
---|---|
Name | Description |
request | ListDeploymentsRequest 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<ListDeploymentsResponse, Deployment> | A pageable asynchronous sequence of Deployment resources. |
// Create client
DeploymentsClient deploymentsClient = await DeploymentsClient.CreateAsync();
// Initialize request argument(s)
ListDeploymentsRequest request = new ListDeploymentsRequest
{
ParentAsEnvironmentName = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]"),
};
// Make the request
PagedAsyncEnumerable<ListDeploymentsResponse, Deployment> response = deploymentsClient.ListDeploymentsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Deployment 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((ListDeploymentsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Deployment 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<Deployment> 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 (Deployment 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;
ListDeploymentsAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListDeploymentsResponse, Deployment> ListDeploymentsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Returns the list of all deployments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
Parameters | |
---|---|
Name | Description |
parent | String Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for.
Format: |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> 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<ListDeploymentsResponse, Deployment> | A pageable asynchronous sequence of Deployment resources. |
// Create client
DeploymentsClient deploymentsClient = await DeploymentsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]";
// Make the request
PagedAsyncEnumerable<ListDeploymentsResponse, Deployment> response = deploymentsClient.ListDeploymentsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Deployment 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((ListDeploymentsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Deployment 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<Deployment> 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 (Deployment item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.