aws_sdk_connectparticipant/operation/send_message/
_send_message_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct SendMessageOutput {
6    /// <p>The ID of the message.</p>
7    pub id: ::std::option::Option<::std::string::String>,
8    /// <p>The time when the message was sent.</p>
9    /// <p>It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.</p>
10    pub absolute_time: ::std::option::Option<::std::string::String>,
11    /// <p>Contains metadata for the message.</p>
12    pub message_metadata: ::std::option::Option<crate::types::MessageProcessingMetadata>,
13    _request_id: Option<String>,
14}
15impl SendMessageOutput {
16    /// <p>The ID of the message.</p>
17    pub fn id(&self) -> ::std::option::Option<&str> {
18        self.id.as_deref()
19    }
20    /// <p>The time when the message was sent.</p>
21    /// <p>It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.</p>
22    pub fn absolute_time(&self) -> ::std::option::Option<&str> {
23        self.absolute_time.as_deref()
24    }
25    /// <p>Contains metadata for the message.</p>
26    pub fn message_metadata(&self) -> ::std::option::Option<&crate::types::MessageProcessingMetadata> {
27        self.message_metadata.as_ref()
28    }
29}
30impl ::aws_types::request_id::RequestId for SendMessageOutput {
31    fn request_id(&self) -> Option<&str> {
32        self._request_id.as_deref()
33    }
34}
35impl SendMessageOutput {
36    /// Creates a new builder-style object to manufacture [`SendMessageOutput`](crate::operation::send_message::SendMessageOutput).
37    pub fn builder() -> crate::operation::send_message::builders::SendMessageOutputBuilder {
38        crate::operation::send_message::builders::SendMessageOutputBuilder::default()
39    }
40}
41
42/// A builder for [`SendMessageOutput`](crate::operation::send_message::SendMessageOutput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct SendMessageOutputBuilder {
46    pub(crate) id: ::std::option::Option<::std::string::String>,
47    pub(crate) absolute_time: ::std::option::Option<::std::string::String>,
48    pub(crate) message_metadata: ::std::option::Option<crate::types::MessageProcessingMetadata>,
49    _request_id: Option<String>,
50}
51impl SendMessageOutputBuilder {
52    /// <p>The ID of the message.</p>
53    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.id = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>The ID of the message.</p>
58    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.id = input;
60        self
61    }
62    /// <p>The ID of the message.</p>
63    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
64        &self.id
65    }
66    /// <p>The time when the message was sent.</p>
67    /// <p>It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.</p>
68    pub fn absolute_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69        self.absolute_time = ::std::option::Option::Some(input.into());
70        self
71    }
72    /// <p>The time when the message was sent.</p>
73    /// <p>It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.</p>
74    pub fn set_absolute_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75        self.absolute_time = input;
76        self
77    }
78    /// <p>The time when the message was sent.</p>
79    /// <p>It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.</p>
80    pub fn get_absolute_time(&self) -> &::std::option::Option<::std::string::String> {
81        &self.absolute_time
82    }
83    /// <p>Contains metadata for the message.</p>
84    pub fn message_metadata(mut self, input: crate::types::MessageProcessingMetadata) -> Self {
85        self.message_metadata = ::std::option::Option::Some(input);
86        self
87    }
88    /// <p>Contains metadata for the message.</p>
89    pub fn set_message_metadata(mut self, input: ::std::option::Option<crate::types::MessageProcessingMetadata>) -> Self {
90        self.message_metadata = input;
91        self
92    }
93    /// <p>Contains metadata for the message.</p>
94    pub fn get_message_metadata(&self) -> &::std::option::Option<crate::types::MessageProcessingMetadata> {
95        &self.message_metadata
96    }
97    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
98        self._request_id = Some(request_id.into());
99        self
100    }
101
102    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
103        self._request_id = request_id;
104        self
105    }
106    /// Consumes the builder and constructs a [`SendMessageOutput`](crate::operation::send_message::SendMessageOutput).
107    pub fn build(self) -> crate::operation::send_message::SendMessageOutput {
108        crate::operation::send_message::SendMessageOutput {
109            id: self.id,
110            absolute_time: self.absolute_time,
111            message_metadata: self.message_metadata,
112            _request_id: self._request_id,
113        }
114    }
115}