Class WarehouseClient (3.3.0-rc)

Service that manages media content + metadata for streaming.

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

WarehouseClient(WarehouseClient const &)

Copy and move support

Parameter
Name Description
WarehouseClient const &

WarehouseClient(WarehouseClient &&)

Copy and move support

Parameter
Name Description
WarehouseClient &&

WarehouseClient(std::shared_ptr< WarehouseConnection >, Options)

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

Operators

operator=(WarehouseClient const &)

Copy and move support

Parameter
Name Description
WarehouseClient const &
Returns
Type Description
WarehouseClient &

operator=(WarehouseClient &&)

Copy and move support

Parameter
Name Description
WarehouseClient &&
Returns
Type Description
WarehouseClient &

Functions

CreateAsset(std::string const &, google::cloud::visionai::v1::Asset const &, std::string const &, Options)

Creates an asset inside corpus.

Parameters
Name Description
parent std::string const &

Required. The parent resource where this asset will be created. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}

asset google::cloud::visionai::v1::Asset const &

Required. The asset to create.

asset_id std::string const &

Optional. The ID to use for the asset, which will become the final component of the asset's resource name if user choose to specify. Otherwise, asset id will be generated by system.
This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The first character must be a letter, the last could be a letter or a number.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::visionai::v1::Asset >

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

CreateAsset(google::cloud::visionai::v1::CreateAssetRequest const &, Options)

Creates an asset inside corpus.

Parameters
Name Description
request google::cloud::visionai::v1::CreateAssetRequest 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.visionai.v1.CreateAssetRequest. 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::visionai::v1::Asset >

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

UpdateAsset(google::cloud::visionai::v1::Asset const &, google::protobuf::FieldMask const &, Options)

Updates an asset inside corpus.

Parameters
Name Description
asset google::cloud::visionai::v1::Asset const &

Required. The asset to update.
The asset's name field is used to identify the asset to be updated. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}

update_mask google::protobuf::FieldMask const &

The list of fields to be updated.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::visionai::v1::Asset >

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

UpdateAsset(google::cloud::visionai::v1::UpdateAssetRequest const &, Options)

Updates an asset inside corpus.

Parameters
Name Description
request google::cloud::visionai::v1::UpdateAssetRequest 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.visionai.v1.UpdateAssetRequest. 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::visionai::v1::Asset >

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

GetAsset(std::string const &, Options)

Reads an asset inside corpus.

Parameters
Name Description
name std::string const &

Required. The name of the asset to retrieve. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}

opts Options

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

Returns
Type Description
StatusOr< google::cloud::visionai::v1::Asset >

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

GetAsset(google::cloud::visionai::v1::GetAssetRequest const &, Options)

Reads an asset inside corpus.

Parameters
Name Description
request google::cloud::visionai::v1::GetAssetRequest 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.visionai.v1.GetAssetRequest. 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::visionai::v1::Asset >

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

ListAssets(std::string const &, Options)

Lists an list of assets inside corpus.

Parameters
Name Description
parent std::string const &

Required. The parent, which owns this collection of assets. Format: projects/{project_number}/locations/{location}/corpora/{corpus}

opts Options

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

Returns
Type Description
StreamRange< google::cloud::visionai::v1::Asset >

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.visionai.v1.Asset, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListAssets(google::cloud::visionai::v1::ListAssetsRequest, Options)

Lists an list of assets inside corpus.

Parameters
Name Description
request google::cloud::visionai::v1::ListAssetsRequest

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.visionai.v1.ListAssetsRequest. 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::visionai::v1::Asset >

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.visionai.v1.Asset, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

DeleteAsset(std::string const &, Options)

Deletes asset inside corpus.

Parameters
Name Description
name std::string const &

Required. The name of the asset to delete. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}

opts Options

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

Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::DeleteAssetMetadata > >

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.visionai.v1.DeleteAssetMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteAsset(NoAwaitTag, std::string const &, Options)

Deletes asset inside corpus.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
name std::string const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

DeleteAsset(google::cloud::visionai::v1::DeleteAssetRequest const &, Options)

Deletes asset inside corpus.

Parameters
Name Description
request google::cloud::visionai::v1::DeleteAssetRequest 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.visionai.v1.DeleteAssetRequest. 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::visionai::v1::DeleteAssetMetadata > >

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.visionai.v1.DeleteAssetMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteAsset(NoAwaitTag, google::cloud::visionai::v1::DeleteAssetRequest const &, Options)

Deletes asset inside corpus.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::visionai::v1::DeleteAssetRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

DeleteAsset(google::longrunning::Operation const &, Options)

Deletes asset inside corpus.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::DeleteAssetMetadata > >

UploadAsset(google::cloud::visionai::v1::UploadAssetRequest const &, Options)

Upload asset by specifing the asset Cloud Storage uri.

For video warehouse, it requires users who call this API have read access to the cloud storage file. Once it is uploaded, it can be retrieved by GenerateRetrievalUrl API which by default, only can retrieve cloud storage files from the same project of the warehouse. To allow retrieval cloud storage files that are in a separate project, it requires to find the vision ai service account (Go to IAM, check checkbox to show "Include Google-provided role grants", search for "Cloud Vision AI Service Agent") and grant the read access of the cloud storage files to that service account.

Parameters
Name Description
request google::cloud::visionai::v1::UploadAssetRequest 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.visionai.v1.UploadAssetRequest. 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::visionai::v1::UploadAssetResponse > >

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.visionai.v1.UploadAssetResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

UploadAsset(NoAwaitTag, google::cloud::visionai::v1::UploadAssetRequest const &, Options)

Upload asset by specifing the asset Cloud Storage uri.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::visionai::v1::UploadAssetRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

UploadAsset(google::longrunning::Operation const &, Options)

Upload asset by specifing the asset Cloud Storage uri.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::UploadAssetResponse > >

GenerateRetrievalUrl(google::cloud::visionai::v1::GenerateRetrievalUrlRequest const &, Options)

Generates a signed url for downloading the asset.

For video warehouse, please see comment of UploadAsset about how to allow retrieval of cloud storage files in a different project.

Parameters
Name Description
request google::cloud::visionai::v1::GenerateRetrievalUrlRequest 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.visionai.v1.GenerateRetrievalUrlRequest. 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::visionai::v1::GenerateRetrievalUrlResponse >

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

AnalyzeAsset(google::cloud::visionai::v1::AnalyzeAssetRequest const &, Options)

Analyze asset to power search capability.

Parameters
Name Description
request google::cloud::visionai::v1::AnalyzeAssetRequest 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.visionai.v1.AnalyzeAssetRequest. 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::visionai::v1::AnalyzeAssetResponse > >

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.visionai.v1.AnalyzeAssetResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

AnalyzeAsset(NoAwaitTag, google::cloud::visionai::v1::AnalyzeAssetRequest const &, Options)

Analyze asset to power search capability.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::visionai::v1::AnalyzeAssetRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

AnalyzeAsset(google::longrunning::Operation const &, Options)

Analyze asset to power search capability.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::AnalyzeAssetResponse > >

