aws_sdk_medialive/operation/delete_cluster/
_delete_cluster_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// Placeholder documentation for DeleteClusterResponse
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteClusterOutput {
7    /// The ARN of this Cluster. It is automatically assigned when the Cluster is created.
8    pub arn: ::std::option::Option<::std::string::String>,
9    /// Placeholder documentation for __listOf__string
10    pub channel_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
11    /// The hardware type for the Cluster
12    pub cluster_type: ::std::option::Option<crate::types::ClusterType>,
13    /// The ID of the Cluster. Unique in the AWS account. The ID is the resource-id portion of the ARN.
14    pub id: ::std::option::Option<::std::string::String>,
15    /// The ARN of the IAM role for the Node in this Cluster. Any Nodes that are associated with this Cluster assume this role. The role gives permissions to the operations that you expect these Node to perform.
16    pub instance_role_arn: ::std::option::Option<::std::string::String>,
17    /// The name that you specified for the Cluster.
18    pub name: ::std::option::Option<::std::string::String>,
19    /// Network settings that connect the Nodes in the Cluster to one or more of the Networks that the Cluster is associated with.
20    pub network_settings: ::std::option::Option<crate::types::ClusterNetworkSettings>,
21    /// The current state of the Cluster.
22    pub state: ::std::option::Option<crate::types::ClusterState>,
23    _request_id: Option<String>,
24}
25impl DeleteClusterOutput {
26    /// The ARN of this Cluster. It is automatically assigned when the Cluster is created.
27    pub fn arn(&self) -> ::std::option::Option<&str> {
28        self.arn.as_deref()
29    }
30    /// Placeholder documentation for __listOf__string
31    ///
32    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.channel_ids.is_none()`.
33    pub fn channel_ids(&self) -> &[::std::string::String] {
34        self.channel_ids.as_deref().unwrap_or_default()
35    }
36    /// The hardware type for the Cluster
37    pub fn cluster_type(&self) -> ::std::option::Option<&crate::types::ClusterType> {
38        self.cluster_type.as_ref()
39    }
40    /// The ID of the Cluster. Unique in the AWS account. The ID is the resource-id portion of the ARN.
41    pub fn id(&self) -> ::std::option::Option<&str> {
42        self.id.as_deref()
43    }
44    /// The ARN of the IAM role for the Node in this Cluster. Any Nodes that are associated with this Cluster assume this role. The role gives permissions to the operations that you expect these Node to perform.
45    pub fn instance_role_arn(&self) -> ::std::option::Option<&str> {
46        self.instance_role_arn.as_deref()
47    }
48    /// The name that you specified for the Cluster.
49    pub fn name(&self) -> ::std::option::Option<&str> {
50        self.name.as_deref()
51    }
52    /// Network settings that connect the Nodes in the Cluster to one or more of the Networks that the Cluster is associated with.
53    pub fn network_settings(&self) -> ::std::option::Option<&crate::types::ClusterNetworkSettings> {
54        self.network_settings.as_ref()
55    }
56    /// The current state of the Cluster.
57    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    /// Creates a new builder-style object to manufacture [`DeleteClusterOutput`](crate::operation::delete_cluster::DeleteClusterOutput).
68    pub fn builder() -> crate::operation::delete_cluster::builders::DeleteClusterOutputBuilder {
69        crate::operation::delete_cluster::builders::DeleteClusterOutputBuilder::default()
70    }
71}
72
73/// A builder for [`DeleteClusterOutput`](crate::operation::delete_cluster::DeleteClusterOutput).
74#[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    /// The ARN of this Cluster. It is automatically assigned when the Cluster is created.
89    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    /// The ARN of this Cluster. It is automatically assigned when the Cluster is created.
94    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95        self.arn = input;
96        self
97    }
98    /// The ARN of this Cluster. It is automatically assigned when the Cluster is created.
99    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
100        &self.arn
101    }
102    /// Appends an item to `channel_ids`.
103    ///
104    /// To override the contents of this collection use [`set_channel_ids`](Self::set_channel_ids).
105    ///
106    /// Placeholder documentation for __listOf__string
107    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    /// Placeholder documentation for __listOf__string
114    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    /// Placeholder documentation for __listOf__string
119    pub fn get_channel_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
120        &self.channel_ids
121    }
122    /// The hardware type for the Cluster
123    pub fn cluster_type(mut self, input: crate::types::ClusterType) -> Self {
124        self.cluster_type = ::std::option::Option::Some(input);
125        self
126    }
127    /// The hardware type for the Cluster
128    pub fn set_cluster_type(mut self, input: ::std::option::Option<crate::types::ClusterType>) -> Self {
129        self.cluster_type = input;
130        self
131    }
132    /// The hardware type for the Cluster
133    pub fn get_cluster_type(&self) -> &::std::option::Option<crate::types::ClusterType> {
134        &self.cluster_type
135    }
136    /// The ID of the Cluster. Unique in the AWS account. The ID is the resource-id portion of the ARN.
137    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    /// The ID of the Cluster. Unique in the AWS account. The ID is the resource-id portion of the ARN.
142    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143        self.id = input;
144        self
145    }
146    /// The ID of the Cluster. Unique in the AWS account. The ID is the resource-id portion of the ARN.
147    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
148        &self.id
149    }
150    /// The ARN of the IAM role for the Node in this Cluster. Any Nodes that are associated with this Cluster assume this role. The role gives permissions to the operations that you expect these Node to perform.
151    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    /// The ARN of the IAM role for the Node in this Cluster. Any Nodes that are associated with this Cluster assume this role. The role gives permissions to the operations that you expect these Node to perform.
156    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    /// The ARN of the IAM role for the Node in this Cluster. Any Nodes that are associated with this Cluster assume this role. The role gives permissions to the operations that you expect these Node to perform.
161    pub fn get_instance_role_arn(&self) -> &::std::option::Option<::std::string::String> {
162        &self.instance_role_arn
163    }
164    /// The name that you specified for the Cluster.
165    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    /// The name that you specified for the Cluster.
170    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
171        self.name = input;
172        self
173    }
174    /// The name that you specified for the Cluster.
175    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
176        &self.name
177    }
178    /// Network settings that connect the Nodes in the Cluster to one or more of the Networks that the Cluster is associated with.
179    pub fn network_settings(mut self, input: crate::types::ClusterNetworkSettings) -> Self {
180        self.network_settings = ::std::option::Option::Some(input);
181        self
182    }
183    /// Network settings that connect the Nodes in the Cluster to one or more of the Networks that the Cluster is associated with.
184    pub fn set_network_settings(mut self, input: ::std::option::Option<crate::types::ClusterNetworkSettings>) -> Self {
185        self.network_settings = input;
186        self
187    }
188    /// Network settings that connect the Nodes in the Cluster to one or more of the Networks that the Cluster is associated with.
189    pub fn get_network_settings(&self) -> &::std::option::Option<crate::types::ClusterNetworkSettings> {
190        &self.network_settings
191    }
192    /// The current state of the Cluster.
193    pub fn state(mut self, input: crate::types::ClusterState) -> Self {
194        self.state = ::std::option::Option::Some(input);
195        self
196    }
197    /// The current state of the Cluster.
198    pub fn set_state(mut self, input: ::std::option::Option<crate::types::ClusterState>) -> Self {
199        self.state = input;
200        self
201    }
202    /// The current state of the Cluster.
203    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    /// Consumes the builder and constructs a [`DeleteClusterOutput`](crate::operation::delete_cluster::DeleteClusterOutput).
216    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}