public abstract class AutoMlClient
Reference documentation and code samples for the Google AutoML v1 API class AutoMlClient.
AutoMl client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.AutoML.V1Assembly
Google.Cloud.AutoML.V1.dll
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 dash-case, either of those cases is accepted.
Properties
CreateDatasetOperationsClient
public virtual OperationsClient CreateDatasetOperationsClient { get; }
The long-running operations client for CreateDataset
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
CreateModelOperationsClient
public virtual OperationsClient CreateModelOperationsClient { get; }
The long-running operations client for CreateModel
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the AutoMl service, which is a host of "automl.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default AutoMl scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default AutoMl scopes are:
DeleteDatasetOperationsClient
public virtual OperationsClient DeleteDatasetOperationsClient { get; }
The long-running operations client for DeleteDataset
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DeleteModelOperationsClient
public virtual OperationsClient DeleteModelOperationsClient { get; }
The long-running operations client for DeleteModel
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DeployModelOperationsClient
public virtual OperationsClient DeployModelOperationsClient { get; }
The long-running operations client for DeployModel
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
ExportDataOperationsClient
public virtual OperationsClient ExportDataOperationsClient { get; }
The long-running operations client for ExportData
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
ExportModelOperationsClient
public virtual OperationsClient ExportModelOperationsClient { get; }
The long-running operations client for ExportModel
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual AutoMl.AutoMlClient GrpcClient { get; }
The underlying gRPC AutoMl client
Property Value | |
---|---|
Type | Description |
AutoMl.AutoMlClient |
ImportDataOperationsClient
public virtual OperationsClient ImportDataOperationsClient { get; }
The long-running operations client for ImportData
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
UndeployModelOperationsClient
public virtual OperationsClient UndeployModelOperationsClient { get; }
The long-running operations client for UndeployModel
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
Methods
Create()
public static AutoMlClient Create()
Synchronously creates a AutoMlClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AutoMlClientBuilder.
Returns | |
---|---|
Type | Description |
AutoMlClient | The created AutoMlClient. |
CreateAsync(CancellationToken)
public static Task<AutoMlClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a AutoMlClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AutoMlClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
Task<AutoMlClient> | The task representing the created AutoMlClient. |
CreateDataset(LocationName, Dataset, CallSettings)
public virtual Operation<Dataset, OperationMetadata> CreateDataset(LocationName parent, Dataset dataset, CallSettings callSettings = null)
Creates a dataset.
Parameters | |
---|---|
Name | Description |
parent | LocationName 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. |
// 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)
public virtual Operation<Dataset, OperationMetadata> CreateDataset(CreateDatasetRequest request, CallSettings callSettings = null)
Creates a dataset.
Parameters | |
---|---|
Name | Description |
request | CreateDatasetRequest 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. |
// 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)
public virtual Operation<Dataset, OperationMetadata> CreateDataset(string parent, Dataset dataset, CallSettings callSettings = null)
Creates a dataset.
Parameters | |
---|---|
Name | Description |
parent | String 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. |
// 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)
public virtual Task<Operation<Dataset, OperationMetadata>> CreateDatasetAsync(LocationName parent, Dataset dataset, CallSettings callSettings = null)
Creates a dataset.
Parameters | |
---|---|
Name | Description |
parent | LocationName 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 |
Task<Operation<Dataset, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Task<Operation<Dataset, OperationMetadata>> CreateDatasetAsync(LocationName parent, Dataset dataset, CancellationToken cancellationToken)
Creates a dataset.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The resource name of the project to create the dataset for. |
dataset | Dataset Required. The dataset to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Dataset, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Task<Operation<Dataset, OperationMetadata>> CreateDatasetAsync(CreateDatasetRequest request, CallSettings callSettings = null)
Creates a dataset.
Parameters | |
---|---|
Name | Description |
request | CreateDatasetRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Dataset, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Task<Operation<Dataset, OperationMetadata>> CreateDatasetAsync(CreateDatasetRequest request, CancellationToken cancellationToken)
Creates a dataset.
Parameters | |
---|---|
Name | Description |
request | CreateDatasetRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Dataset, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Task<Operation<Dataset, OperationMetadata>> CreateDatasetAsync(string parent, Dataset dataset, CallSettings callSettings = null)
Creates a dataset.
Parameters | |
---|---|
Name | Description |
parent | String 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 |
Task<Operation<Dataset, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Task<Operation<Dataset, OperationMetadata>> CreateDatasetAsync(string parent, Dataset dataset, CancellationToken cancellationToken)
Creates a dataset.
Parameters | |
---|---|
Name | Description |
parent | String Required. The resource name of the project to create the dataset for. |
dataset | Dataset Required. The dataset to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Dataset, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Operation<Model, OperationMetadata> CreateModel(LocationName parent, Model model, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
parent | LocationName 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. |
// 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)
public virtual Operation<Model, OperationMetadata> CreateModel(CreateModelRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | CreateModelRequest 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. |
// 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)
public virtual Operation<Model, OperationMetadata> CreateModel(string parent, Model model, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
parent | String 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. |
// 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)
public virtual Task<Operation<Model, OperationMetadata>> CreateModelAsync(LocationName parent, Model model, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
parent | LocationName 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 |
Task<Operation<Model, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Task<Operation<Model, OperationMetadata>> CreateModelAsync(LocationName parent, Model model, CancellationToken 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.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. Resource name of the parent project where the model is being created. |
model | Model Required. The model to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Model, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Task<Operation<Model, OperationMetadata>> CreateModelAsync(CreateModelRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | CreateModelRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Model, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Task<Operation<Model, OperationMetadata>> CreateModelAsync(CreateModelRequest request, CancellationToken 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.
Parameters | |
---|---|
Name | Description |
request | CreateModelRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Model, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Task<Operation<Model, OperationMetadata>> CreateModelAsync(string parent, Model model, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
parent | String 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 |
Task<Operation<Model, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Task<Operation<Model, OperationMetadata>> CreateModelAsync(string parent, Model model, CancellationToken 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.
Parameters | |
---|---|
Name | Description |
parent | String Required. Resource name of the parent project where the model is being created. |
model | Model Required. The model to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Model, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Operation<Empty, OperationMetadata> DeleteDataset(DatasetName name, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
name | DatasetName 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. |
// 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)
public virtual Operation<Empty, OperationMetadata> DeleteDataset(DeleteDatasetRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | DeleteDatasetRequest 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. |
// 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)
public virtual Operation<Empty, OperationMetadata> DeleteDataset(string name, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
name | String 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. |
// 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)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteDatasetAsync(DatasetName name, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
name | DatasetName Required. The resource name of the dataset to delete. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteDatasetAsync(DatasetName name, CancellationToken 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.
Parameters | |
---|---|
Name | Description |
name | DatasetName Required. The resource name of the dataset to delete. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteDatasetAsync(DeleteDatasetRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | DeleteDatasetRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteDatasetAsync(DeleteDatasetRequest request, CancellationToken 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.
Parameters | |
---|---|
Name | Description |
request | DeleteDatasetRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteDatasetAsync(string name, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
name | String Required. The resource name of the dataset to delete. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteDatasetAsync(string name, CancellationToken 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.
Parameters | |
---|---|
Name | Description |
name | String Required. The resource name of the dataset to delete. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Operation<Empty, OperationMetadata> DeleteModel(DeleteModelRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | DeleteModelRequest 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. |
// 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)
public virtual Operation<Empty, OperationMetadata> DeleteModel(ModelName name, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
name | ModelName 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. |
// 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)
public virtual Operation<Empty, OperationMetadata> DeleteModel(string name, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
name | String 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. |
// 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)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteModelAsync(DeleteModelRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | DeleteModelRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteModelAsync(DeleteModelRequest request, CancellationToken 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.
Parameters | |
---|---|
Name | Description |
request | DeleteModelRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteModelAsync(ModelName name, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
name | ModelName Required. Resource name of the model being deleted. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteModelAsync(ModelName name, CancellationToken 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.
Parameters | |
---|---|
Name | Description |
name | ModelName Required. Resource name of the model being deleted. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteModelAsync(string name, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
name | String Required. Resource name of the model being deleted. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteModelAsync(string name, CancellationToken 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.
Parameters | |
---|---|
Name | Description |
name | String Required. Resource name of the model being deleted. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<Empty, OperationMetadata>> | A Task containing the RPC response. |
// 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)
public virtual Operation<Empty, OperationMetadata> DeployModel(DeployModelRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | DeployModelRequest 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. |
// Create client
AutoMlClient autoMlClient = AutoMlClient.Create();
// Initialize request argument(s)
DeployModelRequest request = new DeployModelRequest
{
ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
ImageObjectDetectionModelDeploymentMetadata = new ImageObjectDetectionModelDeploymentMetadata(),
};
// 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)
public virtual Operation<Empty, OperationMetadata> DeployModel(ModelName name, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
name | ModelName 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. |
// 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)
public virtual Operation<Empty, OperationMetadata> DeployModel(string name, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
name | String 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. |
// 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(operation