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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Settings for backtest mode.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct BackTestConfiguration {
    /// <p>Run a backtest instead of monitoring new data.</p>
    pub run_back_test_mode: bool,
}
impl BackTestConfiguration {
    /// <p>Run a backtest instead of monitoring new data.</p>
    pub fn run_back_test_mode(&self) -> bool {
        self.run_back_test_mode
    }
}
impl BackTestConfiguration {
    /// Creates a new builder-style object to manufacture [`BackTestConfiguration`](crate::types::BackTestConfiguration).
    pub fn builder() -> crate::types::builders::BackTestConfigurationBuilder {
        crate::types::builders::BackTestConfigurationBuilder::default()
    }
}

/// A builder for [`BackTestConfiguration`](crate::types::BackTestConfiguration).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct BackTestConfigurationBuilder {
    pub(crate) run_back_test_mode: ::std::option::Option<bool>,
}
impl BackTestConfigurationBuilder {
    /// <p>Run a backtest instead of monitoring new data.</p>
    /// This field is required.
    pub fn run_back_test_mode(mut self, input: bool) -> Self {
        self.run_back_test_mode = ::std::option::Option::Some(input);
        self
    }
    /// <p>Run a backtest instead of monitoring new data.</p>
    pub fn set_run_back_test_mode(mut self, input: ::std::option::Option<bool>) -> Self {
        self.run_back_test_mode = input;
        self
    }
    /// <p>Run a backtest instead of monitoring new data.</p>
    pub fn get_run_back_test_mode(&self) -> &::std::option::Option<bool> {
        &self.run_back_test_mode
    }
    /// Consumes the builder and constructs a [`BackTestConfiguration`](crate::types::BackTestConfiguration).
    /// This method will fail if any of the following fields are not set:
    /// - [`run_back_test_mode`](crate::types::builders::BackTestConfigurationBuilder::run_back_test_mode)
    pub fn build(self) -> ::std::result::Result<crate::types::BackTestConfiguration, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::BackTestConfiguration {
            run_back_test_mode: self.run_back_test_mode.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "run_back_test_mode",
                    "run_back_test_mode was not specified but it is required when building BackTestConfiguration",
                )
            })?,
        })
    }
}