greengrass_ipc/model/
config.rs1use serde::{Deserialize, Serialize};
4use serde_json::Value;
5
6#[derive(Debug, Clone, Serialize)]
8pub struct GetConfigurationRequest {
9 #[serde(rename = "componentName", skip_serializing_if = "Option::is_none")]
11 pub component_name: Option<String>,
12 #[serde(rename = "keyPath")]
14 pub key_path: Vec<String>,
15}
16
17#[derive(Debug, Clone, Deserialize)]
19pub struct GetConfigurationResponse {
20 #[serde(rename = "componentName", default)]
22 pub component_name: Option<String>,
23 #[serde(rename = "value", default)]
25 pub value: Option<Value>,
26}
27
28#[derive(Debug, Clone, Serialize)]
30pub struct UpdateConfigurationRequest {
31 #[serde(rename = "keyPath", skip_serializing_if = "Option::is_none")]
33 pub key_path: Option<Vec<String>>,
34 #[serde(rename = "timestamp")]
36 pub timestamp: f64,
37 #[serde(rename = "valueToMerge")]
39 pub value_to_merge: Value,
40}
41
42#[derive(Debug, Clone, Default, Deserialize)]
44pub struct UpdateConfigurationResponse {}
45
46#[derive(Debug, Clone, Serialize)]
48pub struct SubscribeToConfigurationUpdateRequest {
49 #[serde(rename = "componentName", skip_serializing_if = "Option::is_none")]
51 pub component_name: Option<String>,
52 #[serde(rename = "keyPath")]
54 pub key_path: Vec<String>,
55}
56
57#[derive(Debug, Clone, Default, Deserialize)]
59pub struct SubscribeToConfigurationUpdateResponse {}
60
61#[derive(Debug, Clone, Deserialize)]
63pub struct ConfigurationUpdateEvent {
64 #[serde(rename = "componentName")]
66 pub component_name: String,
67 #[serde(rename = "keyPath")]
69 pub key_path: Vec<String>,
70}
71
72#[derive(Debug, Clone, Deserialize)]
75pub struct ConfigurationUpdateEvents {
76 #[serde(rename = "configurationUpdateEvent", default)]
78 pub configuration_update_event: Option<ConfigurationUpdateEvent>,
79}