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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The <code>MD5OfMessageBody</code> and <code>MessageId</code> elements.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SendMessageOutput {
    /// <p>An MD5 digest of the non-URL-encoded message body string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see <a href="https://www.ietf.org/rfc/rfc1321.txt">RFC1321</a>.</p>
    #[doc(hidden)]
    pub md5_of_message_body: std::option::Option<std::string::String>,
    /// <p>An MD5 digest of the non-URL-encoded message attribute string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see <a href="https://www.ietf.org/rfc/rfc1321.txt">RFC1321</a>.</p>
    #[doc(hidden)]
    pub md5_of_message_attributes: std::option::Option<std::string::String>,
    /// <p>An MD5 digest of the non-URL-encoded message system attribute string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest.</p>
    #[doc(hidden)]
    pub md5_of_message_system_attributes: std::option::Option<std::string::String>,
    /// <p>An attribute containing the <code>MessageId</code> of the message sent to the queue. For more information, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-message-identifiers.html">Queue and Message Identifiers</a> in the <i>Amazon SQS Developer Guide</i>. </p>
    #[doc(hidden)]
    pub message_id: std::option::Option<std::string::String>,
    /// <p>This parameter applies only to FIFO (first-in-first-out) queues.</p>
    /// <p>The large, non-consecutive number that Amazon SQS assigns to each message.</p>
    /// <p>The length of <code>SequenceNumber</code> is 128 bits. <code>SequenceNumber</code> continues to increase for a particular <code>MessageGroupId</code>.</p>
    #[doc(hidden)]
    pub sequence_number: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl SendMessageOutput {
    /// <p>An MD5 digest of the non-URL-encoded message body string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see <a href="https://www.ietf.org/rfc/rfc1321.txt">RFC1321</a>.</p>
    pub fn md5_of_message_body(&self) -> std::option::Option<&str> {
        self.md5_of_message_body.as_deref()
    }
    /// <p>An MD5 digest of the non-URL-encoded message attribute string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see <a href="https://www.ietf.org/rfc/rfc1321.txt">RFC1321</a>.</p>
    pub fn md5_of_message_attributes(&self) -> std::option::Option<&str> {
        self.md5_of_message_attributes.as_deref()
    }
    /// <p>An MD5 digest of the non-URL-encoded message system attribute string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest.</p>
    pub fn md5_of_message_system_attributes(&self) -> std::option::Option<&str> {
        self.md5_of_message_system_attributes.as_deref()
    }
    /// <p>An attribute containing the <code>MessageId</code> of the message sent to the queue. For more information, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-message-identifiers.html">Queue and Message Identifiers</a> in the <i>Amazon SQS Developer Guide</i>. </p>
    pub fn message_id(&self) -> std::option::Option<&str> {
        self.message_id.as_deref()
    }
    /// <p>This parameter applies only to FIFO (first-in-first-out) queues.</p>
    /// <p>The large, non-consecutive number that Amazon SQS assigns to each message.</p>
    /// <p>The length of <code>SequenceNumber</code> is 128 bits. <code>SequenceNumber</code> continues to increase for a particular <code>MessageGroupId</code>.</p>
    pub fn sequence_number(&self) -> std::option::Option<&str> {
        self.sequence_number.as_deref()
    }
}
impl aws_http::request_id::RequestId for SendMessageOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl SendMessageOutput {
    /// Creates a new builder-style object to manufacture [`SendMessageOutput`](crate::operation::send_message::SendMessageOutput).
    pub fn builder() -> crate::operation::send_message::builders::SendMessageOutputBuilder {
        crate::operation::send_message::builders::SendMessageOutputBuilder::default()
    }
}

/// A builder for [`SendMessageOutput`](crate::operation::send_message::SendMessageOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct SendMessageOutputBuilder {
    pub(crate) md5_of_message_body: std::option::Option<std::string::String>,
    pub(crate) md5_of_message_attributes: std::option::Option<std::string::String>,
    pub(crate) md5_of_message_system_attributes: std::option::Option<std::string::String>,
    pub(crate) message_id: std::option::Option<std::string::String>,
    pub(crate) sequence_number: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl SendMessageOutputBuilder {
    /// <p>An MD5 digest of the non-URL-encoded message body string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see <a href="https://www.ietf.org/rfc/rfc1321.txt">RFC1321</a>.</p>
    pub fn md5_of_message_body(mut self, input: impl Into<std::string::String>) -> Self {
        self.md5_of_message_body = Some(input.into());
        self
    }
    /// <p>An MD5 digest of the non-URL-encoded message body string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see <a href="https://www.ietf.org/rfc/rfc1321.txt">RFC1321</a>.</p>
    pub fn set_md5_of_message_body(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.md5_of_message_body = input;
        self
    }
    /// <p>An MD5 digest of the non-URL-encoded message attribute string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see <a href="https://www.ietf.org/rfc/rfc1321.txt">RFC1321</a>.</p>
    pub fn md5_of_message_attributes(mut self, input: impl Into<std::string::String>) -> Self {
        self.md5_of_message_attributes = Some(input.into());
        self
    }
    /// <p>An MD5 digest of the non-URL-encoded message attribute string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see <a href="https://www.ietf.org/rfc/rfc1321.txt">RFC1321</a>.</p>
    pub fn set_md5_of_message_attributes(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.md5_of_message_attributes = input;
        self
    }
    /// <p>An MD5 digest of the non-URL-encoded message system attribute string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest.</p>
    pub fn md5_of_message_system_attributes(
        mut self,
        input: impl Into<std::string::String>,
    ) -> Self {
        self.md5_of_message_system_attributes = Some(input.into());
        self
    }
    /// <p>An MD5 digest of the non-URL-encoded message system attribute string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest.</p>
    pub fn set_md5_of_message_system_attributes(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.md5_of_message_system_attributes = input;
        self
    }
    /// <p>An attribute containing the <code>MessageId</code> of the message sent to the queue. For more information, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-message-identifiers.html">Queue and Message Identifiers</a> in the <i>Amazon SQS Developer Guide</i>. </p>
    pub fn message_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.message_id = Some(input.into());
        self
    }
    /// <p>An attribute containing the <code>MessageId</code> of the message sent to the queue. For more information, see <a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-message-identifiers.html">Queue and Message Identifiers</a> in the <i>Amazon SQS Developer Guide</i>. </p>
    pub fn set_message_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.message_id = input;
        self
    }
    /// <p>This parameter applies only to FIFO (first-in-first-out) queues.</p>
    /// <p>The large, non-consecutive number that Amazon SQS assigns to each message.</p>
    /// <p>The length of <code>SequenceNumber</code> is 128 bits. <code>SequenceNumber</code> continues to increase for a particular <code>MessageGroupId</code>.</p>
    pub fn sequence_number(mut self, input: impl Into<std::string::String>) -> Self {
        self.sequence_number = Some(input.into());
        self
    }
    /// <p>This parameter applies only to FIFO (first-in-first-out) queues.</p>
    /// <p>The large, non-consecutive number that Amazon SQS assigns to each message.</p>
    /// <p>The length of <code>SequenceNumber</code> is 128 bits. <code>SequenceNumber</code> continues to increase for a particular <code>MessageGroupId</code>.</p>
    pub fn set_sequence_number(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.sequence_number = input;
        self
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`SendMessageOutput`](crate::operation::send_message::SendMessageOutput).
    pub fn build(self) -> crate::operation::send_message::SendMessageOutput {
        crate::operation::send_message::SendMessageOutput {
            md5_of_message_body: self.md5_of_message_body,
            md5_of_message_attributes: self.md5_of_message_attributes,
            md5_of_message_system_attributes: self.md5_of_message_system_attributes,
            message_id: self.message_id,
            sequence_number: self.sequence_number,
            _request_id: self._request_id,
        }
    }
}