pub struct CreateWebhookRequestBuilder { /* private fields */ }Expand description
Builder for CreateWebhookRequest.
Implementations§
Source§impl CreateWebhookRequestBuilder
impl CreateWebhookRequestBuilder
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Set webhook description.
Sourcepub fn webhook_url(self, url: impl Into<String>) -> Self
pub fn webhook_url(self, url: impl Into<String>) -> Self
Set webhook URL.
Sourcepub fn trigger_types(self, triggers: Vec<WebhookTrigger>) -> Self
pub fn trigger_types(self, triggers: Vec<WebhookTrigger>) -> Self
Set trigger types.
Sourcepub fn webhook_secret(self, secret: impl Into<String>) -> Self
pub fn webhook_secret(self, secret: impl Into<String>) -> Self
Set webhook secret for signature verification.
Sourcepub fn notification_email_addresses(self, emails: Vec<String>) -> Self
pub fn notification_email_addresses(self, emails: Vec<String>) -> Self
Set notification email addresses.
Sourcepub fn privacy_mode(self, mode: PrivacyMode) -> Self
pub fn privacy_mode(self, mode: PrivacyMode) -> Self
Set privacy mode.
§Example
use nylas_types::{CreateWebhookRequest, PrivacyMode, WebhookTrigger};
let privacy = PrivacyMode {
enabled: true,
redact_emails: true,
redact_bodies: true,
redact_names: false,
};
let request = CreateWebhookRequest::builder()
.webhook_url("https://example.com/webhook")
.trigger_types(vec![WebhookTrigger::MessageCreated])
.privacy_mode(privacy)
.build();Sourcepub fn build(self) -> CreateWebhookRequest
pub fn build(self) -> CreateWebhookRequest
Trait Implementations§
Source§impl Clone for CreateWebhookRequestBuilder
impl Clone for CreateWebhookRequestBuilder
Source§fn clone(&self) -> CreateWebhookRequestBuilder
fn clone(&self) -> CreateWebhookRequestBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateWebhookRequestBuilder
impl Debug for CreateWebhookRequestBuilder
Source§impl Default for CreateWebhookRequestBuilder
impl Default for CreateWebhookRequestBuilder
Source§fn default() -> CreateWebhookRequestBuilder
fn default() -> CreateWebhookRequestBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CreateWebhookRequestBuilder
impl RefUnwindSafe for CreateWebhookRequestBuilder
impl Send for CreateWebhookRequestBuilder
impl Sync for CreateWebhookRequestBuilder
impl Unpin for CreateWebhookRequestBuilder
impl UnsafeUnpin for CreateWebhookRequestBuilder
impl UnwindSafe for CreateWebhookRequestBuilder
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
Mutably borrows from an owned value. Read more