Service to determine the likelihood an event is legitimate.
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
RecaptchaEnterpriseServiceClient(RecaptchaEnterpriseServiceClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
RecaptchaEnterpriseServiceClient const &
|
RecaptchaEnterpriseServiceClient(RecaptchaEnterpriseServiceClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
RecaptchaEnterpriseServiceClient &&
|
RecaptchaEnterpriseServiceClient(std::shared_ptr< RecaptchaEnterpriseServiceConnection >, Options)
Parameters | |
---|---|
Name | Description |
connection |
std::shared_ptr< RecaptchaEnterpriseServiceConnection >
|
opts |
Options
|
Operators
operator=(RecaptchaEnterpriseServiceClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
RecaptchaEnterpriseServiceClient const &
|
Returns | |
---|---|
Type | Description |
RecaptchaEnterpriseServiceClient & |
operator=(RecaptchaEnterpriseServiceClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
RecaptchaEnterpriseServiceClient &&
|
Returns | |
---|---|
Type | Description |
RecaptchaEnterpriseServiceClient & |
Functions
CreateAssessment(std::string const &, google::cloud::recaptchaenterprise::v1::Assessment const &, Options)
Creates an Assessment of the likelihood an event is legitimate.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The name of the project in which the assessment will be created, in the format "projects/{project}". |
assessment |
google::cloud::recaptchaenterprise::v1::Assessment const &
Required. The assessment details. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::recaptchaenterprise::v1::Assessment > |
the result of the RPC. The response message type (google.cloud.recaptchaenterprise.v1.Assessment) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
CreateAssessment(google::cloud::recaptchaenterprise::v1::CreateAssessmentRequest const &, Options)
Creates an Assessment of the likelihood an event is legitimate.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::recaptchaenterprise::v1::CreateAssessmentRequest 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::recaptchaenterprise::v1::Assessment > |
the result of the RPC. The response message type (google.cloud.recaptchaenterprise.v1.Assessment) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
AnnotateAssessment(std::string const &, google::cloud::recaptchaenterprise::v1::AnnotateAssessmentRequest::Annotation, Options)
Annotates a previously created Assessment to provide additional information on whether the event turned out to be authentic or fraudulent.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The resource name of the Assessment, in the format "projects/{project}/assessments/{assessment}". |
annotation |
google::cloud::recaptchaenterprise::v1::AnnotateAssessmentRequest::Annotation
Optional. The annotation that will be assigned to the Event. This field can be left empty to provide reasons that apply to an event without concluding whether the event is legitimate or fraudulent. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::recaptchaenterprise::v1::AnnotateAssessmentResponse > |
the result of the RPC. The response message type (google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
AnnotateAssessment(google::cloud::recaptchaenterprise::v1::AnnotateAssessmentRequest const &, Options)
Annotates a previously created Assessment to provide additional information on whether the event turned out to be authentic or fraudulent.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::recaptchaenterprise::v1::AnnotateAssessmentRequest 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::recaptchaenterprise::v1::AnnotateAssessmentResponse > |
the result of the RPC. The response message type (google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
CreateKey(std::string const &, google::cloud::recaptchaenterprise::v1::Key const &, Options)
Creates a new reCAPTCHA Enterprise key.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The name of the project in which the key will be created, in the format "projects/{project}". |
key |
google::cloud::recaptchaenterprise::v1::Key const &
Required. Information to create a reCAPTCHA Enterprise key. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::recaptchaenterprise::v1::Key > |
the result of the RPC. The response message type (google.cloud.recaptchaenterprise.v1.Key) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
CreateKey(google::cloud::recaptchaenterprise::v1::CreateKeyRequest const &, Options)
Creates a new reCAPTCHA Enterprise key.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::recaptchaenterprise::v1::CreateKeyRequest 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::recaptchaenterprise::v1::Key > |
the result of the RPC. The response message type (google.cloud.recaptchaenterprise.v1.Key) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
ListKeys(std::string const &, Options)
Returns the list of all keys that belong to a project.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The name of the project that contains the keys that will be listed, in the format "projects/{project}". |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::recaptchaenterprise::v1::Key > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListKeys(google::cloud::recaptchaenterprise::v1::ListKeysRequest, Options)
Returns the list of all keys that belong to a project.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::recaptchaenterprise::v1::ListKeysRequest
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::recaptchaenterprise::v1::Key > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
RetrieveLegacySecretKey(std::string const &, Options)
Returns the secret key related to the specified public key.
You must use the legacy secret key only in a 3rd party integration with legacy reCAPTCHA.
Parameters | |
---|---|
Name | Description |
key |
std::string const &
Required. The public key name linked to the requested secret key in the format "projects/{project}/keys/{key}". |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::recaptchaenterprise::v1::RetrieveLegacySecretKeyResponse > |
the result of the RPC. The response message type (google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
RetrieveLegacySecretKey(google::cloud::recaptchaenterprise::v1::RetrieveLegacySecretKeyRequest const &, Options)
Returns the secret key related to the specified public key.
You must use the legacy secret key only in a 3rd party integration with legacy reCAPTCHA.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::recaptchaenterprise::v1::RetrieveLegacySecretKeyRequest 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::recaptchaenterprise::v1::RetrieveLegacySecretKeyResponse > |
the result of the RPC. The response message type (google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetKey(std::string const &, Options)
Returns the specified key.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The name of the requested key, in the format "projects/{project}/keys/{key}". |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::recaptchaenterprise::v1::Key > |
the result of the RPC. The response message type (google.cloud.recaptchaenterprise.v1.Key) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetKey(google::cloud::recaptchaenterprise::v1::GetKeyRequest const &, Options)
Returns the specified key.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::recaptchaenterprise::v1::GetKeyRequest 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::recaptchaenterprise::v1::Key > |
the result of the RPC. The response message type (google.cloud.recaptchaenterprise.v1.Key) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
UpdateKey(google::cloud::recaptchaenterprise::v1::Key const &, google::protobuf::FieldMask const &, Options)
Updates the specified key.
Parameters | |
---|---|
Name | Description |
key |
google::cloud::recaptchaenterprise::v1::Key const &
Required. The key to update. |
update_mask |
google::protobuf::FieldMask const &
Optional. The mask to control which fields of the key get updated. If the mask is not present, all fields will be updated. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::recaptchaenterprise::v1::Key > |
the result of the RPC. The response message type (google.cloud.recaptchaenterprise.v1.Key) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
UpdateKey(google::cloud::recaptchaenterprise::v1::UpdateKeyRequest const &, Options)
Updates the specified key.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::recaptchaenterprise::v1::UpdateKeyRequest 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::recaptchaenterprise::v1::Key > |
the result of the RPC. The response message type (google.cloud.recaptchaenterprise.v1.Key) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
DeleteKey(std::string const &, Options)
Deletes the specified key.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The name of the key to be deleted, in the format "projects/{project}/keys/{key}". |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status |
a |
DeleteKey(google::cloud::recaptchaenterprise::v1::DeleteKeyRequest const &, Options)
Deletes the specified key.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::recaptchaenterprise::v1::DeleteKeyRequest 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 |
MigrateKey(google::cloud::recaptchaenterprise::v1::MigrateKeyRequest const &, Options)
Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise.
Once a key is migrated, it can be used from either product. SiteVerify requests are billed as CreateAssessment calls. You must be authenticated as one of the current owners of the reCAPTCHA Site Key, and your user must have the reCAPTCHA Enterprise Admin IAM role in the destination project.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::recaptchaenterprise::v1::MigrateKeyRequest 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::recaptchaenterprise::v1::Key > |
the result of the RPC. The response message type (google.cloud.recaptchaenterprise.v1.Key) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetMetrics(std::string const &, Options)
Get some aggregated metrics for a Key.
This data can be used to build dashboards.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The name of the requested metrics, in the format "projects/{project}/keys/{key}/metrics". |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::recaptchaenterprise::v1::Metrics > |
the result of the RPC. The response message type (google.cloud.recaptchaenterprise.v1.Metrics) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetMetrics(google::cloud::recaptchaenterprise::v1::GetMetricsRequest const &, Options)
Get some aggregated metrics for a Key.
This data can be used to build dashboards.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::recaptchaenterprise::v1::GetMetricsRequest 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::recaptchaenterprise::v1::Metrics > |
the result of the RPC. The response message type (google.cloud.recaptchaenterprise.v1.Metrics) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
ListRelatedAccountGroups(std::string const &, Options)
List groups of related accounts.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The name of the project to list related account groups from, in the format "projects/{project}". |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::recaptchaenterprise::v1::RelatedAccountGroup > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListRelatedAccountGroups(google::cloud::recaptchaenterprise::v1::ListRelatedAccountGroupsRequest, Options)
List groups of related accounts.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::recaptchaenterprise::v1::ListRelatedAccountGroupsRequest
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::recaptchaenterprise::v1::RelatedAccountGroup > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListRelatedAccountGroupMemberships(std::string const &, Options)
Get memberships in a group of related accounts.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The resource name for the related account group in the format |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::recaptchaenterprise::v1::RelatedAccountGroupMembership > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListRelatedAccountGroupMemberships(google::cloud::recaptchaenterprise::v1::ListRelatedAccountGroupMembershipsRequest, Options)
Get memberships in a group of related accounts.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::recaptchaenterprise::v1::ListRelatedAccountGroupMembershipsRequest
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::recaptchaenterprise::v1::RelatedAccountGroupMembership > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
SearchRelatedAccountGroupMemberships(std::string const &, std::string const &, Options)
Search group memberships related to a given account.
Parameters | |
---|---|
Name | Description |
project |
std::string const &
Required. The name of the project to search related account group memberships from. Specify the project name in the following format: "projects/{project}". |
hashed_account_id |
std::string const &
Optional. The unique stable hashed user identifier we should search connections to. The identifier should correspond to a |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::recaptchaenterprise::v1::RelatedAccountGroupMembership > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
SearchRelatedAccountGroupMemberships(google::cloud::recaptchaenterprise::v1::SearchRelatedAccountGroupMembershipsRequest, Options)
Search group memberships related to a given account.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::recaptchaenterprise::v1::SearchRelatedAccountGroupMembershipsRequest
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::recaptchaenterprise::v1::RelatedAccountGroupMembership > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |