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

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

§Example

Instantiate a resource builder

extern crate hyper;
extern crate hyper_rustls;
extern crate google_androidmanagement1 as androidmanagement1;
 
use std::default::Default;
use androidmanagement1::{AndroidManagement, 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 = AndroidManagement::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 `applications_get(...)`, `create(...)`, `delete(...)`, `devices_delete(...)`, `devices_get(...)`, `devices_issue_command(...)`, `devices_list(...)`, `devices_operations_cancel(...)`, `devices_operations_get(...)`, `devices_operations_list(...)`, `devices_patch(...)`, `enrollment_tokens_create(...)`, `enrollment_tokens_delete(...)`, `enrollment_tokens_get(...)`, `enrollment_tokens_list(...)`, `get(...)`, `list(...)`, `migration_tokens_create(...)`, `migration_tokens_get(...)`, `migration_tokens_list(...)`, `patch(...)`, `policies_delete(...)`, `policies_get(...)`, `policies_list(...)`, `policies_patch(...)`, `web_apps_create(...)`, `web_apps_delete(...)`, `web_apps_get(...)`, `web_apps_list(...)`, `web_apps_patch(...)` and `web_tokens_create(...)`
// to build up your call.
let rb = hub.enterprises();

Implementations§

source§

impl<'a, S> EnterpriseMethods<'a, S>

source

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

Create a builder to help you perform the following task:

Gets info about an application.

§Arguments
  • name - The name of the application in the form enterprises/{enterpriseId}/applications/{package_name}.
source

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

Create a builder to help you perform the following task:

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn’t support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.

§Arguments
  • name - The name of the operation resource to be cancelled.
source

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

Create a builder to help you perform the following task:

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

§Arguments
  • name - The name of the operation resource.
source

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

Create a builder to help you perform the following task:

Lists operations that match the specified filter in the request. If the server doesn’t support this method, it returns UNIMPLEMENTED.

§Arguments
  • name - The name of the operation’s parent resource.
source

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

Create a builder to help you perform the following task:

Deletes a device. This operation wipes the device. Deleted devices do not show up in enterprises.devices.list calls and a 404 is returned from enterprises.devices.get.

§Arguments
  • name - The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId}.
source

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

Create a builder to help you perform the following task:

Gets a device. Deleted devices will respond with a 404 error.

§Arguments
  • name - The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId}.
source

pub fn devices_issue_command( &self, request: Command, name: &str ) -> EnterpriseDeviceIssueCommandCall<'a, S>

Create a builder to help you perform the following task:

Issues a command to a device. The Operation resource returned contains a Command in its metadata field. Use the get operation method to get the status of the command.

§Arguments
  • request - No description provided.
  • name - The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId}.
source

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

Create a builder to help you perform the following task:

Lists devices for a given enterprise. Deleted devices are not returned in the response.

§Arguments
  • parent - The name of the enterprise in the form enterprises/{enterpriseId}.
source

pub fn devices_patch( &self, request: Device, name: &str ) -> EnterpriseDevicePatchCall<'a, S>

Create a builder to help you perform the following task:

Updates a device.

§Arguments
  • request - No description provided.
  • name - The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId}.
source

pub fn enrollment_tokens_create( &self, request: EnrollmentToken, parent: &str ) -> EnterpriseEnrollmentTokenCreateCall<'a, S>

Create a builder to help you perform the following task:

Creates an enrollment token for a given enterprise. It’s up to the caller’s responsibility to manage the lifecycle of newly created tokens and deleting them when they’re not intended to be used anymore. Once an enrollment token has been created, it’s not possible to retrieve the token’s content anymore using AM API. It is recommended for EMMs to securely store the token if it’s intended to be reused.

§Arguments
  • request - No description provided.
  • parent - The name of the enterprise in the form enterprises/{enterpriseId}.
source

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

Create a builder to help you perform the following task:

Deletes an enrollment token. This operation invalidates the token, preventing its future use.

§Arguments
  • name - The name of the enrollment token in the form enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId}.
source

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

Create a builder to help you perform the following task:

Gets an active, unexpired enrollment token. Only a partial view of EnrollmentToken is returned: all the fields but name and expiration_timestamp are empty. This method is meant to help manage active enrollment tokens lifecycle. For security reasons, it’s recommended to delete active enrollment tokens as soon as they’re not intended to be used anymore.

§Arguments
  • name - Required. The name of the enrollment token in the form enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId}.
source

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

Create a builder to help you perform the following task:

Lists active, unexpired enrollment tokens for a given enterprise. The list items contain only a partial view of EnrollmentToken: all the fields but name and expiration_timestamp are empty. This method is meant to help manage active enrollment tokens lifecycle. For security reasons, it’s recommended to delete active enrollment tokens as soon as they’re not intended to be used anymore.

