1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
* 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
}
}