Class AutoMlClient (2.23.0)

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.

Equality

Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection> objects compare equal. Objects that compare equal share the same underlying resources.

Performance

Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.

Thread Safety

Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.

Constructors

AutoMlClient(AutoMlClient const &)

Copy and move support

Parameter
Name Description
AutoMlClient const &

AutoMlClient(AutoMlClient &&)

Copy and move support

Parameter
Name Description
AutoMlClient &&

AutoMlClient(std::shared_ptr< AutoMlConnection >, Options)

Parameters
Name Description
connection std::shared_ptr< AutoMlConnection >
opts Options

Operators

operator=(AutoMlClient const &)

Copy and move support

Parameter
Name Description
AutoMlClient const &
Returns
Type Description
AutoMlClient &

operator=(AutoMlClient &&)

Copy and move support

Parameter
Name Description
AutoMlClient &&
Returns
Type Description
AutoMlClient &

Functions

CreateDataset(std::string const &, google::cloud::automl::v1::Dataset const &, Options)

Creates a dataset.

Parameters
Name Description
parent std::string const &

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

dataset google::cloud::automl::v1::Dataset const &

Required. The dataset to create.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::automl::v1::Dataset > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.automl.v1.Dataset proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateDataset(google::cloud::automl::v1::CreateDatasetRequest const &, Options)

Creates a dataset.

Parameters
Name Description
request google::cloud::automl::v1::CreateDatasetRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.automl.v1.CreateDatasetRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::automl::v1::Dataset > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.automl.v1.Dataset proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

GetDataset(std::string const &, Options)

Gets a dataset.

Parameters
Name Description
name std::string const &

Required. The resource name of the dataset to retrieve.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::automl::v1::Dataset >

the result of the RPC. The response message type (google.cloud.automl.v1.Dataset) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetDataset(google::cloud::automl::v1::GetDatasetRequest const &, Options)

Gets a dataset.

Parameters
Name Description
request google::cloud::automl::v1::GetDatasetRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.automl.v1.GetDatasetRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::automl::v1::Dataset >

the result of the RPC. The response message type (google.cloud.automl.v1.Dataset) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListDatasets(std::string const &, Options)

Lists datasets in a project.

Parameters
Name Description
parent std::string const &

Required. The resource name of the project from which to list datasets.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::automl::v1::Dataset >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.automl.v1.Dataset, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListDatasets(google::cloud::automl::v1::ListDatasetsRequest, Options)

Lists datasets in a project.

Parameters
Name Description
request google::cloud::automl::v1::ListDatasetsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.automl.v1.ListDatasetsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::automl::v1::Dataset >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.automl.v1.Dataset, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

UpdateDataset(google::cloud::automl::v1::Dataset const &, google::protobuf::FieldMask const &, Options)

Updates a dataset.

Parameters
Name Description
dataset google::cloud::automl::v1::Dataset const &

Required. The dataset which replaces the resource on the server.

update_mask google::protobuf::FieldMask const &

Required. The update mask applies to the resource.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::automl::v1::Dataset >

the result of the RPC. The response message type (google.cloud.automl.v1.Dataset) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateDataset(google::cloud::automl::v1::UpdateDatasetRequest const &, Options)

Updates a dataset.

Parameters
Name Description
request google::cloud::automl::v1::UpdateDatasetRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.automl.v1.UpdateDatasetRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::automl::v1::Dataset >

the result of the RPC. The response message type (google.cloud.automl.v1.Dataset) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

DeleteDataset(std::string const &, Options)

Deletes a dataset and all of its contents.

Returns empty response in the response field when it completes, and delete_details in the metadata field.

Parameters
Name Description
name std::string const &

Required. The resource name of the dataset to delete.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::automl::v1::OperationMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.automl.v1.OperationMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteDataset(google::cloud::automl::v1::DeleteDatasetRequest const &, Options)

Deletes a dataset and all of its contents.

Returns empty response in the response field when it completes, and delete_details in the metadata field.

Parameters
Name Description
request google::cloud::automl::v1::DeleteDatasetRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.automl.v1.DeleteDatasetRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::automl::v1::OperationMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.automl.v1.OperationMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

ImportData(std::string const &, google::cloud::automl::v1::InputConfig const &, Options)

Imports data into a dataset.

For Tables this method can only be called on an empty Dataset.