IndexAsset(google::cloud::visionai::v1::IndexAssetRequest const &, Options)

Index one asset for search.

Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND

Parameters
Name Description
request google::cloud::visionai::v1::IndexAssetRequest 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.visionai.v1.IndexAssetRequest. 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::visionai::v1::IndexAssetResponse > >

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.visionai.v1.IndexAssetResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

IndexAsset(NoAwaitTag, google::cloud::visionai::v1::IndexAssetRequest const &, Options)

Index one asset for search.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::visionai::v1::IndexAssetRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

IndexAsset(google::longrunning::Operation const &, Options)

Index one asset for search.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::IndexAssetResponse > >

RemoveIndexAsset(google::cloud::visionai::v1::RemoveIndexAssetRequest const &, Options)

Remove one asset's index data for search.

Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND

Parameters
Name Description
request google::cloud::visionai::v1::RemoveIndexAssetRequest 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.visionai.v1.RemoveIndexAssetRequest. 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::visionai::v1::RemoveIndexAssetResponse > >

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.visionai.v1.RemoveIndexAssetResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

RemoveIndexAsset(NoAwaitTag, google::cloud::visionai::v1::RemoveIndexAssetRequest const &, Options)

Remove one asset's index data for search.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::visionai::v1::RemoveIndexAssetRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

RemoveIndexAsset(google::longrunning::Operation const &, Options)

Remove one asset's index data for search.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::RemoveIndexAssetResponse > >

ViewIndexedAssets(std::string const &, Options)

Lists assets inside an index.

Parameters
Name Description
index std::string const &

Required. The index that owns this collection of assets. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}

opts Options

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

Returns
Type Description
StreamRange< google::cloud::visionai::v1::IndexedAsset >

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.visionai.v1.IndexedAsset, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ViewIndexedAssets(google::cloud::visionai::v1::ViewIndexedAssetsRequest, Options)

Lists assets inside an index.

Parameters
Name Description
request google::cloud::visionai::v1::ViewIndexedAssetsRequest

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.visionai.v1.ViewIndexedAssetsRequest. 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::visionai::v1::IndexedAsset >

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.visionai.v1.IndexedAsset, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

CreateIndex(std::string const &, google::cloud::visionai::v1::Index const &, std::string const &, Options)

Creates an Index under the corpus.

Parameters
Name Description
parent std::string const &

Required. Value for the parent. The resource name of the Corpus under which this index is created. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}

index google::cloud::visionai::v1::Index const &

Required. The index being created.

index_id std::string const &

Optional. The ID for the index. This will become the final resource name for the index. If the user does not specify this value, it will be generated by system.
This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The first character must be a letter, the last could be a letter or a number.

opts Options

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

Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::Index > >

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.visionai.v1.Index proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateIndex(NoAwaitTag, std::string const &, google::cloud::visionai::v1::Index const &, std::string const &, Options)

Creates an Index under the corpus.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
parent std::string const &
index google::cloud::visionai::v1::Index const &
index_id std::string const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

CreateIndex(google::cloud::visionai::v1::CreateIndexRequest const &, Options)

Creates an Index under the corpus.

Parameters
Name Description
request google::cloud::visionai::v1::CreateIndexRequest 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.visionai.v1.CreateIndexRequest. 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::visionai::v1::Index > >

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.visionai.v1.Index proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateIndex(NoAwaitTag, google::cloud::visionai::v1::CreateIndexRequest const &, Options)

Creates an Index under the corpus.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::visionai::v1::CreateIndexRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

CreateIndex(google::longrunning::Operation const &, Options)

Creates an Index under the corpus.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::Index > >

UpdateIndex(google::cloud::visionai::v1::Index const &, google::protobuf::FieldMask const &, Options)

Updates an Index under the corpus.

Users can perform a metadata-only update or trigger a full index rebuild with different update_mask values.

Parameters
Name Description
index google::cloud::visionai::v1::Index const &

Required. The resource being updated.

update_mask google::protobuf::FieldMask const &

Required. Field mask is used to specify the fields to be overwritten in the Index resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field of the resource will be overwritten if it is in the mask. Empty field mask is not allowed. If the mask is "*", it triggers a full update of the index, and also a whole rebuild of index data.

opts Options

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

Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::Index > >

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.visionai.v1.Index proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

UpdateIndex(NoAwaitTag, google::cloud::visionai::v1::Index const &, google::protobuf::FieldMask const &, Options)

Updates an Index under the corpus.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
index google::cloud::visionai::v1::Index const &
update_mask google::protobuf::FieldMask const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

UpdateIndex(google::cloud::visionai::v1::UpdateIndexRequest const &, Options)

Updates an Index under the corpus.

Users can perform a metadata-only update or trigger a full index rebuild with different update_mask values.

Parameters
Name Description
request google::cloud::visionai::v1::UpdateIndexRequest 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.visionai.v1.UpdateIndexRequest. 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::visionai::v1::Index > >

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.visionai.v1.Index proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

UpdateIndex(NoAwaitTag, google::cloud::visionai::v1::UpdateIndexRequest const &, Options)

Updates an Index under the corpus.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::visionai::v1::UpdateIndexRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

UpdateIndex(google::longrunning::Operation const &, Options)

Updates an Index under the corpus.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::Index > >

GetIndex(std::string const &, Options)

Gets the details of a single Index under a Corpus.

Parameters
Name Description
name std::string const &

Required. Name of the Index resource. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}

opts Options

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

Returns
Type Description
StatusOr< google::cloud::visionai::v1::Index >

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

GetIndex(google::cloud::visionai::v1::GetIndexRequest const &, Options)

Gets the details of a single Index under a Corpus.

Parameters
Name Description
request google::cloud::visionai::v1::GetIndexRequest 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.visionai.v1.GetIndexRequest. 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::visionai::v1::Index >

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

ListIndexes(std::string const &, Options)

List all Indexes in a given Corpus.

Parameters
Name Description
parent std::string const &

Required. The parent corpus that owns this collection of indexes. Format: projects/{project_number}/locations/{location}/corpora/{corpus}

opts Options

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

Returns
Type Description
StreamRange< google::cloud::visionai::v1::Index >

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.visionai.v1.Index, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListIndexes(google::cloud::visionai::v1::ListIndexesRequest, Options)

List all Indexes in a given Corpus.

Parameters
Name Description
request google::cloud::visionai::v1::ListIndexesRequest

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.visionai.v1.ListIndexesRequest. 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::visionai::v1::Index >

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.visionai.v1.Index, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

DeleteIndex(std::string const &, Options)

Delete a single Index.

In order to delete an index, the caller must make sure that it is not deployed to any index endpoint.

Parameters
Name Description
name std::string const &

Required. The name of the index to delete. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}

opts Options

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

Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::DeleteIndexMetadata > >

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.visionai.v1.DeleteIndexMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteIndex(NoAwaitTag, std::string const &, Options)

Delete a single Index.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
name std::string const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

DeleteIndex(google::cloud::visionai::v1::DeleteIndexRequest const &, Options)

Delete a single Index.

In order to delete an index, the caller must make sure that it is not deployed to any index endpoint.

