pub struct PatchedBulkWritableWebhookRequest {Show 15 fields
pub id: Uuid,
pub content_types: Option<Vec<String>>,
pub name: Option<String>,
pub type_create: Option<bool>,
pub type_update: Option<bool>,
pub type_delete: Option<bool>,
pub payload_url: Option<String>,
pub enabled: Option<bool>,
pub http_method: Option<HttpMethodEnum>,
pub http_content_type: Option<String>,
pub additional_headers: Option<String>,
pub body_template: Option<String>,
pub secret: Option<String>,
pub ssl_verification: Option<bool>,
pub ca_file_path: Option<String>,
}Expand description
PatchedBulkWritableWebhookRequest : Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during validation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)
Fields§
§id: Uuid§content_types: Option<Vec<String>>§name: Option<String>§type_create: Option<bool>Call this webhook when a matching object is created.
type_update: Option<bool>Call this webhook when a matching object is updated.
type_delete: Option<bool>Call this webhook when a matching object is deleted.
payload_url: Option<String>A POST will be sent to this URL when the webhook is called.
enabled: Option<bool>§http_method: Option<HttpMethodEnum>§http_content_type: Option<String>The complete list of official content types is available here (https://www.iana.org/assignments/media-types/media-types.xhtml).
additional_headers: Option<String>User-supplied HTTP headers to be sent with the request in addition to the HTTP content type. Headers should be defined in the format Name: Value. Jinja2 template processing is supported with the same context as the request body (below).
body_template: Option<String>Jinja2 template for a custom request body. If blank, a JSON object representing the change will be included. Available context data includes: event, model, timestamp, username, request_id, and data.
secret: Option<String>When provided, the request will include a ‘X-Hook-Signature’ header containing a HMAC hex digest of the payload body using the secret as the key. The secret is not transmitted in the request.
ssl_verification: Option<bool>Enable SSL certificate verification. Disable with caution!
ca_file_path: Option<String>The specific CA certificate file to use for SSL verification. Leave blank to use the system defaults.
Implementations§
Source§impl PatchedBulkWritableWebhookRequest
impl PatchedBulkWritableWebhookRequest
Sourcepub fn new(id: Uuid) -> PatchedBulkWritableWebhookRequest
pub fn new(id: Uuid) -> PatchedBulkWritableWebhookRequest
Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during validation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)
Trait Implementations§
Source§impl Clone for PatchedBulkWritableWebhookRequest
impl Clone for PatchedBulkWritableWebhookRequest
Source§fn clone(&self) -> PatchedBulkWritableWebhookRequest
fn clone(&self) -> PatchedBulkWritableWebhookRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for PatchedBulkWritableWebhookRequest
impl Default for PatchedBulkWritableWebhookRequest
Source§fn default() -> PatchedBulkWritableWebhookRequest
fn default() -> PatchedBulkWritableWebhookRequest
Source§impl<'de> Deserialize<'de> for PatchedBulkWritableWebhookRequest
impl<'de> Deserialize<'de> for PatchedBulkWritableWebhookRequest
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>,
Source§impl PartialEq for PatchedBulkWritableWebhookRequest
impl PartialEq for PatchedBulkWritableWebhookRequest
Source§fn eq(&self, other: &PatchedBulkWritableWebhookRequest) -> bool
fn eq(&self, other: &PatchedBulkWritableWebhookRequest) -> bool
self and other values to be equal, and is used by ==.