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