pub struct ProjectMethods<'a, C>where
C: 'a,{ /* private fields */ }Expand description
A builder providing access to all methods supported on project resources.
It is not used directly, but through the RecaptchaEnterprise hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_recaptchaenterprise1 as recaptchaenterprise1;
use recaptchaenterprise1::{RecaptchaEnterprise, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
let secret: yup_oauth2::ApplicationSecret = Default::default();
let connector = hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_only()
.enable_http2()
.build();
let executor = hyper_util::rt::TokioExecutor::new();
let auth = yup_oauth2::InstalledFlowAuthenticator::with_client(
secret,
yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
yup_oauth2::client::CustomHyperClientBuilder::from(
hyper_util::client::legacy::Client::builder(executor).build(connector),
),
).build().await.unwrap();
let client = hyper_util::client::legacy::Client::builder(
hyper_util::rt::TokioExecutor::new()
)
.build(
hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_or_http()
.enable_http2()
.build()
);
let mut hub = RecaptchaEnterprise::new(client, auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `assessments_annotate(...)`, `assessments_create(...)`, `firewallpolicies_create(...)`, `firewallpolicies_delete(...)`, `firewallpolicies_get(...)`, `firewallpolicies_list(...)`, `firewallpolicies_patch(...)`, `firewallpolicies_reorder(...)`, `keys_add_ip_override(...)`, `keys_create(...)`, `keys_delete(...)`, `keys_get(...)`, `keys_get_metrics(...)`, `keys_list(...)`, `keys_list_ip_overrides(...)`, `keys_migrate(...)`, `keys_patch(...)`, `keys_remove_ip_override(...)`, `keys_retrieve_legacy_secret_key(...)`, `relatedaccountgroupmemberships_search(...)`, `relatedaccountgroups_list(...)` and `relatedaccountgroups_memberships_list(...)`
// to build up your call.
let rb = hub.projects();Implementations§
Source§impl<'a, C> ProjectMethods<'a, C>
impl<'a, C> ProjectMethods<'a, C>
Sourcepub fn assessments_annotate(
&self,
request: GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest,
name: &str,
) -> ProjectAssessmentAnnotateCall<'a, C>
pub fn assessments_annotate( &self, request: GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest, name: &str, ) -> ProjectAssessmentAnnotateCall<'a, C>
Create a builder to help you perform the following task:
Annotates a previously created Assessment to provide additional information on whether the event turned out to be authentic or fraudulent.
§Arguments
request- No description provided.name- Required. The resource name of the Assessment, in the formatprojects/{project}/assessments/{assessment}.
Sourcepub fn assessments_create(
&self,
request: GoogleCloudRecaptchaenterpriseV1Assessment,
parent: &str,
) -> ProjectAssessmentCreateCall<'a, C>
pub fn assessments_create( &self, request: GoogleCloudRecaptchaenterpriseV1Assessment, parent: &str, ) -> ProjectAssessmentCreateCall<'a, C>
Create a builder to help you perform the following task:
Creates an Assessment of the likelihood an event is legitimate.
§Arguments
request- No description provided.parent- Required. The name of the project in which the assessment is created, in the formatprojects/{project}.
Sourcepub fn firewallpolicies_create(
&self,
request: GoogleCloudRecaptchaenterpriseV1FirewallPolicy,
parent: &str,
) -> ProjectFirewallpolicyCreateCall<'a, C>
pub fn firewallpolicies_create( &self, request: GoogleCloudRecaptchaenterpriseV1FirewallPolicy, parent: &str, ) -> ProjectFirewallpolicyCreateCall<'a, C>
Create a builder to help you perform the following task:
Creates a new FirewallPolicy, specifying conditions at which reCAPTCHA Enterprise actions can be executed. A project may have a maximum of 1000 policies.
§Arguments
request- No description provided.parent- Required. The name of the project this policy applies to, in the formatprojects/{project}.
Sourcepub fn firewallpolicies_delete(
&self,
name: &str,
) -> ProjectFirewallpolicyDeleteCall<'a, C>
pub fn firewallpolicies_delete( &self, name: &str, ) -> ProjectFirewallpolicyDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes the specified firewall policy.
§Arguments
name- Required. The name of the policy to be deleted, in the formatprojects/{project}/firewallpolicies/{firewallpolicy}.
Sourcepub fn firewallpolicies_get(
&self,
name: &str,
) -> ProjectFirewallpolicyGetCall<'a, C>
pub fn firewallpolicies_get( &self, name: &str, ) -> ProjectFirewallpolicyGetCall<'a, C>
Create a builder to help you perform the following task:
Returns the specified firewall policy.
§Arguments
name- Required. The name of the requested policy, in the formatprojects/{project}/firewallpolicies/{firewallpolicy}.
Sourcepub fn firewallpolicies_list(
&self,
parent: &str,
) -> ProjectFirewallpolicyListCall<'a, C>
pub fn firewallpolicies_list( &self, parent: &str, ) -> ProjectFirewallpolicyListCall<'a, C>
Create a builder to help you perform the following task:
Returns the list of all firewall policies that belong to a project.
§Arguments
parent- Required. The name of the project to list the policies for, in the formatprojects/{project}.
Sourcepub fn firewallpolicies_patch(
&self,
request: GoogleCloudRecaptchaenterpriseV1FirewallPolicy,
name: &str,
) -> ProjectFirewallpolicyPatchCall<'a, C>
pub fn firewallpolicies_patch( &self, request: GoogleCloudRecaptchaenterpriseV1FirewallPolicy, name: &str, ) -> ProjectFirewallpolicyPatchCall<'a, C>
Create a builder to help you perform the following task:
Updates the specified firewall policy.
§Arguments
request- No description provided.name- Identifier. The resource name for the FirewallPolicy in the formatprojects/{project}/firewallpolicies/{firewallpolicy}.
Sourcepub fn firewallpolicies_reorder(
&self,
request: GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest,
parent: &str,
) -> ProjectFirewallpolicyReorderCall<'a, C>
pub fn firewallpolicies_reorder( &self, request: GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest, parent: &str, ) -> ProjectFirewallpolicyReorderCall<'a, C>
Create a builder to help you perform the following task:
Reorders all firewall policies.
§Arguments
request- No description provided.parent- Required. The name of the project to list the policies for, in the formatprojects/{project}.
Sourcepub fn keys_add_ip_override(
&self,
request: GoogleCloudRecaptchaenterpriseV1AddIpOverrideRequest,
name: &str,
) -> ProjectKeyAddIpOverrideCall<'a, C>
pub fn keys_add_ip_override( &self, request: GoogleCloudRecaptchaenterpriseV1AddIpOverrideRequest, name: &str, ) -> ProjectKeyAddIpOverrideCall<'a, C>
Create a builder to help you perform the following task:
Adds an IP override to a key. The following restrictions hold: * The maximum number of IP overrides per key is 1000. * For any conflict (such as IP already exists or IP part of an existing IP range), an error is returned.
§Arguments
request- No description provided.name- Required. The name of the key to which the IP override is added, in the formatprojects/{project}/keys/{key}.
Sourcepub fn keys_create(
&self,
request: GoogleCloudRecaptchaenterpriseV1Key,
parent: &str,
) -> ProjectKeyCreateCall<'a, C>
pub fn keys_create( &self, request: GoogleCloudRecaptchaenterpriseV1Key, parent: &str, ) -> ProjectKeyCreateCall<'a, C>
Create a builder to help you perform the following task:
Creates a new reCAPTCHA Enterprise key.
§Arguments
request- No description provided.parent- Required. The name of the project in which the key is created, in the formatprojects/{project}.
Sourcepub fn keys_delete(&self, name: &str) -> ProjectKeyDeleteCall<'a, C>
pub fn keys_delete(&self, name: &str) -> ProjectKeyDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes the specified key.
§Arguments
name- Required. The name of the key to be deleted, in the formatprojects/{project}/keys/{key}.
Sourcepub fn keys_get(&self, name: &str) -> ProjectKeyGetCall<'a, C>
pub fn keys_get(&self, name: &str) -> ProjectKeyGetCall<'a, C>
Create a builder to help you perform the following task:
Returns the specified key.
§Arguments
name- Required. The name of the requested key, in the formatprojects/{project}/keys/{key}.
Sourcepub fn keys_get_metrics(&self, name: &str) -> ProjectKeyGetMetricCall<'a, C>
pub fn keys_get_metrics(&self, name: &str) -> ProjectKeyGetMetricCall<'a, C>
Create a builder to help you perform the following task:
Get some aggregated metrics for a Key. This data can be used to build dashboards.
§Arguments
name- Required. The name of the requested metrics, in the formatprojects/{project}/keys/{key}/metrics.
Sourcepub fn keys_list(&self, parent: &str) -> ProjectKeyListCall<'a, C>
pub fn keys_list(&self, parent: &str) -> ProjectKeyListCall<'a, C>
Create a builder to help you perform the following task:
Returns the list of all keys that belong to a project.
§Arguments
parent- Required. The name of the project that contains the keys that is listed, in the formatprojects/{project}.
Sourcepub fn keys_list_ip_overrides(
&self,
parent: &str,
) -> ProjectKeyListIpOverrideCall<'a, C>
pub fn keys_list_ip_overrides( &self, parent: &str, ) -> ProjectKeyListIpOverrideCall<'a, C>
Create a builder to help you perform the following task:
Lists all IP overrides for a key.
§Arguments
parent- Required. The parent key for which the IP overrides are listed, in the formatprojects/{project}/keys/{key}.
Sourcepub fn keys_migrate(
&self,
request: GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest,
name: &str,
) -> ProjectKeyMigrateCall<'a, C>
pub fn keys_migrate( &self, request: GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest, name: &str, ) -> ProjectKeyMigrateCall<'a, C>
Create a builder to help you perform the following task:
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 Key, and your user must have the reCAPTCHA Enterprise Admin IAM role in the destination project.
§Arguments
request- No description provided.name- Required. The name of the key to be migrated, in the formatprojects/{project}/keys/{key}.
Sourcepub fn keys_patch(
&self,
request: GoogleCloudRecaptchaenterpriseV1Key,
name: &str,
) -> ProjectKeyPatchCall<'a, C>
pub fn keys_patch( &self, request: GoogleCloudRecaptchaenterpriseV1Key, name: &str, ) -> ProjectKeyPatchCall<'a, C>
Create a builder to help you perform the following task:
Updates the specified key.
§Arguments
request- No description provided.name- Identifier. The resource name for the Key in the formatprojects/{project}/keys/{key}.
Sourcepub fn keys_remove_ip_override(
&self,
request: GoogleCloudRecaptchaenterpriseV1RemoveIpOverrideRequest,
name: &str,
) -> ProjectKeyRemoveIpOverrideCall<'a, C>
pub fn keys_remove_ip_override( &self, request: GoogleCloudRecaptchaenterpriseV1RemoveIpOverrideRequest, name: &str, ) -> ProjectKeyRemoveIpOverrideCall<'a, C>
Create a builder to help you perform the following task:
Removes an IP override from a key. The following restrictions hold: * If the IP isn’t found in an existing IP override, a NOT_FOUND error is returned. * If the IP is found in an existing IP override, but the override type does not match, a NOT_FOUND error is returned.
§Arguments
request- No description provided.name- Required. The name of the key from which the IP override is removed, in the formatprojects/{project}/keys/{key}.
Sourcepub fn keys_retrieve_legacy_secret_key(
&self,
key: &str,
) -> ProjectKeyRetrieveLegacySecretKeyCall<'a, C>
pub fn keys_retrieve_legacy_secret_key( &self, key: &str, ) -> ProjectKeyRetrieveLegacySecretKeyCall<'a, C>
Create a builder to help you perform the following task:
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.
§Arguments
key- Required. The public key name linked to the requested secret key in the formatprojects/{project}/keys/{key}.
Create a builder to help you perform the following task:
Search group memberships related to a given account.
§Arguments
request- No description provided.project- Required. The name of the project to search related account group memberships from. Specify the project name in the following format:projects/{project}.
Create a builder to help you perform the following task:
Get memberships in a group of related accounts.
§Arguments
parent- Required. The resource name for the related account group in the formatprojects/{project}/relatedaccountgroups/{relatedaccountgroup}.
Create a builder to help you perform the following task:
List groups of related accounts.
§Arguments
parent- Required. The name of the project to list related account groups from, in the formatprojects/{project}.