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 UsersAttributes {
    /// ISO 3166-1 alpha-2 country code
    #[serde(rename = "country")]
    pub country: String,
    /// email address
    #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
    pub email: Option<String>,
    /// Is the email verified
    #[serde(rename = "emailVerified", skip_serializing_if = "Option::is_none")]
    pub email_verified: Option<bool>,
    /// Users first name
    #[serde(rename = "firstName", skip_serializing_if = "Option::is_none")]
    pub first_name: Option<String>,
    /// Users last name
    #[serde(rename = "lastName", skip_serializing_if = "Option::is_none")]
    pub last_name: Option<String>,
    /// Users nostr public key
    #[serde(rename = "nostrPublicKey", skip_serializing_if = "Option::is_none")]
    pub nostr_public_key: Option<String>,
    /// user name
    #[serde(rename = "username")]
    pub username: String,
}

impl UsersAttributes {
    pub fn new(country: String, username: String) -> UsersAttributes {
        UsersAttributes {
            country,
            email: None,
            email_verified: None,
            first_name: None,
            last_name: None,
            nostr_public_key: None,
            username,
        }
    }
}