aws_sdk_sqs/operation/send_message/_send_message_output.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The <code>MD5OfMessageBody</code> and <code>MessageId</code> elements.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct SendMessageOutput {
7 /// <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>
8 pub md5_of_message_body: ::std::option::Option<::std::string::String>,
9 /// <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>
10 pub md5_of_message_attributes: ::std::option::Option<::std::string::String>,
11 /// <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>
12 pub md5_of_message_system_attributes: ::std::option::Option<::std::string::String>,
13 /// <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>
14 pub message_id: ::std::option::Option<::std::string::String>,
15 /// <p>This parameter applies only to FIFO (first-in-first-out) queues.</p>
16 /// <p>The large, non-consecutive number that Amazon SQS assigns to each message.</p>
17 /// <p>The length of <code>SequenceNumber</code> is 128 bits. <code>SequenceNumber</code> continues to increase for a particular <code>MessageGroupId</code>.</p>
18 pub sequence_number: ::std::option::Option<::std::string::String>,
19 _request_id: Option<String>,
20}
21impl SendMessageOutput {
22 /// <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>
23 pub fn md5_of_message_body(&self) -> ::std::option::Option<&str> {
24 self.md5_of_message_body.as_deref()
25 }
26 /// <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>
27 pub fn md5_of_message_attributes(&self) -> ::std::option::Option<&str> {
28 self.md5_of_message_attributes.as_deref()
29 }
30 /// <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>
31 pub fn md5_of_message_system_attributes(&self) -> ::std::option::Option<&str> {
32 self.md5_of_message_system_attributes.as_deref()
33 }
34 /// <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>
35 pub fn message_id(&self) -> ::std::option::Option<&str> {
36 self.message_id.as_deref()
37 }
38 /// <p>This parameter applies only to FIFO (first-in-first-out) queues.</p>
39 /// <p>The large, non-consecutive number that Amazon SQS assigns to each message.</p>
40 /// <p>The length of <code>SequenceNumber</code> is 128 bits. <code>SequenceNumber</code> continues to increase for a particular <code>MessageGroupId</code>.</p>
41 pub fn sequence_number(&self) -> ::std::option::Option<&str> {
42 self.sequence_number.as_deref()
43 }
44}
45impl ::aws_types::request_id::RequestId for SendMessageOutput {
46 fn request_id(&self) -> Option<&str> {
47 self._request_id.as_deref()
48 }
49}
50impl SendMessageOutput {
51 /// Creates a new builder-style object to manufacture [`SendMessageOutput`](crate::operation::send_message::SendMessageOutput).
52 pub fn builder() -> crate::operation::send_message::builders::SendMessageOutputBuilder {
53 crate::operation::send_message::builders::SendMessageOutputBuilder::default()
54 }
55}
56
57/// A builder for [`SendMessageOutput`](crate::operation::send_message::SendMessageOutput).
58#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
59#[non_exhaustive]
60pub struct SendMessageOutputBuilder {
61 pub(crate) md5_of_message_body: ::std::option::Option<::std::string::String>,
62 pub(crate) md5_of_message_attributes: ::std::option::Option<::std::string::String>,
63 pub(crate) md5_of_message_system_attributes: ::std::option::Option<::std::string::String>,
64 pub(crate) message_id: ::std::option::Option<::std::string::String>,
65 pub(crate) sequence_number: ::std::option::Option<::std::string::String>,
66 _request_id: Option<String>,
67}
68impl SendMessageOutputBuilder {
69 /// <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>
70 pub fn md5_of_message_body(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
71 self.md5_of_message_body = ::std::option::Option::Some(input.into());
72 self
73 }
74 /// <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>
75 pub fn set_md5_of_message_body(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76 self.md5_of_message_body = input;
77 self
78 }
79 /// <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>
80 pub fn get_md5_of_message_body(&self) -> &::std::option::Option<::std::string::String> {
81 &self.md5_of_message_body
82 }
83 /// <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>
84 pub fn md5_of_message_attributes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
85 self.md5_of_message_attributes = ::std::option::Option::Some(input.into());
86 self
87 }
88 /// <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>
89 pub fn set_md5_of_message_attributes(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
90 self.md5_of_message_attributes = input;
91 self
92 }
93 /// <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>
94 pub fn get_md5_of_message_attributes(&self) -> &::std::option::Option<::std::string::String> {
95 &self.md5_of_message_attributes
96 }
97 /// <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>
98 pub fn md5_of_message_system_attributes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
99 self.md5_of_message_system_attributes = ::std::option::Option::Some(input.into());
100 self
101 }
102 /// <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>
103 pub fn set_md5_of_message_system_attributes(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
104 self.md5_of_message_system_attributes = input;
105 self
106 }
107 /// <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>
108 pub fn get_md5_of_message_system_attributes(&self) -> &::std::option::Option<::std::string::String> {
109 &self.md5_of_message_system_attributes
110 }
111 /// <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>
112 pub fn message_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113 self.message_id = ::std::option::Option::Some(input.into());
114 self
115 }
116 /// <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>
117 pub fn set_message_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118 self.message_id = input;
119 self
120 }
121 /// <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>
122 pub fn get_message_id(&self) -> &::std::option::Option<::std::string::String> {
123 &self.message_id
124 }
125 /// <p>This parameter applies only to FIFO (first-in-first-out) queues.</p>
126 /// <p>The large, non-consecutive number that Amazon SQS assigns to each message.</p>
127 /// <p>The length of <code>SequenceNumber</code> is 128 bits. <code>SequenceNumber</code> continues to increase for a particular <code>MessageGroupId</code>.</p>
128 pub fn sequence_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129 self.sequence_number = ::std::option::Option::Some(input.into());
130 self
131 }
132 /// <p>This parameter applies only to FIFO (first-in-first-out) queues.</p>
133 /// <p>The large, non-consecutive number that Amazon SQS assigns to each message.</p>
134 /// <p>The length of <code>SequenceNumber</code> is 128 bits. <code>SequenceNumber</code> continues to increase for a particular <code>MessageGroupId</code>.</p>
135 pub fn set_sequence_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136 self.sequence_number = input;
137 self
138 }
139 /// <p>This parameter applies only to FIFO (first-in-first-out) queues.</p>
140 /// <p>The large, non-consecutive number that Amazon SQS assigns to each message.</p>
141 /// <p>The length of <code>SequenceNumber</code> is 128 bits. <code>SequenceNumber</code> continues to increase for a particular <code>MessageGroupId</code>.</p>
142 pub fn get_sequence_number(&self) -> &::std::option::Option<::std::string::String> {
143 &self.sequence_number
144 }
145 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
146 self._request_id = Some(request_id.into());
147 self
148 }
149
150 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
151 self._request_id = request_id;
152 self
153 }
154 /// Consumes the builder and constructs a [`SendMessageOutput`](crate::operation::send_message::SendMessageOutput).
155 pub fn build(self) -> crate::operation::send_message::SendMessageOutput {
156 crate::operation::send_message::SendMessageOutput {
157 md5_of_message_body: self.md5_of_message_body,
158 md5_of_message_attributes: self.md5_of_message_attributes,
159 md5_of_message_system_attributes: self.md5_of_message_system_attributes,
160 message_id: self.message_id,
161 sequence_number: self.sequence_number,
162 _request_id: self._request_id,
163 }
164 }
165}