Struct google_cloudidentity1::api::DeviceMethods
source · 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>
impl<'a, S> DeviceMethods<'a, S>
sourcepub fn device_users_client_states_get(
&self,
name: &str
) -> DeviceDeviceUserClientStateGetCall<'a, S>
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}
, wheredevice
is the unique ID assigned to the Device,device_user
is the unique ID assigned to the User andpartner
identifies the partner storing the data. To get the client state for devices belonging to your own organization, thepartnerId
is in the format:customerId-*anystring*
. Where thecustomerId
is your organization’s customer ID andanystring
is any suffix. This suffix is used in setting up Custom Access Levels in Context-Aware Access. You may usemy_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}
.
sourcepub fn device_users_client_states_list(
&self,
parent: &str
) -> DeviceDeviceUserClientStateListCall<'a, S>
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}
sourcepub fn device_users_client_states_patch(
&self,
request: GoogleAppsCloudidentityDevicesV1ClientState,
name: &str
) -> DeviceDeviceUserClientStatePatchCall<'a, S>
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
, wherecustomer
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
Theid
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’)
sourcepub fn device_users_approve(
&self,
request: GoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest,
name: &str
) -> DeviceDeviceUserApproveCall<'a, S>
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.
sourcepub fn device_users_block(
&self,
request: GoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest,
name: &str
) -> DeviceDeviceUserBlockCall<'a, S>
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.
sourcepub fn device_users_cancel_wipe(
&self,
request: GoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest,
name: &str
) -> DeviceDeviceUserCancelWipeCall<'a, S>
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.
sourcepub fn device_users_delete(
&self,
name: &str
) -> DeviceDeviceUserDeleteCall<'a, S>
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.
sourcepub fn device_users_get(&self, name: &str) -> DeviceDeviceUserGetCall<'a, S>
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.
sourcepub fn device_users_list(&self, parent: &str) -> DeviceDeviceUserListCall<'a, S>
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}
sourcepub fn device_users_lookup(
&self,
parent: &str
) -> DeviceDeviceUserLookupCall<'a, S>
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.
sourcepub fn device_users_wipe(
&self,
request: GoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest,
name: &str
) -> DeviceDeviceUserWipeCall<'a, S>
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.
sourcepub fn cancel_wipe(
&self,
request: GoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest,
name: &str
) -> DeviceCancelWipeCall<'a, S>
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.
sourcepub fn create(
&self,
request: GoogleAppsCloudidentityDevicesV1Device
) -> DeviceCreateCall<'a, S>
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.
sourcepub fn delete(&self, name: &str) -> DeviceDeleteCall<'a, S>
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.
sourcepub fn get(&self, name: &str) -> DeviceGetCall<'a, S>
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.
sourcepub fn list(&self) -> DeviceListCall<'a, S>
pub fn list(&self) -> DeviceListCall<'a, S>
Create a builder to help you perform the following task:
Lists/Searches devices.
sourcepub fn wipe(
&self,
request: GoogleAppsCloudidentityDevicesV1WipeDeviceRequest,
name: &str
) -> DeviceWipeCall<'a, S>
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.