Parameters
Name Description
request google::cloud::visionai::v1::DeleteIndexRequest 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.visionai.v1.DeleteIndexRequest. 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::visionai::v1::DeleteIndexMetadata > >

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.visionai.v1.DeleteIndexMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteIndex(NoAwaitTag, google::cloud::visionai::v1::DeleteIndexRequest const &, Options)

Delete a single Index.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::visionai::v1::DeleteIndexRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

DeleteIndex(google::longrunning::Operation const &, Options)

Delete a single Index.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::DeleteIndexMetadata > >

CreateCorpus(std::string const &, google::cloud::visionai::v1::Corpus const &, Options)

Creates a corpus inside a project.

Parameters
Name Description
parent std::string const &

Required. Form: projects/{project_number}/locations/{location_id}

corpus google::cloud::visionai::v1::Corpus const &

Required. The corpus to be created.

opts Options

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

Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::Corpus > >

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.visionai.v1.Corpus proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateCorpus(NoAwaitTag, std::string const &, google::cloud::visionai::v1::Corpus const &, Options)

Creates a corpus inside a project.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
parent std::string const &
corpus google::cloud::visionai::v1::Corpus const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

CreateCorpus(google::cloud::visionai::v1::CreateCorpusRequest const &, Options)

Creates a corpus inside a project.

Parameters
Name Description
request google::cloud::visionai::v1::CreateCorpusRequest 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.visionai.v1.CreateCorpusRequest. 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::visionai::v1::Corpus > >

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.visionai.v1.Corpus proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateCorpus(NoAwaitTag, google::cloud::visionai::v1::CreateCorpusRequest const &, Options)

Creates a corpus inside a project.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::visionai::v1::CreateCorpusRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

CreateCorpus(google::longrunning::Operation const &, Options)

Creates a corpus inside a project.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::Corpus > >

GetCorpus(std::string const &, Options)

Gets corpus details inside a project.

Parameters
Name Description
name std::string const &

Required. The resource name of the corpus to retrieve.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::visionai::v1::Corpus >

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

GetCorpus(google::cloud::visionai::v1::GetCorpusRequest const &, Options)

Gets corpus details inside a project.

Parameters
Name Description
request google::cloud::visionai::v1::GetCorpusRequest 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.visionai.v1.GetCorpusRequest. 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::visionai::v1::Corpus >

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

UpdateCorpus(google::cloud::visionai::v1::Corpus const &, google::protobuf::FieldMask const &, Options)

Updates a corpus in a project.

Parameters
Name Description
corpus google::cloud::visionai::v1::Corpus const &

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

update_mask google::protobuf::FieldMask const &

The list of fields to be updated.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::visionai::v1::Corpus >

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

UpdateCorpus(google::cloud::visionai::v1::UpdateCorpusRequest const &, Options)

Updates a corpus in a project.

Parameters
Name Description
request google::cloud::visionai::v1::UpdateCorpusRequest 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.visionai.v1.UpdateCorpusRequest. 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::visionai::v1::Corpus >

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

ListCorpora(std::string const &, Options)

Lists all corpora in a project.

Parameters
Name Description
parent std::string const &

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

opts Options

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

Returns
Type Description
StreamRange< google::cloud::visionai::v1::Corpus >

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.visionai.v1.Corpus, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListCorpora(google::cloud::visionai::v1::ListCorporaRequest, Options)

Lists all corpora in a project.

Parameters
Name Description
request google::cloud::visionai::v1::ListCorporaRequest

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.visionai.v1.ListCorporaRequest. 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::visionai::v1::Corpus >

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.visionai.v1.Corpus, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

DeleteCorpus(std::string const &, Options)

Deletes a corpus only if its empty.

Returns empty response.

Parameters
Name Description
name std::string const &

Required. The resource name of the corpus to delete.

opts Options

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

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

DeleteCorpus(google::cloud::visionai::v1::DeleteCorpusRequest const &, Options)

Deletes a corpus only if its empty.

Returns empty response.

Parameters
Name Description
request google::cloud::visionai::v1::DeleteCorpusRequest 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.visionai.v1.DeleteCorpusRequest. 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
Status

a Status object. If the request failed, the status contains the details of the failure.

AnalyzeCorpus(google::cloud::visionai::v1::AnalyzeCorpusRequest const &, Options)

Analyzes a corpus.

Parameters
Name Description
request google::cloud::visionai::v1::AnalyzeCorpusRequest 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.visionai.v1.AnalyzeCorpusRequest. 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::visionai::v1::AnalyzeCorpusResponse > >

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.visionai.v1.AnalyzeCorpusResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

AnalyzeCorpus(NoAwaitTag, google::cloud::visionai::v1::AnalyzeCorpusRequest const &, Options)

Analyzes a corpus.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::visionai::v1::AnalyzeCorpusRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

AnalyzeCorpus(google::longrunning::Operation const &, Options)

Analyzes a corpus.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::AnalyzeCorpusResponse > >

CreateDataSchema(std::string const &, google::cloud::visionai::v1::DataSchema const &, Options)

Creates data schema inside corpus.

Parameters
Name Description
parent std::string const &

Required. The parent resource where this data schema will be created. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}

data_schema google::cloud::visionai::v1::DataSchema const &

Required. The data schema to create.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::visionai::v1::DataSchema >

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

CreateDataSchema(google::cloud::visionai::v1::CreateDataSchemaRequest const &, Options)

Creates data schema inside corpus.

Parameters
Name Description
request google::cloud::visionai::v1::CreateDataSchemaRequest 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.visionai.v1.CreateDataSchemaRequest. 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::visionai::v1::DataSchema >

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

UpdateDataSchema(google::cloud::visionai::v1::DataSchema const &, google::protobuf::FieldMask const &, Options)

Updates data schema inside corpus.

Parameters
Name Description
data_schema google::cloud::visionai::v1::DataSchema const &

Required. The data schema's name field is used to identify the data schema to be updated. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}

update_mask google::protobuf::FieldMask const &

The list of fields to be updated.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::visionai::v1::DataSchema >

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

UpdateDataSchema(google::cloud::visionai::v1::UpdateDataSchemaRequest const &, Options)

Updates data schema inside corpus.

Parameters
Name Description
request google::cloud::visionai::v1::UpdateDataSchemaRequest 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.visionai.v1.UpdateDataSchemaRequest. 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::visionai::v1::DataSchema >

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

GetDataSchema(std::string const &, Options)

Gets data schema inside corpus.

Parameters
Name Description
name std::string const &

Required. The name of the data schema to retrieve. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}

opts Options

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

Returns
Type Description
StatusOr< google::cloud::visionai::v1::DataSchema >

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

GetDataSchema(google::cloud::visionai::v1::GetDataSchemaRequest const &, Options)

Gets data schema inside corpus.

Parameters
Name Description
request google::cloud::visionai::v1::GetDataSchemaRequest 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.visionai.v1.GetDataSchemaRequest. 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::visionai::v1::DataSchema >

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

DeleteDataSchema(std::string const &, Options)

Deletes data schema inside corpus.

