/*
 * Tribufu API
 *
 * API to access Tribufu services.
 *
 * The version of the OpenAPI document: 1.3.0
 * Contact: contact@tribufu.com
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CodeResponse {
    #[serde(rename = "code", deserialize_with = "Option::deserialize")]
    pub code: Option<String>,
    #[serde(rename = "state", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub state: Option<Option<String>>,
}

impl CodeResponse {
    pub fn new(code: Option<String>) -> CodeResponse {
        CodeResponse {
            code,
            state: None,
        }
    }
}

