aws_sdk_sns/types/_publish_batch_result_entry.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Encloses data related to a successful message in a batch request for topic.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct PublishBatchResultEntry {
7 /// <p>The <code>Id</code> of an entry in a batch request.</p>
8 pub id: ::std::option::Option<::std::string::String>,
9 /// <p>An identifier for the message.</p>
10 pub message_id: ::std::option::Option<::std::string::String>,
11 /// <p>This parameter applies only to FIFO (first-in-first-out) topics.</p>
12 /// <p>The large, non-consecutive number that Amazon SNS assigns to each message.</p>
13 /// <p>The length of <code>SequenceNumber</code> is 128 bits. <code>SequenceNumber</code> continues to increase for a particular <code>MessageGroupId</code>.</p>
14 pub sequence_number: ::std::option::Option<::std::string::String>,
15}
16impl PublishBatchResultEntry {
17 /// <p>The <code>Id</code> of an entry in a batch request.</p>
18 pub fn id(&self) -> ::std::option::Option<&str> {
19 self.id.as_deref()
20 }
21 /// <p>An identifier for the message.</p>
22 pub fn message_id(&self) -> ::std::option::Option<&str> {
23 self.message_id.as_deref()
24 }
25 /// <p>This parameter applies only to FIFO (first-in-first-out) topics.</p>
26 /// <p>The large, non-consecutive number that Amazon SNS assigns to each message.</p>
27 /// <p>The length of <code>SequenceNumber</code> is 128 bits. <code>SequenceNumber</code> continues to increase for a particular <code>MessageGroupId</code>.</p>
28 pub fn sequence_number(&self) -> ::std::option::Option<&str> {
29 self.sequence_number.as_deref()
30 }
31}
32impl PublishBatchResultEntry {
33 /// Creates a new builder-style object to manufacture [`PublishBatchResultEntry`](crate::types::PublishBatchResultEntry).
34 pub fn builder() -> crate::types::builders::PublishBatchResultEntryBuilder {
35 crate::types::builders::PublishBatchResultEntryBuilder::default()
36 }
37}
38
39/// A builder for [`PublishBatchResultEntry`](crate::types::PublishBatchResultEntry).
40#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
41#[non_exhaustive]
42pub struct PublishBatchResultEntryBuilder {
43 pub(crate) id: ::std::option::Option<::std::string::String>,
44 pub(crate) message_id: ::std::option::Option<::std::string::String>,
45 pub(crate) sequence_number: ::std::option::Option<::std::string::String>,
46}
47impl PublishBatchResultEntryBuilder {
48 /// <p>The <code>Id</code> of an entry in a batch request.</p>
49 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
50 self.id = ::std::option::Option::Some(input.into());
51 self
52 }
53 /// <p>The <code>Id</code> of an entry in a batch request.</p>
54 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
55 self.id = input;
56 self
57 }
58 /// <p>The <code>Id</code> of an entry in a batch request.</p>
59 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
60 &self.id
61 }
62 /// <p>An identifier for the message.</p>
63 pub fn message_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
64 self.message_id = ::std::option::Option::Some(input.into());
65 self
66 }
67 /// <p>An identifier for the message.</p>
68 pub fn set_message_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
69 self.message_id = input;
70 self
71 }
72 /// <p>An identifier for the message.</p>
73 pub fn get_message_id(&self) -> &::std::option::Option<::std::string::String> {
74 &self.message_id
75 }
76 /// <p>This parameter applies only to FIFO (first-in-first-out) topics.</p>
77 /// <p>The large, non-consecutive number that Amazon SNS assigns to each message.</p>
78 /// <p>The length of <code>SequenceNumber</code> is 128 bits. <code>SequenceNumber</code> continues to increase for a particular <code>MessageGroupId</code>.</p>
79 pub fn sequence_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80 self.sequence_number = ::std::option::Option::Some(input.into());
81 self
82 }
83 /// <p>This parameter applies only to FIFO (first-in-first-out) topics.</p>
84 /// <p>The large, non-consecutive number that Amazon SNS assigns to each message.</p>
85 /// <p>The length of <code>SequenceNumber</code> is 128 bits. <code>SequenceNumber</code> continues to increase for a particular <code>MessageGroupId</code>.</p>
86 pub fn set_sequence_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87 self.sequence_number = input;
88 self
89 }
90 /// <p>This parameter applies only to FIFO (first-in-first-out) topics.</p>
91 /// <p>The large, non-consecutive number that Amazon SNS assigns to each message.</p>
92 /// <p>The length of <code>SequenceNumber</code> is 128 bits. <code>SequenceNumber</code> continues to increase for a particular <code>MessageGroupId</code>.</p>
93 pub fn get_sequence_number(&self) -> &::std::option::Option<::std::string::String> {
94 &self.sequence_number
95 }
96 /// Consumes the builder and constructs a [`PublishBatchResultEntry`](crate::types::PublishBatchResultEntry).
97 pub fn build(self) -> crate::types::PublishBatchResultEntry {
98 crate::types::PublishBatchResultEntry {
99 id: self.id,
100 message_id: self.message_id,
101 sequence_number: self.sequence_number,
102 }
103 }
104}