Parameters
Name Description
name std::string const &

Required. The name of the data schema to delete. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}

opts Options

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

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

DeleteDataSchema(google::cloud::visionai::v1::DeleteDataSchemaRequest const &, Options)

Deletes data schema inside corpus.

Parameters
Name Description
request google::cloud::visionai::v1::DeleteDataSchemaRequest 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.visionai.v1.DeleteDataSchemaRequest. 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
Status

a Status object. If the request failed, the status contains the details of the failure.

ListDataSchemas(std::string const &, Options)

Lists a list of data schemas inside corpus.

Parameters
Name Description
parent std::string const &

Required. The parent, which owns this collection of data schemas. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}

opts Options

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

Returns
Type Description
StreamRange< google::cloud::visionai::v1::DataSchema >

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.visionai.v1.DataSchema, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListDataSchemas(google::cloud::visionai::v1::ListDataSchemasRequest, Options)

Lists a list of data schemas inside corpus.

Parameters
Name Description
request google::cloud::visionai::v1::ListDataSchemasRequest

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.visionai.v1.ListDataSchemasRequest. 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::visionai::v1::DataSchema >

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.visionai.v1.DataSchema, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

CreateAnnotation(std::string const &, google::cloud::visionai::v1::Annotation const &, std::string const &, Options)

Creates annotation inside asset.

Parameters
Name Description
parent std::string const &

Required. The parent resource where this annotation will be created. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}

annotation google::cloud::visionai::v1::Annotation const &

Required. The annotation to create.

annotation_id std::string const &

Optional. The ID to use for the annotation, which will become the final component of the annotation's resource name if user choose to specify. Otherwise, annotation id will be generated by system.
This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The first character must be a letter, the last could be a letter or a number.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::visionai::v1::Annotation >

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

CreateAnnotation(google::cloud::visionai::v1::CreateAnnotationRequest const &, Options)

Creates annotation inside asset.

Parameters
Name Description
request google::cloud::visionai::v1::CreateAnnotationRequest 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.visionai.v1.CreateAnnotationRequest. 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::visionai::v1::Annotation >

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

GetAnnotation(std::string const &, Options)

Reads annotation inside asset.

Parameters
Name Description
name std::string const &

Required. The name of the annotation to retrieve. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}

opts Options

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

Returns
Type Description
StatusOr< google::cloud::visionai::v1::Annotation >

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

GetAnnotation(google::cloud::visionai::v1::GetAnnotationRequest const &, Options)

Reads annotation inside asset.

Parameters
Name Description
request google::cloud::visionai::v1::GetAnnotationRequest 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.visionai.v1.GetAnnotationRequest. 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::visionai::v1::Annotation >

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

ListAnnotations(std::string const &, Options)

Lists a list of annotations inside asset.

Parameters
Name Description
parent std::string const &

The parent, which owns this collection of annotations. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}

opts Options

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

Returns
Type Description
StreamRange< google::cloud::visionai::v1::Annotation >

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.visionai.v1.Annotation, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListAnnotations(google::cloud::visionai::v1::ListAnnotationsRequest, Options)

Lists a list of annotations inside asset.

Parameters
Name Description
request google::cloud::visionai::v1::ListAnnotationsRequest

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.visionai.v1.ListAnnotationsRequest. 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::visionai::v1::Annotation >

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.visionai.v1.Annotation, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

UpdateAnnotation(google::cloud::visionai::v1::Annotation const &, google::protobuf::FieldMask const &, Options)

Updates annotation inside asset.

Parameters
Name Description
annotation google::cloud::visionai::v1::Annotation const &

Required. The annotation to update. The annotation's name field is used to identify the annotation to be updated. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}

update_mask google::protobuf::FieldMask const &

The list of fields to be updated.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::visionai::v1::Annotation >

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

UpdateAnnotation(google::cloud::visionai::v1::UpdateAnnotationRequest const &, Options)

Updates annotation inside asset.

Parameters
Name Description
request google::cloud::visionai::v1::UpdateAnnotationRequest 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.visionai.v1.UpdateAnnotationRequest. 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::visionai::v1::Annotation >

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

DeleteAnnotation(std::string const &, Options)

Deletes annotation inside asset.

Parameters
Name Description
name std::string const &

Required. The name of the annotation to delete. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}

opts Options

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

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

DeleteAnnotation(google::cloud::visionai::v1::DeleteAnnotationRequest const &, Options)

Deletes annotation inside asset.

Parameters
Name Description
request google::cloud::visionai::v1::DeleteAnnotationRequest 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.visionai.v1.DeleteAnnotationRequest. 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
Status

a Status object. If the request failed, the status contains the details of the failure.

AsyncIngestAsset(Options)

Ingests data for the asset.

It is not allowed to ingest a data chunk which is already expired according to TTL. This method is only available via the gRPC API (not HTTP since bi-directional streaming is not supported via HTTP).

Parameter
Name Description
opts Options

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

Returns
Type Description
std::unique_ptr<::google::cloud::AsyncStreamingReadWriteRpc< google::cloud::visionai::v1::IngestAssetRequest, google::cloud::visionai::v1::IngestAssetResponse > >

An object representing the bidirectional streaming RPC. Applications can send multiple request messages and receive multiple response messages through this API. Bidirectional streaming RPCs can impose restrictions on the sequence of request and response messages. Please consult the service documentation for details. The request message type (google.cloud.visionai.v1.IngestAssetRequest) and response messages (google.cloud.visionai.v1.IngestAssetResponse) are mapped to C++ classes using the Protobuf mapping rules.

ClipAsset(google::cloud::visionai::v1::ClipAssetRequest const &, Options)

Supported by STREAM_VIDEO corpus type.

Generates clips for downloading. The api takes in a time range, and generates a clip of the first content available after start_time and before end_time, which may overflow beyond these bounds. Returned clips are truncated if the total size of the clips are larger than 100MB.

Parameters
Name Description
request google::cloud::visionai::v1::ClipAssetRequest 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.visionai.v1.ClipAssetRequest. 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::visionai::v1::ClipAssetResponse >

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

GenerateHlsUri(google::cloud::visionai::v1::GenerateHlsUriRequest const &, Options)

Generates a uri for an HLS manifest.

The api takes in a collection of time ranges, and generates a URI for an HLS manifest that covers all the requested time ranges.

Parameters
Name Description
request google::cloud::visionai::v1::GenerateHlsUriRequest 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.visionai.v1.GenerateHlsUriRequest. 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::visionai::v1::GenerateHlsUriResponse >

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

ImportAssets(google::cloud::visionai::v1::ImportAssetsRequest const &, Options)

Imports assets (images plus annotations) from a meta file on cloud storage.

Each row in the meta file is corresponding to an image (specified by a cloud storage uri) and its annotations.

Parameters
Name Description
request google::cloud::visionai::v1::ImportAssetsRequest 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.visionai.v1.ImportAssetsRequest. 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::visionai::v1::ImportAssetsResponse > >

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.visionai.v1.ImportAssetsResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

ImportAssets(NoAwaitTag, google::cloud::visionai::v1::ImportAssetsRequest const &, Options)

