doppler-rs 0.0.1

Unofficial client library for the Doppler API - secure secrets management platform
Documentation
/*
 * Core
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0-oas3.1
 * 
 * Generated by: https://openapi-generator.tech
 */

/*
 * Core
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0-oas3.1
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};
use chrono::{DateTime, NaiveDate, Utc};
/// CreateSyncRequest
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateSyncRequest {
    /// The integration slug which the sync will use
    #[serde(rename = "integration")]
    pub integration: String ,
    /// Configuration data for the sync
    #[serde(rename = "data")]
    pub data: serde_json::Value ,
    /// An option indicating if and how Doppler should attempt to import secrets from the sync destination
    /// An option indicating if and how Doppler should attempt to import secrets from the sync destination
    /// An option indicating if and how Doppler should attempt to import secrets from the sync destination
    /// An option indicating if and how Doppler should attempt to import secrets from the sync destination
    #[serde(rename = "import_option", skip_serializing_if = "Option::is_none")]
    pub import_option: Option<String >,
    /// Causes sync creation to wait for the initial sync to complete before returning.
    #[serde(rename = "await_initial_sync", skip_serializing_if = "Option::is_none")]
    pub await_initial_sync: Option<bool >,
}

impl CreateSyncRequest {
    pub fn new(integration: String , data: serde_json::Value ) -> CreateSyncRequest {
        CreateSyncRequest {
            integration: integration,
            data: data,
            import_option: Some("None".to_string()),
            await_initial_sync: Some(false),
        }
    }
}
/// An option indicating if and how Doppler should attempt to import secrets from the sync destination
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ImportOption {
    #[serde(rename = "none")]
    /// An option indicating if and how Doppler should attempt to import secrets from the sync destination
    None,
    #[serde(rename = "prefer_doppler")]
    /// An option indicating if and how Doppler should attempt to import secrets from the sync destination
    PreferDoppler,
    #[serde(rename = "prefer_integration")]
    /// An option indicating if and how Doppler should attempt to import secrets from the sync destination
    PreferIntegration,
}

impl Default for ImportOption {
    fn default() -> ImportOption {
        Self::None
    }
}