use crate::models::*;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ArtistBiography {
#[serde(rename = "attributes", default)]
pub attributes: ArtistBiographyAttributes,
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
pub relationships: Option<ArtistBiographyRelationships>,
#[serde(rename = "type")]
pub r#type: String,
}
impl ArtistBiography {
pub fn new(id: String, r#type: String) -> ArtistBiography {
ArtistBiography {
attributes: ArtistBiographyAttributes::default(),
id,
relationships: None,
r#type,
}
}
}
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ArtistBiographyAttributes {
#[serde(rename = "editable")]
pub editable: bool,
#[serde(rename = "text")]
pub text: String,
}
impl ArtistBiographyAttributes {
pub fn new(editable: bool, text: String) -> ArtistBiographyAttributes {
ArtistBiographyAttributes { editable, text }
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ArtistBiographyRelationships {
#[serde(rename = "owners")]
pub owners: MultiRelationship<ResourceIdentifier>,
}