Imports assets (images plus annotations) from a meta file on cloud storage.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::visionai::v1::ImportAssetsRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

ImportAssets(google::longrunning::Operation const &, Options)

Imports assets (images plus annotations) from a meta file on cloud storage.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::ImportAssetsResponse > >

CreateSearchConfig(std::string const &, google::cloud::visionai::v1::SearchConfig const &, std::string const &, Options)

Creates a search configuration inside a corpus.

Please follow the rules below to create a valid CreateSearchConfigRequest. General Rules:

  1. Request.search_config_id must not be associated with an existing SearchConfig.
  2. Request must contain at least one non-empty search_criteria_property or facet_property.
  3. mapped_fields must not be empty, and must map to existing UGA keys.
  4. All mapped_fields must be of the same type.
  5. All mapped_fields must share the same granularity.
  6. All mapped_fields must share the same semantic SearchConfig match options. For property-specific rules, please reference the comments for FacetProperty and SearchCriteriaProperty.
Parameters
Name Description
parent std::string const &

Required. The parent resource where this search configuration will be created. Format: projects/{project_number}/locations/{location_id}/corpora/{corpus_id}

search_config google::cloud::visionai::v1::SearchConfig const &

Required. The search config to create.

search_config_id std::string const &

Required. ID to use for the new search config. Will become the final component of the SearchConfig's resource name. This value should be up to 63 characters, and valid characters are /[a-z][0-9]-_/. The first character must be a letter, the last could be a letter or a number.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::visionai::v1::SearchConfig >

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

CreateSearchConfig(google::cloud::visionai::v1::CreateSearchConfigRequest const &, Options)

Creates a search configuration inside a corpus.

Please follow the rules below to create a valid CreateSearchConfigRequest. General Rules:

  1. Request.search_config_id must not be associated with an existing SearchConfig.
  2. Request must contain at least one non-empty search_criteria_property or facet_property.
  3. mapped_fields must not be empty, and must map to existing UGA keys.
  4. All mapped_fields must be of the same type.
  5. All mapped_fields must share the same granularity.
  6. All mapped_fields must share the same semantic SearchConfig match options. For property-specific rules, please reference the comments for FacetProperty and SearchCriteriaProperty.
Parameters
Name Description
request google::cloud::visionai::v1::CreateSearchConfigRequest 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.visionai.v1.CreateSearchConfigRequest. 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::visionai::v1::SearchConfig >

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

UpdateSearchConfig(google::cloud::visionai::v1::SearchConfig const &, google::protobuf::FieldMask const &, Options)

Updates a search configuration inside a corpus.

Please follow the rules below to create a valid UpdateSearchConfigRequest. General Rules:

  1. Request.search_configuration.name must already exist.
  2. Request must contain at least one non-empty search_criteria_property or facet_property.
  3. mapped_fields must not be empty, and must map to existing UGA keys.
  4. All mapped_fields must be of the same type.
  5. All mapped_fields must share the same granularity.
  6. All mapped_fields must share the same semantic SearchConfig match options. For property-specific rules, please reference the comments for FacetProperty and SearchCriteriaProperty.
Parameters
Name Description
search_config google::cloud::visionai::v1::SearchConfig const &

Required. The search configuration to update.
The search configuration's name field is used to identify the resource to be updated. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}

update_mask google::protobuf::FieldMask const &

The list of fields to be updated. If left unset, all field paths will be updated/overwritten.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::visionai::v1::SearchConfig >

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

UpdateSearchConfig(google::cloud::visionai::v1::UpdateSearchConfigRequest const &, Options)

Updates a search configuration inside a corpus.

Please follow the rules below to create a valid UpdateSearchConfigRequest. General Rules:

  1. Request.search_configuration.name must already exist.
  2. Request must contain at least one non-empty search_criteria_property or facet_property.
  3. mapped_fields must not be empty, and must map to existing UGA keys.
  4. All mapped_fields must be of the same type.
  5. All mapped_fields must share the same granularity.
  6. All mapped_fields must share the same semantic SearchConfig match options. For property-specific rules, please reference the comments for FacetProperty and SearchCriteriaProperty.
Parameters
Name Description
request google::cloud::visionai::v1::UpdateSearchConfigRequest 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.visionai.v1.UpdateSearchConfigRequest. 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::visionai::v1::SearchConfig >

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

GetSearchConfig(std::string const &, Options)

Gets a search configuration inside a corpus.

Parameters
Name Description
name std::string const &

Required. The name of the search configuration to retrieve. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}

opts Options

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

Returns
Type Description
StatusOr< google::cloud::visionai::v1::SearchConfig >

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

GetSearchConfig(google::cloud::visionai::v1::GetSearchConfigRequest const &, Options)

Gets a search configuration inside a corpus.

Parameters
Name Description
request google::cloud::visionai::v1::GetSearchConfigRequest 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.visionai.v1.GetSearchConfigRequest. 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::visionai::v1::SearchConfig >

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

DeleteSearchConfig(std::string const &, Options)

Deletes a search configuration inside a corpus.

For a DeleteSearchConfigRequest to be valid, Request.search_configuration.name must already exist.

Parameters
Name Description
name std::string const &

Required. The name of the search configuration to delete. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}

opts Options

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

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

DeleteSearchConfig(google::cloud::visionai::v1::DeleteSearchConfigRequest const &, Options)

Deletes a search configuration inside a corpus.

For a DeleteSearchConfigRequest to be valid, Request.search_configuration.name must already exist.

Parameters
Name Description
request google::cloud::visionai::v1::DeleteSearchConfigRequest 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.visionai.v1.DeleteSearchConfigRequest. 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
Status

a Status object. If the request failed, the status contains the details of the failure.

ListSearchConfigs(std::string const &, Options)

Lists all search configurations inside a corpus.

Parameters
Name Description
parent std::string const &

Required. The parent, which owns this collection of search configurations. Format: projects/{project_number}/locations/{location}/corpora/{corpus}

opts Options

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

Returns
Type Description
StreamRange< google::cloud::visionai::v1::SearchConfig >

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.visionai.v1.SearchConfig, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListSearchConfigs(google::cloud::visionai::v1::ListSearchConfigsRequest, Options)

Lists all search configurations inside a corpus.

Parameters
Name Description
request google::cloud::visionai::v1::ListSearchConfigsRequest

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.visionai.v1.ListSearchConfigsRequest. 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::visionai::v1::SearchConfig >

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.visionai.v1.SearchConfig, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

CreateSearchHypernym(std::string const &, google::cloud::visionai::v1::SearchHypernym const &, std::string const &, Options)

Creates a SearchHypernym inside a corpus.

Parameters
Name Description
parent std::string const &

Required. The parent resource where this SearchHypernym will be created. Format: projects/{project_number}/locations/{location}/corpora/{corpus}

search_hypernym google::cloud::visionai::v1::SearchHypernym const &

Required. The SearchHypernym to create.

search_hypernym_id std::string const &

Optional. The search hypernym id. If omitted, a random UUID will be generated.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::visionai::v1::SearchHypernym >

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

