Google AutoML v1 API - Class AutoMlClientImpl (3.3.0)

public sealed class AutoMlClientImpl : AutoMlClient

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

AutoMl client wrapper implementation, for convenient use.

Inheritance

object > AutoMlClient > AutoMlClientImpl

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.

Constructors

AutoMlClientImpl(AutoMlClient, AutoMlSettings, ILogger)

public AutoMlClientImpl(AutoMl.AutoMlClient grpcClient, AutoMlSettings settings, ILogger logger)

Constructs a client wrapper for the AutoMl service, with the specified gRPC client and settings.

Parameters
Name Description
grpcClient AutoMlAutoMlClient

The underlying gRPC client.

settings AutoMlSettings

The base AutoMlSettings used within this client.

logger ILogger

Optional ILogger to use within this client.

Properties

CreateDatasetOperationsClient

public override OperationsClient CreateDatasetOperationsClient { get; }

The long-running operations client for CreateDataset.

Property Value
Type Description
OperationsClient
Overrides

CreateModelOperationsClient

public override OperationsClient CreateModelOperationsClient { get; }

The long-running operations client for CreateModel.

Property Value
Type Description
OperationsClient
Overrides

DeleteDatasetOperationsClient

public override OperationsClient DeleteDatasetOperationsClient { get; }

The long-running operations client for DeleteDataset.

Property Value
Type Description
OperationsClient
Overrides

DeleteModelOperationsClient

public override OperationsClient DeleteModelOperationsClient { get; }

The long-running operations client for DeleteModel.

Property Value
Type Description
OperationsClient
Overrides

DeployModelOperationsClient

public override OperationsClient DeployModelOperationsClient { get; }

The long-running operations client for DeployModel.

Property Value
Type Description
OperationsClient
Overrides

ExportDataOperationsClient

public override OperationsClient ExportDataOperationsClient { get; }

The long-running operations client for ExportData.

Property Value
Type Description
OperationsClient
Overrides

ExportModelOperationsClient

public override OperationsClient ExportModelOperationsClient { get; }

The long-running operations client for ExportModel.

Property Value
Type Description
OperationsClient
Overrides

GrpcClient

public override AutoMl.AutoMlClient GrpcClient { get; }

The underlying gRPC AutoMl client

Property Value
Type Description
AutoMlAutoMlClient
Overrides

ImportDataOperationsClient

public override OperationsClient ImportDataOperationsClient { get; }

The long-running operations client for ImportData.

Property Value
Type Description
OperationsClient
Overrides

UndeployModelOperationsClient

public override OperationsClient UndeployModelOperationsClient { get; }

The long-running operations client for UndeployModel.

Property Value
Type Description
OperationsClient
Overrides

Methods

CreateDataset(CreateDatasetRequest, CallSettings)

public override 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
OperationDatasetOperationMetadata

The RPC response.

Overrides

CreateDatasetAsync(CreateDatasetRequest, CallSettings)

public override 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
TaskOperationDatasetOperationMetadata

A Task containing the RPC response.

Overrides

CreateModel(CreateModelRequest, CallSettings)

public override 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
OperationModelOperationMetadata

The RPC response.

Overrides

CreateModelAsync(CreateModelRequest, CallSettings)

public override 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
TaskOperationModelOperationMetadata

A Task containing the RPC response.

Overrides

DeleteDataset(DeleteDatasetRequest, CallSettings)

public override 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
OperationEmptyOperationMetadata

The RPC response.

Overrides

DeleteDatasetAsync(DeleteDatasetRequest, CallSettings)

public override 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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Overrides

DeleteModel(DeleteModelRequest, CallSettings)

public override 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
OperationEmptyOperationMetadata

The RPC response.

Overrides

DeleteModelAsync(DeleteModelRequest, CallSettings)

public override 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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Overrides

DeployModel(DeployModelRequest, CallSettings)

public override 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
OperationEmptyOperationMetadata

The RPC response.

Overrides

DeployModelAsync(DeployModelRequest, CallSettings)

