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

/// <p>The batch condition that started the workflow run. Either the number of events in the batch size arrived, in which case the BatchSize member is non-zero, or the batch window expired, in which case the BatchWindow member is non-zero.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StartingEventBatchCondition {
    /// <p>Number of events in the batch.</p>
    pub batch_size: ::std::option::Option<i32>,
    /// <p>Duration of the batch window in seconds.</p>
    pub batch_window: ::std::option::Option<i32>,
}
impl StartingEventBatchCondition {
    /// <p>Number of events in the batch.</p>
    pub fn batch_size(&self) -> ::std::option::Option<i32> {
        self.batch_size
    }
    /// <p>Duration of the batch window in seconds.</p>
    pub fn batch_window(&self) -> ::std::option::Option<i32> {
        self.batch_window
    }
}
impl StartingEventBatchCondition {
    /// Creates a new builder-style object to manufacture [`StartingEventBatchCondition`](crate::types::StartingEventBatchCondition).
    pub fn builder() -> crate::types::builders::StartingEventBatchConditionBuilder {
        crate::types::builders::StartingEventBatchConditionBuilder::default()
    }
}

/// A builder for [`StartingEventBatchCondition`](crate::types::StartingEventBatchCondition).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct StartingEventBatchConditionBuilder {
    pub(crate) batch_size: ::std::option::Option<i32>,
    pub(crate) batch_window: ::std::option::Option<i32>,
}
impl StartingEventBatchConditionBuilder {
    /// <p>Number of events in the batch.</p>
    pub fn batch_size(mut self, input: i32) -> Self {
        self.batch_size = ::std::option::Option::Some(input);
        self
    }
    /// <p>Number of events in the batch.</p>
    pub fn set_batch_size(mut self, input: ::std::option::Option<i32>) -> Self {
        self.batch_size = input;
        self
    }
    /// <p>Number of events in the batch.</p>
    pub fn get_batch_size(&self) -> &::std::option::Option<i32> {
        &self.batch_size
    }
    /// <p>Duration of the batch window in seconds.</p>
    pub fn batch_window(mut self, input: i32) -> Self {
        self.batch_window = ::std::option::Option::Some(input);
        self
    }
    /// <p>Duration of the batch window in seconds.</p>
    pub fn set_batch_window(mut self, input: ::std::option::Option<i32>) -> Self {
        self.batch_window = input;
        self
    }
    /// <p>Duration of the batch window in seconds.</p>
    pub fn get_batch_window(&self) -> &::std::option::Option<i32> {
        &self.batch_window
    }
    /// Consumes the builder and constructs a [`StartingEventBatchCondition`](crate::types::StartingEventBatchCondition).
    pub fn build(self) -> crate::types::StartingEventBatchCondition {
        crate::types::StartingEventBatchCondition {
            batch_size: self.batch_size,
            batch_window: self.batch_window,
        }
    }
}