late 0.0.1055

API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
Documentation
/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api  Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal.  Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).  Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
 *
 * The version of the OpenAPI document: 1.104.0
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetCommentAutomation200ResponseLogsInner {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "commentId", skip_serializing_if = "Option::is_none")]
    pub comment_id: Option<String>,
    #[serde(rename = "commenterId", skip_serializing_if = "Option::is_none")]
    pub commenter_id: Option<String>,
    #[serde(rename = "commenterName", skip_serializing_if = "Option::is_none")]
    pub commenter_name: Option<String>,
    #[serde(rename = "commentText", skip_serializing_if = "Option::is_none")]
    pub comment_text: Option<String>,
    /// Which door triggered this send. Absent on rows written before this field existed (all of those are comment-triggered).
    #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
    pub source: Option<Source>,
    /// DM outcome. 'pending' = the automation has a dmDelaySeconds and the response is queued but not sent yet. 'gated' = the follow-gate confirmation DM went out and we are waiting for the tap; it flips to 'sent' or 'skipped' when they tap.
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Status>,
    /// How the audience rule resolved. Absent on automations without one.
    #[serde(rename = "audienceOutcome", skip_serializing_if = "Option::is_none")]
    pub audience_outcome: Option<AudienceOutcome>,
    /// Follow relationship at decision time. Absent when Instagram would not tell us (the commenter never messaged the account).
    #[serde(
        rename = "commenterIsFollower",
        skip_serializing_if = "Option::is_none"
    )]
    pub commenter_is_follower: Option<bool>,
    #[serde(
        rename = "commenterFollowerCount",
        skip_serializing_if = "Option::is_none"
    )]
    pub commenter_follower_count: Option<i32>,
    /// DM error message if status is failed
    #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    #[serde(rename = "platformError", skip_serializing_if = "Option::is_none")]
    pub platform_error: Option<Box<models::GetCommentAutomation200ResponseLogsInnerPlatformError>>,
    /// True when the failed send spent the comment's single private reply (Instagram subcode 1545133 or 2534023, or Meta code 10900 on Instagram and Facebook), the same rule as `details.privateReplyConsumed` on the private-reply endpoint. Absent on direct DMs and on rows written before this field existed.
    #[serde(
        rename = "privateReplyConsumed",
        skip_serializing_if = "Option::is_none"
    )]
    pub private_reply_consumed: Option<bool>,
    /// Outcome of the optional public reply on the triggering comment. 'skipped' if no commentReply was configured or if the DM failed (the public reply is not attempted in that case).
    #[serde(rename = "commentReplyStatus", skip_serializing_if = "Option::is_none")]
    pub comment_reply_status: Option<CommentReplyStatus>,
    /// Public-reply error message if commentReplyStatus is failed
    #[serde(rename = "commentReplyError", skip_serializing_if = "Option::is_none")]
    pub comment_reply_error: Option<String>,
    /// When the next queued send fires. Present only while something is still pending.
    #[serde(rename = "nextDueAt", skip_serializing_if = "Option::is_none")]
    pub next_due_at: Option<String>,
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
}

impl GetCommentAutomation200ResponseLogsInner {
    pub fn new() -> GetCommentAutomation200ResponseLogsInner {
        GetCommentAutomation200ResponseLogsInner {
            id: None,
            comment_id: None,
            commenter_id: None,
            commenter_name: None,
            comment_text: None,
            source: None,
            status: None,
            audience_outcome: None,
            commenter_is_follower: None,
            commenter_follower_count: None,
            error: None,
            platform_error: None,
            private_reply_consumed: None,
            comment_reply_status: None,
            comment_reply_error: None,
            next_due_at: None,
            created_at: None,
        }
    }
}
/// Which door triggered this send. Absent on rows written before this field existed (all of those are comment-triggered).
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Source {
    #[serde(rename = "comment")]
    Comment,
    #[serde(rename = "story_reply")]
    StoryReply,
    #[serde(rename = "dm")]
    Dm,
}

impl Default for Source {
    fn default() -> Source {
        Self::Comment
    }
}
/// DM outcome. 'pending' = the automation has a dmDelaySeconds and the response is queued but not sent yet. 'gated' = the follow-gate confirmation DM went out and we are waiting for the tap; it flips to 'sent' or 'skipped' when they tap.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "pending")]
    Pending,
    #[serde(rename = "sent")]
    Sent,
    #[serde(rename = "failed")]
    Failed,
    #[serde(rename = "skipped")]
    Skipped,
    #[serde(rename = "gated")]
    Gated,
}

impl Default for Status {
    fn default() -> Status {
        Self::Pending
    }
}
/// How the audience rule resolved. Absent on automations without one.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AudienceOutcome {
    #[serde(rename = "passed")]
    Passed,
    #[serde(rename = "blocked")]
    Blocked,
    #[serde(rename = "gate_sent")]
    GateSent,
    #[serde(rename = "gate_passed")]
    GatePassed,
    #[serde(rename = "gate_failed")]
    GateFailed,
}

impl Default for AudienceOutcome {
    fn default() -> AudienceOutcome {
        Self::Passed
    }
}
/// Outcome of the optional public reply on the triggering comment. 'skipped' if no commentReply was configured or if the DM failed (the public reply is not attempted in that case).
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CommentReplyStatus {
    #[serde(rename = "sent")]
    Sent,
    #[serde(rename = "failed")]
    Failed,
    #[serde(rename = "skipped")]
    Skipped,
}

impl Default for CommentReplyStatus {
    fn default() -> CommentReplyStatus {
        Self::Sent
    }
}