pub struct NotificationChannelServiceClient<T> { /* private fields */ }
Expand description

The Notification Channel API provides access to configuration that controls how messages related to incidents are sent.

Implementations§

source§

impl<T> NotificationChannelServiceClient<T>
where T: GrpcService<BoxBody>, T::Error: Into<StdError>, T::ResponseBody: Body<Data = Bytes> + Send + 'static, <T::ResponseBody as Body>::Error: Into<StdError> + Send,

source

pub fn new(inner: T) -> Self

source

pub fn with_origin(inner: T, origin: Uri) -> Self

source

pub fn with_interceptor<F>( inner: T, interceptor: F ) -> NotificationChannelServiceClient<InterceptedService<T, F>>
where F: Interceptor, T::ResponseBody: Default, T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>, <T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,

source

pub fn send_compressed(self, encoding: CompressionEncoding) -> Self

Compress requests with the given encoding.

This requires the server to support it otherwise it might respond with an error.

source

pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self

Enable decompressing responses.

source

pub fn max_decoding_message_size(self, limit: usize) -> Self

Limits the maximum size of a decoded message.

Default: 4MB

source

pub fn max_encoding_message_size(self, limit: usize) -> Self

Limits the maximum size of an encoded message.

Default: usize::MAX

source

pub async fn list_notification_channel_descriptors( &mut self, request: impl IntoRequest<ListNotificationChannelDescriptorsRequest> ) -> Result<Response<ListNotificationChannelDescriptorsResponse>, Status>

Lists the descriptors for supported channel types. The use of descriptors makes it possible for new channel types to be dynamically added.

source

pub async fn get_notification_channel_descriptor( &mut self, request: impl IntoRequest<GetNotificationChannelDescriptorRequest> ) -> Result<Response<NotificationChannelDescriptor>, Status>

Gets a single channel descriptor. The descriptor indicates which fields are expected / permitted for a notification channel of the given type.

source

pub async fn list_notification_channels( &mut self, request: impl IntoRequest<ListNotificationChannelsRequest> ) -> Result<Response<ListNotificationChannelsResponse>, Status>

Lists the notification channels that have been created for the project. To list the types of notification channels that are supported, use the ListNotificationChannelDescriptors method.

source

pub async fn get_notification_channel( &mut self, request: impl IntoRequest<GetNotificationChannelRequest> ) -> Result<Response<NotificationChannel>, Status>

Gets a single notification channel. The channel includes the relevant configuration details with which the channel was created. However, the response may truncate or omit passwords, API keys, or other private key matter and thus the response may not be 100% identical to the information that was supplied in the call to the create method.

source

pub async fn create_notification_channel( &mut self, request: impl IntoRequest<CreateNotificationChannelRequest> ) -> Result<Response<NotificationChannel>, Status>

Creates a new notification channel, representing a single notification endpoint such as an email address, SMS number, or PagerDuty service.

Design your application to single-thread API calls that modify the state of notification channels in a single project. This includes calls to CreateNotificationChannel, DeleteNotificationChannel and UpdateNotificationChannel.

source

pub async fn update_notification_channel( &mut self, request: impl IntoRequest<UpdateNotificationChannelRequest> ) -> Result<Response<NotificationChannel>, Status>

Updates a notification channel. Fields not specified in the field mask remain unchanged.

Design your application to single-thread API calls that modify the state of notification channels in a single project. This includes calls to CreateNotificationChannel, DeleteNotificationChannel and UpdateNotificationChannel.

source

pub async fn delete_notification_channel( &mut self, request: impl IntoRequest<DeleteNotificationChannelRequest> ) -> Result<Response<()>, Status>

Deletes a notification channel.

Design your application to single-thread API calls that modify the state of notification channels in a single project. This includes calls to CreateNotificationChannel, DeleteNotificationChannel and UpdateNotificationChannel.

source

pub async fn send_notification_channel_verification_code( &mut self, request: impl IntoRequest<SendNotificationChannelVerificationCodeRequest> ) -> Result<Response<()>, Status>

Causes a verification code to be delivered to the channel. The code can then be supplied in VerifyNotificationChannel to verify the channel.

source

pub async fn get_notification_channel_verification_code( &mut self, request: impl IntoRequest<GetNotificationChannelVerificationCodeRequest> ) -> Result<Response<GetNotificationChannelVerificationCodeResponse>, Status>

Requests a verification code for an already verified channel that can then be used in a call to VerifyNotificationChannel() on a different channel with an equivalent identity in the same or in a different project. This makes it possible to copy a channel between projects without requiring manual reverification of the channel. If the channel is not in the verified state, this method will fail (in other words, this may only be used if the SendNotificationChannelVerificationCode and VerifyNotificationChannel paths have already been used to put the given channel into the verified state).

There is no guarantee that the verification codes returned by this method will be of a similar structure or form as the ones that are delivered to the channel via SendNotificationChannelVerificationCode; while VerifyNotificationChannel() will recognize both the codes delivered via SendNotificationChannelVerificationCode() and returned from GetNotificationChannelVerificationCode(), it is typically the case that the verification codes delivered via SendNotificationChannelVerificationCode() will be shorter and also have a shorter expiration (e.g. codes such as “G-123456”) whereas GetVerificationCode() will typically return a much longer, websafe base 64 encoded string that has a longer expiration time.

source

pub async fn verify_notification_channel( &mut self, request: impl IntoRequest<VerifyNotificationChannelRequest> ) -> Result<Response<NotificationChannel>, Status>

Verifies a NotificationChannel by proving receipt of the code delivered to the channel as a result of calling SendNotificationChannelVerificationCode.

Trait Implementations§

source§

impl<T: Clone> Clone for NotificationChannelServiceClient<T>

source§

fn clone(&self) -> NotificationChannelServiceClient<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for NotificationChannelServiceClient<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

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

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more