§Arguments
  • parent - Required. The name of the enterprise in the form enterprises/{enterpriseId}.
source

pub fn migration_tokens_create( &self, request: MigrationToken, parent: &str ) -> EnterpriseMigrationTokenCreateCall<'a, S>

Create a builder to help you perform the following task:

Creates a migration token, to migrate an existing device from being managed by the EMM’s Device Policy Controller (DPC) to being managed by the Android Management API.

§Arguments
  • request - No description provided.
  • parent - Required. The enterprise in which this migration token will be created. Format: enterprises/{enterprise}
source

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

Create a builder to help you perform the following task:

Gets a migration token.

§Arguments
  • name - Required. The name of the migration token to retrieve. Format: enterprises/{enterprise}/migrationTokens/{migration_token}
source

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

Create a builder to help you perform the following task:

Lists migration tokens.

§Arguments
  • parent - Required. The enterprise which the migration tokens belong to. Format: enterprises/{enterprise}
source

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

Create a builder to help you perform the following task:

Deletes a policy. This operation is only permitted if no devices are currently referencing the policy.

§Arguments
  • name - The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId}.
source

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

Create a builder to help you perform the following task:

Gets a policy.

§Arguments
  • name - The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId}.
source

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

Create a builder to help you perform the following task:

Lists policies for a given enterprise.

§Arguments
  • parent - The name of the enterprise in the form enterprises/{enterpriseId}.
source

pub fn policies_patch( &self, request: Policy, name: &str ) -> EnterprisePolicyPatchCall<'a, S>

Create a builder to help you perform the following task:

Updates or creates a policy.

§Arguments
  • request - No description provided.
  • name - The name of the policy in the form enterprises/{enterpriseId}/policies/{policyId}.
source

pub fn web_apps_create( &self, request: WebApp, parent: &str ) -> EnterpriseWebAppCreateCall<'a, S>

Create a builder to help you perform the following task:

Creates a web app.

§Arguments
  • request - No description provided.
  • parent - The name of the enterprise in the form enterprises/{enterpriseId}.
source

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

Create a builder to help you perform the following task:

Deletes a web app.

§Arguments
  • name - The name of the web app in the form enterprises/{enterpriseId}/webApps/{packageName}.
source

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

Create a builder to help you perform the following task:

Gets a web app.

§Arguments
  • name - The name of the web app in the form enterprises/{enterpriseId}/webApp/{packageName}.
source

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

Create a builder to help you perform the following task:

Lists web apps for a given enterprise.

§Arguments
  • parent - The name of the enterprise in the form enterprises/{enterpriseId}.
source

pub fn web_apps_patch( &self, request: WebApp, name: &str ) -> EnterpriseWebAppPatchCall<'a, S>

Create a builder to help you perform the following task:

Updates a web app.

§Arguments
  • request - No description provided.
  • name - The name of the web app in the form enterprises/{enterpriseId}/webApps/{packageName}.
source

pub fn web_tokens_create( &self, request: WebToken, parent: &str ) -> EnterpriseWebTokenCreateCall<'a, S>

Create a builder to help you perform the following task:

Creates a web token to access an embeddable managed Google Play web UI for a given enterprise.

§Arguments
  • request - No description provided.
  • parent - The name of the enterprise in the form enterprises/{enterpriseId}.
source

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

Create a builder to help you perform the following task:

Creates an enterprise. This is the last step in the enterprise signup flow. See also: SigninDetail

§Arguments
  • request - No description provided.
source

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

Create a builder to help you perform the following task:

Permanently deletes an enterprise and all accounts and data associated with it. Warning: this will result in a cascaded deletion of all AM API devices associated with the deleted enterprise. Only available for EMM-managed enterprises.

§Arguments
  • name - The name of the enterprise in the form enterprises/{enterpriseId}.
source

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

Create a builder to help you perform the following task:

Gets an enterprise.

§Arguments
  • name - The name of the enterprise in the form enterprises/{enterpriseId}.
source

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

Create a builder to help you perform the following task:

Lists EMM-managed enterprises. Only BASIC fields are returned.

source

pub fn patch( &self, request: Enterprise, name: &str ) -> EnterprisePatchCall<'a, S>

Create a builder to help you perform the following task:

Updates an enterprise. See also: SigninDetail

§Arguments
  • request - No description provided.
  • name - The name of the enterprise in the form enterprises/{enterpriseId}.

Trait Implementations§

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

impl<'a, S> !UnwindSafe for EnterpriseMethods<'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