1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Information about the suite definition.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SuiteDefinitionInformation {
    /// <p>Suite definition ID of the test suite.</p>
    pub suite_definition_id: ::std::option::Option<::std::string::String>,
    /// <p>Suite name of the test suite.</p>
    pub suite_definition_name: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the devices that are under test for the test suite.</p>
    pub default_devices: ::std::option::Option<::std::vec::Vec<crate::types::DeviceUnderTest>>,
    /// <p>Specifies if the test suite is intended for qualification.</p>
    pub intended_for_qualification: ::std::option::Option<bool>,
    /// <p>Verifies if the test suite is a long duration test.</p>
    pub is_long_duration_test: ::std::option::Option<bool>,
    /// <p>Gets the MQTT protocol that is configured in the suite definition.</p>
    pub protocol: ::std::option::Option<crate::types::Protocol>,
    /// <p>Date (in Unix epoch time) when the test suite was created.</p>
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl SuiteDefinitionInformation {
    /// <p>Suite definition ID of the test suite.</p>
    pub fn suite_definition_id(&self) -> ::std::option::Option<&str> {
        self.suite_definition_id.as_deref()
    }
    /// <p>Suite name of the test suite.</p>
    pub fn suite_definition_name(&self) -> ::std::option::Option<&str> {
        self.suite_definition_name.as_deref()
    }
    /// <p>Specifies the devices that are under test for the test suite.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.default_devices.is_none()`.
    pub fn default_devices(&self) -> &[crate::types::DeviceUnderTest] {
        self.default_devices.as_deref().unwrap_or_default()
    }
    /// <p>Specifies if the test suite is intended for qualification.</p>
    pub fn intended_for_qualification(&self) -> ::std::option::Option<bool> {
        self.intended_for_qualification
    }
    /// <p>Verifies if the test suite is a long duration test.</p>
    pub fn is_long_duration_test(&self) -> ::std::option::Option<bool> {
        self.is_long_duration_test
    }
    /// <p>Gets the MQTT protocol that is configured in the suite definition.</p>
    pub fn protocol(&self) -> ::std::option::Option<&crate::types::Protocol> {
        self.protocol.as_ref()
    }
    /// <p>Date (in Unix epoch time) when the test suite was created.</p>
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
}
impl SuiteDefinitionInformation {
    /// Creates a new builder-style object to manufacture [`SuiteDefinitionInformation`](crate::types::SuiteDefinitionInformation).
    pub fn builder() -> crate::types::builders::SuiteDefinitionInformationBuilder {
        crate::types::builders::SuiteDefinitionInformationBuilder::default()
    }
}

/// A builder for [`SuiteDefinitionInformation`](crate::types::SuiteDefinitionInformation).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct SuiteDefinitionInformationBuilder {
    pub(crate) suite_definition_id: ::std::option::Option<::std::string::String>,
    pub(crate) suite_definition_name: ::std::option::Option<::std::string::String>,
    pub(crate) default_devices: ::std::option::Option<::std::vec::Vec<crate::types::DeviceUnderTest>>,
    pub(crate) intended_for_qualification: ::std::option::Option<bool>,
    pub(crate) is_long_duration_test: ::std::option::Option<bool>,
    pub(crate) protocol: ::std::option::Option<crate::types::Protocol>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl SuiteDefinitionInformationBuilder {
    /// <p>Suite definition ID of the test suite.</p>
    pub fn suite_definition_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.suite_definition_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Suite definition ID of the test suite.</p>
    pub fn set_suite_definition_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.suite_definition_id = input;
        self
    }
    /// <p>Suite definition ID of the test suite.</p>
    pub fn get_suite_definition_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.suite_definition_id
    }
    /// <p>Suite name of the test suite.</p>
    pub fn suite_definition_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.suite_definition_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Suite name of the test suite.</p>
    pub fn set_suite_definition_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.suite_definition_name = input;
        self
    }
    /// <p>Suite name of the test suite.</p>
    pub fn get_suite_definition_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.suite_definition_name
    }
    /// Appends an item to `default_devices`.
    ///
    /// To override the contents of this collection use [`set_default_devices`](Self::set_default_devices).
    ///
    /// <p>Specifies the devices that are under test for the test suite.</p>
    pub fn default_devices(mut self, input: crate::types::DeviceUnderTest) -> Self {
        let mut v = self.default_devices.unwrap_or_default();
        v.push(input);
        self.default_devices = ::std::option::Option::Some(v);
        self
    }
    /// <p>Specifies the devices that are under test for the test suite.</p>
    pub fn set_default_devices(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DeviceUnderTest>>) -> Self {
        self.default_devices = input;
        self
    }
    /// <p>Specifies the devices that are under test for the test suite.</p>
    pub fn get_default_devices(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DeviceUnderTest>> {
        &self.default_devices
    }
    /// <p>Specifies if the test suite is intended for qualification.</p>
    pub fn intended_for_qualification(mut self, input: bool) -> Self {
        self.intended_for_qualification = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies if the test suite is intended for qualification.</p>
    pub fn set_intended_for_qualification(mut self, input: ::std::option::Option<bool>) -> Self {
        self.intended_for_qualification = input;
        self
    }
    /// <p>Specifies if the test suite is intended for qualification.</p>
    pub fn get_intended_for_qualification(&self) -> &::std::option::Option<bool> {
        &self.intended_for_qualification
    }
    /// <p>Verifies if the test suite is a long duration test.</p>
    pub fn is_long_duration_test(mut self, input: bool) -> Self {
        self.is_long_duration_test = ::std::option::Option::Some(input);
        self
    }
    /// <p>Verifies if the test suite is a long duration test.</p>
    pub fn set_is_long_duration_test(mut self, input: ::std::option::Option<bool>) -> Self {
        self.is_long_duration_test = input;
        self
    }
    /// <p>Verifies if the test suite is a long duration test.</p>
    pub fn get_is_long_duration_test(&self) -> &::std::option::Option<bool> {
        &self.is_long_duration_test
    }
    /// <p>Gets the MQTT protocol that is configured in the suite definition.</p>
    pub fn protocol(mut self, input: crate::types::Protocol) -> Self {
        self.protocol = ::std::option::Option::Some(input);
        self
    }
    /// <p>Gets the MQTT protocol that is configured in the suite definition.</p>
    pub fn set_protocol(mut self, input: ::std::option::Option<crate::types::Protocol>) -> Self {
        self.protocol = input;
        self
    }
    /// <p>Gets the MQTT protocol that is configured in the suite definition.</p>
    pub fn get_protocol(&self) -> &::std::option::Option<crate::types::Protocol> {
        &self.protocol
    }
    /// <p>Date (in Unix epoch time) when the test suite was created.</p>
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>Date (in Unix epoch time) when the test suite was created.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>Date (in Unix epoch time) when the test suite was created.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// Consumes the builder and constructs a [`SuiteDefinitionInformation`](crate::types::SuiteDefinitionInformation).
    pub fn build(self) -> crate::types::SuiteDefinitionInformation {
        crate::types::SuiteDefinitionInformation {
            suite_definition_id: self.suite_definition_id,
            suite_definition_name: self.suite_definition_name,
            default_devices: self.default_devices,
            intended_for_qualification: self.intended_for_qualification,
            is_long_duration_test: self.is_long_duration_test,
            protocol: self.protocol,
            created_at: self.created_at,
        }
    }
}