ProjectMethods

Struct ProjectMethods 

Source
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>

Source

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 format projects/{project}/assessments/{assessment}.
Source

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 format projects/{project}.
Source

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 format projects/{project}.
Source

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 format projects/{project}/firewallpolicies/{firewallpolicy}.
Source

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 format projects/{project}/firewallpolicies/{firewallpolicy}.
Source

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 format projects/{project}.
Source

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 format projects/{project}/firewallpolicies/{firewallpolicy}.
Source

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 format projects/{project}.
Source

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 format projects/{project}/keys/{key}.
Source

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 format projects/{project}.
Source

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 format projects/{project}/keys/{key}.
Source

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 format projects/{project}/keys/{key}.
Source

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 format projects/{project}/keys/{key}/metrics.
Source

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 format projects/{project}.
Source

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 format projects/{project}/keys/{key}.
Source

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 format projects/{project}/keys/{key}.
Source

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 format projects/{project}/keys/{key}.
Source

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 format projects/{project}/keys/{key}.
Source

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 format projects/{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}.
Source

pub fn relatedaccountgroups_memberships_list( &self, parent: &str, ) -> ProjectRelatedaccountgroupMembershipListCall<'a, C>

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 format projects/{project}/relatedaccountgroups/{relatedaccountgroup}.
Source

pub fn relatedaccountgroups_list( &self, parent: &str, ) -> ProjectRelatedaccountgroupListCall<'a, C>

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 format projects/{project}.

Trait Implementations§

Source§

impl<'a, C> MethodsBuilder for ProjectMethods<'a, C>

Auto Trait Implementations§

§

impl<'a, C> Freeze for ProjectMethods<'a, C>

§

impl<'a, C> !RefUnwindSafe for ProjectMethods<'a, C>

§

impl<'a, C> Send for ProjectMethods<'a, C>
where C: Sync,

§

impl<'a, C> Sync for ProjectMethods<'a, C>
where C: Sync,

§

impl<'a, C> Unpin for ProjectMethods<'a, C>

§

impl<'a, C> !UnwindSafe for ProjectMethods<'a, C>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more