prawn 0.0.3

Rust Client for the Tidal API providing comprehensive API coverag, and easy OAuth management
Documentation
/*
 * TIDAL API
 *
 * The TIDAL API is a [JSON:API](https://jsonapi.org/)–compliant web API that exposes TIDAL’s music, metadata, and user-related functionality through a consistent, resource-oriented design. More information and API management are available at [developer.tidal.com](developer.tidal.com)
 *
 * The version of the OpenAPI document: 1.0.36
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
#[serde(default)]
pub struct ArtworksAttributes {
    /// Artwork files
    #[serde(rename = "files")]
    pub files: Vec<models::ArtworkFile>,
    /// Media type of artwork files
    #[serde(rename = "mediaType")]
    pub media_type: MediaType,
    #[serde(rename = "sourceFile", skip_serializing_if = "Option::is_none")]
    pub source_file: Option<Box<models::ArtworkSourceFile>>,
}

impl ArtworksAttributes {
    pub fn new(files: Vec<models::ArtworkFile>, media_type: MediaType) -> ArtworksAttributes {
        ArtworksAttributes {
            files,
            media_type,
            source_file: None,
        }
    }
}
/// Media type of artwork files
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum MediaType {
    #[serde(rename = "IMAGE")]
    Image,
    #[serde(rename = "VIDEO")]
    Video,
}

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