aws_sdk_iotfleetwise/operation/create_campaign/
_create_campaign_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct CreateCampaignInput {
6    /// <p>The name of the campaign to create.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>An optional description of the campaign to help identify its purpose.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>The Amazon Resource Name (ARN) of the signal catalog to associate with the campaign.</p>
11    pub signal_catalog_arn: ::std::option::Option<::std::string::String>,
12    /// <p>The ARN of the vehicle or fleet to deploy a campaign to.</p>
13    pub target_arn: ::std::option::Option<::std::string::String>,
14    /// <p>The time, in milliseconds, to deliver a campaign after it was approved. If it's not specified, <code>0</code> is used.</p>
15    /// <p>Default: <code>0</code></p>
16    pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
17    /// <p>The time the campaign expires, in seconds since epoch (January 1, 1970 at midnight UTC time). Vehicle data isn't collected after the campaign expires.</p>
18    /// <p>Default: 253402214400 (December 31, 9999, 00:00:00 UTC)</p>
19    pub expiry_time: ::std::option::Option<::aws_smithy_types::DateTime>,
20    /// <p>How long (in milliseconds) to collect raw data after a triggering event initiates the collection. If it's not specified, <code>0</code> is used.</p>
21    /// <p>Default: <code>0</code></p>
22    pub post_trigger_collection_duration: ::std::option::Option<i64>,
23    /// <p>Option for a vehicle to send diagnostic trouble codes to Amazon Web Services IoT FleetWise. If you want to send diagnostic trouble codes, use <code>SEND_ACTIVE_DTCS</code>. If it's not specified, <code>OFF</code> is used.</p>
24    /// <p>Default: <code>OFF</code></p>
25    pub diagnostics_mode: ::std::option::Option<crate::types::DiagnosticsMode>,
26    /// <p>Determines whether to store collected data after a vehicle lost a connection with the cloud. After a connection is re-established, the data is automatically forwarded to Amazon Web Services IoT FleetWise. If you want to store collected data when a vehicle loses connection with the cloud, use <code>TO_DISK</code>. If it's not specified, <code>OFF</code> is used.</p>
27    /// <p>Default: <code>OFF</code></p>
28    pub spooling_mode: ::std::option::Option<crate::types::SpoolingMode>,
29    /// <p>Determines whether to compress signals before transmitting data to Amazon Web Services IoT FleetWise. If you don't want to compress the signals, use <code>OFF</code>. If it's not specified, <code>SNAPPY</code> is used.</p>
30    /// <p>Default: <code>SNAPPY</code></p>
31    pub compression: ::std::option::Option<crate::types::Compression>,
32    /// <p>A number indicating the priority of one campaign over another campaign for a certain vehicle or fleet. A campaign with the lowest value is deployed to vehicles before any other campaigns. If it's not specified, <code>0</code> is used.</p>
33    /// <p>Default: <code>0</code></p>
34    #[deprecated(note = "priority is no longer used or needed as input")]
35    pub priority: ::std::option::Option<i32>,
36    /// <p>A list of information about signals to collect.</p><note>
37    /// <p>If you upload a signal as a condition in a data partition for a campaign, then those same signals must be included in <code>signalsToCollect</code>.</p>
38    /// </note>
39    pub signals_to_collect: ::std::option::Option<::std::vec::Vec<crate::types::SignalInformation>>,
40    /// <p>The data collection scheme associated with the campaign. You can specify a scheme that collects data based on time or an event.</p>
41    pub collection_scheme: ::std::option::Option<crate::types::CollectionScheme>,
42    /// <p>A list of vehicle attributes to associate with a campaign.</p>
43    /// <p>Enrich the data with specified vehicle attributes. For example, add <code>make</code> and <code>model</code> to the campaign, and Amazon Web Services IoT FleetWise will associate the data with those attributes as dimensions in Amazon Timestream. You can then query the data against <code>make</code> and <code>model</code>.</p>
44    /// <p>Default: An empty array</p>
45    pub data_extra_dimensions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
46    /// <p>Metadata that can be used to manage the campaign.</p>
47    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
48    /// <p>The destination where the campaign sends data. You can send data to an MQTT topic, or store it in Amazon S3 or Amazon Timestream.</p>
49    /// <p>MQTT is the publish/subscribe messaging protocol used by Amazon Web Services IoT to communicate with your devices.</p>
50    /// <p>Amazon S3 optimizes the cost of data storage and provides additional mechanisms to use vehicle data, such as data lakes, centralized data storage, data processing pipelines, and analytics. Amazon Web Services IoT FleetWise supports at-least-once file delivery to S3. Your vehicle data is stored on multiple Amazon Web Services IoT FleetWise servers for redundancy and high availability.</p>
51    /// <p>You can use Amazon Timestream to access and analyze time series data, and Timestream to query vehicle data so that you can identify trends and patterns.</p>
52    pub data_destination_configs: ::std::option::Option<::std::vec::Vec<crate::types::DataDestinationConfig>>,
53    /// <p>The data partitions associated with the signals collected from the vehicle.</p>
54    pub data_partitions: ::std::option::Option<::std::vec::Vec<crate::types::DataPartition>>,
55    /// <p>A list of information about signals to fetch.</p>
56    pub signals_to_fetch: ::std::option::Option<::std::vec::Vec<crate::types::SignalFetchInformation>>,
57}
58impl CreateCampaignInput {
59    /// <p>The name of the campaign to create.</p>
60    pub fn name(&self) -> ::std::option::Option<&str> {
61        self.name.as_deref()
62    }
63    /// <p>An optional description of the campaign to help identify its purpose.</p>
64    pub fn description(&self) -> ::std::option::Option<&str> {
65        self.description.as_deref()
66    }
67    /// <p>The Amazon Resource Name (ARN) of the signal catalog to associate with the campaign.</p>
68    pub fn signal_catalog_arn(&self) -> ::std::option::Option<&str> {
69        self.signal_catalog_arn.as_deref()
70    }
71    /// <p>The ARN of the vehicle or fleet to deploy a campaign to.</p>
72    pub fn target_arn(&self) -> ::std::option::Option<&str> {
73        self.target_arn.as_deref()
74    }
75    /// <p>The time, in milliseconds, to deliver a campaign after it was approved. If it's not specified, <code>0</code> is used.</p>
76    /// <p>Default: <code>0</code></p>
77    pub fn start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
78        self.start_time.as_ref()
79    }
80    /// <p>The time the campaign expires, in seconds since epoch (January 1, 1970 at midnight UTC time). Vehicle data isn't collected after the campaign expires.</p>
81    /// <p>Default: 253402214400 (December 31, 9999, 00:00:00 UTC)</p>
82    pub fn expiry_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
83        self.expiry_time.as_ref()
84    }
85    /// <p>How long (in milliseconds) to collect raw data after a triggering event initiates the collection. If it's not specified, <code>0</code> is used.</p>
86    /// <p>Default: <code>0</code></p>
87    pub fn post_trigger_collection_duration(&self) -> ::std::option::Option<i64> {
88        self.post_trigger_collection_duration
89    }
90    /// <p>Option for a vehicle to send diagnostic trouble codes to Amazon Web Services IoT FleetWise. If you want to send diagnostic trouble codes, use <code>SEND_ACTIVE_DTCS</code>. If it's not specified, <code>OFF</code> is used.</p>
91    /// <p>Default: <code>OFF</code></p>
92    pub fn diagnostics_mode(&self) -> ::std::option::Option<&crate::types::DiagnosticsMode> {
93        self.diagnostics_mode.as_ref()
94    }
95    /// <p>Determines whether to store collected data after a vehicle lost a connection with the cloud. After a connection is re-established, the data is automatically forwarded to Amazon Web Services IoT FleetWise. If you want to store collected data when a vehicle loses connection with the cloud, use <code>TO_DISK</code>. If it's not specified, <code>OFF</code> is used.</p>
96    /// <p>Default: <code>OFF</code></p>
97    pub fn spooling_mode(&self) -> ::std::option::Option<&crate::types::SpoolingMode> {
98        self.spooling_mode.as_ref()
99    }
100    /// <p>Determines whether to compress signals before transmitting data to Amazon Web Services IoT FleetWise. If you don't want to compress the signals, use <code>OFF</code>. If it's not specified, <code>SNAPPY</code> is used.</p>
101    /// <p>Default: <code>SNAPPY</code></p>
102    pub fn compression(&self) -> ::std::option::Option<&crate::types::Compression> {
103        self.compression.as_ref()
104    }
105    /// <p>A number indicating the priority of one campaign over another campaign for a certain vehicle or fleet. A campaign with the lowest value is deployed to vehicles before any other campaigns. If it's not specified, <code>0</code> is used.</p>
106    /// <p>Default: <code>0</code></p>
107    #[deprecated(note = "priority is no longer used or needed as input")]
108    pub fn priority(&self) -> ::std::option::Option<i32> {
109        self.priority
110    }
111    /// <p>A list of information about signals to collect.</p><note>
112    /// <p>If you upload a signal as a condition in a data partition for a campaign, then those same signals must be included in <code>signalsToCollect</code>.</p>
113    /// </note>
114    ///
115    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.signals_to_collect.is_none()`.
116    pub fn signals_to_collect(&self) -> &[crate::types::SignalInformation] {
117        self.signals_to_collect.as_deref().unwrap_or_default()
118    }
119    /// <p>The data collection scheme associated with the campaign. You can specify a scheme that collects data based on time or an event.</p>
120    pub fn collection_scheme(&self) -> ::std::option::Option<&crate::types::CollectionScheme> {
121        self.collection_scheme.as_ref()
122    }
123    /// <p>A list of vehicle attributes to associate with a campaign.</p>
124    /// <p>Enrich the data with specified vehicle attributes. For example, add <code>make</code> and <code>model</code> to the campaign, and Amazon Web Services IoT FleetWise will associate the data with those attributes as dimensions in Amazon Timestream. You can then query the data against <code>make</code> and <code>model</code>.</p>
125    /// <p>Default: An empty array</p>
126    ///
127    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.data_extra_dimensions.is_none()`.
128    pub fn data_extra_dimensions(&self) -> &[::std::string::String] {
129        self.data_extra_dimensions.as_deref().unwrap_or_default()
130    }
131    /// <p>Metadata that can be used to manage the campaign.</p>
132    ///
133    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
134    pub fn tags(&self) -> &[crate::types::Tag] {
135        self.tags.as_deref().unwrap_or_default()
136    }
137    /// <p>The destination where the campaign sends data. You can send data to an MQTT topic, or store it in Amazon S3 or Amazon Timestream.</p>
138    /// <p>MQTT is the publish/subscribe messaging protocol used by Amazon Web Services IoT to communicate with your devices.</p>
139    /// <p>Amazon S3 optimizes the cost of data storage and provides additional mechanisms to use vehicle data, such as data lakes, centralized data storage, data processing pipelines, and analytics. Amazon Web Services IoT FleetWise supports at-least-once file delivery to S3. Your vehicle data is stored on multiple Amazon Web Services IoT FleetWise servers for redundancy and high availability.</p>
140    /// <p>You can use Amazon Timestream to access and analyze time series data, and Timestream to query vehicle data so that you can identify trends and patterns.</p>
141    ///
142    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.data_destination_configs.is_none()`.
143    pub fn data_destination_configs(&self) -> &[crate::types::DataDestinationConfig] {
144        self.data_destination_configs.as_deref().unwrap_or_default()
145    }
146    /// <p>The data partitions associated with the signals collected from the vehicle.</p>
147    ///
148    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.data_partitions.is_none()`.
149    pub fn data_partitions(&self) -> &[crate::types::DataPartition] {
150        self.data_partitions.as_deref().unwrap_or_default()
151    }
152    /// <p>A list of information about signals to fetch.</p>
153    ///
154    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.signals_to_fetch.is_none()`.
155    pub fn signals_to_fetch(&self) -> &[crate::types::SignalFetchInformation] {
156        self.signals_to_fetch.as_deref().unwrap_or_default()
157    }
158}
159impl ::std::fmt::Debug for CreateCampaignInput {
160    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
161        let mut formatter = f.debug_struct("CreateCampaignInput");
162        formatter.field("name", &self.name);
163        formatter.field("description", &self.description);
164        formatter.field("signal_catalog_arn", &self.signal_catalog_arn);
165        formatter.field("target_arn", &self.target_arn);
166        formatter.field("start_time", &self.start_time);
167        formatter.field("expiry_time", &self.expiry_time);
168        formatter.field("post_trigger_collection_duration", &self.post_trigger_collection_duration);
169        formatter.field("diagnostics_mode", &self.diagnostics_mode);
170        formatter.field("spooling_mode", &self.spooling_mode);
171        formatter.field("compression", &self.compression);
172        formatter.field("priority", &self.priority);
173        formatter.field("signals_to_collect", &"*** Sensitive Data Redacted ***");
174        formatter.field("collection_scheme", &self.collection_scheme);
175        formatter.field("data_extra_dimensions", &"*** Sensitive Data Redacted ***");
176        formatter.field("tags", &self.tags);
177        formatter.field("data_destination_configs", &self.data_destination_configs);
178        formatter.field("data_partitions", &self.data_partitions);
179        formatter.field("signals_to_fetch", &"*** Sensitive Data Redacted ***");
180        formatter.finish()
181    }
182}
183impl CreateCampaignInput {
184    /// Creates a new builder-style object to manufacture [`CreateCampaignInput`](crate::operation::create_campaign::CreateCampaignInput).
185    pub fn builder() -> crate::operation::create_campaign::builders::CreateCampaignInputBuilder {
186        crate::operation::create_campaign::builders::CreateCampaignInputBuilder::default()
187    }
188}
189
190/// A builder for [`CreateCampaignInput`](crate::operation::create_campaign::CreateCampaignInput).
191#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
192#[non_exhaustive]
193pub struct CreateCampaignInputBuilder {
194    pub(crate) name: ::std::option::Option<::std::string::String>,
195    pub(crate) description: ::std::option::Option<::std::string::String>,
196    pub(crate) signal_catalog_arn: ::std::option::Option<::std::string::String>,
197    pub(crate) target_arn: ::std::option::Option<::std::string::String>,
198    pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
199    pub(crate) expiry_time: ::std::option::Option<::aws_smithy_types::DateTime>,
200    pub(crate) post_trigger_collection_duration: ::std::option::Option<i64>,
201    pub(crate) diagnostics_mode: ::std::option::Option<crate::types::DiagnosticsMode>,
202    pub(crate) spooling_mode: ::std::option::Option<crate::types::SpoolingMode>,
203    pub(crate) compression: ::std::option::Option<crate::types::Compression>,
204    pub(crate) priority: ::std::option::Option<i32>,
205    pub(crate) signals_to_collect: ::std::option::Option<::std::vec::Vec<crate::types::SignalInformation>>,
206    pub(crate) collection_scheme: ::std::option::Option<crate::types::CollectionScheme>,
207    pub(crate) data_extra_dimensions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
208    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
209    pub(crate) data_destination_configs: ::std::option::Option<::std::vec::Vec<crate::types::DataDestinationConfig>>,
210    pub(crate) data_partitions: ::std::option::Option<::std::vec::Vec<crate::types::DataPartition>>,
211    pub(crate) signals_to_fetch: ::std::option::Option<::std::vec::Vec<crate::types::SignalFetchInformation>>,
212}
213impl CreateCampaignInputBuilder {
214    /// <p>The name of the campaign to create.</p>
215    /// This field is required.
216    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
217        self.name = ::std::option::Option::Some(input.into());
218        self
219    }
220    /// <p>The name of the campaign to create.</p>
221    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
222        self.name = input;
223        self
224    }
225    /// <p>The name of the campaign to create.</p>
226    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
227        &self.name
228    }
229    /// <p>An optional description of the campaign to help identify its purpose.</p>
230    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
231        self.description = ::std::option::Option::Some(input.into());
232        self
233    }
234    /// <p>An optional description of the campaign to help identify its purpose.</p>
235    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
236        self.description = input;
237        self
238    }
239    /// <p>An optional description of the campaign to help identify its purpose.</p>
240    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
241        &self.description
242    }
243    /// <p>The Amazon Resource Name (ARN) of the signal catalog to associate with the campaign.</p>
244    /// This field is required.
245    pub fn signal_catalog_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
246        self.signal_catalog_arn = ::std::option::Option::Some(input.into());
247        self
248    }
249    /// <p>The Amazon Resource Name (ARN) of the signal catalog to associate with the campaign.</p>
250    pub fn set_signal_catalog_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
251        self.signal_catalog_arn = input;
252        self
253    }
254    /// <p>The Amazon Resource Name (ARN) of the signal catalog to associate with the campaign.</p>
255    pub fn get_signal_catalog_arn(&self) -> &::std::option::Option<::std::string::String> {
256        &self.signal_catalog_arn
257    }
258    /// <p>The ARN of the vehicle or fleet to deploy a campaign to.</p>
259    /// This field is required.
260    pub fn target_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
261        self.target_arn = ::std::option::Option::Some(input.into());
262        self
263    }
264    /// <p>The ARN of the vehicle or fleet to deploy a campaign to.</p>
265    pub fn set_target_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
266        self.target_arn = input;
267        self
268    }
269    /// <p>The ARN of the vehicle or fleet to deploy a campaign to.</p>
270    pub fn get_target_arn(&self) -> &::std::option::Option<::std::string::String> {
271        &self.target_arn
272    }
273    /// <p>The time, in milliseconds, to deliver a campaign after it was approved. If it's not specified, <code>0</code> is used.</p>
274    /// <p>Default: <code>0</code></p>
275    pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
276        self.start_time = ::std::option::Option::Some(input);
277        self
278    }
279    /// <p>The time, in milliseconds, to deliver a campaign after it was approved. If it's not specified, <code>0</code> is used.</p>
280    /// <p>Default: <code>0</code></p>
281    pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
282        self.start_time = input;
283        self
284    }
285    /// <p>The time, in milliseconds, to deliver a campaign after it was approved. If it's not specified, <code>0</code> is used.</p>
286    /// <p>Default: <code>0</code></p>
287    pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
288        &self.start_time
289    }
290    /// <p>The time the campaign expires, in seconds since epoch (January 1, 1970 at midnight UTC time). Vehicle data isn't collected after the campaign expires.</p>
291    /// <p>Default: 253402214400 (December 31, 9999, 00:00:00 UTC)</p>
292    pub fn expiry_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
293        self.expiry_time = ::std::option::Option::Some(input);
294        self
295    }
296    /// <p>The time the campaign expires, in seconds since epoch (January 1, 1970 at midnight UTC time). Vehicle data isn't collected after the campaign expires.</p>
297    /// <p>Default: 253402214400 (December 31, 9999, 00:00:00 UTC)</p>
298    pub fn set_expiry_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
299        self.expiry_time = input;
300        self
301    }
302    /// <p>The time the campaign expires, in seconds since epoch (January 1, 1970 at midnight UTC time). Vehicle data isn't collected after the campaign expires.</p>
303    /// <p>Default: 253402214400 (December 31, 9999, 00:00:00 UTC)</p>
304    pub fn get_expiry_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
305        &self.expiry_time
306    }
307    /// <p>How long (in milliseconds) to collect raw data after a triggering event initiates the collection. If it's not specified, <code>0</code> is used.</p>
308    /// <p>Default: <code>0</code></p>
309    pub fn post_trigger_collection_duration(mut self, input: i64) -> Self {
310        self.post_trigger_collection_duration = ::std::option::Option::Some(input);
311        self
312    }
313    /// <p>How long (in milliseconds) to collect raw data after a triggering event initiates the collection. If it's not specified, <code>0</code> is used.</p>
314    /// <p>Default: <code>0</code></p>
315    pub fn set_post_trigger_collection_duration(mut self, input: ::std::option::Option<i64>) -> Self {
316        self.post_trigger_collection_duration = input;
317        self
318    }
319    /// <p>How long (in milliseconds) to collect raw data after a triggering event initiates the collection. If it's not specified, <code>0</code> is used.</p>
320    /// <p>Default: <code>0</code></p>
321    pub fn get_post_trigger_collection_duration(&self) -> &::std::option::Option<i64> {
322        &self.post_trigger_collection_duration
323    }
324    /// <p>Option for a vehicle to send diagnostic trouble codes to Amazon Web Services IoT FleetWise. If you want to send diagnostic trouble codes, use <code>SEND_ACTIVE_DTCS</code>. If it's not specified, <code>OFF</code> is used.</p>
325    /// <p>Default: <code>OFF</code></p>
326    pub fn diagnostics_mode(mut self, input: crate::types::DiagnosticsMode) -> Self {
327        self.diagnostics_mode = ::std::option::Option::Some(input);
328        self
329    }
330    /// <p>Option for a vehicle to send diagnostic trouble codes to Amazon Web Services IoT FleetWise. If you want to send diagnostic trouble codes, use <code>SEND_ACTIVE_DTCS</code>. If it's not specified, <code>OFF</code> is used.</p>
331    /// <p>Default: <code>OFF</code></p>
332    pub fn set_diagnostics_mode(mut self, input: ::std::option::Option<crate::types::DiagnosticsMode>) -> Self {
333        self.diagnostics_mode = input;
334        self
335    }
336    /// <p>Option for a vehicle to send diagnostic trouble codes to Amazon Web Services IoT FleetWise. If you want to send diagnostic trouble codes, use <code>SEND_ACTIVE_DTCS</code>. If it's not specified, <code>OFF</code> is used.</p>
337    /// <p>Default: <code>OFF</code></p>
338    pub fn get_diagnostics_mode(&self) -> &::std::option::Option<crate::types::DiagnosticsMode> {
339        &self.diagnostics_mode
340    }
341    /// <p>Determines whether to store collected data after a vehicle lost a connection with the cloud. After a connection is re-established, the data is automatically forwarded to Amazon Web Services IoT FleetWise. If you want to store collected data when a vehicle loses connection with the cloud, use <code>TO_DISK</code>. If it's not specified, <code>OFF</code> is used.</p>
342    /// <p>Default: <code>OFF</code></p>
343    pub fn spooling_mode(mut self, input: crate::types::SpoolingMode) -> Self {
344        self.spooling_mode = ::std::option::Option::Some(input);
345        self
346    }
347    /// <p>Determines whether to store collected data after a vehicle lost a connection with the cloud. After a connection is re-established, the data is automatically forwarded to Amazon Web Services IoT FleetWise. If you want to store collected data when a vehicle loses connection with the cloud, use <code>TO_DISK</code>. If it's not specified, <code>OFF</code> is used.</p>
348    /// <p>Default: <code>OFF</code></p>
349    pub fn set_spooling_mode(mut self, input: ::std::option::Option<crate::types::SpoolingMode>) -> Self {
350        self.spooling_mode = input;
351        self
352    }
353    /// <p>Determines whether to store collected data after a vehicle lost a connection with the cloud. After a connection is re-established, the data is automatically forwarded to Amazon Web Services IoT FleetWise. If you want to store collected data when a vehicle loses connection with the cloud, use <code>TO_DISK</code>. If it's not specified, <code>OFF</code> is used.</p>
354    /// <p>Default: <code>OFF</code></p>
355    pub fn get_spooling_mode(&self) -> &::std::option::Option<crate::types::SpoolingMode> {
356        &self.spooling_mode
357    }
358    /// <p>Determines whether to compress signals before transmitting data to Amazon Web Services IoT FleetWise. If you don't want to compress the signals, use <code>OFF</code>. If it's not specified, <code>SNAPPY</code> is used.</p>
359    /// <p>Default: <code>SNAPPY</code></p>
360    pub fn compression(mut self, input: crate::types::Compression) -> Self {
361        self.compression = ::std::option::Option::Some(input);
362        self
363    }
364    /// <p>Determines whether to compress signals before transmitting data to Amazon Web Services IoT FleetWise. If you don't want to compress the signals, use <code>OFF</code>. If it's not specified, <code>SNAPPY</code> is used.</p>
365    /// <p>Default: <code>SNAPPY</code></p>
366    pub fn set_compression(mut self, input: ::std::option::Option<crate::types::Compression>) -> Self {
367        self.compression = input;
368        self
369    }
370    /// <p>Determines whether to compress signals before transmitting data to Amazon Web Services IoT FleetWise. If you don't want to compress the signals, use <code>OFF</code>. If it's not specified, <code>SNAPPY</code> is used.</p>
371    /// <p>Default: <code>SNAPPY</code></p>
372    pub fn get_compression(&self) -> &::std::option::Option<crate::types::Compression> {
373        &self.compression
374    }
375    /// <p>A number indicating the priority of one campaign over another campaign for a certain vehicle or fleet. A campaign with the lowest value is deployed to vehicles before any other campaigns. If it's not specified, <code>0</code> is used.</p>
376    /// <p>Default: <code>0</code></p>
377    #[deprecated(note = "priority is no longer used or needed as input")]
378    pub fn priority(mut self, input: i32) -> Self {
379        self.priority = ::std::option::Option::Some(input);
380        self
381    }
382    /// <p>A number indicating the priority of one campaign over another campaign for a certain vehicle or fleet. A campaign with the lowest value is deployed to vehicles before any other campaigns. If it's not specified, <code>0</code> is used.</p>
383    /// <p>Default: <code>0</code></p>
384    #[deprecated(note = "priority is no longer used or needed as input")]
385    pub fn set_priority(mut self, input: ::std::option::Option<i32>) -> Self {
386        self.priority = input;
387        self
388    }
389    /// <p>A number indicating the priority of one campaign over another campaign for a certain vehicle or fleet. A campaign with the lowest value is deployed to vehicles before any other campaigns. If it's not specified, <code>0</code> is used.</p>
390    /// <p>Default: <code>0</code></p>
391    #[deprecated(note = "priority is no longer used or needed as input")]
392    pub fn get_priority(&self) -> &::std::option::Option<i32> {
393        &self.priority
394    }
395    /// Appends an item to `signals_to_collect`.
396    ///
397    /// To override the contents of this collection use [`set_signals_to_collect`](Self::set_signals_to_collect).
398    ///
399    /// <p>A list of information about signals to collect.</p><note>
400    /// <p>If you upload a signal as a condition in a data partition for a campaign, then those same signals must be included in <code>signalsToCollect</code>.</p>
401    /// </note>
402    pub fn signals_to_collect(mut self, input: crate::types::SignalInformation) -> Self {
403        let mut v = self.signals_to_collect.unwrap_or_default();
404        v.push(input);
405        self.signals_to_collect = ::std::option::Option::Some(v);
406        self
407    }
408    /// <p>A list of information about signals to collect.</p><note>
409    /// <p>If you upload a signal as a condition in a data partition for a campaign, then those same signals must be included in <code>signalsToCollect</code>.</p>
410    /// </note>
411    pub fn set_signals_to_collect(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SignalInformation>>) -> Self {
412        self.signals_to_collect = input;
413        self
414    }
415    /// <p>A list of information about signals to collect.</p><note>
416    /// <p>If you upload a signal as a condition in a data partition for a campaign, then those same signals must be included in <code>signalsToCollect</code>.</p>
417    /// </note>
418    pub fn get_signals_to_collect(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SignalInformation>> {
419        &self.signals_to_collect
420    }
421    /// <p>The data collection scheme associated with the campaign. You can specify a scheme that collects data based on time or an event.</p>
422    /// This field is required.
423    pub fn collection_scheme(mut self, input: crate::types::CollectionScheme) -> Self {
424        self.collection_scheme = ::std::option::Option::Some(input);
425        self
426    }
427    /// <p>The data collection scheme associated with the campaign. You can specify a scheme that collects data based on time or an event.</p>
428    pub fn set_collection_scheme(mut self, input: ::std::option::Option<crate::types::CollectionScheme>) -> Self {
429        self.collection_scheme = input;
430        self
431    }
432    /// <p>The data collection scheme associated with the campaign. You can specify a scheme that collects data based on time or an event.</p>
433    pub fn get_collection_scheme(&self) -> &::std::option::Option<crate::types::CollectionScheme> {
434        &self.collection_scheme
435    }
436    /// Appends an item to `data_extra_dimensions`.
437    ///
438    /// To override the contents of this collection use [`set_data_extra_dimensions`](Self::set_data_extra_dimensions).
439    ///
440    /// <p>A list of vehicle attributes to associate with a campaign.</p>
441    /// <p>Enrich the data with specified vehicle attributes. For example, add <code>make</code> and <code>model</code> to the campaign, and Amazon Web Services IoT FleetWise will associate the data with those attributes as dimensions in Amazon Timestream. You can then query the data against <code>make</code> and <code>model</code>.</p>
442    /// <p>Default: An empty array</p>
443    pub fn data_extra_dimensions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
444        let mut v = self.data_extra_dimensions.unwrap_or_default();
445        v.push(input.into());
446        self.data_extra_dimensions = ::std::option::Option::Some(v);
447        self
448    }
449    /// <p>A list of vehicle attributes to associate with a campaign.</p>
450    /// <p>Enrich the data with specified vehicle attributes. For example, add <code>make</code> and <code>model</code> to the campaign, and Amazon Web Services IoT FleetWise will associate the data with those attributes as dimensions in Amazon Timestream. You can then query the data against <code>make</code> and <code>model</code>.</p>
451    /// <p>Default: An empty array</p>
452    pub fn set_data_extra_dimensions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
453        self.data_extra_dimensions = input;
454        self
455    }
456    /// <p>A list of vehicle attributes to associate with a campaign.</p>
457    /// <p>Enrich the data with specified vehicle attributes. For example, add <code>make</code> and <code>model</code> to the campaign, and Amazon Web Services IoT FleetWise will associate the data with those attributes as dimensions in Amazon Timestream. You can then query the data against <code>make</code> and <code>model</code>.</p>
458    /// <p>Default: An empty array</p>
459    pub fn get_data_extra_dimensions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
460        &self.data_extra_dimensions
461    }
462    /// Appends an item to `tags`.
463    ///
464    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
465    ///
466    /// <p>Metadata that can be used to manage the campaign.</p>
467    pub fn tags(mut self, input: crate::types::Tag) -> Self {
468        let mut v = self.tags.unwrap_or_default();
469        v.push(input);
470        self.tags = ::std::option::Option::Some(v);
471        self
472    }
473    /// <p>Metadata that can be used to manage the campaign.</p>
474    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
475        self.tags = input;
476        self
477    }
478    /// <p>Metadata that can be used to manage the campaign.</p>
479    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
480        &self.tags
481    }
482    /// Appends an item to `data_destination_configs`.
483    ///
484    /// To override the contents of this collection use [`set_data_destination_configs`](Self::set_data_destination_configs).
485    ///
486    /// <p>The destination where the campaign sends data. You can send data to an MQTT topic, or store it in Amazon S3 or Amazon Timestream.</p>
487    /// <p>MQTT is the publish/subscribe messaging protocol used by Amazon Web Services IoT to communicate with your devices.</p>
488    /// <p>Amazon S3 optimizes the cost of data storage and provides additional mechanisms to use vehicle data, such as data lakes, centralized data storage, data processing pipelines, and analytics. Amazon Web Services IoT FleetWise supports at-least-once file delivery to S3. Your vehicle data is stored on multiple Amazon Web Services IoT FleetWise servers for redundancy and high availability.</p>
489    /// <p>You can use Amazon Timestream to access and analyze time series data, and Timestream to query vehicle data so that you can identify trends and patterns.</p>
490    pub fn data_destination_configs(mut self, input: crate::types::DataDestinationConfig) -> Self {
491        let mut v = self.data_destination_configs.unwrap_or_default();
492        v.push(input);
493        self.data_destination_configs = ::std::option::Option::Some(v);
494        self
495    }
496    /// <p>The destination where the campaign sends data. You can send data to an MQTT topic, or store it in Amazon S3 or Amazon Timestream.</p>
497    /// <p>MQTT is the publish/subscribe messaging protocol used by Amazon Web Services IoT to communicate with your devices.</p>
498    /// <p>Amazon S3 optimizes the cost of data storage and provides additional mechanisms to use vehicle data, such as data lakes, centralized data storage, data processing pipelines, and analytics. Amazon Web Services IoT FleetWise supports at-least-once file delivery to S3. Your vehicle data is stored on multiple Amazon Web Services IoT FleetWise servers for redundancy and high availability.</p>
499    /// <p>You can use Amazon Timestream to access and analyze time series data, and Timestream to query vehicle data so that you can identify trends and patterns.</p>
500    pub fn set_data_destination_configs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DataDestinationConfig>>) -> Self {
501        self.data_destination_configs = input;
502        self
503    }
504    /// <p>The destination where the campaign sends data. You can send data to an MQTT topic, or store it in Amazon S3 or Amazon Timestream.</p>
505    /// <p>MQTT is the publish/subscribe messaging protocol used by Amazon Web Services IoT to communicate with your devices.</p>
506    /// <p>Amazon S3 optimizes the cost of data storage and provides additional mechanisms to use vehicle data, such as data lakes, centralized data storage, data processing pipelines, and analytics. Amazon Web Services IoT FleetWise supports at-least-once file delivery to S3. Your vehicle data is stored on multiple Amazon Web Services IoT FleetWise servers for redundancy and high availability.</p>
507    /// <p>You can use Amazon Timestream to access and analyze time series data, and Timestream to query vehicle data so that you can identify trends and patterns.</p>
508    pub fn get_data_destination_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DataDestinationConfig>> {
509        &self.data_destination_configs
510    }
511    /// Appends an item to `data_partitions`.
512    ///
513    /// To override the contents of this collection use [`set_data_partitions`](Self::set_data_partitions).
514    ///
515    /// <p>The data partitions associated with the signals collected from the vehicle.</p>
516    pub fn data_partitions(mut self, input: crate::types::DataPartition) -> Self {
517        let mut v = self.data_partitions.unwrap_or_default();
518        v.push(input);
519        self.data_partitions = ::std::option::Option::Some(v);
520        self
521    }
522    /// <p>The data partitions associated with the signals collected from the vehicle.</p>
523    pub fn set_data_partitions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DataPartition>>) -> Self {
524        self.data_partitions = input;
525        self
526    }
527    /// <p>The data partitions associated with the signals collected from the vehicle.</p>
528    pub fn get_data_partitions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DataPartition>> {
529        &self.data_partitions
530    }
531    /// Appends an item to `signals_to_fetch`.
532    ///
533    /// To override the contents of this collection use [`set_signals_to_fetch`](Self::set_signals_to_fetch).
534    ///
535    /// <p>A list of information about signals to fetch.</p>
536    pub fn signals_to_fetch(mut self, input: crate::types::SignalFetchInformation) -> Self {
537        let mut v = self.signals_to_fetch.unwrap_or_default();
538        v.push(input);
539        self.signals_to_fetch = ::std::option::Option::Some(v);
540        self
541    }
542    /// <p>A list of information about signals to fetch.</p>
543    pub fn set_signals_to_fetch(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SignalFetchInformation>>) -> Self {
544        self.signals_to_fetch = input;
545        self
546    }
547    /// <p>A list of information about signals to fetch.</p>
548    pub fn get_signals_to_fetch(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SignalFetchInformation>> {
549        &self.signals_to_fetch
550    }
551    /// Consumes the builder and constructs a [`CreateCampaignInput`](crate::operation::create_campaign::CreateCampaignInput).
552    pub fn build(
553        self,
554    ) -> ::std::result::Result<crate::operation::create_campaign::CreateCampaignInput, ::aws_smithy_types::error::operation::BuildError> {
555        ::std::result::Result::Ok(crate::operation::create_campaign::CreateCampaignInput {
556            name: self.name,
557            description: self.description,
558            signal_catalog_arn: self.signal_catalog_arn,
559            target_arn: self.target_arn,
560            start_time: self.start_time,
561            expiry_time: self.expiry_time,
562            post_trigger_collection_duration: self.post_trigger_collection_duration,
563            diagnostics_mode: self.diagnostics_mode,
564            spooling_mode: self.spooling_mode,
565            compression: self.compression,
566            priority: self.priority,
567            signals_to_collect: self.signals_to_collect,
568            collection_scheme: self.collection_scheme,
569            data_extra_dimensions: self.data_extra_dimensions,
570            tags: self.tags,
571            data_destination_configs: self.data_destination_configs,
572            data_partitions: self.data_partitions,
573            signals_to_fetch: self.signals_to_fetch,
574        })
575    }
576}
577impl ::std::fmt::Debug for CreateCampaignInputBuilder {
578    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
579        let mut formatter = f.debug_struct("CreateCampaignInputBuilder");
580        formatter.field("name", &self.name);
581        formatter.field("description", &self.description);
582        formatter.field("signal_catalog_arn", &self.signal_catalog_arn);
583        formatter.field("target_arn", &self.target_arn);
584        formatter.field("start_time", &self.start_time);
585        formatter.field("expiry_time", &self.expiry_time);
586        formatter.field("post_trigger_collection_duration", &self.post_trigger_collection_duration);
587        formatter.field("diagnostics_mode", &self.diagnostics_mode);
588        formatter.field("spooling_mode", &self.spooling_mode);
589        formatter.field("compression", &self.compression);
590        formatter.field("priority", &self.priority);
591        formatter.field("signals_to_collect", &"*** Sensitive Data Redacted ***");
592        formatter.field("collection_scheme", &self.collection_scheme);
593        formatter.field("data_extra_dimensions", &"*** Sensitive Data Redacted ***");
594        formatter.field("tags", &self.tags);
595        formatter.field("data_destination_configs", &self.data_destination_configs);
596        formatter.field("data_partitions", &self.data_partitions);
597        formatter.field("signals_to_fetch", &"*** Sensitive Data Redacted ***");
598        formatter.finish()
599    }
600}