aws_sdk_medialive/operation/update_cluster/
_update_cluster_output.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateClusterOutput {
7 pub arn: ::std::option::Option<::std::string::String>,
9 pub channel_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
11 pub cluster_type: ::std::option::Option<crate::types::ClusterType>,
13 pub id: ::std::option::Option<::std::string::String>,
15 pub name: ::std::option::Option<::std::string::String>,
17 pub network_settings: ::std::option::Option<crate::types::ClusterNetworkSettings>,
19 pub state: ::std::option::Option<crate::types::ClusterState>,
21 _request_id: Option<String>,
22}
23impl UpdateClusterOutput {
24 pub fn arn(&self) -> ::std::option::Option<&str> {
26 self.arn.as_deref()
27 }
28 pub fn channel_ids(&self) -> &[::std::string::String] {
32 self.channel_ids.as_deref().unwrap_or_default()
33 }
34 pub fn cluster_type(&self) -> ::std::option::Option<&crate::types::ClusterType> {
36 self.cluster_type.as_ref()
37 }
38 pub fn id(&self) -> ::std::option::Option<&str> {
40 self.id.as_deref()
41 }
42 pub fn name(&self) -> ::std::option::Option<&str> {
44 self.name.as_deref()
45 }
46 pub fn network_settings(&self) -> ::std::option::Option<&crate::types::ClusterNetworkSettings> {
48 self.network_settings.as_ref()
49 }
50 pub fn state(&self) -> ::std::option::Option<&crate::types::ClusterState> {
52 self.state.as_ref()
53 }
54}
55impl ::aws_types::request_id::RequestId for UpdateClusterOutput {
56 fn request_id(&self) -> Option<&str> {
57 self._request_id.as_deref()
58 }
59}
60impl UpdateClusterOutput {
61 pub fn builder() -> crate::operation::update_cluster::builders::UpdateClusterOutputBuilder {
63 crate::operation::update_cluster::builders::UpdateClusterOutputBuilder::default()
64 }
65}
66
67#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
69#[non_exhaustive]
70pub struct UpdateClusterOutputBuilder {
71 pub(crate) arn: ::std::option::Option<::std::string::String>,
72 pub(crate) channel_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
73 pub(crate) cluster_type: ::std::option::Option<crate::types::ClusterType>,
74 pub(crate) id: ::std::option::Option<::std::string::String>,
75 pub(crate) name: ::std::option::Option<::std::string::String>,
76 pub(crate) network_settings: ::std::option::Option<crate::types::ClusterNetworkSettings>,
77 pub(crate) state: ::std::option::Option<crate::types::ClusterState>,
78 _request_id: Option<String>,
79}
80impl UpdateClusterOutputBuilder {
81 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83 self.arn = ::std::option::Option::Some(input.into());
84 self
85 }
86 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88 self.arn = input;
89 self
90 }
91 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
93 &self.arn
94 }
95 pub fn channel_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101 let mut v = self.channel_ids.unwrap_or_default();
102 v.push(input.into());
103 self.channel_ids = ::std::option::Option::Some(v);
104 self
105 }
106 pub fn set_channel_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
108 self.channel_ids = input;
109 self
110 }
111 pub fn get_channel_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
113 &self.channel_ids
114 }
115 pub fn cluster_type(mut self, input: crate::types::ClusterType) -> Self {
117 self.cluster_type = ::std::option::Option::Some(input);
118 self
119 }
120 pub fn set_cluster_type(mut self, input: ::std::option::Option<crate::types::ClusterType>) -> Self {
122 self.cluster_type = input;
123 self
124 }
125 pub fn get_cluster_type(&self) -> &::std::option::Option<crate::types::ClusterType> {
127 &self.cluster_type
128 }
129 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131 self.id = ::std::option::Option::Some(input.into());
132 self
133 }
134 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136 self.id = input;
137 self
138 }
139 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
141 &self.id
142 }
143 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145 self.name = ::std::option::Option::Some(input.into());
146 self
147 }
148 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150 self.name = input;
151 self
152 }
153 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
155 &self.name
156 }
157 pub fn network_settings(mut self, input: crate::types::ClusterNetworkSettings) -> Self {
159 self.network_settings = ::std::option::Option::Some(input);
160 self
161 }
162 pub fn set_network_settings(mut self, input: ::std::option::Option<crate::types::ClusterNetworkSettings>) -> Self {
164 self.network_settings = input;
165 self
166 }
167 pub fn get_network_settings(&self) -> &::std::option::Option<crate::types::ClusterNetworkSettings> {
169 &self.network_settings
170 }
171 pub fn state(mut self, input: crate::types::ClusterState) -> Self {
173 self.state = ::std::option::Option::Some(input);
174 self
175 }
176 pub fn set_state(mut self, input: ::std::option::Option<crate::types::ClusterState>) -> Self {
178 self.state = input;
179 self
180 }
181 pub fn get_state(&self) -> &::std::option::Option<crate::types::ClusterState> {
183 &self.state
184 }
185 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
186 self._request_id = Some(request_id.into());
187 self
188 }
189
190 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
191 self._request_id = request_id;
192 self
193 }
194 pub fn build(self) -> crate::operation::update_cluster::UpdateClusterOutput {
196 crate::operation::update_cluster::UpdateClusterOutput {
197 arn: self.arn,
198 channel_ids: self.channel_ids,
199 cluster_type: self.cluster_type,
200 id: self.id,
201 name: self.name,
202 network_settings: self.network_settings,
203 state: self.state,
204 _request_id: self._request_id,
205 }
206 }
207}