zernio 0.0.76

API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
Documentation
/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
 *
 * The version of the OpenAPI document: 1.0.1
 * 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 GetMediaPresignedUrl200Response {
    /// Presigned URL to PUT your file to (expires in 1 hour)
    #[serde(rename = "uploadUrl", skip_serializing_if = "Option::is_none")]
    pub upload_url: Option<String>,
    /// Public URL where the file will be accessible after upload
    #[serde(rename = "publicUrl", skip_serializing_if = "Option::is_none")]
    pub public_url: Option<String>,
    /// Storage key/path of the file
    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
    pub key: Option<String>,
    /// Detected file type based on content type
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<Type>,
}

impl GetMediaPresignedUrl200Response {
    pub fn new() -> GetMediaPresignedUrl200Response {
        GetMediaPresignedUrl200Response {
            upload_url: None,
            public_url: None,
            key: None,
            r#type: None,
        }
    }
}
/// Detected file type based on content type
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "image")]
    Image,
    #[serde(rename = "video")]
    Video,
    #[serde(rename = "document")]
    Document,
}

impl Default for Type {
    fn default() -> Type {
        Self::Image
    }
}