pub struct CreateWebhookRequest {
pub channels: Vec<WebhookChannel>,
pub description: Option<String>,
pub disabled: Option<bool>,
pub filter: Option<String>,
pub filter_types: Vec<String>,
pub metadata: Map<String, Value>,
pub rate_limit: Option<i32>,
pub secret: Option<String>,
pub url: String,
}Expand description
Request to create a webhook endpoint
JSON schema
{
"description": "Request to create a webhook endpoint",
"type": "object",
"required": [
"url"
],
"properties": {
"channels": {
"description": "Webhook event channels to subscribe to",
"type": "array",
"items": {
"$ref": "#/components/schemas/WebhookChannel"
}
},
"description": {
"description": "Endpoint description",
"examples": [
"Webhook description"
],
"type": "string"
},
"disabled": {
"description": "Whether the endpoint is disabled",
"examples": [
false
],
"type": "boolean"
},
"filter": {
"description": "Event filter configuration",
"type": "string"
},
"filterTypes": {
"description": "Event type filters",
"type": "array",
"items": {
"type": "string"
}
},
"metadata": {
"description": "Endpoint metadata",
"examples": [
{
"key": "value"
}
],
"type": "object",
"additionalProperties": {}
},
"rateLimit": {
"description": "Rate limit for the endpoint",
"examples": [
1000
],
"type": "integer",
"format": "int32",
"minimum": 0.0
},
"secret": {
"description": "Endpoint signing secret",
"type": "string"
},
"url": {
"description": "Webhook destination URL",
"examples": [
"https://example.com"
],
"type": "string"
}
}
}Fields§
§channels: Vec<WebhookChannel>Webhook event channels to subscribe to
description: Option<String>Endpoint description
disabled: Option<bool>Whether the endpoint is disabled
filter: Option<String>Event filter configuration
filter_types: Vec<String>Event type filters
metadata: Map<String, Value>Endpoint metadata
rate_limit: Option<i32>Rate limit for the endpoint
secret: Option<String>Endpoint signing secret
url: StringWebhook destination URL
Implementations§
Source§impl CreateWebhookRequest
impl CreateWebhookRequest
pub fn builder() -> CreateWebhookRequest
Trait Implementations§
Source§impl Clone for CreateWebhookRequest
impl Clone for CreateWebhookRequest
Source§fn clone(&self) -> CreateWebhookRequest
fn clone(&self) -> CreateWebhookRequest
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 CreateWebhookRequest
impl Debug for CreateWebhookRequest
Source§impl<'de> Deserialize<'de> for CreateWebhookRequest
impl<'de> Deserialize<'de> for CreateWebhookRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&CreateWebhookRequest> for CreateWebhookRequest
impl From<&CreateWebhookRequest> for CreateWebhookRequest
Source§fn from(value: &CreateWebhookRequest) -> Self
fn from(value: &CreateWebhookRequest) -> Self
Converts to this type from the input type.
Source§impl From<CreateWebhookRequest> for CreateWebhookRequest
impl From<CreateWebhookRequest> for CreateWebhookRequest
Source§fn from(value: CreateWebhookRequest) -> Self
fn from(value: CreateWebhookRequest) -> Self
Converts to this type from the input type.
Source§impl Serialize for CreateWebhookRequest
impl Serialize for CreateWebhookRequest
Source§impl TryFrom<CreateWebhookRequest> for CreateWebhookRequest
impl TryFrom<CreateWebhookRequest> for CreateWebhookRequest
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: CreateWebhookRequest) -> Result<Self, ConversionError>
fn try_from(value: CreateWebhookRequest) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for CreateWebhookRequest
impl RefUnwindSafe for CreateWebhookRequest
impl Send for CreateWebhookRequest
impl Sync for CreateWebhookRequest
impl Unpin for CreateWebhookRequest
impl UnsafeUnpin for CreateWebhookRequest
impl UnwindSafe for CreateWebhookRequest
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