fastcomments-sdk 3.0.1

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 PendingCommentToSyncOutbound {
    #[serde(rename = "_id")]
    pub _id: String,
    #[serde(rename = "commentId")]
    pub comment_id: String,
    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
    pub comment: Option<Box<models::FComment>>,
    #[serde(rename = "externalId", deserialize_with = "Option::deserialize")]
    pub external_id: Option<String>,
    #[serde(rename = "createdAt")]
    pub created_at: chrono::DateTime<chrono::FixedOffset>,
    #[serde(rename = "tenantId")]
    pub tenant_id: String,
    #[serde(rename = "attemptCount")]
    pub attempt_count: f64,
    #[serde(rename = "nextAttemptAt")]
    pub next_attempt_at: chrono::DateTime<chrono::FixedOffset>,
    #[serde(rename = "eventType")]
    pub event_type: f64,
    #[serde(rename = "type")]
    pub r#type: f64,
    #[serde(rename = "domain")]
    pub domain: String,
    #[serde(rename = "lastError")]
    pub last_error: serde_json::Value,
    #[serde(rename = "webhookId", skip_serializing_if = "Option::is_none")]
    pub webhook_id: Option<String>,
}

impl PendingCommentToSyncOutbound {
    pub fn new(_id: String, comment_id: String, external_id: Option<String>, created_at: chrono::DateTime<chrono::FixedOffset>, tenant_id: String, attempt_count: f64, next_attempt_at: chrono::DateTime<chrono::FixedOffset>, event_type: f64, r#type: f64, domain: String, last_error: serde_json::Value) -> PendingCommentToSyncOutbound {
        PendingCommentToSyncOutbound {
            _id,
            comment_id,
            comment: None,
            external_id,
            created_at,
            tenant_id,
            attempt_count,
            next_attempt_at,
            event_type,
            r#type,
            domain,
            last_error,
            webhook_id: None,
        }
    }
}