/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
 *
 * The version of the OpenAPI document: 1.0.4
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SelectPinterestBoardRequest {
    /// Your Zernio profile ID
    #[serde(rename = "profileId")]
    pub profile_id: String,
    /// The Pinterest Board ID selected by the user
    #[serde(rename = "boardId")]
    pub board_id: String,
    /// The board name (for display purposes)
    #[serde(rename = "boardName", skip_serializing_if = "Option::is_none")]
    pub board_name: Option<String>,
    /// Temporary Pinterest access token from OAuth
    #[serde(rename = "tempToken")]
    pub temp_token: String,
    /// User profile data from OAuth redirect
    #[serde(rename = "userProfile", skip_serializing_if = "Option::is_none")]
    pub user_profile: Option<serde_json::Value>,
    /// Pinterest refresh token (if available)
    #[serde(rename = "refreshToken", skip_serializing_if = "Option::is_none")]
    pub refresh_token: Option<String>,
    /// Token expiration time in seconds
    #[serde(rename = "expiresIn", skip_serializing_if = "Option::is_none")]
    pub expires_in: Option<i32>,
    /// Custom redirect URL after connection completes
    #[serde(rename = "redirect_url", skip_serializing_if = "Option::is_none")]
    pub redirect_url: Option<String>,
}

impl SelectPinterestBoardRequest {
    pub fn new(
        profile_id: String,
        board_id: String,
        temp_token: String,
    ) -> SelectPinterestBoardRequest {
        SelectPinterestBoardRequest {
            profile_id,
            board_id,
            board_name: None,
            temp_token,
            user_profile: None,
            refresh_token: None,
            expires_in: None,
            redirect_url: None,
        }
    }
}
