diff --git a/api/src/resources/integration.rs b/api/src/resources/integration.rs
index 88890c9..ec7ab9d 100644
--- a/api/src/resources/integration.rs
+++ b/api/src/resources/integration.rs
@@ -7,8 +7,10 @@ use crate::{Email, ProjectName};
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub struct NewIntegration {
- pub title: Title,
- pub enabled: bool,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub title: Option
,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub enabled: Option,
pub configuration: Configuration,
}
@@ -66,6 +68,7 @@ pub enum DisabledReason {
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub struct Configuration {
+ #[serde(skip_serializing_if = "Option::is_none")]
pub connection: Option,
pub mailboxes: Vec,
}
@@ -74,7 +77,9 @@ pub struct Configuration {
pub struct Connection {
access: AccessType,
application: ApplicationType,
+ #[serde(skip_serializing_if = "Option::is_none")]
ews_endpoint: Option,
+ #[serde(skip_serializing_if = "Option::is_none")]
build_version: Option,
}
@@ -103,15 +108,23 @@ pub struct CustomApplicationConfig {
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub struct Mailbox {
+ #[serde(skip_serializing_if = "Option::is_none")]
pub disabled_reason: Option,
pub email: Email,
pub enabled: bool,
+ #[serde(skip_serializing_if = "Option::is_none")]
pub folder_allowlist: Option>>,
+ #[serde(skip_serializing_if = "Option::is_none")]
pub folder_denylist: Option>>,
+ #[serde(skip_serializing_if = "Option::is_none")]
pub participant_allowlist: Option>,
+ #[serde(skip_serializing_if = "Option::is_none")]
pub participant_denylist: Option>,
+ #[serde(skip_serializing_if = "Option::is_none")]
pub participant_domain_allowlist: Option>,
+ #[serde(skip_serializing_if = "Option::is_none")]
pub participant_domain_denylist: Option>,
+ #[serde(skip_serializing_if = "Option::is_none")]
pub start_timestamp: Option>,
pub bucket_specification: BucketSpecification,
}