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
74
75
76
77
/*
* 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};
/// SecretChangeRequest
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SecretChangeRequest {
/// The name of the secret.
#[serde(rename = "name")]
pub name: String ,
/// The original name of the secret. Use `null` (an actual `null`, not the string `null`) or omit this parameter for new secrets. If it differs from `name` then a rename is inferred.
#[serde(rename = "originalName")]
pub original_name: String ,
/// The value the secret should have. Use `null` (an actual `null`, not the string `null`) to leave the existing secret value unchanged.
#[serde(rename = "value")]
pub value: String ,
/// The value you expect the secret to have before `name` is applied. If specified, the request will only be processed if the provided value matches what's found in Doppler.
#[serde(rename = "originalValue", skip_serializing_if = "Option::is_none")]
pub original_value: Option<String >,
/// Must be set to either `masked`, `unmasked`, or `restricted`.
#[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
pub visibility: Option<String >,
/// Must be set to either `masked`, `unmasked`, or `restricted`. The visibility you expect the secret to have before `visibility` is applied. If specified, the request will only be processed if the provided visibility matches what's found in Doppler.
#[serde(rename = "originalVisibility", skip_serializing_if = "Option::is_none")]
pub original_visibility: Option<String >,
/// Defaults to `false`. Can only be set to `true` if the config being updated is a branch config. If set to `true`, the provided secret will be set in both the branch config as well as the root config in that environment.
#[serde(rename = "shouldPromote", skip_serializing_if = "Option::is_none")]
pub should_promote: Option<bool >,
/// Defaults to `false`. If set to `true`, will delete the secret matching the `name` field.
#[serde(rename = "shouldDelete", skip_serializing_if = "Option::is_none")]
pub should_delete: Option<bool >,
/// Defaults to `false`. Can only be set to `true` if the config being updated is a branch config and there is a secret with the same name in the root config. In this case, the branch secret will inherit the value and visibility type from the root secret.
#[serde(rename = "shouldConverge", skip_serializing_if = "Option::is_none")]
pub should_converge: Option<bool >,
#[serde(rename = "valueType", skip_serializing_if = "Option::is_none")]
pub value_type: Option<models::SecretValueType >,
#[serde(rename = "originalValueType", skip_serializing_if = "Option::is_none")]
pub original_value_type: Option<models::OriginalSecretValueType >,
}
impl SecretChangeRequest {
pub fn new(name: String , original_name: String , value: String ) -> SecretChangeRequest {
SecretChangeRequest {
name: name,
original_name: original_name,
value: value,
original_value: None,
visibility: None,
original_visibility: None,
should_promote: None,
should_delete: None,
should_converge: None,
value_type: None,
original_value_type: None,
}
}
}