Skip to main content

aws_sdk_iotanalytics/types/
_late_data_rule.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>A structure that contains the name and configuration information of a late data rule.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct LateDataRule {
7    /// <p>The name of the late data rule.</p>
8    pub rule_name: ::std::option::Option<::std::string::String>,
9    /// <p>The information needed to configure the late data rule.</p>
10    pub rule_configuration: ::std::option::Option<crate::types::LateDataRuleConfiguration>,
11}
12impl LateDataRule {
13    /// <p>The name of the late data rule.</p>
14    pub fn rule_name(&self) -> ::std::option::Option<&str> {
15        self.rule_name.as_deref()
16    }
17    /// <p>The information needed to configure the late data rule.</p>
18    pub fn rule_configuration(&self) -> ::std::option::Option<&crate::types::LateDataRuleConfiguration> {
19        self.rule_configuration.as_ref()
20    }
21}
22impl LateDataRule {
23    /// Creates a new builder-style object to manufacture [`LateDataRule`](crate::types::LateDataRule).
24    pub fn builder() -> crate::types::builders::LateDataRuleBuilder {
25        crate::types::builders::LateDataRuleBuilder::default()
26    }
27}
28
29/// A builder for [`LateDataRule`](crate::types::LateDataRule).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct LateDataRuleBuilder {
33    pub(crate) rule_name: ::std::option::Option<::std::string::String>,
34    pub(crate) rule_configuration: ::std::option::Option<crate::types::LateDataRuleConfiguration>,
35}
36impl LateDataRuleBuilder {
37    /// <p>The name of the late data rule.</p>
38    pub fn rule_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.rule_name = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The name of the late data rule.</p>
43    pub fn set_rule_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.rule_name = input;
45        self
46    }
47    /// <p>The name of the late data rule.</p>
48    pub fn get_rule_name(&self) -> &::std::option::Option<::std::string::String> {
49        &self.rule_name
50    }
51    /// <p>The information needed to configure the late data rule.</p>
52    /// This field is required.
53    pub fn rule_configuration(mut self, input: crate::types::LateDataRuleConfiguration) -> Self {
54        self.rule_configuration = ::std::option::Option::Some(input);
55        self
56    }
57    /// <p>The information needed to configure the late data rule.</p>
58    pub fn set_rule_configuration(mut self, input: ::std::option::Option<crate::types::LateDataRuleConfiguration>) -> Self {
59        self.rule_configuration = input;
60        self
61    }
62    /// <p>The information needed to configure the late data rule.</p>
63    pub fn get_rule_configuration(&self) -> &::std::option::Option<crate::types::LateDataRuleConfiguration> {
64        &self.rule_configuration
65    }
66    /// Consumes the builder and constructs a [`LateDataRule`](crate::types::LateDataRule).
67    pub fn build(self) -> crate::types::LateDataRule {
68        crate::types::LateDataRule {
69            rule_name: self.rule_name,
70            rule_configuration: self.rule_configuration,
71        }
72    }
73}