pub struct PartnerMethods<'a, C>where
C: 'a,{ /* private fields */ }
Expand description
A builder providing access to all methods supported on partner resources.
It is not used directly, but through the AndroidProvisioningPartner
hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_androiddeviceprovisioning1 as androiddeviceprovisioning1;
use androiddeviceprovisioning1::{AndroidProvisioningPartner, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
let secret: yup_oauth2::ApplicationSecret = Default::default();
let auth = yup_oauth2::InstalledFlowAuthenticator::builder(
secret,
yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
).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_http1()
.build()
);
let mut hub = AndroidProvisioningPartner::new(client, auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `customers_create(...)`, `customers_list(...)`, `devices_claim(...)`, `devices_claim_async(...)`, `devices_find_by_identifier(...)`, `devices_find_by_owner(...)`, `devices_get(...)`, `devices_get_sim_lock_state(...)`, `devices_metadata(...)`, `devices_unclaim(...)`, `devices_unclaim_async(...)`, `devices_update_metadata_async(...)`, `vendors_customers_list(...)` and `vendors_list(...)`
// to build up your call.
let rb = hub.partners();
Implementations§
Source§impl<'a, C> PartnerMethods<'a, C>
impl<'a, C> PartnerMethods<'a, C>
Sourcepub fn customers_create(
&self,
request: CreateCustomerRequest,
parent: &str,
) -> PartnerCustomerCreateCall<'a, C>
pub fn customers_create( &self, request: CreateCustomerRequest, parent: &str, ) -> PartnerCustomerCreateCall<'a, C>
Create a builder to help you perform the following task:
Creates a customer for zero-touch enrollment. After the method returns successfully, admin and owner roles can manage devices and EMM configs by calling API methods or using their zero-touch enrollment portal. The customer receives an email that welcomes them to zero-touch enrollment and explains how to sign into the portal.
§Arguments
request
- No description provided.parent
- Required. The parent resource ID in the formatpartners/[PARTNER_ID]
that identifies the reseller.
Sourcepub fn customers_list(&self, partner_id: i64) -> PartnerCustomerListCall<'a, C>
pub fn customers_list(&self, partner_id: i64) -> PartnerCustomerListCall<'a, C>
Create a builder to help you perform the following task:
Lists the customers that are enrolled to the reseller identified by the partnerId
argument. This list includes customers that the reseller created and customers that enrolled themselves using the portal.
§Arguments
partnerId
- Required. The ID of the reseller partner.
Sourcepub fn devices_claim(
&self,
request: ClaimDeviceRequest,
partner_id: i64,
) -> PartnerDeviceClaimCall<'a, C>
pub fn devices_claim( &self, request: ClaimDeviceRequest, partner_id: i64, ) -> PartnerDeviceClaimCall<'a, C>
Create a builder to help you perform the following task:
Claims a device for a customer and adds it to zero-touch enrollment. If the device is already claimed by another customer, the call returns an error.
§Arguments
request
- No description provided.partnerId
- Required. The ID of the reseller partner.
Sourcepub fn devices_claim_async(
&self,
request: ClaimDevicesRequest,
partner_id: i64,
) -> PartnerDeviceClaimAsyncCall<'a, C>
pub fn devices_claim_async( &self, request: ClaimDevicesRequest, partner_id: i64, ) -> PartnerDeviceClaimAsyncCall<'a, C>
Create a builder to help you perform the following task:
Claims a batch of devices for a customer asynchronously. Adds the devices to zero-touch enrollment. To learn more, read Long‑running batch operations.
§Arguments
request
- No description provided.partnerId
- Required. The ID of the reseller partner.
Sourcepub fn devices_find_by_identifier(
&self,
request: FindDevicesByDeviceIdentifierRequest,
partner_id: i64,
) -> PartnerDeviceFindByIdentifierCall<'a, C>
pub fn devices_find_by_identifier( &self, request: FindDevicesByDeviceIdentifierRequest, partner_id: i64, ) -> PartnerDeviceFindByIdentifierCall<'a, C>
Create a builder to help you perform the following task:
Finds devices by hardware identifiers, such as IMEI.
§Arguments
request
- No description provided.partnerId
- Required. The ID of the reseller partner.
Sourcepub fn devices_find_by_owner(
&self,
request: FindDevicesByOwnerRequest,
partner_id: i64,
) -> PartnerDeviceFindByOwnerCall<'a, C>
pub fn devices_find_by_owner( &self, request: FindDevicesByOwnerRequest, partner_id: i64, ) -> PartnerDeviceFindByOwnerCall<'a, C>
Create a builder to help you perform the following task:
Finds devices claimed for customers. The results only contain devices registered to the reseller that’s identified by the partnerId
argument. The customer’s devices purchased from other resellers don’t appear in the results.
§Arguments
request
- No description provided.partnerId
- Required. The ID of the reseller partner.
Sourcepub fn devices_get(&self, name: &str) -> PartnerDeviceGetCall<'a, C>
pub fn devices_get(&self, name: &str) -> PartnerDeviceGetCall<'a, C>
Create a builder to help you perform the following task:
Gets a device.
§Arguments
name
- Required. The device API resource name in the formatpartners/[PARTNER_ID]/devices/[DEVICE_ID]
.
Sourcepub fn devices_get_sim_lock_state(
&self,
request: GetDeviceSimLockStateRequest,
partner_id: i64,
) -> PartnerDeviceGetSimLockStateCall<'a, C>
pub fn devices_get_sim_lock_state( &self, request: GetDeviceSimLockStateRequest, partner_id: i64, ) -> PartnerDeviceGetSimLockStateCall<'a, C>
Create a builder to help you perform the following task:
Gets a device’s SIM lock state.
§Arguments
request
- No description provided.partnerId
- Required. The ID of the partner.
Sourcepub fn devices_metadata(
&self,
request: UpdateDeviceMetadataRequest,
metadata_owner_id: i64,
device_id: i64,
) -> PartnerDeviceMetadataCall<'a, C>
pub fn devices_metadata( &self, request: UpdateDeviceMetadataRequest, metadata_owner_id: i64, device_id: i64, ) -> PartnerDeviceMetadataCall<'a, C>
Create a builder to help you perform the following task:
Updates reseller metadata associated with the device. Android devices only.
§Arguments
request
- No description provided.metadataOwnerId
- Required. The owner of the newly set metadata. Set this to the partner ID.deviceId
- Required. The ID of the device.
Sourcepub fn devices_unclaim(
&self,
request: UnclaimDeviceRequest,
partner_id: i64,
) -> PartnerDeviceUnclaimCall<'a, C>
pub fn devices_unclaim( &self, request: UnclaimDeviceRequest, partner_id: i64, ) -> PartnerDeviceUnclaimCall<'a, C>
Create a builder to help you perform the following task:
Unclaims a device from a customer and removes it from zero-touch enrollment.
§Arguments
request
- No description provided.partnerId
- Required. The ID of the reseller partner.
Sourcepub fn devices_unclaim_async(
&self,
request: UnclaimDevicesRequest,
partner_id: i64,
) -> PartnerDeviceUnclaimAsyncCall<'a, C>
pub fn devices_unclaim_async( &self, request: UnclaimDevicesRequest, partner_id: i64, ) -> PartnerDeviceUnclaimAsyncCall<'a, C>
Create a builder to help you perform the following task:
Unclaims a batch of devices for a customer asynchronously. Removes the devices from zero-touch enrollment. To learn more, read Long‑running batch operations.
§Arguments
request
- No description provided.partnerId
- Required. The reseller partner ID.
Sourcepub fn devices_update_metadata_async(
&self,
request: UpdateDeviceMetadataInBatchRequest,
partner_id: i64,
) -> PartnerDeviceUpdateMetadataAsyncCall<'a, C>
pub fn devices_update_metadata_async( &self, request: UpdateDeviceMetadataInBatchRequest, partner_id: i64, ) -> PartnerDeviceUpdateMetadataAsyncCall<'a, C>
Create a builder to help you perform the following task:
Updates the reseller metadata attached to a batch of devices. This method updates devices asynchronously and returns an Operation
that can be used to track progress. Read Long‑running batch operations. Android Devices only.
§Arguments
request
- No description provided.partnerId
- Required. The reseller partner ID.
Sourcepub fn vendors_customers_list(
&self,
parent: &str,
) -> PartnerVendorCustomerListCall<'a, C>
pub fn vendors_customers_list( &self, parent: &str, ) -> PartnerVendorCustomerListCall<'a, C>
Create a builder to help you perform the following task:
Lists the customers of the vendor.
§Arguments
parent
- Required. The resource name in the formatpartners/[PARTNER_ID]/vendors/[VENDOR_ID]
.
Sourcepub fn vendors_list(&self, parent: &str) -> PartnerVendorListCall<'a, C>
pub fn vendors_list(&self, parent: &str) -> PartnerVendorListCall<'a, C>
Create a builder to help you perform the following task:
Lists the vendors of the partner.
§Arguments
parent
- Required. The resource name in the formatpartners/[PARTNER_ID]
.
Trait Implementations§
impl<'a, C> MethodsBuilder for PartnerMethods<'a, C>
Auto Trait Implementations§
impl<'a, C> Freeze for PartnerMethods<'a, C>
impl<'a, C> !RefUnwindSafe for PartnerMethods<'a, C>
impl<'a, C> Send for PartnerMethods<'a, C>where
C: Sync,
impl<'a, C> Sync for PartnerMethods<'a, C>where
C: Sync,
impl<'a, C> Unpin for PartnerMethods<'a, C>
impl<'a, C> !UnwindSafe for PartnerMethods<'a, C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more