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 ArtistClaimsAttributes {
    /// The artist id which is being claimed
    #[serde(rename = "artistId")]
    pub artist_id: String,
    /// Artist claim links external to TIDAL API
    #[serde(rename = "externalLinks", skip_serializing_if = "Option::is_none")]
    pub external_links: Option<Vec<models::ExternalLink>>,
    /// The DSP used for authentication
    #[serde(rename = "provider")]
    pub provider: Provider,
    /// The recommended claim resolution
    #[serde(rename = "recommendation", skip_serializing_if = "Option::is_none")]
    pub recommendation: Option<Recommendation>,
    /// List of UPCs retrieved from the DSP
    #[serde(rename = "retrievedUpcs", skip_serializing_if = "Option::is_none")]
    pub retrieved_upcs: Option<Vec<models::BarcodeId>>,
    /// Current status of this claim
    #[serde(rename = "status")]
    pub status: Status,
}

impl ArtistClaimsAttributes {
    pub fn new(artist_id: String, provider: Provider, status: Status) -> ArtistClaimsAttributes {
        ArtistClaimsAttributes {
            artist_id,
            external_links: None,
            provider,
            recommendation: None,
            retrieved_upcs: None,
            status,
        }
    }
}
/// The DSP used for authentication
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Provider {
    #[serde(rename = "DISTROKID")]
    Distrokid,
    #[serde(rename = "CDBABY")]
    Cdbaby,
    #[serde(rename = "TUNECORE")]
    Tunecore,
}

impl Default for Provider {
    fn default() -> Provider {
        Self::Distrokid
    }
}
/// The recommended claim resolution
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Recommendation {
    #[serde(rename = "CLAIM_PROFILE")]
    ClaimProfile,
    #[serde(rename = "CLAIM_CONTENT")]
    ClaimContent,
}

impl Default for Recommendation {
    fn default() -> Recommendation {
        Self::ClaimProfile
    }
}
/// Current status of this claim
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "AWAITING_OAUTH")]
    AwaitingOauth,
    #[serde(rename = "FETCHING_CONTENT")]
    FetchingContent,
    #[serde(rename = "VERIFIED")]
    Verified,
    #[serde(rename = "NO_MATCHES")]
    NoMatches,
    #[serde(rename = "AUTHENTICATION_FAILED")]
    AuthenticationFailed,
    #[serde(rename = "PROCESSING")]
    Processing,
    #[serde(rename = "COMPLETED")]
    Completed,
    #[serde(rename = "FAILED")]
    Failed,
    #[serde(rename = "CANCELLED")]
    Cancelled,
}

impl Default for Status {
    fn default() -> Status {
        Self::AwaitingOauth
    }
}