CreateSearchHypernym(google::cloud::visionai::v1::CreateSearchHypernymRequest const &, Options)

Creates a SearchHypernym inside a corpus.

Parameters
Name Description
request google::cloud::visionai::v1::CreateSearchHypernymRequest 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.visionai.v1.CreateSearchHypernymRequest. 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::visionai::v1::SearchHypernym >

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

UpdateSearchHypernym(google::cloud::visionai::v1::SearchHypernym const &, google::protobuf::FieldMask const &, Options)

Updates a SearchHypernym inside a corpus.

Parameters
Name Description
search_hypernym google::cloud::visionai::v1::SearchHypernym const &

Required. The SearchHypernym to update. The search hypernym's name field is used to identify the search hypernym to be updated. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}

update_mask google::protobuf::FieldMask const &

The list of fields to be updated. If left unset, all field paths will be updated/overwritten.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::visionai::v1::SearchHypernym >

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

UpdateSearchHypernym(google::cloud::visionai::v1::UpdateSearchHypernymRequest const &, Options)

Updates a SearchHypernym inside a corpus.

Parameters
Name Description
request google::cloud::visionai::v1::UpdateSearchHypernymRequest 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.visionai.v1.UpdateSearchHypernymRequest. 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::visionai::v1::SearchHypernym >

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

GetSearchHypernym(std::string const &, Options)

Gets a SearchHypernym inside a corpus.

Parameters
Name Description
name std::string const &

Required. The name of the SearchHypernym to retrieve. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}

opts Options

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

Returns
Type Description
StatusOr< google::cloud::visionai::v1::SearchHypernym >

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

GetSearchHypernym(google::cloud::visionai::v1::GetSearchHypernymRequest const &, Options)

Gets a SearchHypernym inside a corpus.

Parameters
Name Description
request google::cloud::visionai::v1::GetSearchHypernymRequest 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.visionai.v1.GetSearchHypernymRequest. 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::visionai::v1::SearchHypernym >

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

DeleteSearchHypernym(std::string const &, Options)

Deletes a SearchHypernym inside a corpus.

Parameters
Name Description
name std::string const &

Required. The name of the SearchHypernym to delete. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}

opts Options

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

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

DeleteSearchHypernym(google::cloud::visionai::v1::DeleteSearchHypernymRequest const &, Options)

Deletes a SearchHypernym inside a corpus.

Parameters
Name Description
request google::cloud::visionai::v1::DeleteSearchHypernymRequest 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.visionai.v1.DeleteSearchHypernymRequest. 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
Status

a Status object. If the request failed, the status contains the details of the failure.

ListSearchHypernyms(std::string const &, Options)

Lists SearchHypernyms inside a corpus.

Parameters
Name Description
parent std::string const &

Required. The parent, which owns this collection of SearchHypernyms. Format: projects/{project_number}/locations/{location}/corpora/{corpus}

opts Options

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

Returns
Type Description
StreamRange< google::cloud::visionai::v1::SearchHypernym >

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.visionai.v1.SearchHypernym, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListSearchHypernyms(google::cloud::visionai::v1::ListSearchHypernymsRequest, Options)

Lists SearchHypernyms inside a corpus.

Parameters
Name Description
request google::cloud::visionai::v1::ListSearchHypernymsRequest

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.visionai.v1.ListSearchHypernymsRequest. 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::visionai::v1::SearchHypernym >

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.visionai.v1.SearchHypernym, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

SearchAssets(google::cloud::visionai::v1::SearchAssetsRequest, Options)

Search media asset.

Parameters
Name Description
request google::cloud::visionai::v1::SearchAssetsRequest

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.visionai.v1.SearchAssetsRequest. 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::visionai::v1::SearchResultItem >

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.visionai.v1.SearchResultItem, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

SearchIndexEndpoint(google::cloud::visionai::v1::SearchIndexEndpointRequest, Options)

Search a deployed index endpoint (IMAGE corpus type only).

Parameters
Name Description
request google::cloud::visionai::v1::SearchIndexEndpointRequest

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.visionai.v1.SearchIndexEndpointRequest. 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::visionai::v1::SearchResultItem >

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.visionai.v1.SearchResultItem, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

CreateIndexEndpoint(std::string const &, google::cloud::visionai::v1::IndexEndpoint const &, std::string const &, Options)

Creates an IndexEndpoint.

Parameters
Name Description
parent std::string const &

Required. Format: projects/{project}/locations/{location}

index_endpoint google::cloud::visionai::v1::IndexEndpoint const &

Required. The resource being created.

index_endpoint_id std::string const &

Optional. The ID to use for the IndexEndpoint, which will become the final component of the IndexEndpoint's resource name if the user specifies it. Otherwise, IndexEndpoint id will be autogenerated.
This value should be up to 63 characters, and valid characters are a-z, 0-9 and dash (-). The first character must be a letter, the last must be a letter or a number.

opts Options

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

Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::IndexEndpoint > >

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.visionai.v1.IndexEndpoint proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateIndexEndpoint(NoAwaitTag, std::string const &, google::cloud::visionai::v1::IndexEndpoint const &, std::string const &, Options)

Creates an IndexEndpoint.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
parent std::string const &
index_endpoint google::cloud::visionai::v1::IndexEndpoint const &
index_endpoint_id std::string const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

CreateIndexEndpoint(google::cloud::visionai::v1::CreateIndexEndpointRequest const &, Options)

Creates an IndexEndpoint.

Parameters
Name Description
request google::cloud::visionai::v1::CreateIndexEndpointRequest 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.visionai.v1.CreateIndexEndpointRequest. 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::visionai::v1::IndexEndpoint > >

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.visionai.v1.IndexEndpoint proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateIndexEndpoint(NoAwaitTag, google::cloud::visionai::v1::CreateIndexEndpointRequest const &, Options)

Creates an IndexEndpoint.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::visionai::v1::CreateIndexEndpointRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

CreateIndexEndpoint(google::longrunning::Operation const &, Options)

Creates an IndexEndpoint.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::IndexEndpoint > >

GetIndexEndpoint(std::string const &, Options)

Gets an IndexEndpoint.

Parameters
Name Description
name std::string const &

Required. Name of the IndexEndpoint resource.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::visionai::v1::IndexEndpoint >

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

GetIndexEndpoint(google::cloud::visionai::v1::GetIndexEndpointRequest const &, Options)

Gets an IndexEndpoint.

Parameters
Name Description
request google::cloud::visionai::v1::GetIndexEndpointRequest 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.visionai.v1.GetIndexEndpointRequest. 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::visionai::v1::IndexEndpoint >

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

ListIndexEndpoints(std::string const &, Options)

Lists all IndexEndpoints in a project.

Parameters
Name Description
parent std::string const &

Required. Format: projects/{project}/locations/{location}

opts Options

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

Returns
Type Description
StreamRange< google::cloud::visionai::v1::IndexEndpoint >

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.visionai.v1.IndexEndpoint, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListIndexEndpoints(google::cloud::visionai::v1::ListIndexEndpointsRequest, Options)

Lists all IndexEndpoints in a project.

