aws_sdk_iot/operation/update_stream/
_update_stream_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateStreamInput {
6 pub stream_id: ::std::option::Option<::std::string::String>,
8 pub description: ::std::option::Option<::std::string::String>,
10 pub files: ::std::option::Option<::std::vec::Vec<crate::types::StreamFile>>,
12 pub role_arn: ::std::option::Option<::std::string::String>,
14}
15impl UpdateStreamInput {
16 pub fn stream_id(&self) -> ::std::option::Option<&str> {
18 self.stream_id.as_deref()
19 }
20 pub fn description(&self) -> ::std::option::Option<&str> {
22 self.description.as_deref()
23 }
24 pub fn files(&self) -> &[crate::types::StreamFile] {
28 self.files.as_deref().unwrap_or_default()
29 }
30 pub fn role_arn(&self) -> ::std::option::Option<&str> {
32 self.role_arn.as_deref()
33 }
34}
35impl UpdateStreamInput {
36 pub fn builder() -> crate::operation::update_stream::builders::UpdateStreamInputBuilder {
38 crate::operation::update_stream::builders::UpdateStreamInputBuilder::default()
39 }
40}
41
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct UpdateStreamInputBuilder {
46 pub(crate) stream_id: ::std::option::Option<::std::string::String>,
47 pub(crate) description: ::std::option::Option<::std::string::String>,
48 pub(crate) files: ::std::option::Option<::std::vec::Vec<crate::types::StreamFile>>,
49 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
50}
51impl UpdateStreamInputBuilder {
52 pub fn stream_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55 self.stream_id = ::std::option::Option::Some(input.into());
56 self
57 }
58 pub fn set_stream_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60 self.stream_id = input;
61 self
62 }
63 pub fn get_stream_id(&self) -> &::std::option::Option<::std::string::String> {
65 &self.stream_id
66 }
67 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69 self.description = ::std::option::Option::Some(input.into());
70 self
71 }
72 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74 self.description = input;
75 self
76 }
77 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
79 &self.description
80 }
81 pub fn files(mut self, input: crate::types::StreamFile) -> Self {
87 let mut v = self.files.unwrap_or_default();
88 v.push(input);
89 self.files = ::std::option::Option::Some(v);
90 self
91 }
92 pub fn set_files(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StreamFile>>) -> Self {
94 self.files = input;
95 self
96 }
97 pub fn get_files(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StreamFile>> {
99 &self.files
100 }
101 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103 self.role_arn = ::std::option::Option::Some(input.into());
104 self
105 }
106 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108 self.role_arn = input;
109 self
110 }
111 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
113 &self.role_arn
114 }
115 pub fn build(
117 self,
118 ) -> ::std::result::Result<crate::operation::update_stream::UpdateStreamInput, ::aws_smithy_types::error::operation::BuildError> {
119 ::std::result::Result::Ok(crate::operation::update_stream::UpdateStreamInput {
120 stream_id: self.stream_id,
121 description: self.description,
122 files: self.files,
123 role_arn: self.role_arn,
124 })
125 }
126}