public override Task<Operation<Empty, OperationMetadata>> DeployModelAsync(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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Overrides

ExportData(ExportDataRequest, CallSettings)

public override Operation<Empty, OperationMetadata> ExportData(ExportDataRequest request, CallSettings callSettings = null)

Exports dataset's data to the provided output location. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.

Parameters
Name Description
request ExportDataRequest

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
OperationEmptyOperationMetadata

The RPC response.

Overrides

ExportDataAsync(ExportDataRequest, CallSettings)

public override Task<Operation<Empty, OperationMetadata>> ExportDataAsync(ExportDataRequest request, CallSettings callSettings = null)

Exports dataset's data to the provided output location. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.

Parameters
Name Description
request ExportDataRequest

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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Overrides

ExportModel(ExportModelRequest, CallSettings)

public override Operation<Empty, OperationMetadata> ExportModel(ExportModelRequest request, CallSettings callSettings = null)

Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A model is considered export-able if and only if it has an export format defined for it in [ModelExportOutputConfig][google.cloud.automl.v1.ModelExportOutputConfig].

Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.

Parameters
Name Description
request ExportModelRequest

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
OperationEmptyOperationMetadata

The RPC response.

Overrides

ExportModelAsync(ExportModelRequest, CallSettings)

public override Task<Operation<Empty, OperationMetadata>> ExportModelAsync(ExportModelRequest request, CallSettings callSettings = null)

Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A model is considered export-able if and only if it has an export format defined for it in [ModelExportOutputConfig][google.cloud.automl.v1.ModelExportOutputConfig].

Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.

Parameters
Name Description
request ExportModelRequest

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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Overrides

GetAnnotationSpec(GetAnnotationSpecRequest, CallSettings)

public override AnnotationSpec GetAnnotationSpec(GetAnnotationSpecRequest request, CallSettings callSettings = null)

Gets an annotation spec.

Parameters
Name Description
request GetAnnotationSpecRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AnnotationSpec

The RPC response.

Overrides

GetAnnotationSpecAsync(GetAnnotationSpecRequest, CallSettings)

public override Task<AnnotationSpec> GetAnnotationSpecAsync(GetAnnotationSpecRequest request, CallSettings callSettings = null)

Gets an annotation spec.

Parameters
Name Description
request GetAnnotationSpecRequest

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
TaskAnnotationSpec

A Task containing the RPC response.

Overrides

GetDataset(GetDatasetRequest, CallSettings)

public override Dataset GetDataset(GetDatasetRequest request, CallSettings callSettings = null)

Gets a dataset.

Parameters
Name Description
request GetDatasetRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Dataset

The RPC response.

Overrides

GetDatasetAsync(GetDatasetRequest, CallSettings)

public override Task<Dataset> GetDatasetAsync(GetDatasetRequest request, CallSettings callSettings = null)

Gets a dataset.

Parameters
Name Description
request GetDatasetRequest

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
TaskDataset

A Task containing the RPC response.

Overrides

GetModel(GetModelRequest, CallSettings)

public override Model GetModel(GetModelRequest request, CallSettings callSettings = null)

Gets a model.

Parameters
Name Description
request GetModelRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Model

The RPC response.

Overrides

GetModelAsync(GetModelRequest, CallSettings)

public override Task<Model> GetModelAsync(GetModelRequest request, CallSettings callSettings = null)

Gets a model.

Parameters
Name Description
request GetModelRequest

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
TaskModel

A Task containing the RPC response.

Overrides

GetModelEvaluation(GetModelEvaluationRequest, CallSettings)

public override ModelEvaluation GetModelEvaluation(GetModelEvaluationRequest request, CallSettings callSettings = null)

Gets a model evaluation.

Parameters
Name Description
request GetModelEvaluationRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ModelEvaluation

The RPC response.

Overrides

GetModelEvaluationAsync(GetModelEvaluationRequest, CallSettings)

public override Task<ModelEvaluation> GetModelEvaluationAsync(GetModelEvaluationRequest request, CallSettings callSettings = null)

Gets a model evaluation.

Parameters
Name Description
request GetModelEvaluationRequest

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
TaskModelEvaluation

A Task containing the RPC response.

Overrides

ImportData(ImportDataRequest, CallSettings)

public override Operation<Empty, OperationMetadata> ImportData(ImportDataRequest request, CallSettings callSettings = null)

Imports data into a dataset. For Tables this method can only be called on an empty Dataset.

For Tables:

  • A [schema_inference_version][google.cloud.automl.v1.InputConfig.params] parameter must be explicitly set. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Parameters
Name Description
request ImportDataRequest

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
OperationEmptyOperationMetadata

The RPC response.

Overrides

ImportDataAsync(ImportDataRequest, CallSettings)

public override Task<Operation<Empty, OperationMetadata>> ImportDataAsync(ImportDataRequest request, CallSettings callSettings = null)

Imports data into a dataset. For Tables this method can only be called on an empty Dataset.

For Tables:

  • A [schema_inference_version][google.cloud.automl.v1.InputConfig.params] parameter must be explicitly set. Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.
Parameters
Name Description
request ImportDataRequest

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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Overrides

ListDatasets(ListDatasetsRequest, CallSettings)

public override PagedEnumerable<ListDatasetsResponse, Dataset> ListDatasets(ListDatasetsRequest request, CallSettings callSettings = null)

Lists datasets in a project.

Parameters
Name Description
request ListDatasetsRequest

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
PagedEnumerableListDatasetsResponseDataset

A pageable sequence of Dataset resources.

Overrides

ListDatasetsAsync(ListDatasetsRequest, CallSettings)

public override PagedAsyncEnumerable<ListDatasetsResponse, Dataset> ListDatasetsAsync(ListDatasetsRequest request, CallSettings callSettings = null)

Lists datasets in a project.

Parameters
Name Description
request ListDatasetsRequest

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
PagedAsyncEnumerableListDatasetsResponseDataset

A pageable asynchronous sequence of Dataset resources.

Overrides

ListModelEvaluations(ListModelEvaluationsRequest, CallSettings)

public override PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation> ListModelEvaluations(ListModelEvaluationsRequest request, CallSettings callSettings = null)

Lists model evaluations.

Parameters
Name Description
request ListModelEvaluationsRequest

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
PagedEnumerableListModelEvaluationsResponseModelEvaluation

A pageable sequence of ModelEvaluation resources.

Overrides

ListModelEvaluationsAsync(ListModelEvaluationsRequest, CallSettings)

public override PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation> ListModelEvaluationsAsync(ListModelEvaluationsRequest request, CallSettings callSettings = null)

Lists model evaluations.

Parameters
Name Description
request ListModelEvaluationsRequest

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
PagedAsyncEnumerableListModelEvaluationsResponseModelEvaluation

A pageable asynchronous sequence of ModelEvaluation resources.

Overrides

ListModels(ListModelsRequest, CallSettings)

public override PagedEnumerable<ListModelsResponse, Model> ListModels(ListModelsRequest request, CallSettings callSettings = null)

Lists models.

Parameters
Name Description
request ListModelsRequest

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
PagedEnumerableListModelsResponseModel

A pageable sequence of Model resources.

Overrides

ListModelsAsync(ListModelsRequest, CallSettings)

public override PagedAsyncEnumerable<ListModelsResponse, Model> ListModelsAsync(ListModelsRequest request, CallSettings callSettings = null)

Lists models.

Parameters
Name Description
request ListModelsRequest

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
PagedAsyncEnumerableListModelsResponseModel

A pageable asynchronous sequence of Model resources.

Overrides

UndeployModel(UndeployModelRequest, CallSettings)

public override Operation<Empty, OperationMetadata> UndeployModel(UndeployModelRequest request, CallSettings callSettings = null)

Undeploys a model. If the model is not deployed this method has no effect.

Only applicable for Text Classification, Image Object Detection and Tables; all other domains manage deployment automatically.

Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.

Parameters
Name Description
request UndeployModelRequest

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
OperationEmptyOperationMetadata

The RPC response.

Overrides

UndeployModelAsync(UndeployModelRequest, CallSettings)

public override Task<Operation<Empty, OperationMetadata>> UndeployModelAsync(UndeployModelRequest request, CallSettings callSettings = null)

Undeploys a model. If the model is not deployed this method has no effect.

Only applicable for Text Classification, Image Object Detection and Tables; all other domains manage deployment automatically.

Returns an empty response in the [response][google.longrunning.Operation.response] field when it completes.

Parameters
Name Description
request UndeployModelRequest

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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Overrides

UpdateDataset(UpdateDatasetRequest, CallSettings)

public override Dataset UpdateDataset(UpdateDatasetRequest request, CallSettings callSettings = null)

Updates a dataset.

Parameters
Name Description
request UpdateDatasetRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Dataset

The RPC response.

Overrides

UpdateDatasetAsync(UpdateDatasetRequest, CallSettings)

public override Task<Dataset> UpdateDatasetAsync(UpdateDatasetRequest request, CallSettings callSettings = null)

Updates a dataset.

Parameters
Name Description
request UpdateDatasetRequest

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
TaskDataset

A Task containing the RPC response.

Overrides

UpdateModel(UpdateModelRequest, CallSettings)

public override Model UpdateModel(UpdateModelRequest request, CallSettings callSettings = null)

Updates a model.

Parameters
Name Description
request UpdateModelRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Model

The RPC response.

Overrides

UpdateModelAsync(UpdateModelRequest, CallSettings)

public override Task<Model> UpdateModelAsync(UpdateModelRequest request, CallSettings callSettings = null)

Updates a model.

Parameters
Name Description
request UpdateModelRequest

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
TaskModel

A Task containing the RPC response.

Overrides