doppler_rs/models/create_sync_request.rs
1/*
2 * Core
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.0.0-oas3.1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/*
12 * Core
13 *
14 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
15 *
16 * The version of the OpenAPI document: 1.0.0-oas3.1
17 *
18 * Generated by: https://openapi-generator.tech
19 */
20
21use crate::models;
22use serde::{Deserialize, Serialize};
23use chrono::{DateTime, NaiveDate, Utc};
24/// CreateSyncRequest
25#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
26pub struct CreateSyncRequest {
27 /// The integration slug which the sync will use
28 #[serde(rename = "integration")]
29 pub integration: String ,
30 /// Configuration data for the sync
31 #[serde(rename = "data")]
32 pub data: serde_json::Value ,
33 /// An option indicating if and how Doppler should attempt to import secrets from the sync destination
34 /// An option indicating if and how Doppler should attempt to import secrets from the sync destination
35 /// An option indicating if and how Doppler should attempt to import secrets from the sync destination
36 /// An option indicating if and how Doppler should attempt to import secrets from the sync destination
37 #[serde(rename = "import_option", skip_serializing_if = "Option::is_none")]
38 pub import_option: Option<String >,
39 /// Causes sync creation to wait for the initial sync to complete before returning.
40 #[serde(rename = "await_initial_sync", skip_serializing_if = "Option::is_none")]
41 pub await_initial_sync: Option<bool >,
42}
43
44impl CreateSyncRequest {
45 pub fn new(integration: String , data: serde_json::Value ) -> CreateSyncRequest {
46 CreateSyncRequest {
47 integration: integration,
48 data: data,
49 import_option: Some("None".to_string()),
50 await_initial_sync: Some(false),
51 }
52 }
53}
54/// An option indicating if and how Doppler should attempt to import secrets from the sync destination
55#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
56pub enum ImportOption {
57 #[serde(rename = "none")]
58 /// An option indicating if and how Doppler should attempt to import secrets from the sync destination
59 None,
60 #[serde(rename = "prefer_doppler")]
61 /// An option indicating if and how Doppler should attempt to import secrets from the sync destination
62 PreferDoppler,
63 #[serde(rename = "prefer_integration")]
64 /// An option indicating if and how Doppler should attempt to import secrets from the sync destination
65 PreferIntegration,
66}
67
68impl Default for ImportOption {
69 fn default() -> ImportOption {
70 Self::None
71 }
72}
73