aws_sdk_iot/operation/create_stream/
_create_stream_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 CreateStreamOutput {
6    /// <p>The stream ID.</p>
7    pub stream_id: ::std::option::Option<::std::string::String>,
8    /// <p>The stream ARN.</p>
9    pub stream_arn: ::std::option::Option<::std::string::String>,
10    /// <p>A description of the stream.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>The version of the stream.</p>
13    pub stream_version: ::std::option::Option<i32>,
14    _request_id: Option<String>,
15}
16impl CreateStreamOutput {
17    /// <p>The stream ID.</p>
18    pub fn stream_id(&self) -> ::std::option::Option<&str> {
19        self.stream_id.as_deref()
20    }
21    /// <p>The stream ARN.</p>
22    pub fn stream_arn(&self) -> ::std::option::Option<&str> {
23        self.stream_arn.as_deref()
24    }
25    /// <p>A description of the stream.</p>
26    pub fn description(&self) -> ::std::option::Option<&str> {
27        self.description.as_deref()
28    }
29    /// <p>The version of the stream.</p>
30    pub fn stream_version(&self) -> ::std::option::Option<i32> {
31        self.stream_version
32    }
33}
34impl ::aws_types::request_id::RequestId for CreateStreamOutput {
35    fn request_id(&self) -> Option<&str> {
36        self._request_id.as_deref()
37    }
38}
39impl CreateStreamOutput {
40    /// Creates a new builder-style object to manufacture [`CreateStreamOutput`](crate::operation::create_stream::CreateStreamOutput).
41    pub fn builder() -> crate::operation::create_stream::builders::CreateStreamOutputBuilder {
42        crate::operation::create_stream::builders::CreateStreamOutputBuilder::default()
43    }
44}
45
46/// A builder for [`CreateStreamOutput`](crate::operation::create_stream::CreateStreamOutput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct CreateStreamOutputBuilder {
50    pub(crate) stream_id: ::std::option::Option<::std::string::String>,
51    pub(crate) stream_arn: ::std::option::Option<::std::string::String>,
52    pub(crate) description: ::std::option::Option<::std::string::String>,
53    pub(crate) stream_version: ::std::option::Option<i32>,
54    _request_id: Option<String>,
55}
56impl CreateStreamOutputBuilder {
57    /// <p>The stream ID.</p>
58    pub fn stream_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        self.stream_id = ::std::option::Option::Some(input.into());
60        self
61    }
62    /// <p>The stream ID.</p>
63    pub fn set_stream_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64        self.stream_id = input;
65        self
66    }
67    /// <p>The stream ID.</p>
68    pub fn get_stream_id(&self) -> &::std::option::Option<::std::string::String> {
69        &self.stream_id
70    }
71    /// <p>The stream ARN.</p>
72    pub fn stream_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        self.stream_arn = ::std::option::Option::Some(input.into());
74        self
75    }
76    /// <p>The stream ARN.</p>
77    pub fn set_stream_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78        self.stream_arn = input;
79        self
80    }
81    /// <p>The stream ARN.</p>
82    pub fn get_stream_arn(&self) -> &::std::option::Option<::std::string::String> {
83        &self.stream_arn
84    }
85    /// <p>A description of the stream.</p>
86    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87        self.description = ::std::option::Option::Some(input.into());
88        self
89    }
90    /// <p>A description of the stream.</p>
91    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92        self.description = input;
93        self
94    }
95    /// <p>A description of the stream.</p>
96    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
97        &self.description
98    }
99    /// <p>The version of the stream.</p>
100    pub fn stream_version(mut self, input: i32) -> Self {
101        self.stream_version = ::std::option::Option::Some(input);
102        self
103    }
104    /// <p>The version of the stream.</p>
105    pub fn set_stream_version(mut self, input: ::std::option::Option<i32>) -> Self {
106        self.stream_version = input;
107        self
108    }
109    /// <p>The version of the stream.</p>
110    pub fn get_stream_version(&self) -> &::std::option::Option<i32> {
111        &self.stream_version
112    }
113    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
114        self._request_id = Some(request_id.into());
115        self
116    }
117
118    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
119        self._request_id = request_id;
120        self
121    }
122    /// Consumes the builder and constructs a [`CreateStreamOutput`](crate::operation::create_stream::CreateStreamOutput).
123    pub fn build(self) -> crate::operation::create_stream::CreateStreamOutput {
124        crate::operation::create_stream::CreateStreamOutput {
125            stream_id: self.stream_id,
126            stream_arn: self.stream_arn,
127            description: self.description,
128            stream_version: self.stream_version,
129            _request_id: self._request_id,
130        }
131    }
132}