fastcomments-sdk 3.0.0

Official FastComments Rust SDK (Typed API Client & Utilities)
Documentation
/*
 * fastcomments
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 0.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::client::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ApiDomainConfiguration {
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "domain")]
    pub domain: String,
    #[serde(rename = "emailFromName", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub email_from_name: Option<Option<String>>,
    #[serde(rename = "emailFromEmail", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub email_from_email: Option<Option<String>>,
    /// Construct a type with a set of properties K of type T
    #[serde(rename = "emailHeaders", skip_serializing_if = "Option::is_none")]
    pub email_headers: Option<std::collections::HashMap<String, String>>,
    #[serde(rename = "wpSyncToken", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub wp_sync_token: Option<Option<String>>,
    #[serde(rename = "wpSynced", skip_serializing_if = "Option::is_none")]
    pub wp_synced: Option<bool>,
    #[serde(rename = "wpURL", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub wp_url: Option<Option<String>>,
    #[serde(rename = "createdAt")]
    pub created_at: chrono::DateTime<chrono::FixedOffset>,
    #[serde(rename = "autoAddedDate", skip_serializing_if = "Option::is_none")]
    pub auto_added_date: Option<chrono::DateTime<chrono::FixedOffset>>,
    #[serde(rename = "siteType", skip_serializing_if = "Option::is_none")]
    pub site_type: Option<models::ImportedSiteType>,
    #[serde(rename = "logoSrc", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub logo_src: Option<Option<String>>,
    #[serde(rename = "logoSrc100px", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub logo_src100px: Option<Option<String>>,
    #[serde(rename = "footerUnsubscribeURL", skip_serializing_if = "Option::is_none")]
    pub footer_unsubscribe_url: Option<String>,
    #[serde(rename = "disableUnsubscribeLinks", skip_serializing_if = "Option::is_none")]
    pub disable_unsubscribe_links: Option<bool>,
}

impl ApiDomainConfiguration {
    pub fn new(id: String, domain: String, created_at: chrono::DateTime<chrono::FixedOffset>) -> ApiDomainConfiguration {
        ApiDomainConfiguration {
            id,
            domain,
            email_from_name: None,
            email_from_email: None,
            email_headers: None,
            wp_sync_token: None,
            wp_synced: None,
            wp_url: None,
            created_at,
            auto_added_date: None,
            site_type: None,
            logo_src: None,
            logo_src100px: None,
            footer_unsubscribe_url: None,
            disable_unsubscribe_links: None,
        }
    }
}