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

/// <p>An array of structures that define the traffic allocation percentages among the feature variations during each step of a launch. This also defines the start time of each step.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ScheduledSplitsLaunchDefinition {
    /// <p>An array of structures that define the traffic allocation percentages among the feature variations during each step of the launch. This also defines the start time of each step.</p>
    pub steps: ::std::option::Option<::std::vec::Vec<crate::types::ScheduledSplit>>,
}
impl ScheduledSplitsLaunchDefinition {
    /// <p>An array of structures that define the traffic allocation percentages among the feature variations during each step of the launch. This also defines the start time of each step.</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 `.steps.is_none()`.
    pub fn steps(&self) -> &[crate::types::ScheduledSplit] {
        self.steps.as_deref().unwrap_or_default()
    }
}
impl ScheduledSplitsLaunchDefinition {
    /// Creates a new builder-style object to manufacture [`ScheduledSplitsLaunchDefinition`](crate::types::ScheduledSplitsLaunchDefinition).
    pub fn builder() -> crate::types::builders::ScheduledSplitsLaunchDefinitionBuilder {
        crate::types::builders::ScheduledSplitsLaunchDefinitionBuilder::default()
    }
}

/// A builder for [`ScheduledSplitsLaunchDefinition`](crate::types::ScheduledSplitsLaunchDefinition).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ScheduledSplitsLaunchDefinitionBuilder {
    pub(crate) steps: ::std::option::Option<::std::vec::Vec<crate::types::ScheduledSplit>>,
}
impl ScheduledSplitsLaunchDefinitionBuilder {
    /// Appends an item to `steps`.
    ///
    /// To override the contents of this collection use [`set_steps`](Self::set_steps).
    ///
    /// <p>An array of structures that define the traffic allocation percentages among the feature variations during each step of the launch. This also defines the start time of each step.</p>
    pub fn steps(mut self, input: crate::types::ScheduledSplit) -> Self {
        let mut v = self.steps.unwrap_or_default();
        v.push(input);
        self.steps = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of structures that define the traffic allocation percentages among the feature variations during each step of the launch. This also defines the start time of each step.</p>
    pub fn set_steps(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ScheduledSplit>>) -> Self {
        self.steps = input;
        self
    }
    /// <p>An array of structures that define the traffic allocation percentages among the feature variations during each step of the launch. This also defines the start time of each step.</p>
    pub fn get_steps(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ScheduledSplit>> {
        &self.steps
    }
    /// Consumes the builder and constructs a [`ScheduledSplitsLaunchDefinition`](crate::types::ScheduledSplitsLaunchDefinition).
    pub fn build(self) -> crate::types::ScheduledSplitsLaunchDefinition {
        crate::types::ScheduledSplitsLaunchDefinition { steps: self.steps }
    }
}