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

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

§Example

Instantiate a resource builder

extern crate hyper;
extern crate hyper_rustls;
extern crate google_alertcenter1_beta1 as alertcenter1_beta1;
 
use std::default::Default;
use alertcenter1_beta1::{AlertCenter, 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 = AlertCenter::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 `batch_delete(...)`, `batch_undelete(...)`, `delete(...)`, `feedback_create(...)`, `feedback_list(...)`, `get(...)`, `get_metadata(...)`, `list(...)` and `undelete(...)`
// to build up your call.
let rb = hub.alerts();

Implementations§

source§

impl<'a, S> AlertMethods<'a, S>

source

pub fn feedback_create( &self, request: AlertFeedback, alert_id: &str ) -> AlertFeedbackCreateCall<'a, S>

Create a builder to help you perform the following task:

Creates new feedback for an alert. Attempting to create a feedback for a non-existent alert returns NOT_FOUND error. Attempting to create a feedback for an alert that is marked for deletion returns `FAILED_PRECONDITION’ error.

§Arguments
  • request - No description provided.
  • alertId - Required. The identifier of the alert this feedback belongs to.
source

pub fn feedback_list(&self, alert_id: &str) -> AlertFeedbackListCall<'a, S>

Create a builder to help you perform the following task:

Lists all the feedback for an alert. Attempting to list feedbacks for a non-existent alert returns NOT_FOUND error.

§Arguments
  • alertId - Required. The alert identifier. The “-” wildcard could be used to represent all alerts.
source

pub fn batch_delete( &self, request: BatchDeleteAlertsRequest ) -> AlertBatchDeleteCall<'a, S>

Create a builder to help you perform the following task:

Performs batch delete operation on alerts.

§Arguments
  • request - No description provided.
source

pub fn batch_undelete( &self, request: BatchUndeleteAlertsRequest ) -> AlertBatchUndeleteCall<'a, S>

Create a builder to help you perform the following task:

Performs batch undelete operation on alerts.

§Arguments
  • request - No description provided.
source

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

Create a builder to help you perform the following task:

Marks the specified alert for deletion. An alert that has been marked for deletion is removed from Alert Center after 30 days. Marking an alert for deletion has no effect on an alert which has already been marked for deletion. Attempting to mark a nonexistent alert for deletion results in a NOT_FOUND error.

§Arguments
  • alertId - Required. The identifier of the alert to delete.
source

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

Create a builder to help you perform the following task:

Gets the specified alert. Attempting to get a nonexistent alert returns NOT_FOUND error.

§Arguments
  • alertId - Required. The identifier of the alert to retrieve.
source

pub fn get_metadata(&self, alert_id: &str) -> AlertGetMetadataCall<'a, S>

Create a builder to help you perform the following task:

Returns the metadata of an alert. Attempting to get metadata for a non-existent alert returns NOT_FOUND error.

§Arguments
  • alertId - Required. The identifier of the alert this metadata belongs to.
source

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

Create a builder to help you perform the following task:

Lists the alerts.

source

pub fn undelete( &self, request: UndeleteAlertRequest, alert_id: &str ) -> AlertUndeleteCall<'a, S>

Create a builder to help you perform the following task:

Restores, or “undeletes”, an alert that was marked for deletion within the past 30 days. Attempting to undelete an alert which was marked for deletion over 30 days ago (which has been removed from the Alert Center database) or a nonexistent alert returns a NOT_FOUND error. Attempting to undelete an alert which has not been marked for deletion has no effect.

§Arguments
  • request - No description provided.
  • alertId - Required. The identifier of the alert to undelete.

Trait Implementations§

source§

impl<'a, S> MethodsBuilder for AlertMethods<'a, S>

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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