aws_sdk_iotanalytics/operation/describe_channel/
_describe_channel_input.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 DescribeChannelInput {
6    /// <p>The name of the channel whose information is retrieved.</p>
7    pub channel_name: ::std::option::Option<::std::string::String>,
8    /// <p>If true, additional statistical information about the channel is included in the response. This feature can't be used with a channel whose S3 storage is customer-managed.</p>
9    pub include_statistics: ::std::option::Option<bool>,
10}
11impl DescribeChannelInput {
12    /// <p>The name of the channel whose information is retrieved.</p>
13    pub fn channel_name(&self) -> ::std::option::Option<&str> {
14        self.channel_name.as_deref()
15    }
16    /// <p>If true, additional statistical information about the channel is included in the response. This feature can't be used with a channel whose S3 storage is customer-managed.</p>
17    pub fn include_statistics(&self) -> ::std::option::Option<bool> {
18        self.include_statistics
19    }
20}
21impl DescribeChannelInput {
22    /// Creates a new builder-style object to manufacture [`DescribeChannelInput`](crate::operation::describe_channel::DescribeChannelInput).
23    pub fn builder() -> crate::operation::describe_channel::builders::DescribeChannelInputBuilder {
24        crate::operation::describe_channel::builders::DescribeChannelInputBuilder::default()
25    }
26}
27
28/// A builder for [`DescribeChannelInput`](crate::operation::describe_channel::DescribeChannelInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DescribeChannelInputBuilder {
32    pub(crate) channel_name: ::std::option::Option<::std::string::String>,
33    pub(crate) include_statistics: ::std::option::Option<bool>,
34}
35impl DescribeChannelInputBuilder {
36    /// <p>The name of the channel whose information is retrieved.</p>
37    /// This field is required.
38    pub fn channel_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.channel_name = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The name of the channel whose information is retrieved.</p>
43    pub fn set_channel_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.channel_name = input;
45        self
46    }
47    /// <p>The name of the channel whose information is retrieved.</p>
48    pub fn get_channel_name(&self) -> &::std::option::Option<::std::string::String> {
49        &self.channel_name
50    }
51    /// <p>If true, additional statistical information about the channel is included in the response. This feature can't be used with a channel whose S3 storage is customer-managed.</p>
52    pub fn include_statistics(mut self, input: bool) -> Self {
53        self.include_statistics = ::std::option::Option::Some(input);
54        self
55    }
56    /// <p>If true, additional statistical information about the channel is included in the response. This feature can't be used with a channel whose S3 storage is customer-managed.</p>
57    pub fn set_include_statistics(mut self, input: ::std::option::Option<bool>) -> Self {
58        self.include_statistics = input;
59        self
60    }
61    /// <p>If true, additional statistical information about the channel is included in the response. This feature can't be used with a channel whose S3 storage is customer-managed.</p>
62    pub fn get_include_statistics(&self) -> &::std::option::Option<bool> {
63        &self.include_statistics
64    }
65    /// Consumes the builder and constructs a [`DescribeChannelInput`](crate::operation::describe_channel::DescribeChannelInput).
66    pub fn build(
67        self,
68    ) -> ::std::result::Result<crate::operation::describe_channel::DescribeChannelInput, ::aws_smithy_types::error::operation::BuildError> {
69        ::std::result::Result::Ok(crate::operation::describe_channel::DescribeChannelInput {
70            channel_name: self.channel_name,
71            include_statistics: self.include_statistics,
72        })
73    }
74}