/*
 * Pescheck API
 *
 * Official client library for the Pescheck API (v2), generated from the OpenAPI specification. Authenticate with OAuth2 client credentials and use the checks, profiles, screenings, webhooks and divisions endpoints. See https://github.com/pescheckit/pescheck-clients for installation and usage.
 *
 * The version of the OpenAPI document: 2.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// V2DocumentContent : How the file is delivered. `type` is the discriminator; today it is always `\"base64\"` and `data` holds the encoded bytes. Other delivery types may be added later without breaking this contract.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct V2DocumentContent {
    #[serde(rename = "type")]
    pub r#type: String,
    /// Base64-encoded file contents (type == base64).
    #[serde(rename = "data", skip_serializing_if = "Option::is_none")]
    pub data: Option<String>,
}

impl V2DocumentContent {
    /// How the file is delivered. `type` is the discriminator; today it is always `\"base64\"` and `data` holds the encoded bytes. Other delivery types may be added later without breaking this contract.
    pub fn new(r#type: String) -> V2DocumentContent {
        V2DocumentContent {
            r#type,
            data: None,
        }
    }
}

