aws_sdk_medialive/operation/delete_cluster/
_delete_cluster_output.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteClusterOutput {
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 instance_role_arn: ::std::option::Option<::std::string::String>,
17 pub name: ::std::option::Option<::std::string::String>,
19 pub network_settings: ::std::option::Option<crate::types::ClusterNetworkSettings>,
21 pub state: ::std::option::Option<crate::types::ClusterState>,
23 _request_id: Option<String>,
24}
25impl DeleteClusterOutput {
26 pub fn arn(&self) -> ::std::option::Option<&str> {
28 self.arn.as_deref()
29 }
30 pub fn channel_ids(&self) -> &[::std::string::String] {
34 self.channel_ids.as_deref().unwrap_or_default()
35 }
36 pub fn cluster_type(&self) -> ::std::option::Option<&crate::types::ClusterType> {
38 self.cluster_type.as_ref()
39 }
40 pub fn id(&self) -> ::std::option::Option<&str> {
42 self.id.as_deref()
43 }
44 pub fn instance_role_arn(&self) -> ::std::option::Option<&str> {
46 self.instance_role_arn.as_deref()
47 }
48 pub fn name(&self) -> ::std::option::Option<&str> {
50 self.name.as_deref()
51 }
52 pub fn network_settings(&self) -> ::std::option::Option<&crate::types::ClusterNetworkSettings> {
54 self.network_settings.as_ref()
55 }
56 pub fn state(&self) -> ::std::option::Option<&crate::types::ClusterState> {
58 self.state.as_ref()
59 }
60}
61impl ::aws_types::request_id::RequestId for DeleteClusterOutput {
62 fn request_id(&self) -> Option<&str> {
63 self._request_id.as_deref()
64 }
65}
66impl DeleteClusterOutput {
67 pub fn builder() -> crate::operation::delete_cluster::builders::DeleteClusterOutputBuilder {
69 crate::operation::delete_cluster::builders::DeleteClusterOutputBuilder::default()
70 }
71}
72
73#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
75#[non_exhaustive]
76pub struct DeleteClusterOutputBuilder {
77 pub(crate) arn: ::std::option::Option<::std::string::String>,
78 pub(crate) channel_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
79 pub(crate) cluster_type: ::std::option::Option<crate::types::ClusterType>,
80 pub(crate) id: ::std::option::Option<::std::string::String>,
81 pub(crate) instance_role_arn: ::std::option::Option<::std::string::String>,
82 pub(crate) name: ::std::option::Option<::std::string::String>,
83 pub(crate) network_settings: ::std::option::Option<crate::types::ClusterNetworkSettings>,
84 pub(crate) state: ::std::option::Option<crate::types::ClusterState>,
85 _request_id: Option<String>,
86}
87impl DeleteClusterOutputBuilder {
88 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90 self.arn = ::std::option::Option::Some(input.into());
91 self
92 }
93 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95 self.arn = input;
96 self
97 }
98 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
100 &self.arn
101 }
102 pub fn channel_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108 let mut v = self.channel_ids.unwrap_or_default();
109 v.push(input.into());
110 self.channel_ids = ::std::option::Option::Some(v);
111 self
112 }
113 pub fn set_channel_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
115 self.channel_ids = input;
116 self
117 }
118 pub fn get_channel_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
120 &self.channel_ids
121 }
122 pub fn cluster_type(mut self, input: crate::types::ClusterType) -> Self {
124 self.cluster_type = ::std::option::Option::Some(input);
125 self
126 }
127 pub fn set_cluster_type(mut self, input: ::std::option::Option<crate::types::ClusterType>) -> Self {
129 self.cluster_type = input;
130 self
131 }
132 pub fn get_cluster_type(&self) -> &::std::option::Option<crate::types::ClusterType> {
134 &self.cluster_type
135 }
136 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138 self.id = ::std::option::Option::Some(input.into());
139 self
140 }
141 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143 self.id = input;
144 self
145 }
146 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
148 &self.id
149 }
150 pub fn instance_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
152 self.instance_role_arn = ::std::option::Option::Some(input.into());
153 self
154 }
155 pub fn set_instance_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
157 self.instance_role_arn = input;
158 self
159 }
160 pub fn get_instance_role_arn(&self) -> &::std::option::Option<::std::string::String> {
162 &self.instance_role_arn
163 }
164 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
166 self.name = ::std::option::Option::Some(input.into());
167 self
168 }
169 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
171 self.name = input;
172 self
173 }
174 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
176 &self.name
177 }
178 pub fn network_settings(mut self, input: crate::types::ClusterNetworkSettings) -> Self {
180 self.network_settings = ::std::option::Option::Some(input);
181 self
182 }
183 pub fn set_network_settings(mut self, input: ::std::option::Option<crate::types::ClusterNetworkSettings>) -> Self {
185 self.network_settings = input;
186 self
187 }
188 pub fn get_network_settings(&self) -> &::std::option::Option<crate::types::ClusterNetworkSettings> {
190 &self.network_settings
191 }
192 pub fn state(mut self, input: crate::types::ClusterState) -> Self {
194 self.state = ::std::option::Option::Some(input);
195 self
196 }
197 pub fn set_state(mut self, input: ::std::option::Option<crate::types::ClusterState>) -> Self {
199 self.state = input;
200 self
201 }
202 pub fn get_state(&self) -> &::std::option::Option<crate::types::ClusterState> {
204 &self.state
205 }
206 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
207 self._request_id = Some(request_id.into());
208 self
209 }
210
211 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
212 self._request_id = request_id;
213 self
214 }
215 pub fn build(self) -> crate::operation::delete_cluster::DeleteClusterOutput {
217 crate::operation::delete_cluster::DeleteClusterOutput {
218 arn: self.arn,
219 channel_ids: self.channel_ids,
220 cluster_type: self.cluster_type,
221 id: self.id,
222 instance_role_arn: self.instance_role_arn,
223 name: self.name,
224 network_settings: self.network_settings,
225 state: self.state,
226 _request_id: self._request_id,
227 }
228 }
229}