Struct PartnerMethods

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

Source

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 format partners/[PARTNER_ID] that identifies the reseller.
Source

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.
Source

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.
Source

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.
Source

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.
Source

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.
Source

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 format partners/[PARTNER_ID]/devices/[DEVICE_ID].
Source

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.
Source

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.
Source

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.
Source

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.
Source

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.
Source

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 format partners/[PARTNER_ID]/vendors/[VENDOR_ID].
Source

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 format partners/[PARTNER_ID].

Trait Implementations§

Source§

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> 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

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

Source§

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
Source§

impl<T> ErasedDestructor for T
where T: 'static,