Parameters
Name Description
request google::cloud::visionai::v1::ListIndexEndpointsRequest

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.visionai.v1.ListIndexEndpointsRequest. 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::visionai::v1::IndexEndpoint >

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.visionai.v1.IndexEndpoint, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

UpdateIndexEndpoint(google::cloud::visionai::v1::IndexEndpoint const &, google::protobuf::FieldMask const &, Options)

Updates an IndexEndpoint.

Parameters
Name Description
index_endpoint google::cloud::visionai::v1::IndexEndpoint const &

Required. The resource being updated.

update_mask google::protobuf::FieldMask const &

Required. Field mask is used to specify the fields to be overwritten in the IndexEndpoint resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field of the resource will be overwritten if it is in the mask. Empty field mask is not allowed. If the mask is "*", then this is a full replacement of the resource.

opts Options

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

Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::IndexEndpoint > >

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.visionai.v1.IndexEndpoint proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

UpdateIndexEndpoint(NoAwaitTag, google::cloud::visionai::v1::IndexEndpoint const &, google::protobuf::FieldMask const &, Options)

Updates an IndexEndpoint.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
index_endpoint google::cloud::visionai::v1::IndexEndpoint const &
update_mask google::protobuf::FieldMask const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

UpdateIndexEndpoint(google::cloud::visionai::v1::UpdateIndexEndpointRequest const &, Options)

Updates an IndexEndpoint.

Parameters
Name Description
request google::cloud::visionai::v1::UpdateIndexEndpointRequest 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.visionai.v1.UpdateIndexEndpointRequest. 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::visionai::v1::IndexEndpoint > >

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.visionai.v1.IndexEndpoint proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

UpdateIndexEndpoint(NoAwaitTag, google::cloud::visionai::v1::UpdateIndexEndpointRequest const &, Options)

Updates an IndexEndpoint.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::visionai::v1::UpdateIndexEndpointRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

UpdateIndexEndpoint(google::longrunning::Operation const &, Options)

Updates an IndexEndpoint.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::IndexEndpoint > >

DeleteIndexEndpoint(std::string const &, Options)

Deletes an IndexEndpoint.

Parameters
Name Description
name std::string const &

Required. Name of the resource.

opts Options

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

Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::DeleteIndexEndpointMetadata > >

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.visionai.v1.DeleteIndexEndpointMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteIndexEndpoint(NoAwaitTag, std::string const &, Options)

Deletes an IndexEndpoint.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
name std::string const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

DeleteIndexEndpoint(google::cloud::visionai::v1::DeleteIndexEndpointRequest const &, Options)

Deletes an IndexEndpoint.

Parameters
Name Description
request google::cloud::visionai::v1::DeleteIndexEndpointRequest 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.visionai.v1.DeleteIndexEndpointRequest. 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::visionai::v1::DeleteIndexEndpointMetadata > >

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.visionai.v1.DeleteIndexEndpointMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteIndexEndpoint(NoAwaitTag, google::cloud::visionai::v1::DeleteIndexEndpointRequest const &, Options)

Deletes an IndexEndpoint.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::visionai::v1::DeleteIndexEndpointRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

DeleteIndexEndpoint(google::longrunning::Operation const &, Options)

Deletes an IndexEndpoint.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::DeleteIndexEndpointMetadata > >

DeployIndex(google::cloud::visionai::v1::DeployIndexRequest const &, Options)

Deploys an Index to IndexEndpoint.

Parameters
Name Description
request google::cloud::visionai::v1::DeployIndexRequest 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.visionai.v1.DeployIndexRequest. 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::visionai::v1::DeployIndexResponse > >

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.visionai.v1.DeployIndexResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeployIndex(NoAwaitTag, google::cloud::visionai::v1::DeployIndexRequest const &, Options)

Deploys an Index to IndexEndpoint.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::visionai::v1::DeployIndexRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

DeployIndex(google::longrunning::Operation const &, Options)

Deploys an Index to IndexEndpoint.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::DeployIndexResponse > >

UndeployIndex(google::cloud::visionai::v1::UndeployIndexRequest const &, Options)

Undeploys an Index from IndexEndpoint.

Parameters
Name Description
request google::cloud::visionai::v1::UndeployIndexRequest 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.visionai.v1.UndeployIndexRequest. 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::visionai::v1::UndeployIndexResponse > >

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.visionai.v1.UndeployIndexResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

UndeployIndex(NoAwaitTag, google::cloud::visionai::v1::UndeployIndexRequest const &, Options)

Undeploys an Index from IndexEndpoint.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::visionai::v1::UndeployIndexRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

UndeployIndex(google::longrunning::Operation const &, Options)

Undeploys an Index from IndexEndpoint.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::UndeployIndexResponse > >

CreateCollection(std::string const &, google::cloud::visionai::v1::Collection const &, std::string const &, Options)

Creates a collection.

Parameters
Name Description
parent std::string const &

Required. The parent resource where this collection will be created. Format: projects/{project_number}/locations/{location}/corpora/{corpus}

collection google::cloud::visionai::v1::Collection const &

Required. The collection resource to be created.

collection_id std::string const &

Optional. The ID to use for the collection, which will become the final component of the resource name if user choose to specify. Otherwise, collection id will be generated by system.
This value should be up to 55 characters, and valid characters are /[a-z][0-9]-/. The first character must be a letter, the last could be a letter or a number.

opts Options

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

Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::Collection > >

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.visionai.v1.Collection proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateCollection(NoAwaitTag, std::string const &, google::cloud::visionai::v1::Collection const &, std::string const &, Options)

Creates a collection.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
parent std::string const &
collection google::cloud::visionai::v1::Collection const &
collection_id std::string const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

CreateCollection(google::cloud::visionai::v1::CreateCollectionRequest const &, Options)

Creates a collection.

Parameters
Name Description
request google::cloud::visionai::v1::CreateCollectionRequest 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.visionai.v1.CreateCollectionRequest. 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::visionai::v1::Collection > >

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.visionai.v1.Collection proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateCollection(NoAwaitTag, google::cloud::visionai::v1::CreateCollectionRequest const &, Options)

Creates a collection.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::visionai::v1::CreateCollectionRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

CreateCollection(google::longrunning::Operation const &, Options)

Creates a collection.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::Collection > >

DeleteCollection(std::string const &, Options)

Deletes a collection.

Parameters
Name Description
name std::string const &

Required. The name of the collection to delete. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}

opts Options

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

Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::DeleteCollectionMetadata > >

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.visionai.v1.DeleteCollectionMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteCollection(NoAwaitTag, std::string const &, Options)

Deletes a collection.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
name std::string const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

DeleteCollection(google::cloud::visionai::v1::DeleteCollectionRequest const &, Options)

Deletes a collection.

Parameters
Name Description
request google::cloud::visionai::v1::DeleteCollectionRequest 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.visionai.v1.DeleteCollectionRequest. 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::visionai::v1::DeleteCollectionMetadata > >

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.visionai.v1.DeleteCollectionMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteCollection(NoAwaitTag, google::cloud::visionai::v1::DeleteCollectionRequest const &, Options)

