aws_sdk_connectparticipant/operation/send_event/
_send_event_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 SendEventOutput {
6    /// <p>The ID of the response.</p>
7    pub id: ::std::option::Option<::std::string::String>,
8    /// <p>The time when the event 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    _request_id: Option<String>,
12}
13impl SendEventOutput {
14    /// <p>The ID of the response.</p>
15    pub fn id(&self) -> ::std::option::Option<&str> {
16        self.id.as_deref()
17    }
18    /// <p>The time when the event was sent.</p>
19    /// <p>It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.</p>
20    pub fn absolute_time(&self) -> ::std::option::Option<&str> {
21        self.absolute_time.as_deref()
22    }
23}
24impl ::aws_types::request_id::RequestId for SendEventOutput {
25    fn request_id(&self) -> Option<&str> {
26        self._request_id.as_deref()
27    }
28}
29impl SendEventOutput {
30    /// Creates a new builder-style object to manufacture [`SendEventOutput`](crate::operation::send_event::SendEventOutput).
31    pub fn builder() -> crate::operation::send_event::builders::SendEventOutputBuilder {
32        crate::operation::send_event::builders::SendEventOutputBuilder::default()
33    }
34}
35
36/// A builder for [`SendEventOutput`](crate::operation::send_event::SendEventOutput).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct SendEventOutputBuilder {
40    pub(crate) id: ::std::option::Option<::std::string::String>,
41    pub(crate) absolute_time: ::std::option::Option<::std::string::String>,
42    _request_id: Option<String>,
43}
44impl SendEventOutputBuilder {
45    /// <p>The ID of the response.</p>
46    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47        self.id = ::std::option::Option::Some(input.into());
48        self
49    }
50    /// <p>The ID of the response.</p>
51    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52        self.id = input;
53        self
54    }
55    /// <p>The ID of the response.</p>
56    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
57        &self.id
58    }
59    /// <p>The time when the event was sent.</p>
60    /// <p>It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.</p>
61    pub fn absolute_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62        self.absolute_time = ::std::option::Option::Some(input.into());
63        self
64    }
65    /// <p>The time when the event was sent.</p>
66    /// <p>It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.</p>
67    pub fn set_absolute_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
68        self.absolute_time = input;
69        self
70    }
71    /// <p>The time when the event was sent.</p>
72    /// <p>It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.</p>
73    pub fn get_absolute_time(&self) -> &::std::option::Option<::std::string::String> {
74        &self.absolute_time
75    }
76    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
77        self._request_id = Some(request_id.into());
78        self
79    }
80
81    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
82        self._request_id = request_id;
83        self
84    }
85    /// Consumes the builder and constructs a [`SendEventOutput`](crate::operation::send_event::SendEventOutput).
86    pub fn build(self) -> crate::operation::send_event::SendEventOutput {
87        crate::operation::send_event::SendEventOutput {
88            id: self.id,
89            absolute_time: self.absolute_time,
90            _request_id: self._request_id,
91        }
92    }
93}