aws_sdk_iotanalytics/operation/create_channel/
_create_channel_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 CreateChannelOutput {
6    /// <p>The name of the channel.</p>
7    pub channel_name: ::std::option::Option<::std::string::String>,
8    /// <p>The ARN of the channel.</p>
9    pub channel_arn: ::std::option::Option<::std::string::String>,
10    /// <p>How long, in days, message data is kept for the channel.</p>
11    pub retention_period: ::std::option::Option<crate::types::RetentionPeriod>,
12    _request_id: Option<String>,
13}
14impl CreateChannelOutput {
15    /// <p>The name of the channel.</p>
16    pub fn channel_name(&self) -> ::std::option::Option<&str> {
17        self.channel_name.as_deref()
18    }
19    /// <p>The ARN of the channel.</p>
20    pub fn channel_arn(&self) -> ::std::option::Option<&str> {
21        self.channel_arn.as_deref()
22    }
23    /// <p>How long, in days, message data is kept for the channel.</p>
24    pub fn retention_period(&self) -> ::std::option::Option<&crate::types::RetentionPeriod> {
25        self.retention_period.as_ref()
26    }
27}
28impl ::aws_types::request_id::RequestId for CreateChannelOutput {
29    fn request_id(&self) -> Option<&str> {
30        self._request_id.as_deref()
31    }
32}
33impl CreateChannelOutput {
34    /// Creates a new builder-style object to manufacture [`CreateChannelOutput`](crate::operation::create_channel::CreateChannelOutput).
35    pub fn builder() -> crate::operation::create_channel::builders::CreateChannelOutputBuilder {
36        crate::operation::create_channel::builders::CreateChannelOutputBuilder::default()
37    }
38}
39
40/// A builder for [`CreateChannelOutput`](crate::operation::create_channel::CreateChannelOutput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct CreateChannelOutputBuilder {
44    pub(crate) channel_name: ::std::option::Option<::std::string::String>,
45    pub(crate) channel_arn: ::std::option::Option<::std::string::String>,
46    pub(crate) retention_period: ::std::option::Option<crate::types::RetentionPeriod>,
47    _request_id: Option<String>,
48}
49impl CreateChannelOutputBuilder {
50    /// <p>The name of the channel.</p>
51    pub fn channel_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
52        self.channel_name = ::std::option::Option::Some(input.into());
53        self
54    }
55    /// <p>The name of the channel.</p>
56    pub fn set_channel_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
57        self.channel_name = input;
58        self
59    }
60    /// <p>The name of the channel.</p>
61    pub fn get_channel_name(&self) -> &::std::option::Option<::std::string::String> {
62        &self.channel_name
63    }
64    /// <p>The ARN of the channel.</p>
65    pub fn channel_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66        self.channel_arn = ::std::option::Option::Some(input.into());
67        self
68    }
69    /// <p>The ARN of the channel.</p>
70    pub fn set_channel_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71        self.channel_arn = input;
72        self
73    }
74    /// <p>The ARN of the channel.</p>
75    pub fn get_channel_arn(&self) -> &::std::option::Option<::std::string::String> {
76        &self.channel_arn
77    }
78    /// <p>How long, in days, message data is kept for the channel.</p>
79    pub fn retention_period(mut self, input: crate::types::RetentionPeriod) -> Self {
80        self.retention_period = ::std::option::Option::Some(input);
81        self
82    }
83    /// <p>How long, in days, message data is kept for the channel.</p>
84    pub fn set_retention_period(mut self, input: ::std::option::Option<crate::types::RetentionPeriod>) -> Self {
85        self.retention_period = input;
86        self
87    }
88    /// <p>How long, in days, message data is kept for the channel.</p>
89    pub fn get_retention_period(&self) -> &::std::option::Option<crate::types::RetentionPeriod> {
90        &self.retention_period
91    }
92    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
93        self._request_id = Some(request_id.into());
94        self
95    }
96
97    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
98        self._request_id = request_id;
99        self
100    }
101    /// Consumes the builder and constructs a [`CreateChannelOutput`](crate::operation::create_channel::CreateChannelOutput).
102    pub fn build(self) -> crate::operation::create_channel::CreateChannelOutput {
103        crate::operation::create_channel::CreateChannelOutput {
104            channel_name: self.channel_name,
105            channel_arn: self.channel_arn,
106            retention_period: self.retention_period,
107            _request_id: self._request_id,
108        }
109    }
110}