pub struct AccountMethods<'a> { /* private fields */ }
Expand description
A builder providing access to all methods supported on account resources.
It is not used directly, but through the MyBusinessAccountManagement
hub.
Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_mybusinessaccountmanagement1 as mybusinessaccountmanagement1;
use std::default::Default;
use mybusinessaccountmanagement1::{MyBusinessAccountManagement, oauth2, hyper, hyper_rustls};
let secret: oauth2::ApplicationSecret = Default::default();
let auth = oauth2::InstalledFlowAuthenticator::builder(
secret,
oauth2::InstalledFlowReturnMethod::HTTPRedirect,
).build().await.unwrap();
let mut hub = MyBusinessAccountManagement::new(hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots().https_or_http().enable_http1().enable_http2().build()), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `admins_create(...)`, `admins_delete(...)`, `admins_list(...)`, `admins_patch(...)`, `create(...)`, `get(...)`, `invitations_accept(...)`, `invitations_decline(...)`, `invitations_list(...)`, `list(...)` and `patch(...)`
// to build up your call.
let rb = hub.accounts();
Implementations
sourceimpl<'a> AccountMethods<'a>
impl<'a> AccountMethods<'a>
sourcepub fn admins_create(
&self,
request: Admin,
parent: &str
) -> AccountAdminCreateCall<'a>
pub fn admins_create(
&self,
request: Admin,
parent: &str
) -> AccountAdminCreateCall<'a>
Create a builder to help you perform the following task:
Invites the specified user to become an administrator for the specified account. The invitee must accept the invitation in order to be granted access to the account. See AcceptInvitation to programmatically accept an invitation.
Arguments
request
- No description provided.parent
- Required. The resource name of the account this admin is created for.accounts/{account_id}
.
sourcepub fn admins_delete(&self, name: &str) -> AccountAdminDeleteCall<'a>
pub fn admins_delete(&self, name: &str) -> AccountAdminDeleteCall<'a>
Create a builder to help you perform the following task:
Removes the specified admin from the specified account.
Arguments
name
- Required. The resource name of the admin to remove from the account.accounts/{account_id}/admins/{admin_id}
.
sourcepub fn admins_list(&self, parent: &str) -> AccountAdminListCall<'a>
pub fn admins_list(&self, parent: &str) -> AccountAdminListCall<'a>
Create a builder to help you perform the following task:
Lists the admins for the specified account.
Arguments
parent
- Required. The name of the account from which to retrieve a list of admins.accounts/{account_id}/admins
.
sourcepub fn admins_patch(
&self,
request: Admin,
name: &str
) -> AccountAdminPatchCall<'a>
pub fn admins_patch(
&self,
request: Admin,
name: &str
) -> AccountAdminPatchCall<'a>
Create a builder to help you perform the following task:
Updates the Admin for the specified Account Admin.
Arguments
request
- No description provided.name
- Immutable. The resource name. For account admins, this is in the form:accounts/{account_id}/admins/{admin_id}
For location admins, this is in the form:locations/{location_id}/admins/{admin_id}
This field will be ignored if set during admin creation.
sourcepub fn invitations_accept(
&self,
request: AcceptInvitationRequest,
name: &str
) -> AccountInvitationAcceptCall<'a>
pub fn invitations_accept(
&self,
request: AcceptInvitationRequest,
name: &str
) -> AccountInvitationAcceptCall<'a>
Create a builder to help you perform the following task:
Accepts the specified invitation.
Arguments
request
- No description provided.name
- Required. The name of the invitation that is being accepted.accounts/{account_id}/invitations/{invitation_id}
sourcepub fn invitations_decline(
&self,
request: DeclineInvitationRequest,
name: &str
) -> AccountInvitationDeclineCall<'a>
pub fn invitations_decline(
&self,
request: DeclineInvitationRequest,
name: &str
) -> AccountInvitationDeclineCall<'a>
Create a builder to help you perform the following task:
Declines the specified invitation.
Arguments
request
- No description provided.name
- Required. The name of the account invitation that is being declined.accounts/{account_id}/invitations/{invitation_id}
sourcepub fn invitations_list(&self, parent: &str) -> AccountInvitationListCall<'a>
pub fn invitations_list(&self, parent: &str) -> AccountInvitationListCall<'a>
Create a builder to help you perform the following task:
Lists pending invitations for the specified account.
Arguments
parent
- Required. The name of the account from which the list of invitations is being retrieved.accounts/{account_id}/invitations
sourcepub fn create(&self, request: Account) -> AccountCreateCall<'a>
pub fn create(&self, request: Account) -> AccountCreateCall<'a>
Create a builder to help you perform the following task:
Creates an account with the specified name and type under the given parent. - Personal accounts and Organizations cannot be created. - User Groups cannot be created with a Personal account as primary owner. - Location Groups cannot be created with a primary owner of a Personal account if the Personal account is in an Organization. - Location Groups cannot own Location Groups.
Arguments
request
- No description provided.
sourcepub fn get(&self, name: &str) -> AccountGetCall<'a>
pub fn get(&self, name: &str) -> AccountGetCall<'a>
Create a builder to help you perform the following task:
Gets the specified account. Returns NOT_FOUND
if the account does not exist or if the caller does not have access rights to it.
Arguments
name
- Required. The name of the account to fetch.
sourcepub fn list(&self) -> AccountListCall<'a>
pub fn list(&self) -> AccountListCall<'a>
Create a builder to help you perform the following task:
Lists all of the accounts for the authenticated user. This includes all accounts that the user owns, as well as any accounts for which the user has management rights.
sourcepub fn patch(&self, request: Account, name: &str) -> AccountPatchCall<'a>
pub fn patch(&self, request: Account, name: &str) -> AccountPatchCall<'a>
Create a builder to help you perform the following task:
Updates the specified business account. Personal accounts cannot be updated using this method.
Arguments
request
- No description provided.name
- Immutable. The resource name, in the formataccounts/{account_id}
.
Trait Implementations
impl<'a> MethodsBuilder for AccountMethods<'a>
Auto Trait Implementations
impl<'a> !RefUnwindSafe for AccountMethods<'a>
impl<'a> Send for AccountMethods<'a>
impl<'a> Sync for AccountMethods<'a>
impl<'a> Unpin for AccountMethods<'a>
impl<'a> !UnwindSafe for AccountMethods<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more