Class AutoMlClient
AutoMl client wrapper, for convenient use.
Inherited Members
Namespace: Google.Cloud.AutoML.V1
Assembly: Google.Cloud.AutoML.V1.dll
Syntax
public abstract class AutoMlClient
Remarks
AutoML Server API.
The resource names are assigned by the server. The server never reuses names that it has created after the resources with those names are deleted.
An ID of a resource is the last element of the item's resource name. For
projects/{project_id}/locations/{location_id}/datasets/{dataset_id}
, then
the id for the item is {dataset_id}
.
Currently the only supported location_id
is "us-central1".
On any input that is documented to expect a string parameter in snake_case or kebab-case, either of those cases is accepted.
Properties
CreateDatasetOperationsClient
The long-running operations client for CreateDataset
.
Declaration
public virtual OperationsClient CreateDatasetOperationsClient { get; }
Property Value
Type | Description |
---|---|
OperationsClient |
CreateModelOperationsClient
The long-running operations client for CreateModel
.
Declaration
public virtual OperationsClient CreateModelOperationsClient { get; }
Property Value
Type | Description |
---|---|
OperationsClient |
DefaultEndpoint
The default endpoint for the AutoMl service, which is a host of "automl.googleapis.com" and a port of 443.
Declaration
public static string DefaultEndpoint { get; }
Property Value
Type | Description |
---|---|
System.String |
DefaultScopes
The default AutoMl scopes.
Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.String> |
Remarks
The default AutoMl scopes are:
DeleteDatasetOperationsClient
The long-running operations client for DeleteDataset
.
Declaration
public virtual OperationsClient DeleteDatasetOperationsClient { get; }
Property Value
Type | Description |
---|---|
OperationsClient |
DeleteModelOperationsClient
The long-running operations client for DeleteModel
.
Declaration
public virtual OperationsClient DeleteModelOperationsClient { get; }
Property Value
Type | Description |
---|---|
OperationsClient |
DeployModelOperationsClient
The long-running operations client for DeployModel
.
Declaration
public virtual OperationsClient DeployModelOperationsClient { get; }
Property Value
Type | Description |
---|---|
OperationsClient |
ExportDataOperationsClient
The long-running operations client for ExportData
.
Declaration
public virtual OperationsClient ExportDataOperationsClient { get; }
Property Value
Type | Description |
---|---|
OperationsClient |
ExportModelOperationsClient
The long-running operations client for ExportModel
.
Declaration
public virtual OperationsClient ExportModelOperationsClient { get; }
Property Value
Type | Description |
---|---|
OperationsClient |
GrpcClient
The underlying gRPC AutoMl client
Declaration
public virtual AutoMl.AutoMlClient GrpcClient { get; }
Property Value
Type | Description |
---|---|
AutoMl.AutoMlClient |
ImportDataOperationsClient
The long-running operations client for ImportData
.
Declaration
public virtual OperationsClient ImportDataOperationsClient { get; }
Property Value
Type | Description |
---|---|
OperationsClient |
UndeployModelOperationsClient
The long-running operations client for UndeployModel
.
Declaration
public virtual OperationsClient UndeployModelOperationsClient { get; }
Property Value
Type | Description |
---|---|
OperationsClient |
Methods
Create()
Synchronously creates a AutoMlClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AutoMlClientBuilder.
Declaration
public static AutoMlClient Create()
Returns
Type | Description |
---|---|
AutoMlClient | The created AutoMlClient. |
CreateAsync(CancellationToken)
Asynchronously creates a AutoMlClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AutoMlClientBuilder.
Declaration
public static Task<AutoMlClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken | The System.Threading.CancellationToken to use while creating the client. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<AutoMlClient> | The task representing the created AutoMlClient. |
CreateDataset(LocationName, Dataset, CallSettings)
Creates a dataset.
Declaration
public virtual Operation<Dataset, OperationMetadata> CreateDataset(LocationName parent, Dataset dataset, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
LocationName | parent | Required. The resource name of the project to create the dataset for. |
Dataset | dataset | Required. The dataset to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Dataset, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Dataset dataset = new Dataset();
// Make the request
Operation<Dataset, OperationMetadata> response = autoMlClient.CreateDataset(parent, dataset);
// Poll until the returned long-running operation is complete
Operation<Dataset, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Dataset result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Dataset, OperationMetadata> retrievedResponse = autoMlClient.PollOnceCreateDataset(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Dataset retrievedResult = retrievedResponse.Result;
}
CreateDataset(CreateDatasetRequest, CallSettings)
Creates a dataset.
Declaration
public virtual Operation<Dataset, OperationMetadata> CreateDataset(CreateDatasetRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
CreateDatasetRequest | 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 |
---|---|
Operation<Dataset, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
CreateDatasetRequest request = new CreateDatasetRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Dataset = new Dataset(),
};
// Make the request
Operation<Dataset, OperationMetadata> response = autoMlClient.CreateDataset(request);
// Poll until the returned long-running operation is complete
Operation<Dataset, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Dataset result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Dataset, OperationMetadata> retrievedResponse = autoMlClient.PollOnceCreateDataset(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Dataset retrievedResult = retrievedResponse.Result;
}
CreateDataset(String, Dataset, CallSettings)
Creates a dataset.
Declaration
public virtual Operation<Dataset, OperationMetadata> CreateDataset(string parent, Dataset dataset, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | parent | Required. The resource name of the project to create the dataset for. |
Dataset | dataset | Required. The dataset to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Dataset, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Dataset dataset = new Dataset();
// Make the request
Operation<Dataset, OperationMetadata> response = autoMlClient.CreateDataset(parent, dataset);
// Poll until the returned long-running operation is complete
Operation<Dataset, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Dataset result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Dataset, OperationMetadata> retrievedResponse = autoMlClient.PollOnceCreateDataset(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Dataset retrievedResult = retrievedResponse.Result;
}
CreateDatasetAsync(LocationName, Dataset, CallSettings)
Creates a dataset.
Declaration
public virtual Task<Operation<Dataset, OperationMetadata>> CreateDatasetAsync(LocationName parent, Dataset dataset, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
LocationName | parent | Required. The resource name of the project to create the dataset for. |
Dataset | dataset | Required. The dataset to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Dataset, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Dataset dataset = new Dataset();
// Make the request
Operation<Dataset, OperationMetadata> response = await autoMlClient.CreateDatasetAsync(parent, dataset);
// Poll until the returned long-running operation is complete
Operation<Dataset, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Dataset result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Dataset, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceCreateDatasetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Dataset retrievedResult = retrievedResponse.Result;
}
CreateDatasetAsync(LocationName, Dataset, CancellationToken)
Creates a dataset.
Declaration
public virtual Task<Operation<Dataset, OperationMetadata>> CreateDatasetAsync(LocationName parent, Dataset dataset, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
LocationName | parent | Required. The resource name of the project to create the dataset for. |
Dataset | dataset | Required. The dataset to create. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Dataset, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Dataset dataset = new Dataset();
// Make the request
Operation<Dataset, OperationMetadata> response = await autoMlClient.CreateDatasetAsync(parent, dataset);
// Poll until the returned long-running operation is complete
Operation<Dataset, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Dataset result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Dataset, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceCreateDatasetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Dataset retrievedResult = retrievedResponse.Result;
}
CreateDatasetAsync(CreateDatasetRequest, CallSettings)
Creates a dataset.
Declaration
public virtual Task<Operation<Dataset, OperationMetadata>> CreateDatasetAsync(CreateDatasetRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
CreateDatasetRequest | 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 |
---|---|
System.Threading.Tasks.Task<Operation<Dataset, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
CreateDatasetRequest request = new CreateDatasetRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Dataset = new Dataset(),
};
// Make the request
Operation<Dataset, OperationMetadata> response = await autoMlClient.CreateDatasetAsync(request);
// Poll until the returned long-running operation is complete
Operation<Dataset, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Dataset result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Dataset, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceCreateDatasetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Dataset retrievedResult = retrievedResponse.Result;
}
CreateDatasetAsync(CreateDatasetRequest, CancellationToken)
Creates a dataset.
Declaration
public virtual Task<Operation<Dataset, OperationMetadata>> CreateDatasetAsync(CreateDatasetRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CreateDatasetRequest | request | The request object containing all of the parameters for the API call. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Dataset, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
CreateDatasetRequest request = new CreateDatasetRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Dataset = new Dataset(),
};
// Make the request
Operation<Dataset, OperationMetadata> response = await autoMlClient.CreateDatasetAsync(request);
// Poll until the returned long-running operation is complete
Operation<Dataset, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Dataset result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Dataset, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceCreateDatasetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Dataset retrievedResult = retrievedResponse.Result;
}
CreateDatasetAsync(String, Dataset, CallSettings)
Creates a dataset.
Declaration
public virtual Task<Operation<Dataset, OperationMetadata>> CreateDatasetAsync(string parent, Dataset dataset, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | parent | Required. The resource name of the project to create the dataset for. |
Dataset | dataset | Required. The dataset to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Dataset, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Dataset dataset = new Dataset();
// Make the request
Operation<Dataset, OperationMetadata> response = await autoMlClient.CreateDatasetAsync(parent, dataset);
// Poll until the returned long-running operation is complete
Operation<Dataset, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Dataset result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Dataset, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceCreateDatasetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Dataset retrievedResult = retrievedResponse.Result;
}
CreateDatasetAsync(String, Dataset, CancellationToken)
Creates a dataset.
Declaration
public virtual Task<Operation<Dataset, OperationMetadata>> CreateDatasetAsync(string parent, Dataset dataset, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | parent | Required. The resource name of the project to create the dataset for. |
Dataset | dataset | Required. The dataset to create. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Dataset, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Dataset dataset = new Dataset();
// Make the request
Operation<Dataset, OperationMetadata> response = await autoMlClient.CreateDatasetAsync(parent, dataset);
// Poll until the returned long-running operation is complete
Operation<Dataset, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Dataset result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Dataset, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceCreateDatasetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Dataset retrievedResult = retrievedResponse.Result;
}
CreateModel(LocationName, Model, CallSettings)
Creates a model. Returns a Model in the [response][google.longrunning.Operation.response] field when it completes. When you create a model, several model evaluations are created for it: a global evaluation, and one evaluation for each annotation spec.
Declaration
public virtual Operation<Model, OperationMetadata> CreateModel(LocationName parent, Model model, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
LocationName | parent | Required. Resource name of the parent project where the model is being created. |
Model | model | Required. The model to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Model, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Model model = new Model();
// Make the request
Operation<Model, OperationMetadata> response = autoMlClient.CreateModel(parent, model);
// Poll until the returned long-running operation is complete
Operation<Model, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Model result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Model, OperationMetadata> retrievedResponse = autoMlClient.PollOnceCreateModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Model retrievedResult = retrievedResponse.Result;
}
CreateModel(CreateModelRequest, CallSettings)
Creates a model. Returns a Model in the [response][google.longrunning.Operation.response] field when it completes. When you create a model, several model evaluations are created for it: a global evaluation, and one evaluation for each annotation spec.
Declaration
public virtual Operation<Model, OperationMetadata> CreateModel(CreateModelRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
CreateModelRequest | 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 |
---|---|
Operation<Model, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
CreateModelRequest request = new CreateModelRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Model = new Model(),
};
// Make the request
Operation<Model, OperationMetadata> response = autoMlClient.CreateModel(request);
// Poll until the returned long-running operation is complete
Operation<Model, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Model result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Model, OperationMetadata> retrievedResponse = autoMlClient.PollOnceCreateModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Model retrievedResult = retrievedResponse.Result;
}
CreateModel(String, Model, CallSettings)
Creates a model. Returns a Model in the [response][google.longrunning.Operation.response] field when it completes. When you create a model, several model evaluations are created for it: a global evaluation, and one evaluation for each annotation spec.
Declaration
public virtual Operation<Model, OperationMetadata> CreateModel(string parent, Model model, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | parent | Required. Resource name of the parent project where the model is being created. |
Model | model | Required. The model to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Model, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Model model = new Model();
// Make the request
Operation<Model, OperationMetadata> response = autoMlClient.CreateModel(parent, model);
// Poll until the returned long-running operation is complete
Operation<Model, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Model result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Model, OperationMetadata> retrievedResponse = autoMlClient.PollOnceCreateModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Model retrievedResult = retrievedResponse.Result;
}
CreateModelAsync(LocationName, Model, CallSettings)
Creates a model. Returns a Model in the [response][google.longrunning.Operation.response] field when it completes. When you create a model, several model evaluations are created for it: a global evaluation, and one evaluation for each annotation spec.
Declaration
public virtual Task<Operation<Model, OperationMetadata>> CreateModelAsync(LocationName parent, Model model, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
LocationName | parent | Required. Resource name of the parent project where the model is being created. |
Model | model | Required. The model to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Model, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Model model = new Model();
// Make the request
Operation<Model, OperationMetadata> response = await autoMlClient.CreateModelAsync(parent, model);
// Poll until the returned long-running operation is complete
Operation<Model, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Model result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Model, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceCreateModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Model retrievedResult = retrievedResponse.Result;
}
CreateModelAsync(LocationName, Model, CancellationToken)
Creates a model. Returns a Model in the [response][google.longrunning.Operation.response] field when it completes. When you create a model, several model evaluations are created for it: a global evaluation, and one evaluation for each annotation spec.
Declaration
public virtual Task<Operation<Model, OperationMetadata>> CreateModelAsync(LocationName parent, Model model, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
LocationName | parent | Required. Resource name of the parent project where the model is being created. |
Model | model | Required. The model to create. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Model, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Model model = new Model();
// Make the request
Operation<Model, OperationMetadata> response = await autoMlClient.CreateModelAsync(parent, model);
// Poll until the returned long-running operation is complete
Operation<Model, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Model result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Model, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceCreateModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Model retrievedResult = retrievedResponse.Result;
}
CreateModelAsync(CreateModelRequest, CallSettings)
Creates a model. Returns a Model in the [response][google.longrunning.Operation.response] field when it completes. When you create a model, several model evaluations are created for it: a global evaluation, and one evaluation for each annotation spec.
Declaration
public virtual Task<Operation<Model, OperationMetadata>> CreateModelAsync(CreateModelRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
CreateModelRequest | 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 |
---|---|
System.Threading.Tasks.Task<Operation<Model, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
CreateModelRequest request = new CreateModelRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Model = new Model(),
};
// Make the request
Operation<Model, OperationMetadata> response = await autoMlClient.CreateModelAsync(request);
// Poll until the returned long-running operation is complete
Operation<Model, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Model result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Model, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceCreateModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Model retrievedResult = retrievedResponse.Result;
}
CreateModelAsync(CreateModelRequest, CancellationToken)
Creates a model. Returns a Model in the [response][google.longrunning.Operation.response] field when it completes. When you create a model, several model evaluations are created for it: a global evaluation, and one evaluation for each annotation spec.
Declaration
public virtual Task<Operation<Model, OperationMetadata>> CreateModelAsync(CreateModelRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CreateModelRequest | request | The request object containing all of the parameters for the API call. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Model, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
CreateModelRequest request = new CreateModelRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Model = new Model(),
};
// Make the request
Operation<Model, OperationMetadata> response = await autoMlClient.CreateModelAsync(request);
// Poll until the returned long-running operation is complete
Operation<Model, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Model result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Model, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceCreateModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Model retrievedResult = retrievedResponse.Result;
}
CreateModelAsync(String, Model, CallSettings)
Creates a model. Returns a Model in the [response][google.longrunning.Operation.response] field when it completes. When you create a model, several model evaluations are created for it: a global evaluation, and one evaluation for each annotation spec.
Declaration
public virtual Task<Operation<Model, OperationMetadata>> CreateModelAsync(string parent, Model model, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | parent | Required. Resource name of the parent project where the model is being created. |
Model | model | Required. The model to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Model, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Model model = new Model();
// Make the request
Operation<Model, OperationMetadata> response = await autoMlClient.CreateModelAsync(parent, model);
// Poll until the returned long-running operation is complete
Operation<Model, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Model result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Model, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceCreateModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Model retrievedResult = retrievedResponse.Result;
}
CreateModelAsync(String, Model, CancellationToken)
Creates a model. Returns a Model in the [response][google.longrunning.Operation.response] field when it completes. When you create a model, several model evaluations are created for it: a global evaluation, and one evaluation for each annotation spec.
Declaration
public virtual Task<Operation<Model, OperationMetadata>> CreateModelAsync(string parent, Model model, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | parent | Required. Resource name of the parent project where the model is being created. |
Model | model | Required. The model to create. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Model, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Model model = new Model();
// Make the request
Operation<Model, OperationMetadata> response = await autoMlClient.CreateModelAsync(parent, model);
// Poll until the returned long-running operation is complete
Operation<Model, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Model result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Model, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceCreateModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Model retrievedResult = retrievedResponse.Result;
}
DeleteDataset(DatasetName, CallSettings)
Deletes a dataset and all of its contents.
Returns empty response in the
[response][google.longrunning.Operation.response] field when it completes,
and delete_details
in the
[metadata][google.longrunning.Operation.metadata] field.
Declaration
public virtual Operation<Empty, OperationMetadata> DeleteDataset(DatasetName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DatasetName | name | Required. The resource name of the dataset to delete. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
DatasetName name = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]");
// Make the request
Operation<Empty, OperationMetadata> response = autoMlClient.DeleteDataset(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceDeleteDataset(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteDataset(DeleteDatasetRequest, CallSettings)
Deletes a dataset and all of its contents.
Returns empty response in the
[response][google.longrunning.Operation.response] field when it completes,
and delete_details
in the
[metadata][google.longrunning.Operation.metadata] field.
Declaration
public virtual Operation<Empty, OperationMetadata> DeleteDataset(DeleteDatasetRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeleteDatasetRequest | 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 |
---|---|
Operation<Empty, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
DeleteDatasetRequest request = new DeleteDatasetRequest
{
DatasetName = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = autoMlClient.DeleteDataset(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceDeleteDataset(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteDataset(String, CallSettings)
Deletes a dataset and all of its contents.
Returns empty response in the
[response][google.longrunning.Operation.response] field when it completes,
and delete_details
in the
[metadata][google.longrunning.Operation.metadata] field.
Declaration
public virtual Operation<Empty, OperationMetadata> DeleteDataset(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. The resource name of the dataset to delete. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/datasets/[DATASET]";
// Make the request
Operation<Empty, OperationMetadata> response = autoMlClient.DeleteDataset(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceDeleteDataset(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteDatasetAsync(DatasetName, CallSettings)
Deletes a dataset and all of its contents.
Returns empty response in the
[response][google.longrunning.Operation.response] field when it completes,
and delete_details
in the
[metadata][google.longrunning.Operation.metadata] field.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> DeleteDatasetAsync(DatasetName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DatasetName | name | Required. The resource name of the dataset to delete. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
DatasetName name = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]");
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.DeleteDatasetAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceDeleteDatasetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteDatasetAsync(DatasetName, CancellationToken)
Deletes a dataset and all of its contents.
Returns empty response in the
[response][google.longrunning.Operation.response] field when it completes,
and delete_details
in the
[metadata][google.longrunning.Operation.metadata] field.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> DeleteDatasetAsync(DatasetName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DatasetName | name | Required. The resource name of the dataset to delete. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
DatasetName name = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]");
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.DeleteDatasetAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceDeleteDatasetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteDatasetAsync(DeleteDatasetRequest, CallSettings)
Deletes a dataset and all of its contents.
Returns empty response in the
[response][google.longrunning.Operation.response] field when it completes,
and delete_details
in the
[metadata][google.longrunning.Operation.metadata] field.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> DeleteDatasetAsync(DeleteDatasetRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeleteDatasetRequest | 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 |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
DeleteDatasetRequest request = new DeleteDatasetRequest
{
DatasetName = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.DeleteDatasetAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceDeleteDatasetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteDatasetAsync(DeleteDatasetRequest, CancellationToken)
Deletes a dataset and all of its contents.
Returns empty response in the
[response][google.longrunning.Operation.response] field when it completes,
and delete_details
in the
[metadata][google.longrunning.Operation.metadata] field.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> DeleteDatasetAsync(DeleteDatasetRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DeleteDatasetRequest | request | The request object containing all of the parameters for the API call. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
DeleteDatasetRequest request = new DeleteDatasetRequest
{
DatasetName = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.DeleteDatasetAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceDeleteDatasetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteDatasetAsync(String, CallSettings)
Deletes a dataset and all of its contents.
Returns empty response in the
[response][google.longrunning.Operation.response] field when it completes,
and delete_details
in the
[metadata][google.longrunning.Operation.metadata] field.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> DeleteDatasetAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. The resource name of the dataset to delete. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/datasets/[DATASET]";
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.DeleteDatasetAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceDeleteDatasetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteDatasetAsync(String, CancellationToken)
Deletes a dataset and all of its contents.
Returns empty response in the
[response][google.longrunning.Operation.response] field when it completes,
and delete_details
in the
[metadata][google.longrunning.Operation.metadata] field.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> DeleteDatasetAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. The resource name of the dataset to delete. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/datasets/[DATASET]";
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.DeleteDatasetAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceDeleteDatasetAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteModel(DeleteModelRequest, CallSettings)
Deletes a model.
Returns google.protobuf.Empty
in the
[response][google.longrunning.Operation.response] field when it completes,
and delete_details
in the
[metadata][google.longrunning.Operation.metadata] field.
Declaration
public virtual Operation<Empty, OperationMetadata> DeleteModel(DeleteModelRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeleteModelRequest | 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 |
---|---|
Operation<Empty, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
DeleteModelRequest request = new DeleteModelRequest
{
ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = autoMlClient.DeleteModel(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceDeleteModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteModel(ModelName, CallSettings)
Deletes a model.
Returns google.protobuf.Empty
in the
[response][google.longrunning.Operation.response] field when it completes,
and delete_details
in the
[metadata][google.longrunning.Operation.metadata] field.
Declaration
public virtual Operation<Empty, OperationMetadata> DeleteModel(ModelName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ModelName | name | Required. Resource name of the model being deleted. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
Operation<Empty, OperationMetadata> response = autoMlClient.DeleteModel(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceDeleteModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteModel(String, CallSettings)
Deletes a model.
Returns google.protobuf.Empty
in the
[response][google.longrunning.Operation.response] field when it completes,
and delete_details
in the
[metadata][google.longrunning.Operation.metadata] field.
Declaration
public virtual Operation<Empty, OperationMetadata> DeleteModel(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. Resource name of the model being deleted. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
Operation<Empty, OperationMetadata> response = autoMlClient.DeleteModel(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceDeleteModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteModelAsync(DeleteModelRequest, CallSettings)
Deletes a model.
Returns google.protobuf.Empty
in the
[response][google.longrunning.Operation.response] field when it completes,
and delete_details
in the
[metadata][google.longrunning.Operation.metadata] field.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> DeleteModelAsync(DeleteModelRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeleteModelRequest | 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 |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
DeleteModelRequest request = new DeleteModelRequest
{
ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.DeleteModelAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceDeleteModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteModelAsync(DeleteModelRequest, CancellationToken)
Deletes a model.
Returns google.protobuf.Empty
in the
[response][google.longrunning.Operation.response] field when it completes,
and delete_details
in the
[metadata][google.longrunning.Operation.metadata] field.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> DeleteModelAsync(DeleteModelRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DeleteModelRequest | request | The request object containing all of the parameters for the API call. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
DeleteModelRequest request = new DeleteModelRequest
{
ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.DeleteModelAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceDeleteModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteModelAsync(ModelName, CallSettings)
Deletes a model.
Returns google.protobuf.Empty
in the
[response][google.longrunning.Operation.response] field when it completes,
and delete_details
in the
[metadata][google.longrunning.Operation.metadata] field.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> DeleteModelAsync(ModelName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ModelName | name | Required. Resource name of the model being deleted. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.DeleteModelAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceDeleteModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteModelAsync(ModelName, CancellationToken)
Deletes a model.
Returns google.protobuf.Empty
in the
[response][google.longrunning.Operation.response] field when it completes,
and delete_details
in the
[metadata][google.longrunning.Operation.metadata] field.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> DeleteModelAsync(ModelName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ModelName | name | Required. Resource name of the model being deleted. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.DeleteModelAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceDeleteModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteModelAsync(String, CallSettings)
Deletes a model.
Returns google.protobuf.Empty
in the
[response][google.longrunning.Operation.response] field when it completes,
and delete_details
in the
[metadata][google.longrunning.Operation.metadata] field.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> DeleteModelAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. Resource name of the model being deleted. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.DeleteModelAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceDeleteModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteModelAsync(String, CancellationToken)
Deletes a model.
Returns google.protobuf.Empty
in the
[response][google.longrunning.Operation.response] field when it completes,
and delete_details
in the
[metadata][google.longrunning.Operation.metadata] field.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> DeleteModelAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. Resource name of the model being deleted. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.DeleteModelAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceDeleteModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeployModel(DeployModelRequest, CallSettings)
Deploys a model. If a model is already deployed, deploying it with the same parameters has no effect. Deploying with different parametrs (as e.g. changing
[node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) will reset the deployment state without pausing the model's availability.
Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage deployment automatically.
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Operation<Empty, OperationMetadata> DeployModel(DeployModelRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeployModelRequest | 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 |
---|---|
Operation<Empty, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
DeployModelRequest request = new DeployModelRequest
{
ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
ImageObjectDetectionModelDeploymentMetadata = new ImageObjectDetectionModelDeploymentMetadata(),
ImageClassificationModelDeploymentMetadata = new ImageClassificationModelDeploymentMetadata(),
};
// Make the request
Operation<Empty, OperationMetadata> response = autoMlClient.DeployModel(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceDeployModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeployModel(ModelName, CallSettings)
Deploys a model. If a model is already deployed, deploying it with the same parameters has no effect. Deploying with different parametrs (as e.g. changing
[node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) will reset the deployment state without pausing the model's availability.
Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage deployment automatically.
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Operation<Empty, OperationMetadata> DeployModel(ModelName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ModelName | name | Required. Resource name of the model to deploy. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
Operation<Empty, OperationMetadata> response = autoMlClient.DeployModel(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceDeployModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeployModel(String, CallSettings)
Deploys a model. If a model is already deployed, deploying it with the same parameters has no effect. Deploying with different parametrs (as e.g. changing
[node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) will reset the deployment state without pausing the model's availability.
Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage deployment automatically.
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Operation<Empty, OperationMetadata> DeployModel(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. Resource name of the model to deploy. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
Operation<Empty, OperationMetadata> response = autoMlClient.DeployModel(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceDeployModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeployModelAsync(DeployModelRequest, CallSettings)
Deploys a model. If a model is already deployed, deploying it with the same parameters has no effect. Deploying with different parametrs (as e.g. changing
[node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) will reset the deployment state without pausing the model's availability.
Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage deployment automatically.
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> DeployModelAsync(DeployModelRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeployModelRequest | 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 |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
DeployModelRequest request = new DeployModelRequest
{
ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
ImageObjectDetectionModelDeploymentMetadata = new ImageObjectDetectionModelDeploymentMetadata(),
ImageClassificationModelDeploymentMetadata = new ImageClassificationModelDeploymentMetadata(),
};
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.DeployModelAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceDeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeployModelAsync(DeployModelRequest, CancellationToken)
Deploys a model. If a model is already deployed, deploying it with the same parameters has no effect. Deploying with different parametrs (as e.g. changing
[node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) will reset the deployment state without pausing the model's availability.
Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage deployment automatically.
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> DeployModelAsync(DeployModelRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DeployModelRequest | request | The request object containing all of the parameters for the API call. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
DeployModelRequest request = new DeployModelRequest
{
ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
ImageObjectDetectionModelDeploymentMetadata = new ImageObjectDetectionModelDeploymentMetadata(),
ImageClassificationModelDeploymentMetadata = new ImageClassificationModelDeploymentMetadata(),
};
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.DeployModelAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceDeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeployModelAsync(ModelName, CallSettings)
Deploys a model. If a model is already deployed, deploying it with the same parameters has no effect. Deploying with different parametrs (as e.g. changing
[node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) will reset the deployment state without pausing the model's availability.
Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage deployment automatically.
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> DeployModelAsync(ModelName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ModelName | name | Required. Resource name of the model to deploy. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.DeployModelAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceDeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeployModelAsync(ModelName, CancellationToken)
Deploys a model. If a model is already deployed, deploying it with the same parameters has no effect. Deploying with different parametrs (as e.g. changing
[node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) will reset the deployment state without pausing the model's availability.
Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage deployment automatically.
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> DeployModelAsync(ModelName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ModelName | name | Required. Resource name of the model to deploy. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.DeployModelAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceDeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeployModelAsync(String, CallSettings)
Deploys a model. If a model is already deployed, deploying it with the same parameters has no effect. Deploying with different parametrs (as e.g. changing
[node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) will reset the deployment state without pausing the model's availability.
Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage deployment automatically.
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> DeployModelAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. Resource name of the model to deploy. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.DeployModelAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceDeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeployModelAsync(String, CancellationToken)
Deploys a model. If a model is already deployed, deploying it with the same parameters has no effect. Deploying with different parametrs (as e.g. changing
[node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number]) will reset the deployment state without pausing the model's availability.
Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage deployment automatically.
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> DeployModelAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. Resource name of the model to deploy. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.DeployModelAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceDeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ExportData(DatasetName, OutputConfig, CallSettings)
Exports dataset's data to the provided output location. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Operation<Empty, OperationMetadata> ExportData(DatasetName name, OutputConfig outputConfig, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DatasetName | name | Required. The resource name of the dataset. |
OutputConfig | outputConfig | Required. The desired output location. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
DatasetName name = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]");
OutputConfig outputConfig = new OutputConfig();
// Make the request
Operation<Empty, OperationMetadata> response = autoMlClient.ExportData(name, outputConfig);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceExportData(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ExportData(ExportDataRequest, CallSettings)
Exports dataset's data to the provided output location. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Operation<Empty, OperationMetadata> ExportData(ExportDataRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ExportDataRequest | 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 |
---|---|
Operation<Empty, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
ExportDataRequest request = new ExportDataRequest
{
DatasetName = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]"),
OutputConfig = new OutputConfig(),
};
// Make the request
Operation<Empty, OperationMetadata> response = autoMlClient.ExportData(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceExportData(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ExportData(String, OutputConfig, CallSettings)
Exports dataset's data to the provided output location. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Operation<Empty, OperationMetadata> ExportData(string name, OutputConfig outputConfig, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. The resource name of the dataset. |
OutputConfig | outputConfig | Required. The desired output location. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/datasets/[DATASET]";
OutputConfig outputConfig = new OutputConfig();
// Make the request
Operation<Empty, OperationMetadata> response = autoMlClient.ExportData(name, outputConfig);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceExportData(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ExportDataAsync(DatasetName, OutputConfig, CallSettings)
Exports dataset's data to the provided output location. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> ExportDataAsync(DatasetName name, OutputConfig outputConfig, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DatasetName | name | Required. The resource name of the dataset. |
OutputConfig | outputConfig | Required. The desired output location. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
DatasetName name = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]");
OutputConfig outputConfig = new OutputConfig();
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.ExportDataAsync(name, outputConfig);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceExportDataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ExportDataAsync(DatasetName, OutputConfig, CancellationToken)
Exports dataset's data to the provided output location. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> ExportDataAsync(DatasetName name, OutputConfig outputConfig, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DatasetName | name | Required. The resource name of the dataset. |
OutputConfig | outputConfig | Required. The desired output location. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
DatasetName name = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]");
OutputConfig outputConfig = new OutputConfig();
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.ExportDataAsync(name, outputConfig);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceExportDataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ExportDataAsync(ExportDataRequest, CallSettings)
Exports dataset's data to the provided output location. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> ExportDataAsync(ExportDataRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ExportDataRequest | 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 |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
ExportDataRequest request = new ExportDataRequest
{
DatasetName = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]"),
OutputConfig = new OutputConfig(),
};
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.ExportDataAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceExportDataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ExportDataAsync(ExportDataRequest, CancellationToken)
Exports dataset's data to the provided output location. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> ExportDataAsync(ExportDataRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ExportDataRequest | request | The request object containing all of the parameters for the API call. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
ExportDataRequest request = new ExportDataRequest
{
DatasetName = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]"),
OutputConfig = new OutputConfig(),
};
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.ExportDataAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceExportDataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ExportDataAsync(String, OutputConfig, CallSettings)
Exports dataset's data to the provided output location. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> ExportDataAsync(string name, OutputConfig outputConfig, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. The resource name of the dataset. |
OutputConfig | outputConfig | Required. The desired output location. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/datasets/[DATASET]";
OutputConfig outputConfig = new OutputConfig();
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.ExportDataAsync(name, outputConfig);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceExportDataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ExportDataAsync(String, OutputConfig, CancellationToken)
Exports dataset's data to the provided output location. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> ExportDataAsync(string name, OutputConfig outputConfig, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. The resource name of the dataset. |
OutputConfig | outputConfig | Required. The desired output location. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/datasets/[DATASET]";
OutputConfig outputConfig = new OutputConfig();
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.ExportDataAsync(name, outputConfig);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceExportDataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ExportModel(ExportModelRequest, CallSettings)
Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A model is considered export-able if and only if it has an export format defined for it in [ModelExportOutputConfig][google.cloud.automl.v1.ModelExportOutputConfig].
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Operation<Empty, OperationMetadata> ExportModel(ExportModelRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ExportModelRequest | 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 |
---|---|
Operation<Empty, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
ExportModelRequest request = new ExportModelRequest
{
ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
OutputConfig = new ModelExportOutputConfig(),
};
// Make the request
Operation<Empty, OperationMetadata> response = autoMlClient.ExportModel(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceExportModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ExportModel(ModelName, ModelExportOutputConfig, CallSettings)
Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A model is considered export-able if and only if it has an export format defined for it in [ModelExportOutputConfig][google.cloud.automl.v1.ModelExportOutputConfig].
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Operation<Empty, OperationMetadata> ExportModel(ModelName name, ModelExportOutputConfig outputConfig, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ModelName | name | Required. The resource name of the model to export. |
ModelExportOutputConfig | outputConfig | Required. The desired output location and configuration. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
ModelExportOutputConfig outputConfig = new ModelExportOutputConfig();
// Make the request
Operation<Empty, OperationMetadata> response = autoMlClient.ExportModel(name, outputConfig);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceExportModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ExportModel(String, ModelExportOutputConfig, CallSettings)
Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A model is considered export-able if and only if it has an export format defined for it in [ModelExportOutputConfig][google.cloud.automl.v1.ModelExportOutputConfig].
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Operation<Empty, OperationMetadata> ExportModel(string name, ModelExportOutputConfig outputConfig, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. The resource name of the model to export. |
ModelExportOutputConfig | outputConfig | Required. The desired output location and configuration. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
ModelExportOutputConfig outputConfig = new ModelExportOutputConfig();
// Make the request
Operation<Empty, OperationMetadata> response = autoMlClient.ExportModel(name, outputConfig);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceExportModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ExportModelAsync(ExportModelRequest, CallSettings)
Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A model is considered export-able if and only if it has an export format defined for it in [ModelExportOutputConfig][google.cloud.automl.v1.ModelExportOutputConfig].
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> ExportModelAsync(ExportModelRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ExportModelRequest | 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 |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
ExportModelRequest request = new ExportModelRequest
{
ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
OutputConfig = new ModelExportOutputConfig(),
};
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.ExportModelAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceExportModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ExportModelAsync(ExportModelRequest, CancellationToken)
Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A model is considered export-able if and only if it has an export format defined for it in [ModelExportOutputConfig][google.cloud.automl.v1.ModelExportOutputConfig].
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> ExportModelAsync(ExportModelRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ExportModelRequest | request | The request object containing all of the parameters for the API call. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
ExportModelRequest request = new ExportModelRequest
{
ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
OutputConfig = new ModelExportOutputConfig(),
};
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.ExportModelAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceExportModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ExportModelAsync(ModelName, ModelExportOutputConfig, CallSettings)
Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A model is considered export-able if and only if it has an export format defined for it in [ModelExportOutputConfig][google.cloud.automl.v1.ModelExportOutputConfig].
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> ExportModelAsync(ModelName name, ModelExportOutputConfig outputConfig, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ModelName | name | Required. The resource name of the model to export. |
ModelExportOutputConfig | outputConfig | Required. The desired output location and configuration. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
ModelExportOutputConfig outputConfig = new ModelExportOutputConfig();
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.ExportModelAsync(name, outputConfig);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceExportModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ExportModelAsync(ModelName, ModelExportOutputConfig, CancellationToken)
Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A model is considered export-able if and only if it has an export format defined for it in [ModelExportOutputConfig][google.cloud.automl.v1.ModelExportOutputConfig].
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> ExportModelAsync(ModelName name, ModelExportOutputConfig outputConfig, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ModelName | name | Required. The resource name of the model to export. |
ModelExportOutputConfig | outputConfig | Required. The desired output location and configuration. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
ModelExportOutputConfig outputConfig = new ModelExportOutputConfig();
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.ExportModelAsync(name, outputConfig);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceExportModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ExportModelAsync(String, ModelExportOutputConfig, CallSettings)
Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A model is considered export-able if and only if it has an export format defined for it in [ModelExportOutputConfig][google.cloud.automl.v1.ModelExportOutputConfig].
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> ExportModelAsync(string name, ModelExportOutputConfig outputConfig, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. The resource name of the model to export. |
ModelExportOutputConfig | outputConfig | Required. The desired output location and configuration. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
ModelExportOutputConfig outputConfig = new ModelExportOutputConfig();
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.ExportModelAsync(name, outputConfig);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceExportModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ExportModelAsync(String, ModelExportOutputConfig, CancellationToken)
Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A model is considered export-able if and only if it has an export format defined for it in [ModelExportOutputConfig][google.cloud.automl.v1.ModelExportOutputConfig].
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> ExportModelAsync(string name, ModelExportOutputConfig outputConfig, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. The resource name of the model to export. |
ModelExportOutputConfig | outputConfig | Required. The desired output location and configuration. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
ModelExportOutputConfig outputConfig = new ModelExportOutputConfig();
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.ExportModelAsync(name, outputConfig);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceExportModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
GetAnnotationSpec(AnnotationSpecName, CallSettings)
Gets an annotation spec.
Declaration
public virtual AnnotationSpec GetAnnotationSpec(AnnotationSpecName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AnnotationSpecName | name | Required. The resource name of the annotation spec to retrieve. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
AnnotationSpec | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
AnnotationSpecName name = AnnotationSpecName.FromProjectLocationDatasetAnnotationSpec("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]");
// Make the request
AnnotationSpec response = autoMlClient.GetAnnotationSpec(name);
GetAnnotationSpec(GetAnnotationSpecRequest, CallSettings)
Gets an annotation spec.
Declaration
public virtual AnnotationSpec GetAnnotationSpec(GetAnnotationSpecRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetAnnotationSpecRequest | 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 |
---|---|
AnnotationSpec | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
GetAnnotationSpecRequest request = new GetAnnotationSpecRequest
{
AnnotationSpecName = AnnotationSpecName.FromProjectLocationDatasetAnnotationSpec("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]"),
};
// Make the request
AnnotationSpec response = autoMlClient.GetAnnotationSpec(request);
GetAnnotationSpec(String, CallSettings)
Gets an annotation spec.
Declaration
public virtual AnnotationSpec GetAnnotationSpec(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. The resource name of the annotation spec to retrieve. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
AnnotationSpec | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/datasets/[DATASET]/annotationSpecs/[ANNOTATION_SPEC]";
// Make the request
AnnotationSpec response = autoMlClient.GetAnnotationSpec(name);
GetAnnotationSpecAsync(AnnotationSpecName, CallSettings)
Gets an annotation spec.
Declaration
public virtual Task<AnnotationSpec> GetAnnotationSpecAsync(AnnotationSpecName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AnnotationSpecName | name | Required. The resource name of the annotation spec to retrieve. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<AnnotationSpec> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
AnnotationSpecName name = AnnotationSpecName.FromProjectLocationDatasetAnnotationSpec("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]");
// Make the request
AnnotationSpec response = await autoMlClient.GetAnnotationSpecAsync(name);
GetAnnotationSpecAsync(AnnotationSpecName, CancellationToken)
Gets an annotation spec.
Declaration
public virtual Task<AnnotationSpec> GetAnnotationSpecAsync(AnnotationSpecName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
AnnotationSpecName | name | Required. The resource name of the annotation spec to retrieve. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<AnnotationSpec> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
AnnotationSpecName name = AnnotationSpecName.FromProjectLocationDatasetAnnotationSpec("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]");
// Make the request
AnnotationSpec response = await autoMlClient.GetAnnotationSpecAsync(name);
GetAnnotationSpecAsync(GetAnnotationSpecRequest, CallSettings)
Gets an annotation spec.
Declaration
public virtual Task<AnnotationSpec> GetAnnotationSpecAsync(GetAnnotationSpecRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetAnnotationSpecRequest | 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 |
---|---|
System.Threading.Tasks.Task<AnnotationSpec> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
GetAnnotationSpecRequest request = new GetAnnotationSpecRequest
{
AnnotationSpecName = AnnotationSpecName.FromProjectLocationDatasetAnnotationSpec("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]"),
};
// Make the request
AnnotationSpec response = await autoMlClient.GetAnnotationSpecAsync(request);
GetAnnotationSpecAsync(GetAnnotationSpecRequest, CancellationToken)
Gets an annotation spec.
Declaration
public virtual Task<AnnotationSpec> GetAnnotationSpecAsync(GetAnnotationSpecRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
GetAnnotationSpecRequest | request | The request object containing all of the parameters for the API call. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<AnnotationSpec> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
GetAnnotationSpecRequest request = new GetAnnotationSpecRequest
{
AnnotationSpecName = AnnotationSpecName.FromProjectLocationDatasetAnnotationSpec("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]"),
};
// Make the request
AnnotationSpec response = await autoMlClient.GetAnnotationSpecAsync(request);
GetAnnotationSpecAsync(String, CallSettings)
Gets an annotation spec.
Declaration
public virtual Task<AnnotationSpec> GetAnnotationSpecAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. The resource name of the annotation spec to retrieve. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<AnnotationSpec> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/datasets/[DATASET]/annotationSpecs/[ANNOTATION_SPEC]";
// Make the request
AnnotationSpec response = await autoMlClient.GetAnnotationSpecAsync(name);
GetAnnotationSpecAsync(String, CancellationToken)
Gets an annotation spec.
Declaration
public virtual Task<AnnotationSpec> GetAnnotationSpecAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. The resource name of the annotation spec to retrieve. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<AnnotationSpec> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/datasets/[DATASET]/annotationSpecs/[ANNOTATION_SPEC]";
// Make the request
AnnotationSpec response = await autoMlClient.GetAnnotationSpecAsync(name);
GetDataset(DatasetName, CallSettings)
Gets a dataset.
Declaration
public virtual Dataset GetDataset(DatasetName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DatasetName | name | Required. The resource name of the dataset to retrieve. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Dataset | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
DatasetName name = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]");
// Make the request
Dataset response = autoMlClient.GetDataset(name);
GetDataset(GetDatasetRequest, CallSettings)
Gets a dataset.
Declaration
public virtual Dataset GetDataset(GetDatasetRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetDatasetRequest | 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 |
---|---|
Dataset | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
GetDatasetRequest request = new GetDatasetRequest
{
DatasetName = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]"),
};
// Make the request
Dataset response = autoMlClient.GetDataset(request);
GetDataset(String, CallSettings)
Gets a dataset.
Declaration
public virtual Dataset GetDataset(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. The resource name of the dataset to retrieve. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Dataset | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/datasets/[DATASET]";
// Make the request
Dataset response = autoMlClient.GetDataset(name);
GetDatasetAsync(DatasetName, CallSettings)
Gets a dataset.
Declaration
public virtual Task<Dataset> GetDatasetAsync(DatasetName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DatasetName | name | Required. The resource name of the dataset to retrieve. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Dataset> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
DatasetName name = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]");
// Make the request
Dataset response = await autoMlClient.GetDatasetAsync(name);
GetDatasetAsync(DatasetName, CancellationToken)
Gets a dataset.
Declaration
public virtual Task<Dataset> GetDatasetAsync(DatasetName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DatasetName | name | Required. The resource name of the dataset to retrieve. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Dataset> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
DatasetName name = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]");
// Make the request
Dataset response = await autoMlClient.GetDatasetAsync(name);
GetDatasetAsync(GetDatasetRequest, CallSettings)
Gets a dataset.
Declaration
public virtual Task<Dataset> GetDatasetAsync(GetDatasetRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetDatasetRequest | 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 |
---|---|
System.Threading.Tasks.Task<Dataset> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
GetDatasetRequest request = new GetDatasetRequest
{
DatasetName = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]"),
};
// Make the request
Dataset response = await autoMlClient.GetDatasetAsync(request);
GetDatasetAsync(GetDatasetRequest, CancellationToken)
Gets a dataset.
Declaration
public virtual Task<Dataset> GetDatasetAsync(GetDatasetRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
GetDatasetRequest | request | The request object containing all of the parameters for the API call. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Dataset> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
GetDatasetRequest request = new GetDatasetRequest
{
DatasetName = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]"),
};
// Make the request
Dataset response = await autoMlClient.GetDatasetAsync(request);
GetDatasetAsync(String, CallSettings)
Gets a dataset.
Declaration
public virtual Task<Dataset> GetDatasetAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. The resource name of the dataset to retrieve. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Dataset> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/datasets/[DATASET]";
// Make the request
Dataset response = await autoMlClient.GetDatasetAsync(name);
GetDatasetAsync(String, CancellationToken)
Gets a dataset.
Declaration
public virtual Task<Dataset> GetDatasetAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. The resource name of the dataset to retrieve. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Dataset> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/datasets/[DATASET]";
// Make the request
Dataset response = await autoMlClient.GetDatasetAsync(name);
GetModel(GetModelRequest, CallSettings)
Gets a model.
Declaration
public virtual Model GetModel(GetModelRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetModelRequest | 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 |
---|---|
Model | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
GetModelRequest request = new GetModelRequest
{
ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
};
// Make the request
Model response = autoMlClient.GetModel(request);
GetModel(ModelName, CallSettings)
Gets a model.
Declaration
public virtual Model GetModel(ModelName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ModelName | name | Required. Resource name of the model. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Model | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
Model response = autoMlClient.GetModel(name);
GetModel(String, CallSettings)
Gets a model.
Declaration
public virtual Model GetModel(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. Resource name of the model. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Model | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
Model response = autoMlClient.GetModel(name);
GetModelAsync(GetModelRequest, CallSettings)
Gets a model.
Declaration
public virtual Task<Model> GetModelAsync(GetModelRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetModelRequest | 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 |
---|---|
System.Threading.Tasks.Task<Model> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
GetModelRequest request = new GetModelRequest
{
ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
};
// Make the request
Model response = await autoMlClient.GetModelAsync(request);
GetModelAsync(GetModelRequest, CancellationToken)
Gets a model.
Declaration
public virtual Task<Model> GetModelAsync(GetModelRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
GetModelRequest | request | The request object containing all of the parameters for the API call. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Model> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
GetModelRequest request = new GetModelRequest
{
ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
};
// Make the request
Model response = await autoMlClient.GetModelAsync(request);
GetModelAsync(ModelName, CallSettings)
Gets a model.
Declaration
public virtual Task<Model> GetModelAsync(ModelName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ModelName | name | Required. Resource name of the model. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Model> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
Model response = await autoMlClient.GetModelAsync(name);
GetModelAsync(ModelName, CancellationToken)
Gets a model.
Declaration
public virtual Task<Model> GetModelAsync(ModelName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ModelName | name | Required. Resource name of the model. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Model> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
Model response = await autoMlClient.GetModelAsync(name);
GetModelAsync(String, CallSettings)
Gets a model.
Declaration
public virtual Task<Model> GetModelAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. Resource name of the model. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Model> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
Model response = await autoMlClient.GetModelAsync(name);
GetModelAsync(String, CancellationToken)
Gets a model.
Declaration
public virtual Task<Model> GetModelAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. Resource name of the model. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Model> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
Model response = await autoMlClient.GetModelAsync(name);
GetModelEvaluation(GetModelEvaluationRequest, CallSettings)
Gets a model evaluation.
Declaration
public virtual ModelEvaluation GetModelEvaluation(GetModelEvaluationRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetModelEvaluationRequest | 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 |
---|---|
ModelEvaluation | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
GetModelEvaluationRequest request = new GetModelEvaluationRequest
{
ModelEvaluationName = ModelEvaluationName.FromProjectLocationModelModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[MODEL_EVALUATION]"),
};
// Make the request
ModelEvaluation response = autoMlClient.GetModelEvaluation(request);
GetModelEvaluation(ModelEvaluationName, CallSettings)
Gets a model evaluation.
Declaration
public virtual ModelEvaluation GetModelEvaluation(ModelEvaluationName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ModelEvaluationName | name | Required. Resource name for the model evaluation. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
ModelEvaluation | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
ModelEvaluationName name = ModelEvaluationName.FromProjectLocationModelModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[MODEL_EVALUATION]");
// Make the request
ModelEvaluation response = autoMlClient.GetModelEvaluation(name);
GetModelEvaluation(String, CallSettings)
Gets a model evaluation.
Declaration
public virtual ModelEvaluation GetModelEvaluation(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. Resource name for the model evaluation. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
ModelEvaluation | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]/modelEvaluations/[MODEL_EVALUATION]";
// Make the request
ModelEvaluation response = autoMlClient.GetModelEvaluation(name);
GetModelEvaluationAsync(GetModelEvaluationRequest, CallSettings)
Gets a model evaluation.
Declaration
public virtual Task<ModelEvaluation> GetModelEvaluationAsync(GetModelEvaluationRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetModelEvaluationRequest | 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 |
---|---|
System.Threading.Tasks.Task<ModelEvaluation> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
GetModelEvaluationRequest request = new GetModelEvaluationRequest
{
ModelEvaluationName = ModelEvaluationName.FromProjectLocationModelModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[MODEL_EVALUATION]"),
};
// Make the request
ModelEvaluation response = await autoMlClient.GetModelEvaluationAsync(request);
GetModelEvaluationAsync(GetModelEvaluationRequest, CancellationToken)
Gets a model evaluation.
Declaration
public virtual Task<ModelEvaluation> GetModelEvaluationAsync(GetModelEvaluationRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
GetModelEvaluationRequest | request | The request object containing all of the parameters for the API call. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ModelEvaluation> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
GetModelEvaluationRequest request = new GetModelEvaluationRequest
{
ModelEvaluationName = ModelEvaluationName.FromProjectLocationModelModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[MODEL_EVALUATION]"),
};
// Make the request
ModelEvaluation response = await autoMlClient.GetModelEvaluationAsync(request);
GetModelEvaluationAsync(ModelEvaluationName, CallSettings)
Gets a model evaluation.
Declaration
public virtual Task<ModelEvaluation> GetModelEvaluationAsync(ModelEvaluationName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ModelEvaluationName | name | Required. Resource name for the model evaluation. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ModelEvaluation> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
ModelEvaluationName name = ModelEvaluationName.FromProjectLocationModelModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[MODEL_EVALUATION]");
// Make the request
ModelEvaluation response = await autoMlClient.GetModelEvaluationAsync(name);
GetModelEvaluationAsync(ModelEvaluationName, CancellationToken)
Gets a model evaluation.
Declaration
public virtual Task<ModelEvaluation> GetModelEvaluationAsync(ModelEvaluationName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ModelEvaluationName | name | Required. Resource name for the model evaluation. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ModelEvaluation> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
ModelEvaluationName name = ModelEvaluationName.FromProjectLocationModelModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[MODEL_EVALUATION]");
// Make the request
ModelEvaluation response = await autoMlClient.GetModelEvaluationAsync(name);
GetModelEvaluationAsync(String, CallSettings)
Gets a model evaluation.
Declaration
public virtual Task<ModelEvaluation> GetModelEvaluationAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. Resource name for the model evaluation. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ModelEvaluation> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]/modelEvaluations/[MODEL_EVALUATION]";
// Make the request
ModelEvaluation response = await autoMlClient.GetModelEvaluationAsync(name);
GetModelEvaluationAsync(String, CancellationToken)
Gets a model evaluation.
Declaration
public virtual Task<ModelEvaluation> GetModelEvaluationAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. Resource name for the model evaluation. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ModelEvaluation> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]/modelEvaluations/[MODEL_EVALUATION]";
// Make the request
ModelEvaluation response = await autoMlClient.GetModelEvaluationAsync(name);
ImportData(DatasetName, InputConfig, CallSettings)
Imports data into a dataset. For Tables this method can only be called on an empty Dataset.
For Tables:
- A [schema_inference_version][google.cloud.automl.v1.InputConfig.params] parameter must be explicitly set. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Operation<Empty, OperationMetadata> ImportData(DatasetName name, InputConfig inputConfig, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DatasetName | name | Required. Dataset name. Dataset must already exist. All imported annotations and examples will be added. |
InputConfig | inputConfig | Required. The desired input location and its domain specific semantics, if any. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
DatasetName name = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]");
InputConfig inputConfig = new InputConfig();
// Make the request
Operation<Empty, OperationMetadata> response = autoMlClient.ImportData(name, inputConfig);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceImportData(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ImportData(ImportDataRequest, CallSettings)
Imports data into a dataset. For Tables this method can only be called on an empty Dataset.
For Tables:
- A [schema_inference_version][google.cloud.automl.v1.InputConfig.params] parameter must be explicitly set. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Operation<Empty, OperationMetadata> ImportData(ImportDataRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ImportDataRequest | 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 |
---|---|
Operation<Empty, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
ImportDataRequest request = new ImportDataRequest
{
DatasetName = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]"),
InputConfig = new InputConfig(),
};
// Make the request
Operation<Empty, OperationMetadata> response = autoMlClient.ImportData(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceImportData(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ImportData(String, InputConfig, CallSettings)
Imports data into a dataset. For Tables this method can only be called on an empty Dataset.
For Tables:
- A [schema_inference_version][google.cloud.automl.v1.InputConfig.params] parameter must be explicitly set. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Operation<Empty, OperationMetadata> ImportData(string name, InputConfig inputConfig, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. Dataset name. Dataset must already exist. All imported annotations and examples will be added. |
InputConfig | inputConfig | Required. The desired input location and its domain specific semantics, if any. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/datasets/[DATASET]";
InputConfig inputConfig = new InputConfig();
// Make the request
Operation<Empty, OperationMetadata> response = autoMlClient.ImportData(name, inputConfig);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceImportData(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ImportDataAsync(DatasetName, InputConfig, CallSettings)
Imports data into a dataset. For Tables this method can only be called on an empty Dataset.
For Tables:
- A [schema_inference_version][google.cloud.automl.v1.InputConfig.params] parameter must be explicitly set. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> ImportDataAsync(DatasetName name, InputConfig inputConfig, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DatasetName | name | Required. Dataset name. Dataset must already exist. All imported annotations and examples will be added. |
InputConfig | inputConfig | Required. The desired input location and its domain specific semantics, if any. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
DatasetName name = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]");
InputConfig inputConfig = new InputConfig();
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.ImportDataAsync(name, inputConfig);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceImportDataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ImportDataAsync(DatasetName, InputConfig, CancellationToken)
Imports data into a dataset. For Tables this method can only be called on an empty Dataset.
For Tables:
- A [schema_inference_version][google.cloud.automl.v1.InputConfig.params] parameter must be explicitly set. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> ImportDataAsync(DatasetName name, InputConfig inputConfig, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DatasetName | name | Required. Dataset name. Dataset must already exist. All imported annotations and examples will be added. |
InputConfig | inputConfig | Required. The desired input location and its domain specific semantics, if any. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
DatasetName name = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]");
InputConfig inputConfig = new InputConfig();
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.ImportDataAsync(name, inputConfig);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceImportDataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ImportDataAsync(ImportDataRequest, CallSettings)
Imports data into a dataset. For Tables this method can only be called on an empty Dataset.
For Tables:
- A [schema_inference_version][google.cloud.automl.v1.InputConfig.params] parameter must be explicitly set. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> ImportDataAsync(ImportDataRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ImportDataRequest | 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 |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
ImportDataRequest request = new ImportDataRequest
{
DatasetName = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]"),
InputConfig = new InputConfig(),
};
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.ImportDataAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceImportDataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ImportDataAsync(ImportDataRequest, CancellationToken)
Imports data into a dataset. For Tables this method can only be called on an empty Dataset.
For Tables:
- A [schema_inference_version][google.cloud.automl.v1.InputConfig.params] parameter must be explicitly set. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> ImportDataAsync(ImportDataRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ImportDataRequest | request | The request object containing all of the parameters for the API call. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
ImportDataRequest request = new ImportDataRequest
{
DatasetName = DatasetName.FromProjectLocationDataset("[PROJECT]", "[LOCATION]", "[DATASET]"),
InputConfig = new InputConfig(),
};
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.ImportDataAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceImportDataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ImportDataAsync(String, InputConfig, CallSettings)
Imports data into a dataset. For Tables this method can only be called on an empty Dataset.
For Tables:
- A [schema_inference_version][google.cloud.automl.v1.InputConfig.params] parameter must be explicitly set. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> ImportDataAsync(string name, InputConfig inputConfig, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. Dataset name. Dataset must already exist. All imported annotations and examples will be added. |
InputConfig | inputConfig | Required. The desired input location and its domain specific semantics, if any. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/datasets/[DATASET]";
InputConfig inputConfig = new InputConfig();
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.ImportDataAsync(name, inputConfig);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceImportDataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ImportDataAsync(String, InputConfig, CancellationToken)
Imports data into a dataset. For Tables this method can only be called on an empty Dataset.
For Tables:
- A [schema_inference_version][google.cloud.automl.v1.InputConfig.params] parameter must be explicitly set. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> ImportDataAsync(string name, InputConfig inputConfig, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. Dataset name. Dataset must already exist. All imported annotations and examples will be added. |
InputConfig | inputConfig | Required. The desired input location and its domain specific semantics, if any. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/datasets/[DATASET]";
InputConfig inputConfig = new InputConfig();
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.ImportDataAsync(name, inputConfig);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceImportDataAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
ListDatasets(LocationName, String, Nullable<Int32>, CallSettings)
Lists datasets in a project.
Declaration
public virtual PagedEnumerable<ListDatasetsResponse, Dataset> ListDatasets(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
LocationName | parent | Required. The resource name of the project from which to list datasets. |
System.String | pageToken | The token returned from the previous request. A value of |
System.Nullable<System.Int32> | 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<ListDatasetsResponse, Dataset> | A pageable sequence of Dataset resources. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListDatasetsResponse, Dataset> response = autoMlClient.ListDatasets(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Dataset 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 (ListDatasetsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Dataset 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<Dataset> 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 (Dataset 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;
ListDatasets(ListDatasetsRequest, CallSettings)
Lists datasets in a project.
Declaration
public virtual PagedEnumerable<ListDatasetsResponse, Dataset> ListDatasets(ListDatasetsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListDatasetsRequest | 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<ListDatasetsResponse, Dataset> | A pageable sequence of Dataset resources. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
ListDatasetsRequest request = new ListDatasetsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
};
// Make the request
PagedEnumerable<ListDatasetsResponse, Dataset> response = autoMlClient.ListDatasets(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Dataset 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 (ListDatasetsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Dataset 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<Dataset> 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 (Dataset 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;
ListDatasets(String, String, Nullable<Int32>, CallSettings)
Lists datasets in a project.
Declaration
public virtual PagedEnumerable<ListDatasetsResponse, Dataset> ListDatasets(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | parent | Required. The resource name of the project from which to list datasets. |
System.String | pageToken | The token returned from the previous request. A value of |
System.Nullable<System.Int32> | 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<ListDatasetsResponse, Dataset> | A pageable sequence of Dataset resources. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListDatasetsResponse, Dataset> response = autoMlClient.ListDatasets(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Dataset 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 (ListDatasetsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Dataset 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<Dataset> 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 (Dataset 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;
ListDatasetsAsync(LocationName, String, Nullable<Int32>, CallSettings)
Lists datasets in a project.
Declaration
public virtual PagedAsyncEnumerable<ListDatasetsResponse, Dataset> ListDatasetsAsync(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
LocationName | parent | Required. The resource name of the project from which to list datasets. |
System.String | pageToken | The token returned from the previous request. A value of |
System.Nullable<System.Int32> | 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<ListDatasetsResponse, Dataset> | A pageable asynchronous sequence of Dataset resources. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListDatasetsResponse, Dataset> response = autoMlClient.ListDatasetsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Dataset 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((ListDatasetsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Dataset 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<Dataset> 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 (Dataset 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;
ListDatasetsAsync(ListDatasetsRequest, CallSettings)
Lists datasets in a project.
Declaration
public virtual PagedAsyncEnumerable<ListDatasetsResponse, Dataset> ListDatasetsAsync(ListDatasetsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListDatasetsRequest | 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<ListDatasetsResponse, Dataset> | A pageable asynchronous sequence of Dataset resources. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
ListDatasetsRequest request = new ListDatasetsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListDatasetsResponse, Dataset> response = autoMlClient.ListDatasetsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Dataset 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((ListDatasetsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Dataset 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<Dataset> 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 (Dataset 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;
ListDatasetsAsync(String, String, Nullable<Int32>, CallSettings)
Lists datasets in a project.
Declaration
public virtual PagedAsyncEnumerable<ListDatasetsResponse, Dataset> ListDatasetsAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | parent | Required. The resource name of the project from which to list datasets. |
System.String | pageToken | The token returned from the previous request. A value of |
System.Nullable<System.Int32> | 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<ListDatasetsResponse, Dataset> | A pageable asynchronous sequence of Dataset resources. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListDatasetsResponse, Dataset> response = autoMlClient.ListDatasetsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Dataset 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((ListDatasetsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Dataset 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<Dataset> 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 (Dataset 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;
ListModelEvaluations(ListModelEvaluationsRequest, CallSettings)
Lists model evaluations.
Declaration
public virtual PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation> ListModelEvaluations(ListModelEvaluationsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListModelEvaluationsRequest | 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<ListModelEvaluationsResponse, ModelEvaluation> | A pageable sequence of ModelEvaluation resources. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
ListModelEvaluationsRequest request = new ListModelEvaluationsRequest
{
ParentAsModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
Filter = "",
};
// Make the request
PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation> response = autoMlClient.ListModelEvaluations(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (ModelEvaluation 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 (ListModelEvaluationsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ModelEvaluation 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<ModelEvaluation> 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 (ModelEvaluation 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;
ListModelEvaluations(ModelName, String, String, Nullable<Int32>, CallSettings)
Lists model evaluations.
Declaration
public virtual PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation> ListModelEvaluations(ModelName parent, string filter, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ModelName | parent | Required. Resource name of the model to list the model evaluations for. If modelId is set as "-", this will list model evaluations from across all models of the parent location. |
System.String | filter | Required. An expression for filtering the results of the request.
Some examples of using the filter are:
|
System.String | pageToken | The token returned from the previous request. A value of |
System.Nullable<System.Int32> | 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<ListModelEvaluationsResponse, ModelEvaluation> | A pageable sequence of ModelEvaluation resources. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
ModelName parent = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
string filter = "";
// Make the request
PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation> response = autoMlClient.ListModelEvaluations(parent, filter);
// Iterate over all response items, lazily performing RPCs as required
foreach (ModelEvaluation 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 (ListModelEvaluationsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ModelEvaluation 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<ModelEvaluation> 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 (ModelEvaluation 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;
ListModelEvaluations(String, String, String, Nullable<Int32>, CallSettings)
Lists model evaluations.
Declaration
public virtual PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation> ListModelEvaluations(string parent, string filter, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | parent | Required. Resource name of the model to list the model evaluations for. If modelId is set as "-", this will list model evaluations from across all models of the parent location. |
System.String | filter | Required. An expression for filtering the results of the request.
Some examples of using the filter are:
|
System.String | pageToken | The token returned from the previous request. A value of |
System.Nullable<System.Int32> | 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<ListModelEvaluationsResponse, ModelEvaluation> | A pageable sequence of ModelEvaluation resources. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
string filter = "";
// Make the request
PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation> response = autoMlClient.ListModelEvaluations(parent, filter);
// Iterate over all response items, lazily performing RPCs as required
foreach (ModelEvaluation 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 (ListModelEvaluationsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ModelEvaluation 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<ModelEvaluation> 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 (ModelEvaluation 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;
ListModelEvaluationsAsync(ListModelEvaluationsRequest, CallSettings)
Lists model evaluations.
Declaration
public virtual PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation> ListModelEvaluationsAsync(ListModelEvaluationsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListModelEvaluationsRequest | 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<ListModelEvaluationsResponse, ModelEvaluation> | A pageable asynchronous sequence of ModelEvaluation resources. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
ListModelEvaluationsRequest request = new ListModelEvaluationsRequest
{
ParentAsModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation> response = autoMlClient.ListModelEvaluationsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ModelEvaluation 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((ListModelEvaluationsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ModelEvaluation 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<ModelEvaluation> 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 (ModelEvaluation 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;
ListModelEvaluationsAsync(ModelName, String, String, Nullable<Int32>, CallSettings)
Lists model evaluations.
Declaration
public virtual PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation> ListModelEvaluationsAsync(ModelName parent, string filter, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ModelName | parent | Required. Resource name of the model to list the model evaluations for. If modelId is set as "-", this will list model evaluations from across all models of the parent location. |
System.String | filter | Required. An expression for filtering the results of the request.
Some examples of using the filter are:
|
System.String | pageToken | The token returned from the previous request. A value of |
System.Nullable<System.Int32> | 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<ListModelEvaluationsResponse, ModelEvaluation> | A pageable asynchronous sequence of ModelEvaluation resources. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
ModelName parent = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
string filter = "";
// Make the request
PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation> response = autoMlClient.ListModelEvaluationsAsync(parent, filter);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ModelEvaluation 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((ListModelEvaluationsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ModelEvaluation 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<ModelEvaluation> 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 (ModelEvaluation 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;
ListModelEvaluationsAsync(String, String, String, Nullable<Int32>, CallSettings)
Lists model evaluations.
Declaration
public virtual PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation> ListModelEvaluationsAsync(string parent, string filter, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | parent | Required. Resource name of the model to list the model evaluations for. If modelId is set as "-", this will list model evaluations from across all models of the parent location. |
System.String | filter | Required. An expression for filtering the results of the request.
Some examples of using the filter are:
|
System.String | pageToken | The token returned from the previous request. A value of |
System.Nullable<System.Int32> | 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<ListModelEvaluationsResponse, ModelEvaluation> | A pageable asynchronous sequence of ModelEvaluation resources. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
string filter = "";
// Make the request
PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation> response = autoMlClient.ListModelEvaluationsAsync(parent, filter);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ModelEvaluation 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((ListModelEvaluationsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ModelEvaluation 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<ModelEvaluation> 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 (ModelEvaluation 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;
ListModels(LocationName, String, Nullable<Int32>, CallSettings)
Lists models.
Declaration
public virtual PagedEnumerable<ListModelsResponse, Model> ListModels(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
LocationName | parent | Required. Resource name of the project, from which to list the models. |
System.String | pageToken | The token returned from the previous request. A value of |
System.Nullable<System.Int32> | 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<ListModelsResponse, Model> | A pageable sequence of Model resources. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListModelsResponse, Model> response = autoMlClient.ListModels(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Model 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 (ListModelsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Model 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<Model> 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 (Model 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;
ListModels(ListModelsRequest, CallSettings)
Lists models.
Declaration
public virtual PagedEnumerable<ListModelsResponse, Model> ListModels(ListModelsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListModelsRequest | 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<ListModelsResponse, Model> | A pageable sequence of Model resources. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
ListModelsRequest request = new ListModelsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
};
// Make the request
PagedEnumerable<ListModelsResponse, Model> response = autoMlClient.ListModels(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Model 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 (ListModelsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Model 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<Model> 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 (Model 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;
ListModels(String, String, Nullable<Int32>, CallSettings)
Lists models.
Declaration
public virtual PagedEnumerable<ListModelsResponse, Model> ListModels(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | parent | Required. Resource name of the project, from which to list the models. |
System.String | pageToken | The token returned from the previous request. A value of |
System.Nullable<System.Int32> | 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<ListModelsResponse, Model> | A pageable sequence of Model resources. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListModelsResponse, Model> response = autoMlClient.ListModels(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Model 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 (ListModelsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Model 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<Model> 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 (Model 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;
ListModelsAsync(LocationName, String, Nullable<Int32>, CallSettings)
Lists models.
Declaration
public virtual PagedAsyncEnumerable<ListModelsResponse, Model> ListModelsAsync(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
LocationName | parent | Required. Resource name of the project, from which to list the models. |
System.String | pageToken | The token returned from the previous request. A value of |
System.Nullable<System.Int32> | 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<ListModelsResponse, Model> | A pageable asynchronous sequence of Model resources. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListModelsResponse, Model> response = autoMlClient.ListModelsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Model 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((ListModelsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Model 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<Model> 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 (Model 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;
ListModelsAsync(ListModelsRequest, CallSettings)
Lists models.
Declaration
public virtual PagedAsyncEnumerable<ListModelsResponse, Model> ListModelsAsync(ListModelsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListModelsRequest | 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<ListModelsResponse, Model> | A pageable asynchronous sequence of Model resources. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
ListModelsRequest request = new ListModelsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListModelsResponse, Model> response = autoMlClient.ListModelsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Model 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((ListModelsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Model 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<Model> 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 (Model 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;
ListModelsAsync(String, String, Nullable<Int32>, CallSettings)
Lists models.
Declaration
public virtual PagedAsyncEnumerable<ListModelsResponse, Model> ListModelsAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | parent | Required. Resource name of the project, from which to list the models. |
System.String | pageToken | The token returned from the previous request. A value of |
System.Nullable<System.Int32> | 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<ListModelsResponse, Model> | A pageable asynchronous sequence of Model resources. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListModelsResponse, Model> response = autoMlClient.ListModelsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Model 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((ListModelsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Model 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<Model> 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 (Model 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;
PollOnceCreateDataset(String, CallSettings)
Poll an operation once, using an operationName
from a previous invocation of CreateDataset
.
Declaration
public virtual Operation<Dataset, OperationMetadata> PollOnceCreateDataset(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Dataset, OperationMetadata> | The result of polling the operation. |
PollOnceCreateDatasetAsync(String, CallSettings)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
CreateDataset
.
Declaration
public virtual Task<Operation<Dataset, OperationMetadata>> PollOnceCreateDatasetAsync(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Dataset, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceCreateModel(String, CallSettings)
Poll an operation once, using an operationName
from a previous invocation of CreateModel
.
Declaration
public virtual Operation<Model, OperationMetadata> PollOnceCreateModel(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Model, OperationMetadata> | The result of polling the operation. |
PollOnceCreateModelAsync(String, CallSettings)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
CreateModel
.
Declaration
public virtual Task<Operation<Model, OperationMetadata>> PollOnceCreateModelAsync(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Model, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceDeleteDataset(String, CallSettings)
Poll an operation once, using an operationName
from a previous invocation of DeleteDataset
.
Declaration
public virtual Operation<Empty, OperationMetadata> PollOnceDeleteDataset(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, OperationMetadata> | The result of polling the operation. |
PollOnceDeleteDatasetAsync(String, CallSettings)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DeleteDataset
.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> PollOnceDeleteDatasetAsync(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceDeleteModel(String, CallSettings)
Poll an operation once, using an operationName
from a previous invocation of DeleteModel
.
Declaration
public virtual Operation<Empty, OperationMetadata> PollOnceDeleteModel(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, OperationMetadata> | The result of polling the operation. |
PollOnceDeleteModelAsync(String, CallSettings)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DeleteModel
.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> PollOnceDeleteModelAsync(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceDeployModel(String, CallSettings)
Poll an operation once, using an operationName
from a previous invocation of DeployModel
.
Declaration
public virtual Operation<Empty, OperationMetadata> PollOnceDeployModel(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, OperationMetadata> | The result of polling the operation. |
PollOnceDeployModelAsync(String, CallSettings)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DeployModel
.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> PollOnceDeployModelAsync(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceExportData(String, CallSettings)
Poll an operation once, using an operationName
from a previous invocation of ExportData
.
Declaration
public virtual Operation<Empty, OperationMetadata> PollOnceExportData(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, OperationMetadata> | The result of polling the operation. |
PollOnceExportDataAsync(String, CallSettings)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
ExportData
.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> PollOnceExportDataAsync(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceExportModel(String, CallSettings)
Poll an operation once, using an operationName
from a previous invocation of ExportModel
.
Declaration
public virtual Operation<Empty, OperationMetadata> PollOnceExportModel(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, OperationMetadata> | The result of polling the operation. |
PollOnceExportModelAsync(String, CallSettings)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
ExportModel
.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> PollOnceExportModelAsync(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceImportData(String, CallSettings)
Poll an operation once, using an operationName
from a previous invocation of ImportData
.
Declaration
public virtual Operation<Empty, OperationMetadata> PollOnceImportData(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, OperationMetadata> | The result of polling the operation. |
PollOnceImportDataAsync(String, CallSettings)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
ImportData
.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> PollOnceImportDataAsync(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A task representing the result of polling the operation. |
PollOnceUndeployModel(String, CallSettings)
Poll an operation once, using an operationName
from a previous invocation of UndeployModel
.
Declaration
public virtual Operation<Empty, OperationMetadata> PollOnceUndeployModel(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, OperationMetadata> | The result of polling the operation. |
PollOnceUndeployModelAsync(String, CallSettings)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UndeployModel
.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> PollOnceUndeployModelAsync(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A task representing the result of polling the operation. |
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 |
---|---|
System.Threading.Tasks.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.
UndeployModel(ModelName, CallSettings)
Undeploys a model. If the model is not deployed this method has no effect.
Only applicable for Text Classification, Image Object Detection and Tables; all other domains manage deployment automatically.
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Operation<Empty, OperationMetadata> UndeployModel(ModelName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ModelName | name | Required. Resource name of the model to undeploy. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
Operation<Empty, OperationMetadata> response = autoMlClient.UndeployModel(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceUndeployModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
UndeployModel(UndeployModelRequest, CallSettings)
Undeploys a model. If the model is not deployed this method has no effect.
Only applicable for Text Classification, Image Object Detection and Tables; all other domains manage deployment automatically.
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Operation<Empty, OperationMetadata> UndeployModel(UndeployModelRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UndeployModelRequest | 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 |
---|---|
Operation<Empty, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
UndeployModelRequest request = new UndeployModelRequest
{
ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = autoMlClient.UndeployModel(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceUndeployModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
UndeployModel(String, CallSettings)
Undeploys a model. If the model is not deployed this method has no effect.
Only applicable for Text Classification, Image Object Detection and Tables; all other domains manage deployment automatically.
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Operation<Empty, OperationMetadata> UndeployModel(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. Resource name of the model to undeploy. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, OperationMetadata> | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
Operation<Empty, OperationMetadata> response = autoMlClient.UndeployModel(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = autoMlClient.PollOnceUndeployModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
UndeployModelAsync(ModelName, CallSettings)
Undeploys a model. If the model is not deployed this method has no effect.
Only applicable for Text Classification, Image Object Detection and Tables; all other domains manage deployment automatically.
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> UndeployModelAsync(ModelName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ModelName | name | Required. Resource name of the model to undeploy. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.UndeployModelAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceUndeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
UndeployModelAsync(ModelName, CancellationToken)
Undeploys a model. If the model is not deployed this method has no effect.
Only applicable for Text Classification, Image Object Detection and Tables; all other domains manage deployment automatically.
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> UndeployModelAsync(ModelName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ModelName | name | Required. Resource name of the model to undeploy. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.UndeployModelAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceUndeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
UndeployModelAsync(UndeployModelRequest, CallSettings)
Undeploys a model. If the model is not deployed this method has no effect.
Only applicable for Text Classification, Image Object Detection and Tables; all other domains manage deployment automatically.
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> UndeployModelAsync(UndeployModelRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UndeployModelRequest | 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 |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
UndeployModelRequest request = new UndeployModelRequest
{
ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.UndeployModelAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceUndeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
UndeployModelAsync(UndeployModelRequest, CancellationToken)
Undeploys a model. If the model is not deployed this method has no effect.
Only applicable for Text Classification, Image Object Detection and Tables; all other domains manage deployment automatically.
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> UndeployModelAsync(UndeployModelRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
UndeployModelRequest | request | The request object containing all of the parameters for the API call. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
UndeployModelRequest request = new UndeployModelRequest
{
ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.UndeployModelAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceUndeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
UndeployModelAsync(String, CallSettings)
Undeploys a model. If the model is not deployed this method has no effect.
Only applicable for Text Classification, Image Object Detection and Tables; all other domains manage deployment automatically.
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> UndeployModelAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. Resource name of the model to undeploy. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.UndeployModelAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceUndeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
UndeployModelAsync(String, CancellationToken)
Undeploys a model. If the model is not deployed this method has no effect.
Only applicable for Text Classification, Image Object Detection and Tables; all other domains manage deployment automatically.
Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Declaration
public virtual Task<Operation<Empty, OperationMetadata>> UndeployModelAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. Resource name of the model to undeploy. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
Operation<Empty, OperationMetadata> response = await autoMlClient.UndeployModelAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await autoMlClient.PollOnceUndeployModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
UpdateDataset(Dataset, FieldMask, CallSettings)
Updates a dataset.
Declaration
public virtual Dataset UpdateDataset(Dataset dataset, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
Dataset | dataset | Required. The dataset which replaces the resource on the server. |
FieldMask | updateMask | Required. The update mask applies to the resource. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Dataset | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
Dataset dataset = new Dataset();
FieldMask updateMask = new FieldMask();
// Make the request
Dataset response = autoMlClient.UpdateDataset(dataset, updateMask);
UpdateDataset(UpdateDatasetRequest, CallSettings)
Updates a dataset.
Declaration
public virtual Dataset UpdateDataset(UpdateDatasetRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateDatasetRequest | 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 |
---|---|
Dataset | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
UpdateDatasetRequest request = new UpdateDatasetRequest
{
Dataset = new Dataset(),
UpdateMask = new FieldMask(),
};
// Make the request
Dataset response = autoMlClient.UpdateDataset(request);
UpdateDatasetAsync(Dataset, FieldMask, CallSettings)
Updates a dataset.
Declaration
public virtual Task<Dataset> UpdateDatasetAsync(Dataset dataset, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
Dataset | dataset | Required. The dataset which replaces the resource on the server. |
FieldMask | updateMask | Required. The update mask applies to the resource. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Dataset> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
Dataset dataset = new Dataset();
FieldMask updateMask = new FieldMask();
// Make the request
Dataset response = await autoMlClient.UpdateDatasetAsync(dataset, updateMask);
UpdateDatasetAsync(Dataset, FieldMask, CancellationToken)
Updates a dataset.
Declaration
public virtual Task<Dataset> UpdateDatasetAsync(Dataset dataset, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Dataset | dataset | Required. The dataset which replaces the resource on the server. |
FieldMask | updateMask | Required. The update mask applies to the resource. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Dataset> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
Dataset dataset = new Dataset();
FieldMask updateMask = new FieldMask();
// Make the request
Dataset response = await autoMlClient.UpdateDatasetAsync(dataset, updateMask);
UpdateDatasetAsync(UpdateDatasetRequest, CallSettings)
Updates a dataset.
Declaration
public virtual Task<Dataset> UpdateDatasetAsync(UpdateDatasetRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateDatasetRequest | 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 |
---|---|
System.Threading.Tasks.Task<Dataset> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
UpdateDatasetRequest request = new UpdateDatasetRequest
{
Dataset = new Dataset(),
UpdateMask = new FieldMask(),
};
// Make the request
Dataset response = await autoMlClient.UpdateDatasetAsync(request);
UpdateDatasetAsync(UpdateDatasetRequest, CancellationToken)
Updates a dataset.
Declaration
public virtual Task<Dataset> UpdateDatasetAsync(UpdateDatasetRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
UpdateDatasetRequest | request | The request object containing all of the parameters for the API call. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Dataset> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
UpdateDatasetRequest request = new UpdateDatasetRequest
{
Dataset = new Dataset(),
UpdateMask = new FieldMask(),
};
// Make the request
Dataset response = await autoMlClient.UpdateDatasetAsync(request);
UpdateModel(Model, FieldMask, CallSettings)
Updates a model.
Declaration
public virtual Model UpdateModel(Model model, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
Model | model | Required. The model which replaces the resource on the server. |
FieldMask | updateMask | Required. The update mask applies to the resource. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Model | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
Model model = new Model();
FieldMask updateMask = new FieldMask();
// Make the request
Model response = autoMlClient.UpdateModel(model, updateMask);
UpdateModel(UpdateModelRequest, CallSettings)
Updates a model.
Declaration
public virtual Model UpdateModel(UpdateModelRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateModelRequest | 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 |
---|---|
Model | The RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
UpdateModelRequest request = new UpdateModelRequest
{
Model = new Model(),
UpdateMask = new FieldMask(),
};
// Make the request
Model response = autoMlClient.UpdateModel(request);
UpdateModelAsync(Model, FieldMask, CallSettings)
Updates a model.
Declaration
public virtual Task<Model> UpdateModelAsync(Model model, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
Model | model | Required. The model which replaces the resource on the server. |
FieldMask | updateMask | Required. The update mask applies to the resource. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Model> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
Model model = new Model();
FieldMask updateMask = new FieldMask();
// Make the request
Model response = await autoMlClient.UpdateModelAsync(model, updateMask);
UpdateModelAsync(Model, FieldMask, CancellationToken)
Updates a model.
Declaration
public virtual Task<Model> UpdateModelAsync(Model model, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Model | model | Required. The model which replaces the resource on the server. |
FieldMask | updateMask | Required. The update mask applies to the resource. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Model> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
Model model = new Model();
FieldMask updateMask = new FieldMask();
// Make the request
Model response = await autoMlClient.UpdateModelAsync(model, updateMask);
UpdateModelAsync(UpdateModelRequest, CallSettings)
Updates a model.
Declaration
public virtual Task<Model> UpdateModelAsync(UpdateModelRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateModelRequest | 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 |
---|---|
System.Threading.Tasks.Task<Model> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
UpdateModelRequest request = new UpdateModelRequest
{
Model = new Model(),
UpdateMask = new FieldMask(),
};
// Make the request
Model response = await autoMlClient.UpdateModelAsync(request);
UpdateModelAsync(UpdateModelRequest, CancellationToken)
Updates a model.
Declaration
public virtual Task<Model> UpdateModelAsync(UpdateModelRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
UpdateModelRequest | request | The request object containing all of the parameters for the API call. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Model> | A Task containing the RPC response. |
Sample code
// Create client
AutoMlClient autoMlClient = await AutoMlClient.CreateAsync();
// Initialize request argument(s)
UpdateModelRequest request = new UpdateModelRequest
{
Model = new Model(),
UpdateMask = new FieldMask(),
};
// Make the request
Model response = await autoMlClient.UpdateModelAsync(request);