Service that implements Google Cloud Speech Adaptation API.
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
AdaptationClient(AdaptationClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
AdaptationClient const &
|
AdaptationClient(AdaptationClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
AdaptationClient &&
|
AdaptationClient(std::shared_ptr< AdaptationConnection >, Options)
Parameters | |
---|---|
Name | Description |
connection |
std::shared_ptr< AdaptationConnection >
|
opts |
Options
|
Operators
operator=(AdaptationClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
AdaptationClient const &
|
Returns | |
---|---|
Type | Description |
AdaptationClient & |
operator=(AdaptationClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
AdaptationClient &&
|
Returns | |
---|---|
Type | Description |
AdaptationClient & |
Functions
CreatePhraseSet(std::string const &, google::cloud::speech::v1::PhraseSet const &, std::string const &, Options)
Create a set of phrase hints.
Each item in the set can be a single word or a multi-word phrase. The items in the PhraseSet are favored by the recognition model when you send a call that includes the PhraseSet.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The parent resource where this phrase set will be created. Format: |
phrase_set |
google::cloud::speech::v1::PhraseSet const &
Required. The phrase set to create. |
phrase_set_id |
std::string const &
Required. The ID to use for the phrase set, which will become the final component of the phrase set's resource name. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::speech::v1::PhraseSet > |
the result of the RPC. The response message type (google.cloud.speech.v1.PhraseSet) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
CreatePhraseSet(google::cloud::speech::v1::CreatePhraseSetRequest const &, Options)
Create a set of phrase hints.
Each item in the set can be a single word or a multi-word phrase. The items in the PhraseSet are favored by the recognition model when you send a call that includes the PhraseSet.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::speech::v1::CreatePhraseSetRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::speech::v1::PhraseSet > |
the result of the RPC. The response message type (google.cloud.speech.v1.PhraseSet) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetPhraseSet(std::string const &, Options)
Get a phrase set.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The name of the phrase set to retrieve. Format: |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::speech::v1::PhraseSet > |
the result of the RPC. The response message type (google.cloud.speech.v1.PhraseSet) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetPhraseSet(google::cloud::speech::v1::GetPhraseSetRequest const &, Options)
Get a phrase set.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::speech::v1::GetPhraseSetRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::speech::v1::PhraseSet > |
the result of the RPC. The response message type (google.cloud.speech.v1.PhraseSet) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
ListPhraseSet(std::string const &, Options)
List phrase sets.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The parent, which owns this collection of phrase set. Format: |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::speech::v1::PhraseSet > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListPhraseSet(google::cloud::speech::v1::ListPhraseSetRequest, Options)
List phrase sets.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::speech::v1::ListPhraseSetRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::speech::v1::PhraseSet > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
UpdatePhraseSet(google::cloud::speech::v1::PhraseSet const &, google::protobuf::FieldMask const &, Options)
Update a phrase set.
Parameters | |
---|---|
Name | Description |
phrase_set |
google::cloud::speech::v1::PhraseSet const &
Required. The phrase set to update. |
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::speech::v1::PhraseSet > |
the result of the RPC. The response message type (google.cloud.speech.v1.PhraseSet) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
UpdatePhraseSet(google::cloud::speech::v1::UpdatePhraseSetRequest const &, Options)
Update a phrase set.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::speech::v1::UpdatePhraseSetRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::speech::v1::PhraseSet > |
the result of the RPC. The response message type (google.cloud.speech.v1.PhraseSet) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
DeletePhraseSet(std::string const &, Options)
Delete a phrase set.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The name of the phrase set to delete. Format: |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status |
a |
DeletePhraseSet(google::cloud::speech::v1::DeletePhraseSetRequest const &, Options)
Delete a phrase set.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::speech::v1::DeletePhraseSetRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status |
a |
CreateCustomClass(std::string const &, google::cloud::speech::v1::CustomClass const &, std::string const &, Options)
Create a custom class.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The parent resource where this custom class will be created. Format: |
custom_class |
google::cloud::speech::v1::CustomClass const &
Required. The custom class to create. |
custom_class_id |
std::string const &
Required. The ID to use for the custom class, which will become the final component of the custom class' resource name. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::speech::v1::CustomClass > |
the result of the RPC. The response message type (google.cloud.speech.v1.CustomClass) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
CreateCustomClass(google::cloud::speech::v1::CreateCustomClassRequest const &, Options)
Create a custom class.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::speech::v1::CreateCustomClassRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::speech::v1::CustomClass > |
the result of the RPC. The response message type (google.cloud.speech.v1.CustomClass) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetCustomClass(std::string const &, Options)
Get a custom class.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The name of the custom class to retrieve. Format: |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::speech::v1::CustomClass > |
the result of the RPC. The response message type (google.cloud.speech.v1.CustomClass) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetCustomClass(google::cloud::speech::v1::GetCustomClassRequest const &, Options)
Get a custom class.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::speech::v1::GetCustomClassRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::speech::v1::CustomClass > |
the result of the RPC. The response message type (google.cloud.speech.v1.CustomClass) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
ListCustomClasses(std::string const &, Options)
List custom classes.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The parent, which owns this collection of custom classes. Format: |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::speech::v1::CustomClass > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListCustomClasses(google::cloud::speech::v1::ListCustomClassesRequest, Options)
List custom classes.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::speech::v1::ListCustomClassesRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::speech::v1::CustomClass > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
UpdateCustomClass(google::cloud::speech::v1::CustomClass const &, google::protobuf::FieldMask const &, Options)
Update a custom class.
Parameters | |
---|---|
Name | Description |
custom_class |
google::cloud::speech::v1::CustomClass const &
Required. The custom class to update. |
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::speech::v1::CustomClass > |
the result of the RPC. The response message type (google.cloud.speech.v1.CustomClass) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
UpdateCustomClass(google::cloud::speech::v1::UpdateCustomClassRequest const &, Options)
Update a custom class.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::speech::v1::UpdateCustomClassRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::speech::v1::CustomClass > |
the result of the RPC. The response message type (google.cloud.speech.v1.CustomClass) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
DeleteCustomClass(std::string const &, Options)
Delete a custom class.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The name of the custom class to delete. Format: |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status |
a |
DeleteCustomClass(google::cloud::speech::v1::DeleteCustomClassRequest const &, Options)
Delete a custom class.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::speech::v1::DeleteCustomClassRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status |
a |
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
.
NOTE: the name
binding allows API services to override the binding to use different resource name schemes, such as users/*/operations
. To override the binding, API services can add a binding such as "/v1/{name=users/*}/operations"
to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
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 |
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
.
NOTE: the name
binding allows API services to override the binding to use different resource name schemes, such as users/*/operations
. To override the binding, API services can add a binding such as "/v1/{name=users/*}/operations"
to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
Parameters | |
---|---|
Name | Description |
request |
google::longrunning::ListOperationsRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
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 |
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 |
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 |
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 |