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>Specifies the settings for an event that causes a journey activity to start.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct EventStartCondition {
    /// <p>Specifies the settings for an event that causes a campaign to be sent or a journey activity to be performed.</p>
    pub event_filter: ::std::option::Option<crate::types::EventFilter>,
    #[allow(missing_docs)] // documentation missing in model
    pub segment_id: ::std::option::Option<::std::string::String>,
}
impl EventStartCondition {
    /// <p>Specifies the settings for an event that causes a campaign to be sent or a journey activity to be performed.</p>
    pub fn event_filter(&self) -> ::std::option::Option<&crate::types::EventFilter> {
        self.event_filter.as_ref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn segment_id(&self) -> ::std::option::Option<&str> {
        self.segment_id.as_deref()
    }
}
impl EventStartCondition {
    /// Creates a new builder-style object to manufacture [`EventStartCondition`](crate::types::EventStartCondition).
    pub fn builder() -> crate::types::builders::EventStartConditionBuilder {
        crate::types::builders::EventStartConditionBuilder::default()
    }
}

/// A builder for [`EventStartCondition`](crate::types::EventStartCondition).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct EventStartConditionBuilder {
    pub(crate) event_filter: ::std::option::Option<crate::types::EventFilter>,
    pub(crate) segment_id: ::std::option::Option<::std::string::String>,
}
impl EventStartConditionBuilder {
    /// <p>Specifies the settings for an event that causes a campaign to be sent or a journey activity to be performed.</p>
    pub fn event_filter(mut self, input: crate::types::EventFilter) -> Self {
        self.event_filter = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the settings for an event that causes a campaign to be sent or a journey activity to be performed.</p>
    pub fn set_event_filter(mut self, input: ::std::option::Option<crate::types::EventFilter>) -> Self {
        self.event_filter = input;
        self
    }
    /// <p>Specifies the settings for an event that causes a campaign to be sent or a journey activity to be performed.</p>
    pub fn get_event_filter(&self) -> &::std::option::Option<crate::types::EventFilter> {
        &self.event_filter
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn segment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.segment_id = ::std::option::Option::Some(input.into());
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_segment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.segment_id = input;
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_segment_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.segment_id
    }
    /// Consumes the builder and constructs a [`EventStartCondition`](crate::types::EventStartCondition).
    pub fn build(self) -> crate::types::EventStartCondition {
        crate::types::EventStartCondition {
            event_filter: self.event_filter,
            segment_id: self.segment_id,
        }
    }
}