Deletes a collection.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::visionai::v1::DeleteCollectionRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

DeleteCollection(google::longrunning::Operation const &, Options)

Deletes a collection.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::visionai::v1::DeleteCollectionMetadata > >

GetCollection(std::string const &, Options)

Gets a collection.

Parameters
Name Description
name std::string const &

Required. The name of the collection to retrieve. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}

opts Options

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

Returns
Type Description
StatusOr< google::cloud::visionai::v1::Collection >

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

GetCollection(google::cloud::visionai::v1::GetCollectionRequest const &, Options)

Gets a collection.

Parameters
Name Description
request google::cloud::visionai::v1::GetCollectionRequest 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.visionai.v1.GetCollectionRequest. 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::visionai::v1::Collection >

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

UpdateCollection(google::cloud::visionai::v1::Collection const &, google::protobuf::FieldMask const &, Options)

Updates a collection.

Parameters
Name Description
collection google::cloud::visionai::v1::Collection const &

Required. The collection to update.
The collection's name field is used to identify the collection to be updated. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}

update_mask google::protobuf::FieldMask const &

The list of fields to be updated.

  • Unset update_mask or set update_mask to be a single "*" only will update all updatable fields with the value provided in collection.
  • To update display_name value to empty string, set it in the collection to empty string, and set update_mask with "display_name". Same applies to other updatable string fields in the collection.
opts Options

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

Returns
Type Description
StatusOr< google::cloud::visionai::v1::Collection >

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

UpdateCollection(google::cloud::visionai::v1::UpdateCollectionRequest const &, Options)

Updates a collection.

Parameters
Name Description
request google::cloud::visionai::v1::UpdateCollectionRequest 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.visionai.v1.UpdateCollectionRequest. 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::visionai::v1::Collection >

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

ListCollections(std::string const &, Options)

Lists collections inside a corpus.

Parameters
Name Description
parent std::string const &

Required. The parent corpus. Format: projects/{project_number}/locations/{location}/corpora/{corpus}

opts Options

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

Returns
Type Description
StreamRange< google::cloud::visionai::v1::Collection >

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.visionai.v1.Collection, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListCollections(google::cloud::visionai::v1::ListCollectionsRequest, Options)

Lists collections inside a corpus.

Parameters
Name Description
request google::cloud::visionai::v1::ListCollectionsRequest

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.visionai.v1.ListCollectionsRequest. 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::visionai::v1::Collection >

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.visionai.v1.Collection, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

AddCollectionItem(google::cloud::visionai::v1::CollectionItem const &, Options)

Adds an item into a Collection.

Parameters
Name Description
item google::cloud::visionai::v1::CollectionItem const &

Required. The item to be added.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::visionai::v1::AddCollectionItemResponse >

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

AddCollectionItem(google::cloud::visionai::v1::AddCollectionItemRequest const &, Options)

Adds an item into a Collection.

Parameters
Name Description
request google::cloud::visionai::v1::AddCollectionItemRequest 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.visionai.v1.AddCollectionItemRequest. 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::visionai::v1::AddCollectionItemResponse >

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

RemoveCollectionItem(google::cloud::visionai::v1::CollectionItem const &, Options)

Removes an item from a collection.

Parameters
Name Description
item google::cloud::visionai::v1::CollectionItem const &

Required. The item to be removed.

opts Options

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

Returns
Type Description
StatusOr< google::cloud::visionai::v1::RemoveCollectionItemResponse >

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

RemoveCollectionItem(google::cloud::visionai::v1::RemoveCollectionItemRequest const &, Options)

Removes an item from a collection.

Parameters
Name Description
request google::cloud::visionai::v1::RemoveCollectionItemRequest 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.visionai.v1.RemoveCollectionItemRequest. 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::visionai::v1::RemoveCollectionItemResponse >

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

ViewCollectionItems(std::string const &, Options)

View items inside a collection.

Parameters
Name Description
collection std::string const &

Required. The collection to view. Format: projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}

opts Options

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

Returns
Type Description
StreamRange< google::cloud::visionai::v1::CollectionItem >

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.visionai.v1.CollectionItem, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ViewCollectionItems(google::cloud::visionai::v1::ViewCollectionItemsRequest, Options)

View items inside a collection.

Parameters
Name Description
request google::cloud::visionai::v1::ViewCollectionItemsRequest

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.visionai.v1.ViewCollectionItemsRequest. 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::visionai::v1::CollectionItem >

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.visionai.v1.CollectionItem, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListLocations(google::cloud::location::ListLocationsRequest, Options)

Lists information about the supported locations for this service.

Parameters
Name Description
request google::cloud::location::ListLocationsRequest

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.location.ListLocationsRequest. 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::location::Location >

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.location.Location, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

GetLocation(google::cloud::location::GetLocationRequest const &, Options)

Gets information about a location.

Parameters
Name Description
request google::cloud::location::GetLocationRequest 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.location.GetLocationRequest. 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::location::Location >

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

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

Lists operations that match the specified filter in the request.

If the server doesn't support this method, it returns UNIMPLEMENTED.

Parameters
Name Description
name std::string const &

The name of the operation's parent resource.

filter std::string const &

The standard list filter.

opts Options

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

Returns
Type Description
StreamRange< google::longrunning::Operation >

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.longrunning.Operation, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListOperations(google::longrunning::ListOperationsRequest, Options)

Lists operations that match the specified filter in the request.

If the server doesn't support this method, it returns UNIMPLEMENTED.

Parameters
Name Description
request google::longrunning::ListOperationsRequest

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.longrunning.ListOperationsRequest. 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::longrunning::Operation >

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.longrunning.Operation, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

GetOperation(std::string const &, Options)

Gets the latest state of a long-running operation.

Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters
Name Description
name std::string const &

The name of the operation resource.

opts Options

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

Returns
Type Description
StatusOr< google::longrunning::Operation >

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

GetOperation(google::longrunning::GetOperationRequest const &, Options)

Gets the latest state of a long-running operation.

Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters
Name Description
request google::longrunning::GetOperationRequest 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.longrunning.GetOperationRequest. 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::longrunning::Operation >

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

DeleteOperation(std::string const &, Options)

Deletes a long-running operation.

This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
Name Description
name std::string const &

The name of the operation resource to be deleted.

opts Options

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

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

DeleteOperation(google::longrunning::DeleteOperationRequest const &, Options)

Deletes a long-running operation.

This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
Name Description
request google::longrunning::DeleteOperationRequest 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.longrunning.DeleteOperationRequest. 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
Status

a Status object. If the request failed, the status contains the details of the failure.

CancelOperation(std::string const &, Options)

Starts asynchronous cancellation on a long-running operation.

The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.

Parameters
Name Description
name std::string const &

The name of the operation resource to be cancelled.

opts Options

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

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

CancelOperation(google::longrunning::CancelOperationRequest const &, Options)

Starts asynchronous cancellation on a long-running operation.

The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.

Parameters
Name Description
request google::longrunning::CancelOperationRequest 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.longrunning.CancelOperationRequest. 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
Status

a Status object. If the request failed, the status contains the details of the failure.