For Tables:

Parameters
Name Description
name std::string const &

Required. Dataset name. Dataset must already exist. All imported annotations and examples will be added.

input_config google::cloud::automl::v1::InputConfig const &

Required. The desired input location and its domain specific semantics, if any.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::automl::v1::OperationMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.automl.v1.OperationMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

ImportData(google::cloud::automl::v1::ImportDataRequest const &, Options)

Imports data into a dataset.

For Tables this method can only be called on an empty Dataset.

For Tables:

Parameters
Name Description
request google::cloud::automl::v1::ImportDataRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.automl.v1.ImportDataRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::automl::v1::OperationMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.automl.v1.OperationMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

ExportData(std::string const &, google::cloud::automl::v1::OutputConfig const &, Options)

Exports dataset's data to the provided output location.

Returns an empty response in the response field when it completes.

Parameters
Name Description
name std::string const &

Required. The resource name of the dataset.

output_config google::cloud::automl::v1::OutputConfig const &

Required. The desired output location.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::automl::v1::OperationMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.automl.v1.OperationMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

ExportData(google::cloud::automl::v1::ExportDataRequest const &, Options)

Exports dataset's data to the provided output location.

Returns an empty response in the response field when it completes.

Parameters
Name Description
request google::cloud::automl::v1::ExportDataRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.automl.v1.ExportDataRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::automl::v1::OperationMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.automl.v1.OperationMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

GetAnnotationSpec(std::string const &, Options)

Gets an annotation spec.

Parameters
Name Description
name std::string const &

Required. The resource name of the annotation spec to retrieve.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::automl::v1::AnnotationSpec >

the result of the RPC. The response message type (google.cloud.automl.v1.AnnotationSpec) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetAnnotationSpec(google::cloud::automl::v1::GetAnnotationSpecRequest const &, Options)

Gets an annotation spec.

Parameters
Name Description
request google::cloud::automl::v1::GetAnnotationSpecRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.automl.v1.GetAnnotationSpecRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::automl::v1::AnnotationSpec >

the result of the RPC. The response message type (google.cloud.automl.v1.AnnotationSpec) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

CreateModel(std::string const &, google::cloud::automl::v1::Model const &, Options)

Creates a model.

Returns a Model in the response field when it completes. When you create a model, several model evaluations are created for it: a global evaluation, and one evaluation for each annotation spec.

Parameters
Name Description
parent std::string const &

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

model google::cloud::automl::v1::Model const &

Required. The model to create.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::automl::v1::Model > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.automl.v1.Model proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateModel(google::cloud::automl::v1::CreateModelRequest const &, Options)

Creates a model.

Returns a Model in the 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 google::cloud::automl::v1::CreateModelRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.automl.v1.CreateModelRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::automl::v1::Model > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.automl.v1.Model proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

GetModel(std::string const &, Options)

Gets a model.

Parameters
Name Description
name std::string const &

Required. Resource name of the model.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::automl::v1::Model >

the result of the RPC. The response message type (google.cloud.automl.v1.Model) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetModel(google::cloud::automl::v1::GetModelRequest const &, Options)

Gets a model.

Parameters
Name Description
request google::cloud::automl::v1::GetModelRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.automl.v1.GetModelRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::automl::v1::Model >

the result of the RPC. The response message type (google.cloud.automl.v1.Model) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListModels(std::string const &, Options)

Lists models.

Parameters
Name Description
parent std::string const &

Required. Resource name of the project, from which to list the models.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::automl::v1::Model >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.automl.v1.Model, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListModels(google::cloud::automl::v1::ListModelsRequest, Options)

Lists models.

Parameters
Name Description
request google::cloud::automl::v1::ListModelsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.automl.v1.ListModelsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::automl::v1::Model >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.automl.v1.Model, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

DeleteModel(std::string const &, Options)

Deletes a model.

Returns google.protobuf.Empty in the response field when it completes, and delete_details in the metadata field.

Parameters
Name Description
name std::string const &

Required. Resource name of the model being deleted.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::automl::v1::OperationMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.automl.v1.OperationMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteModel(google::cloud::automl::v1::DeleteModelRequest const &, Options)

Deletes a model.

Returns google.protobuf.Empty in the response field when it completes, and delete_details in the metadata field.

