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 191 192 193 194 195 196 197 198
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Gets the suite definition configuration.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SuiteDefinitionConfiguration {
/// <p>Gets the suite definition name. This is a required parameter.</p>
pub suite_definition_name: ::std::option::Option<::std::string::String>,
/// <p>Gets the devices configured.</p>
pub devices: ::std::option::Option<::std::vec::Vec<crate::types::DeviceUnderTest>>,
/// <p>Gets the tests intended for qualification in a suite.</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 test suite root group. This is a required parameter. For updating or creating the latest qualification suite, if <code>intendedForQualification</code> is set to true, <code>rootGroup</code> can be an empty string. If <code>intendedForQualification</code> is false, <code>rootGroup</code> cannot be an empty string. If <code>rootGroup</code> is empty, and <code>intendedForQualification</code> is set to true, all the qualification tests are included, and the configuration is default.</p>
/// <p>For a qualification suite, the minimum length is 0, and the maximum is 2048. For a non-qualification suite, the minimum length is 1, and the maximum is 2048.</p>
pub root_group: ::std::option::Option<::std::string::String>,
/// <p>Gets the device permission ARN. This is a required parameter.</p>
pub device_permission_role_arn: ::std::option::Option<::std::string::String>,
/// <p>Sets the MQTT protocol that is configured in the suite definition.</p>
pub protocol: ::std::option::Option<crate::types::Protocol>,
}
impl SuiteDefinitionConfiguration {
/// <p>Gets the suite definition name. This is a required parameter.</p>
pub fn suite_definition_name(&self) -> ::std::option::Option<&str> {
self.suite_definition_name.as_deref()
}
/// <p>Gets the devices configured.</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 `.devices.is_none()`.
pub fn devices(&self) -> &[crate::types::DeviceUnderTest] {
self.devices.as_deref().unwrap_or_default()
}
/// <p>Gets the tests intended for qualification in a suite.</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 test suite root group. This is a required parameter. For updating or creating the latest qualification suite, if <code>intendedForQualification</code> is set to true, <code>rootGroup</code> can be an empty string. If <code>intendedForQualification</code> is false, <code>rootGroup</code> cannot be an empty string. If <code>rootGroup</code> is empty, and <code>intendedForQualification</code> is set to true, all the qualification tests are included, and the configuration is default.</p>
/// <p>For a qualification suite, the minimum length is 0, and the maximum is 2048. For a non-qualification suite, the minimum length is 1, and the maximum is 2048.</p>
pub fn root_group(&self) -> ::std::option::Option<&str> {
self.root_group.as_deref()
}
/// <p>Gets the device permission ARN. This is a required parameter.</p>
pub fn device_permission_role_arn(&self) -> ::std::option::Option<&str> {
self.device_permission_role_arn.as_deref()
}
/// <p>Sets 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()
}
}
impl SuiteDefinitionConfiguration {
/// Creates a new builder-style object to manufacture [`SuiteDefinitionConfiguration`](crate::types::SuiteDefinitionConfiguration).
pub fn builder() -> crate::types::builders::SuiteDefinitionConfigurationBuilder {
crate::types::builders::SuiteDefinitionConfigurationBuilder::default()
}
}
/// A builder for [`SuiteDefinitionConfiguration`](crate::types::SuiteDefinitionConfiguration).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct SuiteDefinitionConfigurationBuilder {
pub(crate) suite_definition_name: ::std::option::Option<::std::string::String>,
pub(crate) 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) root_group: ::std::option::Option<::std::string::String>,
pub(crate) device_permission_role_arn: ::std::option::Option<::std::string::String>,
pub(crate) protocol: ::std::option::Option<crate::types::Protocol>,
}
impl SuiteDefinitionConfigurationBuilder {
/// <p>Gets the suite definition name. This is a required parameter.</p>
/// This field is required.
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>Gets the suite definition name. This is a required parameter.</p>
pub fn set_suite_definition_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.suite_definition_name = input;
self
}
/// <p>Gets the suite definition name. This is a required parameter.</p>
pub fn get_suite_definition_name(&self) -> &::std::option::Option<::std::string::String> {
&self.suite_definition_name
}
/// Appends an item to `devices`.
///
/// To override the contents of this collection use [`set_devices`](Self::set_devices).
///
/// <p>Gets the devices configured.</p>
pub fn devices(mut self, input: crate::types::DeviceUnderTest) -> Self {
let mut v = self.devices.unwrap_or_default();
v.push(input);
self.devices = ::std::option::Option::Some(v);
self
}
/// <p>Gets the devices configured.</p>
pub fn set_devices(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DeviceUnderTest>>) -> Self {
self.devices = input;
self
}
/// <p>Gets the devices configured.</p>
pub fn get_devices(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DeviceUnderTest>> {
&self.devices
}
/// <p>Gets the tests intended for qualification in a suite.</p>
pub fn intended_for_qualification(mut self, input: bool) -> Self {
self.intended_for_qualification = ::std::option::Option::Some(input);
self
}
/// <p>Gets the tests intended for qualification in a suite.</p>
pub fn set_intended_for_qualification(mut self, input: ::std::option::Option<bool>) -> Self {
self.intended_for_qualification = input;
self
}
/// <p>Gets the tests intended for qualification in a suite.</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 test suite root group. This is a required parameter. For updating or creating the latest qualification suite, if <code>intendedForQualification</code> is set to true, <code>rootGroup</code> can be an empty string. If <code>intendedForQualification</code> is false, <code>rootGroup</code> cannot be an empty string. If <code>rootGroup</code> is empty, and <code>intendedForQualification</code> is set to true, all the qualification tests are included, and the configuration is default.</p>
/// <p>For a qualification suite, the minimum length is 0, and the maximum is 2048. For a non-qualification suite, the minimum length is 1, and the maximum is 2048.</p>
/// This field is required.
pub fn root_group(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.root_group = ::std::option::Option::Some(input.into());
self
}
/// <p>Gets the test suite root group. This is a required parameter. For updating or creating the latest qualification suite, if <code>intendedForQualification</code> is set to true, <code>rootGroup</code> can be an empty string. If <code>intendedForQualification</code> is false, <code>rootGroup</code> cannot be an empty string. If <code>rootGroup</code> is empty, and <code>intendedForQualification</code> is set to true, all the qualification tests are included, and the configuration is default.</p>
/// <p>For a qualification suite, the minimum length is 0, and the maximum is 2048. For a non-qualification suite, the minimum length is 1, and the maximum is 2048.</p>
pub fn set_root_group(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.root_group = input;
self
}
/// <p>Gets the test suite root group. This is a required parameter. For updating or creating the latest qualification suite, if <code>intendedForQualification</code> is set to true, <code>rootGroup</code> can be an empty string. If <code>intendedForQualification</code> is false, <code>rootGroup</code> cannot be an empty string. If <code>rootGroup</code> is empty, and <code>intendedForQualification</code> is set to true, all the qualification tests are included, and the configuration is default.</p>
/// <p>For a qualification suite, the minimum length is 0, and the maximum is 2048. For a non-qualification suite, the minimum length is 1, and the maximum is 2048.</p>
pub fn get_root_group(&self) -> &::std::option::Option<::std::string::String> {
&self.root_group
}
/// <p>Gets the device permission ARN. This is a required parameter.</p>
/// This field is required.
pub fn device_permission_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.device_permission_role_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>Gets the device permission ARN. This is a required parameter.</p>
pub fn set_device_permission_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.device_permission_role_arn = input;
self
}
/// <p>Gets the device permission ARN. This is a required parameter.</p>
pub fn get_device_permission_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.device_permission_role_arn
}
/// <p>Sets 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>Sets 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>Sets the MQTT protocol that is configured in the suite definition.</p>
pub fn get_protocol(&self) -> &::std::option::Option<crate::types::Protocol> {
&self.protocol
}
/// Consumes the builder and constructs a [`SuiteDefinitionConfiguration`](crate::types::SuiteDefinitionConfiguration).
pub fn build(self) -> crate::types::SuiteDefinitionConfiguration {
crate::types::SuiteDefinitionConfiguration {
suite_definition_name: self.suite_definition_name,
devices: self.devices,
intended_for_qualification: self.intended_for_qualification,
is_long_duration_test: self.is_long_duration_test,
root_group: self.root_group,
device_permission_role_arn: self.device_permission_role_arn,
protocol: self.protocol,
}
}
}