pub struct DeviceMethods<'a, S>
where S: 'a,
{ /* private fields */ }
Expand description

A builder providing access to all methods supported on device resources. It is not used directly, but through the CloudIdentity hub.

§Example

Instantiate a resource builder

extern crate hyper;
extern crate hyper_rustls;
extern crate google_cloudidentity1 as cloudidentity1;
 
use std::default::Default;
use cloudidentity1::{CloudIdentity, oauth2, hyper, hyper_rustls, chrono, FieldMask};
 
let secret: oauth2::ApplicationSecret = Default::default();
let auth = oauth2::InstalledFlowAuthenticator::builder(
        secret,
        oauth2::InstalledFlowReturnMethod::HTTPRedirect,
    ).build().await.unwrap();
let mut hub = CloudIdentity::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `cancel_wipe(...)`, `create(...)`, `delete(...)`, `device_users_approve(...)`, `device_users_block(...)`, `device_users_cancel_wipe(...)`, `device_users_client_states_get(...)`, `device_users_client_states_list(...)`, `device_users_client_states_patch(...)`, `device_users_delete(...)`, `device_users_get(...)`, `device_users_list(...)`, `device_users_lookup(...)`, `device_users_wipe(...)`, `get(...)`, `list(...)` and `wipe(...)`
// to build up your call.
let rb = hub.devices();

Implementations§

source§

impl<'a, S> DeviceMethods<'a, S>

source

pub fn device_users_client_states_get( &self, name: &str ) -> DeviceDeviceUserClientStateGetCall<'a, S>

Create a builder to help you perform the following task:

Gets the client state for the device user

§Arguments
  • name - Required. Resource name of the ClientState in format: devices/{device}/deviceUsers/{device_user}/clientStates/{partner}, where device is the unique ID assigned to the Device, device_user is the unique ID assigned to the User and partner identifies the partner storing the data. To get the client state for devices belonging to your own organization, the partnerId is in the format: customerId-*anystring*. Where the customerId is your organization’s customer ID and anystring is any suffix. This suffix is used in setting up Custom Access Levels in Context-Aware Access. You may use my_customer instead of the customer ID for devices managed by your own organization. You may specify - in place of the {device}, so the ClientState resource name can be: devices/-/deviceUsers/{device_user_resource}/clientStates/{partner}.
source

pub fn device_users_client_states_list( &self, parent: &str ) -> DeviceDeviceUserClientStateListCall<'a, S>

Create a builder to help you perform the following task:

Lists the client states for the given search query.

§Arguments
  • parent - Required. To list all ClientStates, set this to “devices/-/deviceUsers/-”. To list all ClientStates owned by a DeviceUser, set this to the resource name of the DeviceUser. Format: devices/{device}/deviceUsers/{deviceUser}
source

pub fn device_users_client_states_patch( &self, request: GoogleAppsCloudidentityDevicesV1ClientState, name: &str ) -> DeviceDeviceUserClientStatePatchCall<'a, S>

Create a builder to help you perform the following task:

Updates the client state for the device user Note: This method is available only to customers who have one of the following SKUs: Enterprise Standard, Enterprise Plus, Enterprise for Education, and Cloud Identity Premium

§Arguments
  • request - No description provided.
  • name - Output only. Resource name of the ClientState in format: devices/{device}/deviceUsers/{device_user}/clientState/{partner}, where partner corresponds to the partner storing the data. For partners belonging to the “BeyondCorp Alliance”, this is the partner ID specified to you by Google. For all other callers, this is a string of the form: {customer}-suffix, where customer is your customer ID. The suffix is any string the caller specifies. This string will be displayed verbatim in the administration console. This suffix is used in setting up Custom Access Levels in Context-Aware Access. Your organization’s customer ID can be obtained from the URL: GET https://www.googleapis.com/admin/directory/v1/customers/my_customer The id field in the response contains the customer ID starting with the letter ‘C’. The customer ID to be used in this API is the string after the letter ‘C’ (not including ‘C’)
source

pub fn device_users_approve( &self, request: GoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest, name: &str ) -> DeviceDeviceUserApproveCall<'a, S>

Create a builder to help you perform the following task:

Approves device to access user data.

§Arguments
  • request - No description provided.
  • name - Required. Resource name of the Device in format: devices/{device}/deviceUsers/{device_user}, where device is the unique ID assigned to the Device, and device_user is the unique ID assigned to the User.
source

pub fn device_users_block( &self, request: GoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest, name: &str ) -> DeviceDeviceUserBlockCall<'a, S>

Create a builder to help you perform the following task:

Blocks device from accessing user data

§Arguments
  • request - No description provided.
  • name - Required. Resource name of the Device in format: devices/{device}/deviceUsers/{device_user}, where device is the unique ID assigned to the Device, and device_user is the unique ID assigned to the User.
source

pub fn device_users_cancel_wipe( &self, request: GoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest, name: &str ) -> DeviceDeviceUserCancelWipeCall<'a, S>

Create a builder to help you perform the following task:

Cancels an unfinished user account wipe. This operation can be used to cancel device wipe in the gap between the wipe operation returning success and the device being wiped.

§Arguments
  • request - No description provided.
  • name - Required. Resource name of the Device in format: devices/{device}/deviceUsers/{device_user}, where device is the unique ID assigned to the Device, and device_user is the unique ID assigned to the User.
source

pub fn device_users_delete( &self, name: &str ) -> DeviceDeviceUserDeleteCall<'a, S>

