pub struct Customers {
pub client: Client,
}
Fields§
§client: Client
Implementations§
Source§impl Customers
impl Customers
Sourcepub async fn get(
&self,
customer_key: &str,
) -> Result<Response<Customer>, ClientError>
pub async fn get( &self, customer_key: &str, ) -> Result<Response<Customer>, ClientError>
This function performs a GET
to the /admin/directory/v1/customers/{customerKey}
endpoint.
Retrieves a customer.
Parameters:
customer_key: &str
– Id of the customer to be retrieved.
Sourcepub async fn update(
&self,
customer_key: &str,
body: &Customer,
) -> Result<Response<Customer>, ClientError>
pub async fn update( &self, customer_key: &str, body: &Customer, ) -> Result<Response<Customer>, ClientError>
This function performs a PUT
to the /admin/directory/v1/customers/{customerKey}
endpoint.
Updates a customer.
Parameters:
customer_key: &str
– Id of the customer to be updated.
Sourcepub async fn patch(
&self,
customer_key: &str,
body: &Customer,
) -> Result<Response<Customer>, ClientError>
pub async fn patch( &self, customer_key: &str, body: &Customer, ) -> Result<Response<Customer>, ClientError>
This function performs a PATCH
to the /admin/directory/v1/customers/{customerKey}
endpoint.
Patches a customer.
Parameters:
customer_key: &str
– Id of the customer to be updated.
Sourcepub async fn admin_chrome_printers_get(
&self,
name: &str,
) -> Result<Response<Printer>, ClientError>
pub async fn admin_chrome_printers_get( &self, name: &str, ) -> Result<Response<Printer>, ClientError>
This function performs a GET
to the /admin/directory/v1/{name}
endpoint.
Returns a Printer
resource (printer’s config).
Parameters:
name: &str
– Required. The name of the printer to retrieve. Format: customers/{customer_id}/chrome/printers/{printer_id}.
Sourcepub async fn admin_chrome_printers_delete(
&self,
name: &str,
) -> Result<Response<Empty>, ClientError>
pub async fn admin_chrome_printers_delete( &self, name: &str, ) -> Result<Response<Empty>, ClientError>
This function performs a DELETE
to the /admin/directory/v1/{name}
endpoint.
Deletes a Printer
.
Parameters:
name: &str
– Required. The name of the printer to be updated. Format: customers/{customer_id}/chrome/printers/{printer_id}.
Sourcepub async fn admin_chrome_printers_patch(
&self,
name: &str,
clear_mask: &str,
update_mask: &str,
body: &Printer,
) -> Result<Response<Printer>, ClientError>
pub async fn admin_chrome_printers_patch( &self, name: &str, clear_mask: &str, update_mask: &str, body: &Printer, ) -> Result<Response<Printer>, ClientError>
This function performs a PATCH
to the /admin/directory/v1/{name}
endpoint.
Updates a Printer
resource.
Parameters:
name: &str
– The resource name of the Printer object, in the format customers/{customer-id}/printers/{printer-id} (During printer creation leave empty).clear_mask: &str
– The list of fields to be cleared. Note, some of the fields are read only and cannot be updated. Values for not specified fields will be patched.update_mask: &str
– The list of fields to be updated. Note, some of the fields are read only and cannot be updated. Values for not specified fields will be patched.
Sourcepub async fn admin_chrome_printers_list(
&self,
parent: &str,
filter: &str,
org_unit_id: &str,
page_size: i64,
page_token: &str,
) -> Result<Response<Vec<Printer>>, ClientError>
pub async fn admin_chrome_printers_list( &self, parent: &str, filter: &str, org_unit_id: &str, page_size: i64, page_token: &str, ) -> Result<Response<Vec<Printer>>, ClientError>
This function performs a GET
to the /admin/directory/v1/{parent}/chrome/printers
endpoint.
List printers configs.
Parameters:
parent: &str
– Required. The name of the customer who owns this collection of printers. Format: customers/{customer_id}.filter: &str
– Search query. Search syntax is shared between this api and Admin Console printers pages.org_unit_id: &str
– Organization Unit that we want to list the printers for. When org_unit is not present in the request then all printers of the customer are returned (or filtered). When org_unit is present in the request then only printers available to this OU will be returned (owned or inherited). You may see if printer is owned or inherited for this OU by looking at Printer.org_unit_id.page_size: i64
– The maximum number of objects to return. The service may return fewer than this value.page_token: &str
– A page token, received from a previous call.
Sourcepub async fn admin_chrome_printers_list_all(
&self,
parent: &str,
filter: &str,
org_unit_id: &str,
) -> Result<Response<Vec<Printer>>, ClientError>
pub async fn admin_chrome_printers_list_all( &self, parent: &str, filter: &str, org_unit_id: &str, ) -> Result<Response<Vec<Printer>>, ClientError>
This function performs a GET
to the /admin/directory/v1/{parent}/chrome/printers
endpoint.
As opposed to admin_chrome_printers_list
, this function returns all the pages of the request at once.
List printers configs.
Sourcepub async fn admin_chrome_printers_create(
&self,
parent: &str,
body: &Printer,
) -> Result<Response<Printer>, ClientError>
pub async fn admin_chrome_printers_create( &self, parent: &str, body: &Printer, ) -> Result<Response<Printer>, ClientError>
This function performs a POST
to the /admin/directory/v1/{parent}/chrome/printers
endpoint.
Creates a printer under given Organization Unit.
Parameters:
parent: &str
– Required. The name of the customer. Format: customers/{customer_id}.
Sourcepub async fn admin_chrome_printers_batch_create(
&self,
parent: &str,
body: &BatchCreatePrintersRequest,
) -> Result<Response<BatchCreatePrintersResponse>, ClientError>
pub async fn admin_chrome_printers_batch_create( &self, parent: &str, body: &BatchCreatePrintersRequest, ) -> Result<Response<BatchCreatePrintersResponse>, ClientError>
This function performs a POST
to the /admin/directory/v1/{parent}/chrome/printers:batchCreatePrinters
endpoint.
Creates printers under given Organization Unit.
Parameters:
parent: &str
– Required. The name of the customer. Format: customers/{customer_id}.
Sourcepub async fn admin_chrome_printers_batch_delete(
&self,
parent: &str,
body: &BatchDeletePrintersRequest,
) -> Result<Response<BatchDeletePrintersResponse>, ClientError>
pub async fn admin_chrome_printers_batch_delete( &self, parent: &str, body: &BatchDeletePrintersRequest, ) -> Result<Response<BatchDeletePrintersResponse>, ClientError>
This function performs a POST
to the /admin/directory/v1/{parent}/chrome/printers:batchDeletePrinters
endpoint.
Deletes printers in batch.
Parameters:
parent: &str
– Required. The name of the customer. Format: customers/{customer_id}.
Sourcepub async fn admin_chrome_printers_list_printer_models(
&self,
parent: &str,
filter: &str,
page_size: i64,
page_token: &str,
) -> Result<Response<Vec<PrinterModel>>, ClientError>
pub async fn admin_chrome_printers_list_printer_models( &self, parent: &str, filter: &str, page_size: i64, page_token: &str, ) -> Result<Response<Vec<PrinterModel>>, ClientError>
This function performs a GET
to the /admin/directory/v1/{parent}/chrome/printers:listPrinterModels
endpoint.
Lists the supported printer models.
Parameters:
parent: &str
– Required. The name of the customer who owns this collection of printers. Format: customers/{customer_id}.filter: &str
– Filer to list only models by a given manufacturer in format: “manufacturer:Brother”. Search syntax is shared between this api and Admin Console printers pages.page_size: i64
– The maximum number of objects to return. The service may return fewer than this value.page_token: &str
– A page token, received from a previous call.
Sourcepub async fn admin_chrome_printers_list_all_printer_models(
&self,
parent: &str,
filter: &str,
) -> Result<Response<Vec<PrinterModel>>, ClientError>
pub async fn admin_chrome_printers_list_all_printer_models( &self, parent: &str, filter: &str, ) -> Result<Response<Vec<PrinterModel>>, ClientError>
This function performs a GET
to the /admin/directory/v1/{parent}/chrome/printers:listPrinterModels
endpoint.
As opposed to admin_chrome_printers_list_printer_models
, this function returns all the pages of the request at once.
Lists the supported printer models.
Auto Trait Implementations§
impl Freeze for Customers
impl !RefUnwindSafe for Customers
impl Send for Customers
impl Sync for Customers
impl Unpin for Customers
impl !UnwindSafe for Customers
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