Google AutoML v1 API - Class AutoMlClient (3.1.0)

public abstract class AutoMlClient

Reference documentation and code samples for the Google AutoML v1 API class AutoMlClient.

AutoMl client wrapper, for convenient use.

Inheritance

Object > AutoMlClient

Derived Types

Namespace

Google.Cloud.AutoML.V1

Assembly

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
TypeDescription
OperationsClient

CreateModelOperationsClient

public virtual OperationsClient CreateModelOperationsClient { get; }

The long-running operations client for CreateModel.

Property Value
TypeDescription
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
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default AutoMl scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default AutoMl scopes are:

DeleteDatasetOperationsClient

public virtual OperationsClient DeleteDatasetOperationsClient { get; }

The long-running operations client for DeleteDataset.

Property Value
TypeDescription
OperationsClient

DeleteModelOperationsClient

public virtual OperationsClient DeleteModelOperationsClient { get; }

The long-running operations client for DeleteModel.

Property Value
TypeDescription
OperationsClient

DeployModelOperationsClient

public virtual OperationsClient DeployModelOperationsClient { get; }

The long-running operations client for DeployModel.

Property Value
TypeDescription
OperationsClient

ExportDataOperationsClient

public virtual OperationsClient ExportDataOperationsClient { get; }

The long-running operations client for ExportData.

Property Value
TypeDescription
OperationsClient

ExportModelOperationsClient

public virtual OperationsClient ExportModelOperationsClient { get; }

The long-running operations client for ExportModel.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual AutoMl.AutoMlClient GrpcClient { get; }

The underlying gRPC AutoMl client

Property Value
TypeDescription
AutoMl.AutoMlClient

ImportDataOperationsClient

public virtual OperationsClient ImportDataOperationsClient { get; }

The long-running operations client for ImportData.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

UndeployModelOperationsClient

public virtual OperationsClient UndeployModelOperationsClient { get; }

The long-running operations client for UndeployModel.

Property Value
TypeDescription
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
TypeDescription
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
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
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
NameDescription
parentLocationName

Required. The resource name of the project to create the dataset for.

datasetDataset

Required. The dataset to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Dataset, OperationMetadata>

The RPC response.

Example
// 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
NameDescription
requestCreateDatasetRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Dataset, OperationMetadata>

The RPC response.

Example
// 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
NameDescription
parentString

Required. The resource name of the project to create the dataset for.

datasetDataset

Required. The dataset to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Dataset, OperationMetadata>

The RPC response.

Example
// 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
NameDescription
parentLocationName

Required. The resource name of the project to create the dataset for.

datasetDataset

Required. The dataset to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Dataset, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
parentLocationName

Required. The resource name of the project to create the dataset for.

datasetDataset

Required. The dataset to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Dataset, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestCreateDatasetRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Dataset, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestCreateDatasetRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Dataset, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
parentString

Required. The resource name of the project to create the dataset for.

datasetDataset

Required. The dataset to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Dataset, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
parentString

Required. The resource name of the project to create the dataset for.

datasetDataset

Required. The dataset to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Dataset, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
parentLocationName

Required. Resource name of the parent project where the model is being created.

modelModel

Required. The model to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Model, OperationMetadata>

The RPC response.

Example
// 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
NameDescription
requestCreateModelRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Model, OperationMetadata>

The RPC response.

Example
// 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
NameDescription
parentString

Required. Resource name of the parent project where the model is being created.

modelModel

Required. The model to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Model, OperationMetadata>

The RPC response.

Example
// 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
NameDescription
parentLocationName

Required. Resource name of the parent project where the model is being created.

modelModel

Required. The model to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Model, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
parentLocationName

Required. Resource name of the parent project where the model is being created.

modelModel

Required. The model to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Model, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestCreateModelRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Model, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestCreateModelRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Model, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
parentString

Required. Resource name of the parent project where the model is being created.

modelModel

Required. The model to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Model, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
parentString

Required. Resource name of the parent project where the model is being created.

modelModel

Required. The model to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Model, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
nameDatasetName

Required. The resource name of the dataset to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The RPC response.

Example
// 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
NameDescription
requestDeleteDatasetRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The RPC response.

Example
// 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
NameDescription
nameString

Required. The resource name of the dataset to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The RPC response.

Example
// 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
NameDescription
nameDatasetName

Required. The resource name of the dataset to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
nameDatasetName

Required. The resource name of the dataset to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestDeleteDatasetRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestDeleteDatasetRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The resource name of the dataset to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. The resource name of the dataset to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestDeleteModelRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The RPC response.

Example
// 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
NameDescription
nameModelName

Required. Resource name of the model being deleted.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The RPC response.

Example
// 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
NameDescription
nameString

Required. Resource name of the model being deleted.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The RPC response.

Example
// 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
NameDescription
requestDeleteModelRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestDeleteModelRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
nameModelName

Required. Resource name of the model being deleted.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
nameModelName

Required. Resource name of the model being deleted.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. Resource name of the model being deleted.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
nameString

Required. Resource name of the model being deleted.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// 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
NameDescription
requestDeployModelRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The RPC response.

Example
// 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
NameDescription
nameModelName

Required. Resource name of the model to deploy.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The RPC response.

Example
// 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
NameDescription
nameString

Required. Resource name of the model to deploy.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The RPC response.

Example
// 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