tidalv2 0.3.0

Rust client library for TIDAL's v2 JSON:API - type-safe access to TIDAL's music catalog and streaming services
Documentation
/*
 * TIDAL API - Beta
 *
 * TIDAL API is a [JSON:API](https://jsonapi.org/) Web API that gives access to TIDAL functionality and data.
 *
 * The version of the OpenAPI document: 0.1.76
 *
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Links {
    #[serde(rename = "meta", skip_serializing_if = "Option::is_none")]
    pub meta: Option<models::LinksMeta>,
    /// Link to next page
    #[serde(rename = "next", skip_serializing_if = "Option::is_none")]
    pub next: Option<String>,
    /// Link to self
    #[serde(rename = "self")]
    pub param_self: String,
}

impl Links {
    pub fn new(param_self: String) -> Links {
        Links {
            meta: None,
            next: None,
            param_self,
        }
    }
}

/// LinksMeta : Non-standard meta information for links
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LinksMeta {
    /// Only cursor part of next link
    #[serde(rename = "nextCursor")]
    pub next_cursor: String,
}

impl LinksMeta {
    /// Non-standard meta information for links
    pub fn new(next_cursor: String) -> LinksMeta {
        LinksMeta { next_cursor }
    }
}