rusty_cdk_core/appconfig/
dto.rs1use serde_json::Value;
2use serde::Serialize;
3use crate::{dto_methods, ref_struct};
4use crate::shared::Id;
5
6ref_struct!(ApplicationRef);
7
8#[derive(Debug, Serialize)]
9pub struct Application {
10 #[serde(skip)]
11 pub(super) id: Id,
12 #[serde(skip)]
13 pub(super) resource_id: String,
14 #[serde(rename = "Type")]
15 pub(super) r#type: String,
16 #[serde(rename = "Properties")]
17 pub(super) properties: ApplicationProperties
18}
19dto_methods!(Application);
20
21#[derive(Debug, Serialize)]
22pub struct ApplicationProperties {
23 #[serde(rename = "Name")]
24 pub(super) name: String,
25}
26
27ref_struct!(ConfigurationProfileRef);
28
29#[derive(Debug, Serialize)]
30pub struct ConfigurationProfile {
31 #[serde(skip)]
32 pub(super) id: Id,
33 #[serde(skip)]
34 pub(super) resource_id: String,
35 #[serde(rename = "Type")]
36 pub(super) r#type: String,
37 #[serde(rename = "Properties")]
38 pub(super) properties: ConfigurationProfileProperties
39}
40dto_methods!(ConfigurationProfile);
41
42#[derive(Debug, Serialize)]
43pub struct ConfigurationProfileProperties {
44 #[serde(rename = "Name")]
45 pub(super) name: String,
46 #[serde(rename = "ApplicationId")]
47 pub(super) application_id: Value,
48 #[serde(rename = "DeletionProtectionCheck", skip_serializing_if = "Option::is_none")]
49 pub(super) deletion_protection_check: Option<String>,
50 #[serde(rename = "LocationUri")]
51 pub(super) location_uri: String,
52 #[serde(rename = "Type", skip_serializing_if = "Option::is_none")]
53 pub(super) config_type: Option<String>,
54 #[serde(rename = "Validators", skip_serializing_if = "Option::is_none")]
55 pub(super) validators: Option<Vec<Validator>>
56 }
59
60#[derive(Debug, Serialize)]
61pub struct Validator {
62 #[serde(rename = "Content")]
63 pub(super) content: String,
64 #[serde(rename = "Type")]
65 pub(super) validator_type: String,
66}
67
68ref_struct!(DeploymentStrategyRef);
69
70#[derive(Debug, Serialize)]
71pub struct DeploymentStrategy {
72 #[serde(skip)]
73 pub(super) id: Id,
74 #[serde(skip)]
75 pub(super) resource_id: String,
76 #[serde(rename = "Type")]
77 pub(super) r#type: String,
78 #[serde(rename = "Properties")]
79 pub(super) properties: DeploymentStrategyProperties
80}
81dto_methods!(DeploymentStrategy);
82
83#[derive(Debug, Serialize)]
84pub struct DeploymentStrategyProperties {
85 #[serde(rename = "Name")]
86 pub(super) name: String,
87 #[serde(rename = "DeploymentDurationInMinutes")]
88 pub(super) deployment_duration_in_minutes: u16,
89 #[serde(rename = "GrowthFactor")]
90 pub(super) growth_factor: u8,
91 #[serde(rename = "ReplicateTo")]
92 pub(super) replicate_to: String,
93 #[serde(rename = "GrowthType", skip_serializing_if = "Option::is_none")]
94 pub(super) growth_type: Option<String>,
95 }
98
99ref_struct!(EnvironmentRef);
100
101#[derive(Debug, Serialize)]
102pub struct Environment {
103 #[serde(skip)]
104 pub(super) id: Id,
105 #[serde(skip)]
106 pub(super) resource_id: String,
107 #[serde(rename = "Type")]
108 pub(super) r#type: String,
109 #[serde(rename = "Properties")]
110 pub(super) properties: EnvironmentProperties,
111}
112dto_methods!(Environment);
113
114#[derive(Debug, Serialize)]
115pub struct EnvironmentProperties {
116 #[serde(rename = "Name")]
117 pub(super) name: String,
118 #[serde(rename = "ApplicationId")]
119 pub(super) application_id: Value,
120 #[serde(rename = "DeletionProtectionCheck", skip_serializing_if = "Option::is_none")]
121 pub(super) deletion_protection_check: Option<String>
122 }