pub struct EssentialContactsService { /* private fields */ }Expand description
Implements a client for the Essential Contacts API.
§Example
let client = EssentialContactsService::builder().build().await?;
// use `client` to make requests to the Essential Contacts API.§Service Description
Manages contacts for important Google Cloud notifications.
§Configuration
To configure EssentialContactsService use the with_* methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://essentialcontacts.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
EssentialContactsService holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap EssentialContactsService in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl EssentialContactsService
impl EssentialContactsService
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for EssentialContactsService.
let client = EssentialContactsService::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: EssentialContactsService + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: EssentialContactsService + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn create_contact(&self) -> CreateContact
pub fn create_contact(&self) -> CreateContact
Adds a new contact for a resource.
Sourcepub fn update_contact(&self) -> UpdateContact
pub fn update_contact(&self) -> UpdateContact
Updates a contact. Note: A contact’s email address cannot be changed.
Sourcepub fn list_contacts(&self) -> ListContacts
pub fn list_contacts(&self) -> ListContacts
Lists the contacts that have been set on a resource.
Sourcepub fn get_contact(&self) -> GetContact
pub fn get_contact(&self) -> GetContact
Gets a single contact.
Sourcepub fn delete_contact(&self) -> DeleteContact
pub fn delete_contact(&self) -> DeleteContact
Deletes a contact.
Sourcepub fn compute_contacts(&self) -> ComputeContacts
pub fn compute_contacts(&self) -> ComputeContacts
Lists all contacts for the resource that are subscribed to the specified notification categories, including contacts inherited from any parent resources.
Sourcepub fn send_test_message(&self) -> SendTestMessage
pub fn send_test_message(&self) -> SendTestMessage
Allows a contact admin to send a test message to contact to verify that it has been configured correctly.
Trait Implementations§
Source§impl Clone for EssentialContactsService
impl Clone for EssentialContactsService
Source§fn clone(&self) -> EssentialContactsService
fn clone(&self) -> EssentialContactsService
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more