pub struct LocationMethods<'a> { /* private fields */ }
Expand description
A builder providing access to all methods supported on location 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(...)` and `transfer(...)`
// to build up your call.
let rb = hub.locations();
Implementations
sourceimpl<'a> LocationMethods<'a>
impl<'a> LocationMethods<'a>
sourcepub fn admins_create(
&self,
request: Admin,
parent: &str
) -> LocationAdminCreateCall<'a>
pub fn admins_create(
&self,
request: Admin,
parent: &str
) -> LocationAdminCreateCall<'a>
Create a builder to help you perform the following task:
Invites the specified user to become an administrator for the specified location. The invitee must accept the invitation in order to be granted access to the location. See AcceptInvitation to programmatically accept an invitation.
Arguments
request
- No description provided.parent
- Required. The resource name of the location this admin is created for.locations/{location_id}/admins
.
sourcepub fn admins_delete(&self, name: &str) -> LocationAdminDeleteCall<'a>
pub fn admins_delete(&self, name: &str) -> LocationAdminDeleteCall<'a>
Create a builder to help you perform the following task:
Removes the specified admin as a manager of the specified location.
Arguments
name
- Required. The resource name of the admin to remove from the location.
sourcepub fn admins_list(&self, parent: &str) -> LocationAdminListCall<'a>
pub fn admins_list(&self, parent: &str) -> LocationAdminListCall<'a>
Create a builder to help you perform the following task:
Lists all of the admins for the specified location.
Arguments
parent
- Required. The name of the location to list admins of.locations/{location_id}/admins
.
sourcepub fn admins_patch(
&self,
request: Admin,
name: &str
) -> LocationAdminPatchCall<'a>
pub fn admins_patch(
&self,
request: Admin,
name: &str
) -> LocationAdminPatchCall<'a>
Create a builder to help you perform the following task:
Updates the Admin for the specified location. Only the AdminRole of the Admin can be updated.
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 transfer(
&self,
request: TransferLocationRequest,
name: &str
) -> LocationTransferCall<'a>
pub fn transfer(
&self,
request: TransferLocationRequest,
name: &str
) -> LocationTransferCall<'a>
Create a builder to help you perform the following task:
Moves a location from an account that the user owns to another account that the same user administers. The user must be an owner of the account the location is currently associated with and must also be at least a manager of the destination account.
Arguments
request
- No description provided.name
- Required. The name of the location to transfer.locations/{location_id}
.
Trait Implementations
impl<'a> MethodsBuilder for LocationMethods<'a>
Auto Trait Implementations
impl<'a> !RefUnwindSafe for LocationMethods<'a>
impl<'a> Send for LocationMethods<'a>
impl<'a> Sync for LocationMethods<'a>
impl<'a> Unpin for LocationMethods<'a>
impl<'a> !UnwindSafe for LocationMethods<'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