//! !!! DO NOT EDIT THIS FILE !!!
//!
//! This file is auto-generated by './generate-schema.sh' in the repository.
//! Please refer to the script code to learn how to update the source data.

#![allow(clippy::enum_variant_names)]
#![allow(clippy::missing_docs_in_private_items)]
#![allow(missing_docs)]
#![allow(non_snake_case)]

// Example code that deserializes and serializes the model.
// extern crate serde;
// #[macro_use]
// extern crate serde_derive;
// extern crate serde_json;
//
// use generated_module::FilesCompleteUploadExternalResponse;
//
// fn main() {
//     let json = r#"{"answer": 42}"#;
//     let model: FilesCompleteUploadExternalResponse = serde_json::from_str(&json).unwrap();
// }

use serde::{Deserialize, Serialize};
use std::collections::HashMap;

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct FilesCompleteUploadExternalResponse {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub files: Option<Vec<File>>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub needed: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub ok: Option<bool>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub provided: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub response_metadata: Option<ResponseMetadata>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct File {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub alt_txt: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub channels: Option<Vec<String>>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub comments_count: Option<i64>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub created: Option<i64>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub deanimate: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub deanimate_gif: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub display_as_bot: Option<bool>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub edit_link: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub editable: Option<bool>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub external_type: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub file_access: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub filetype: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub groups: Option<Vec<String>>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub has_more_shares: Option<bool>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub has_rich_preview: Option<bool>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub ims: Option<Vec<String>>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub is_external: Option<bool>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub is_public: Option<bool>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub is_starred: Option<bool>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub lines: Option<i64>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub lines_more: Option<i64>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub media_display_type: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub mimetype: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub mode: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub original_h: Option<i64>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub original_w: Option<i64>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub permalink: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub permalink_public: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub pretty_type: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub preview: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub preview_highlight: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub preview_is_truncated: Option<bool>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub public_url_shared: Option<bool>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub shares: Option<Shares>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub size: Option<i64>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub thumb_160: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub thumb_360: Option<String>,

    #[serde(rename = "thumb_360_gif")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub thumb_360__gif: Option<String>,

    #[serde(rename = "thumb_360_h")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub thumb_360__h: Option<i64>,

    #[serde(rename = "thumb_360_w")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub thumb_360__w: Option<i64>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub thumb_480: Option<String>,

    #[serde(rename = "thumb_480_gif")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub thumb_480__gif: Option<String>,

    #[serde(rename = "thumb_480_h")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub thumb_480__h: Option<i64>,

    #[serde(rename = "thumb_480_w")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub thumb_480__w: Option<i64>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub thumb_64: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub thumb_80: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub thumb_tiny: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub timestamp: Option<i64>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub url_private: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub url_private_download: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub user: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub user_team: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub username: Option<String>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Shares {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub public: Option<HashMap<String, Vec<Public>>>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Public {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub channel_name: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub latest_reply: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub reply_count: Option<i64>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub reply_users: Option<Vec<String>>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub reply_users_count: Option<i64>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub share_user_id: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub source: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub team_id: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub thread_ts: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub ts: Option<String>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ResponseMetadata {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub messages: Option<Vec<String>>,
}
