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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct NotifyWorkersInput {
    /// <p>The subject line of the email message to send. Can include up to 200 characters.</p>
    pub subject: ::std::option::Option<::std::string::String>,
    /// <p>The text of the email message to send. Can include up to 4,096 characters</p>
    pub message_text: ::std::option::Option<::std::string::String>,
    /// <p>A list of Worker IDs you wish to notify. You can notify upto 100 Workers at a time.</p>
    pub worker_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl NotifyWorkersInput {
    /// <p>The subject line of the email message to send. Can include up to 200 characters.</p>
    pub fn subject(&self) -> ::std::option::Option<&str> {
        self.subject.as_deref()
    }
    /// <p>The text of the email message to send. Can include up to 4,096 characters</p>
    pub fn message_text(&self) -> ::std::option::Option<&str> {
        self.message_text.as_deref()
    }
    /// <p>A list of Worker IDs you wish to notify. You can notify upto 100 Workers at a time.</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 `.worker_ids.is_none()`.
    pub fn worker_ids(&self) -> &[::std::string::String] {
        self.worker_ids.as_deref().unwrap_or_default()
    }
}
impl NotifyWorkersInput {
    /// Creates a new builder-style object to manufacture [`NotifyWorkersInput`](crate::operation::notify_workers::NotifyWorkersInput).
    pub fn builder() -> crate::operation::notify_workers::builders::NotifyWorkersInputBuilder {
        crate::operation::notify_workers::builders::NotifyWorkersInputBuilder::default()
    }
}

/// A builder for [`NotifyWorkersInput`](crate::operation::notify_workers::NotifyWorkersInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct NotifyWorkersInputBuilder {
    pub(crate) subject: ::std::option::Option<::std::string::String>,
    pub(crate) message_text: ::std::option::Option<::std::string::String>,
    pub(crate) worker_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl NotifyWorkersInputBuilder {
    /// <p>The subject line of the email message to send. Can include up to 200 characters.</p>
    /// This field is required.
    pub fn subject(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.subject = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The subject line of the email message to send. Can include up to 200 characters.</p>
    pub fn set_subject(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.subject = input;
        self
    }
    /// <p>The subject line of the email message to send. Can include up to 200 characters.</p>
    pub fn get_subject(&self) -> &::std::option::Option<::std::string::String> {
        &self.subject
    }
    /// <p>The text of the email message to send. Can include up to 4,096 characters</p>
    /// This field is required.
    pub fn message_text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.message_text = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The text of the email message to send. Can include up to 4,096 characters</p>
    pub fn set_message_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.message_text = input;
        self
    }
    /// <p>The text of the email message to send. Can include up to 4,096 characters</p>
    pub fn get_message_text(&self) -> &::std::option::Option<::std::string::String> {
        &self.message_text
    }
    /// Appends an item to `worker_ids`.
    ///
    /// To override the contents of this collection use [`set_worker_ids`](Self::set_worker_ids).
    ///
    /// <p>A list of Worker IDs you wish to notify. You can notify upto 100 Workers at a time.</p>
    pub fn worker_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.worker_ids.unwrap_or_default();
        v.push(input.into());
        self.worker_ids = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of Worker IDs you wish to notify. You can notify upto 100 Workers at a time.</p>
    pub fn set_worker_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.worker_ids = input;
        self
    }
    /// <p>A list of Worker IDs you wish to notify. You can notify upto 100 Workers at a time.</p>
    pub fn get_worker_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.worker_ids
    }
    /// Consumes the builder and constructs a [`NotifyWorkersInput`](crate::operation::notify_workers::NotifyWorkersInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::notify_workers::NotifyWorkersInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::notify_workers::NotifyWorkersInput {
            subject: self.subject,
            message_text: self.message_text,
            worker_ids: self.worker_ids,
        })
    }
}