Create a builder to help you perform the following task:

Deletes the specified DeviceUser. This also revokes the user’s access to device data.

§Arguments
  • name - Required. Resource name of the Device in format: devices/{device}/deviceUsers/{device_user}, where device is the unique ID assigned to the Device, and device_user is the unique ID assigned to the User.
source

pub fn device_users_get(&self, name: &str) -> DeviceDeviceUserGetCall<'a, S>

Create a builder to help you perform the following task:

Retrieves the specified DeviceUser

§Arguments
  • name - Required. Resource name of the Device in format: devices/{device}/deviceUsers/{device_user}, where device is the unique ID assigned to the Device, and device_user is the unique ID assigned to the User.
source

pub fn device_users_list(&self, parent: &str) -> DeviceDeviceUserListCall<'a, S>

Create a builder to help you perform the following task:

Lists/Searches DeviceUsers.

§Arguments
  • parent - Required. To list all DeviceUsers, set this to “devices/-”. To list all DeviceUsers owned by a device, set this to the resource name of the device. Format: devices/{device}
source

pub fn device_users_lookup( &self, parent: &str ) -> DeviceDeviceUserLookupCall<'a, S>

Create a builder to help you perform the following task:

Looks up resource names of the DeviceUsers associated with the caller’s credentials, as well as the properties provided in the request. This method must be called with end-user credentials with the scope: https://www.googleapis.com/auth/cloud-identity.devices.lookup If multiple properties are provided, only DeviceUsers having all of these properties are considered as matches - i.e. the query behaves like an AND. Different platforms require different amounts of information from the caller to ensure that the DeviceUser is uniquely identified. - iOS: No properties need to be passed, the caller’s credentials are sufficient to identify the corresponding DeviceUser. - Android: Specifying the ‘android_id’ field is required. - Desktop: Specifying the ‘raw_resource_id’ field is required.

§Arguments
  • parent - Must be set to “devices/-/deviceUsers” to search across all DeviceUser belonging to the user.
source

pub fn device_users_wipe( &self, request: GoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest, name: &str ) -> DeviceDeviceUserWipeCall<'a, S>

Create a builder to help you perform the following task:

Wipes the user’s account on a device. Other data on the device that is not associated with the user’s work account is not affected. For example, if a Gmail app is installed on a device that is used for personal and work purposes, and the user is logged in to the Gmail app with their personal account as well as their work account, wiping the “deviceUser” by their work administrator will not affect their personal account within Gmail or other apps such as Photos.

§Arguments
  • request - No description provided.
  • name - Required. Resource name of the Device in format: devices/{device}/deviceUsers/{device_user}, where device is the unique ID assigned to the Device, and device_user is the unique ID assigned to the User.
source

pub fn cancel_wipe( &self, request: GoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest, name: &str ) -> DeviceCancelWipeCall<'a, S>

Create a builder to help you perform the following task:

Cancels an unfinished device wipe. This operation can be used to cancel device wipe in the gap between the wipe operation returning success and the device being wiped. This operation is possible when the device is in a “pending wipe” state. The device enters the “pending wipe” state when a wipe device command is issued, but has not yet been sent to the device. The cancel wipe will fail if the wipe command has already been issued to the device.

§Arguments
  • request - No description provided.
  • name - Required. Resource name of the Device in format: devices/{device}, where device is the unique ID assigned to the Device.
source

pub fn create( &self, request: GoogleAppsCloudidentityDevicesV1Device ) -> DeviceCreateCall<'a, S>

Create a builder to help you perform the following task:

Creates a device. Only company-owned device may be created. Note: This method is available only to customers who have one of the following SKUs: Enterprise Standard, Enterprise Plus, Enterprise for Education, and Cloud Identity Premium

§Arguments
  • request - No description provided.
source

pub fn delete(&self, name: &str) -> DeviceDeleteCall<'a, S>

Create a builder to help you perform the following task:

Deletes the specified device.

§Arguments
  • name - Required. Resource name of the Device in format: devices/{device}, where device is the unique ID assigned to the Device.
source

pub fn get(&self, name: &str) -> DeviceGetCall<'a, S>

Create a builder to help you perform the following task:

Retrieves the specified device.

§Arguments
  • name - Required. Resource name of the Device in the format: devices/{device}, where device is the unique ID assigned to the Device.
source

pub fn list(&self) -> DeviceListCall<'a, S>

Create a builder to help you perform the following task:

Lists/Searches devices.

source

pub fn wipe( &self, request: GoogleAppsCloudidentityDevicesV1WipeDeviceRequest, name: &str ) -> DeviceWipeCall<'a, S>

Create a builder to help you perform the following task:

Wipes all data on the specified device.

§Arguments
  • request - No description provided.
  • name - Required. Resource name of the Device in format: devices/{device}/deviceUsers/{device_user}, where device is the unique ID assigned to the Device, and device_user is the unique ID assigned to the User.

Trait Implementations§

source§

impl<'a, S> MethodsBuilder for DeviceMethods<'a, S>

Auto Trait Implementations§

§

impl<'a, S> !RefUnwindSafe for DeviceMethods<'a, S>

§

impl<'a, S> Send for DeviceMethods<'a, S>
where S: Sync,

§

impl<'a, S> Sync for DeviceMethods<'a, S>
where S: Sync,

§

impl<'a, S> Unpin for DeviceMethods<'a, S>

§

impl<'a, S> !UnwindSafe for DeviceMethods<'a, S>

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

§

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

§

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