aws_sdk_pipes/types/
_pipe_target_sqs_queue_parameters.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The parameters for using a Amazon SQS stream as a target.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
6pub struct PipeTargetSqsQueueParameters {
7    /// <p>The FIFO message group ID to use as the target.</p>
8    pub message_group_id: ::std::option::Option<::std::string::String>,
9    /// <p>This parameter applies only to FIFO (first-in-first-out) queues.</p>
10    /// <p>The token used for deduplication of sent messages.</p>
11    pub message_deduplication_id: ::std::option::Option<::std::string::String>,
12}
13impl PipeTargetSqsQueueParameters {
14    /// <p>The FIFO message group ID to use as the target.</p>
15    pub fn message_group_id(&self) -> ::std::option::Option<&str> {
16        self.message_group_id.as_deref()
17    }
18    /// <p>This parameter applies only to FIFO (first-in-first-out) queues.</p>
19    /// <p>The token used for deduplication of sent messages.</p>
20    pub fn message_deduplication_id(&self) -> ::std::option::Option<&str> {
21        self.message_deduplication_id.as_deref()
22    }
23}
24impl ::std::fmt::Debug for PipeTargetSqsQueueParameters {
25    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
26        let mut formatter = f.debug_struct("PipeTargetSqsQueueParameters");
27        formatter.field("message_group_id", &"*** Sensitive Data Redacted ***");
28        formatter.field("message_deduplication_id", &"*** Sensitive Data Redacted ***");
29        formatter.finish()
30    }
31}
32impl PipeTargetSqsQueueParameters {
33    /// Creates a new builder-style object to manufacture [`PipeTargetSqsQueueParameters`](crate::types::PipeTargetSqsQueueParameters).
34    pub fn builder() -> crate::types::builders::PipeTargetSqsQueueParametersBuilder {
35        crate::types::builders::PipeTargetSqsQueueParametersBuilder::default()
36    }
37}
38
39/// A builder for [`PipeTargetSqsQueueParameters`](crate::types::PipeTargetSqsQueueParameters).
40#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
41#[non_exhaustive]
42pub struct PipeTargetSqsQueueParametersBuilder {
43    pub(crate) message_group_id: ::std::option::Option<::std::string::String>,
44    pub(crate) message_deduplication_id: ::std::option::Option<::std::string::String>,
45}
46impl PipeTargetSqsQueueParametersBuilder {
47    /// <p>The FIFO message group ID to use as the target.</p>
48    pub fn message_group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
49        self.message_group_id = ::std::option::Option::Some(input.into());
50        self
51    }
52    /// <p>The FIFO message group ID to use as the target.</p>
53    pub fn set_message_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
54        self.message_group_id = input;
55        self
56    }
57    /// <p>The FIFO message group ID to use as the target.</p>
58    pub fn get_message_group_id(&self) -> &::std::option::Option<::std::string::String> {
59        &self.message_group_id
60    }
61    /// <p>This parameter applies only to FIFO (first-in-first-out) queues.</p>
62    /// <p>The token used for deduplication of sent messages.</p>
63    pub fn message_deduplication_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
64        self.message_deduplication_id = ::std::option::Option::Some(input.into());
65        self
66    }
67    /// <p>This parameter applies only to FIFO (first-in-first-out) queues.</p>
68    /// <p>The token used for deduplication of sent messages.</p>
69    pub fn set_message_deduplication_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
70        self.message_deduplication_id = input;
71        self
72    }
73    /// <p>This parameter applies only to FIFO (first-in-first-out) queues.</p>
74    /// <p>The token used for deduplication of sent messages.</p>
75    pub fn get_message_deduplication_id(&self) -> &::std::option::Option<::std::string::String> {
76        &self.message_deduplication_id
77    }
78    /// Consumes the builder and constructs a [`PipeTargetSqsQueueParameters`](crate::types::PipeTargetSqsQueueParameters).
79    pub fn build(self) -> crate::types::PipeTargetSqsQueueParameters {
80        crate::types::PipeTargetSqsQueueParameters {
81            message_group_id: self.message_group_id,
82            message_deduplication_id: self.message_deduplication_id,
83        }
84    }
85}
86impl ::std::fmt::Debug for PipeTargetSqsQueueParametersBuilder {
87    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
88        let mut formatter = f.debug_struct("PipeTargetSqsQueueParametersBuilder");
89        formatter.field("message_group_id", &"*** Sensitive Data Redacted ***");
90        formatter.field("message_deduplication_id", &"*** Sensitive Data Redacted ***");
91        formatter.finish()
92    }
93}