Parameters
Name Description
request google::cloud::automl::v1::DeleteModelRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.automl.v1.DeleteModelRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::automl::v1::OperationMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.automl.v1.OperationMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

UpdateModel(google::cloud::automl::v1::Model const &, google::protobuf::FieldMask const &, Options)

Updates a model.

Parameters
Name Description
model google::cloud::automl::v1::Model const &

Required. The model which replaces the resource on the server.

update_mask google::protobuf::FieldMask const &

Required. The update mask applies to the resource.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::automl::v1::Model >

the result of the RPC. The response message type (google.cloud.automl.v1.Model) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateModel(google::cloud::automl::v1::UpdateModelRequest const &, Options)

Updates a model.

Parameters
Name Description
request google::cloud::automl::v1::UpdateModelRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.automl.v1.UpdateModelRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::automl::v1::Model >

the result of the RPC. The response message type (google.cloud.automl.v1.Model) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

DeployModel(std::string const &, Options)

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 field when it completes.

Parameters
Name Description
name std::string const &

Required. Resource name of the model to deploy.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::automl::v1::OperationMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.automl.v1.OperationMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeployModel(google::cloud::automl::v1::DeployModelRequest const &, Options)

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 field when it completes.

Parameters
Name Description
request google::cloud::automl::v1::DeployModelRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.automl.v1.DeployModelRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::automl::v1::OperationMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.automl.v1.OperationMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

UndeployModel(std::string const &, Options)

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 field when it completes.

Parameters
Name Description
name std::string const &

Required. Resource name of the model to undeploy.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::automl::v1::OperationMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.automl.v1.OperationMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

UndeployModel(google::cloud::automl::v1::UndeployModelRequest const &, Options)

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 field when it completes.

Parameters
Name Description
request google::cloud::automl::v1::UndeployModelRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.automl.v1.UndeployModelRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::automl::v1::OperationMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.automl.v1.OperationMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

ExportModel(std::string const &, google::cloud::automl::v1::ModelExportOutputConfig const &, Options)

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.

Returns an empty response in the response field when it completes.

Parameters
Name Description
name std::string const &

Required. The resource name of the model to export.

output_config google::cloud::automl::v1::ModelExportOutputConfig const &

Required. The desired output location and configuration.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::automl::v1::OperationMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.automl.v1.OperationMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

ExportModel(google::cloud::automl::v1::ExportModelRequest const &, Options)

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.

Returns an empty response in the response field when it completes.

Parameters
Name Description
request google::cloud::automl::v1::ExportModelRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.automl.v1.ExportModelRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::automl::v1::OperationMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.automl.v1.OperationMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

GetModelEvaluation(std::string const &, Options)

Gets a model evaluation.

Parameters
Name Description
name std::string const &

Required. Resource name for the model evaluation.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::automl::v1::ModelEvaluation >

the result of the RPC. The response message type (google.cloud.automl.v1.ModelEvaluation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetModelEvaluation(google::cloud::automl::v1::GetModelEvaluationRequest const &, Options)

Gets a model evaluation.

Parameters
Name Description
request google::cloud::automl::v1::GetModelEvaluationRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.automl.v1.GetModelEvaluationRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::automl::v1::ModelEvaluation >

the result of the RPC. The response message type (google.cloud.automl.v1.ModelEvaluation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListModelEvaluations(std::string const &, std::string const &, Options)

Lists model evaluations.

Parameters
Name Description
parent std::string const &

Required. Resource name of the model to list the model evaluations for. If modelId is set as "-", this will list model evaluations from across all models of the parent location.

filter std::string const &

Required. An expression for filtering the results of the request.

  • annotation_spec_id - for =, != or existence. See example below for the last.
    Some examples of using the filter are:
  • annotation_spec_id!=4 --> The model evaluation was done for annotation spec with ID different than 4.
  • NOT annotation_spec_id:* --> The model evaluation was done for aggregate of all annotation specs.
opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::automl::v1::ModelEvaluation >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.automl.v1.ModelEvaluation, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListModelEvaluations(google::cloud::automl::v1::ListModelEvaluationsRequest, Options)

Lists model evaluations.

Parameters
Name Description
request google::cloud::automl::v1::ListModelEvaluationsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.automl.v1.ListModelEvaluationsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::automl::v1::ModelEvaluation >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.automl.v1.ModelEvaluation, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.