late 0.0.1055

API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
Documentation
/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api  Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal.  Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).  Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
 *
 * The version of the OpenAPI document: 1.104.0
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

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

/// TikTokPlatformDataMusicSoundInfo : Commercial Music Library track to attach. Accounts connected through the TikTok for Business app only: a developer-app account rejects the post at publish time with a message that says so. Pick musicSoundId from GET /v1/accounts/{accountId}/tiktok/commercial-music. Ignored on drafts, where TikTok ignores every post_info field.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TikTokPlatformDataMusicSoundInfo {
    /// The id field of a track from GET /v1/accounts/{accountId}/tiktok/commercial-music (a song clip id). TikTok fails the publish with a generic 51065 when given the commercial music id instead.
    #[serde(rename = "musicSoundId")]
    pub music_sound_id: String,
    /// Track volume. TikTok defaults an omitted volume to 0, which publishes the track silently, so we default to the app's 50. Video posts only.
    #[serde(rename = "musicSoundVolume", skip_serializing_if = "Option::is_none")]
    pub music_sound_volume: Option<i32>,
    /// Start point of the track in milliseconds (default 0). Video posts only.
    #[serde(rename = "musicSoundStart", skip_serializing_if = "Option::is_none")]
    pub music_sound_start: Option<i32>,
    /// End point of the track in milliseconds (default: the video length). Must be greater than musicSoundStart. Video posts only.
    #[serde(rename = "musicSoundEnd", skip_serializing_if = "Option::is_none")]
    pub music_sound_end: Option<i32>,
}

impl TikTokPlatformDataMusicSoundInfo {
    /// Commercial Music Library track to attach. Accounts connected through the TikTok for Business app only: a developer-app account rejects the post at publish time with a message that says so. Pick musicSoundId from GET /v1/accounts/{accountId}/tiktok/commercial-music. Ignored on drafts, where TikTok ignores every post_info field.
    pub fn new(music_sound_id: String) -> TikTokPlatformDataMusicSoundInfo {
        TikTokPlatformDataMusicSoundInfo {
            music_sound_id,
            music_sound_volume: None,
            music_sound_start: None,
            music_sound_end: None,
        }
    }
}