Struct google_api_proto::google::monitoring::v3::notification_channel_service_client::NotificationChannelServiceClient
source · 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,
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,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
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,
sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
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.
sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
sourcepub async fn list_notification_channel_descriptors(
&mut self,
request: impl IntoRequest<ListNotificationChannelDescriptorsRequest>,
) -> Result<Response<ListNotificationChannelDescriptorsResponse>, Status>
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.
sourcepub async fn get_notification_channel_descriptor(
&mut self,
request: impl IntoRequest<GetNotificationChannelDescriptorRequest>,
) -> Result<Response<NotificationChannelDescriptor>, Status>
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.
sourcepub async fn list_notification_channels(
&mut self,
request: impl IntoRequest<ListNotificationChannelsRequest>,
) -> Result<Response<ListNotificationChannelsResponse>, Status>
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.
sourcepub async fn get_notification_channel(
&mut self,
request: impl IntoRequest<GetNotificationChannelRequest>,
) -> Result<Response<NotificationChannel>, Status>
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.
sourcepub async fn create_notification_channel(
&mut self,
request: impl IntoRequest<CreateNotificationChannelRequest>,
) -> Result<Response<NotificationChannel>, Status>
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.
sourcepub async fn update_notification_channel(
&mut self,
request: impl IntoRequest<UpdateNotificationChannelRequest>,
) -> Result<Response<NotificationChannel>, Status>
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.
sourcepub async fn delete_notification_channel(
&mut self,
request: impl IntoRequest<DeleteNotificationChannelRequest>,
) -> Result<Response<()>, Status>
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.
sourcepub async fn send_notification_channel_verification_code(
&mut self,
request: impl IntoRequest<SendNotificationChannelVerificationCodeRequest>,
) -> Result<Response<()>, Status>
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.
sourcepub async fn get_notification_channel_verification_code(
&mut self,
request: impl IntoRequest<GetNotificationChannelVerificationCodeRequest>,
) -> Result<Response<GetNotificationChannelVerificationCodeResponse>, Status>
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.
sourcepub async fn verify_notification_channel(
&mut self,
request: impl IntoRequest<VerifyNotificationChannelRequest>,
) -> Result<Response<NotificationChannel>, Status>
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>
impl<T: Clone> Clone for NotificationChannelServiceClient<T>
source§fn clone(&self) -> NotificationChannelServiceClient<T>
fn clone(&self) -> NotificationChannelServiceClient<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<T> !Freeze for NotificationChannelServiceClient<T>
impl<T> RefUnwindSafe for NotificationChannelServiceClient<T>where
T: RefUnwindSafe,
impl<T> Send for NotificationChannelServiceClient<T>where
T: Send,
impl<T> Sync for NotificationChannelServiceClient<T>where
T: Sync,
impl<T> Unpin for NotificationChannelServiceClient<T>where
T: Unpin,
impl<T> UnwindSafe for NotificationChannelServiceClient<T>where
T: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request