aws_sdk_medialive/operation/update_cluster/
_update_cluster_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// Placeholder documentation for UpdateClusterResponse
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateClusterOutput {
7    /// The ARN of the Cluster.
8    pub arn: ::std::option::Option<::std::string::String>,
9    /// An array of the IDs of the Channels that are associated with this Cluster. One Channel is associated with the Cluster as follows: A Channel belongs to a ChannelPlacementGroup. A ChannelPlacementGroup is attached to a Node. A Node belongs to a Cluster.
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 unique ID of the Cluster.
14    pub id: ::std::option::Option<::std::string::String>,
15    /// The user-specified name of the Cluster.
16    pub name: ::std::option::Option<::std::string::String>,
17    /// Network settings that connect the Nodes in the Cluster to one or more of the Networks that the Cluster is associated with.
18    pub network_settings: ::std::option::Option<crate::types::ClusterNetworkSettings>,
19    /// The current state of the Cluster.
20    pub state: ::std::option::Option<crate::types::ClusterState>,
21    _request_id: Option<String>,
22}
23impl UpdateClusterOutput {
24    /// The ARN of the Cluster.
25    pub fn arn(&self) -> ::std::option::Option<&str> {
26        self.arn.as_deref()
27    }
28    /// An array of the IDs of the Channels that are associated with this Cluster. One Channel is associated with the Cluster as follows: A Channel belongs to a ChannelPlacementGroup. A ChannelPlacementGroup is attached to a Node. A Node belongs to a Cluster.
29    ///
30    /// 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()`.
31    pub fn channel_ids(&self) -> &[::std::string::String] {
32        self.channel_ids.as_deref().unwrap_or_default()
33    }
34    /// The hardware type for the Cluster
35    pub fn cluster_type(&self) -> ::std::option::Option<&crate::types::ClusterType> {
36        self.cluster_type.as_ref()
37    }
38    /// The unique ID of the Cluster.
39    pub fn id(&self) -> ::std::option::Option<&str> {
40        self.id.as_deref()
41    }
42    /// The user-specified name of the Cluster.
43    pub fn name(&self) -> ::std::option::Option<&str> {
44        self.name.as_deref()
45    }
46    /// Network settings that connect the Nodes in the Cluster to one or more of the Networks that the Cluster is associated with.
47    pub fn network_settings(&self) -> ::std::option::Option<&crate::types::ClusterNetworkSettings> {
48        self.network_settings.as_ref()
49    }
50    /// The current state of the Cluster.
51    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    /// Creates a new builder-style object to manufacture [`UpdateClusterOutput`](crate::operation::update_cluster::UpdateClusterOutput).
62    pub fn builder() -> crate::operation::update_cluster::builders::UpdateClusterOutputBuilder {
63        crate::operation::update_cluster::builders::UpdateClusterOutputBuilder::default()
64    }
65}
66
67/// A builder for [`UpdateClusterOutput`](crate::operation::update_cluster::UpdateClusterOutput).
68#[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    /// The ARN of the Cluster.
82    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    /// The ARN of the Cluster.
87    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.arn = input;
89        self
90    }
91    /// The ARN of the Cluster.
92    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
93        &self.arn
94    }
95    /// Appends an item to `channel_ids`.
96    ///
97    /// To override the contents of this collection use [`set_channel_ids`](Self::set_channel_ids).
98    ///
99    /// An array of the IDs of the Channels that are associated with this Cluster. One Channel is associated with the Cluster as follows: A Channel belongs to a ChannelPlacementGroup. A ChannelPlacementGroup is attached to a Node. A Node belongs to a Cluster.
100    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    /// An array of the IDs of the Channels that are associated with this Cluster. One Channel is associated with the Cluster as follows: A Channel belongs to a ChannelPlacementGroup. A ChannelPlacementGroup is attached to a Node. A Node belongs to a Cluster.
107    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    /// An array of the IDs of the Channels that are associated with this Cluster. One Channel is associated with the Cluster as follows: A Channel belongs to a ChannelPlacementGroup. A ChannelPlacementGroup is attached to a Node. A Node belongs to a Cluster.
112    pub fn get_channel_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
113        &self.channel_ids
114    }
115    /// The hardware type for the Cluster
116    pub fn cluster_type(mut self, input: crate::types::ClusterType) -> Self {
117        self.cluster_type = ::std::option::Option::Some(input);
118        self
119    }
120    /// The hardware type for the Cluster
121    pub fn set_cluster_type(mut self, input: ::std::option::Option<crate::types::ClusterType>) -> Self {
122        self.cluster_type = input;
123        self
124    }
125    /// The hardware type for the Cluster
126    pub fn get_cluster_type(&self) -> &::std::option::Option<crate::types::ClusterType> {
127        &self.cluster_type
128    }
129    /// The unique ID of the Cluster.
130    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    /// The unique ID of the Cluster.
135    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136        self.id = input;
137        self
138    }
139    /// The unique ID of the Cluster.
140    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
141        &self.id
142    }
143    /// The user-specified name of the Cluster.
144    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    /// The user-specified name of the Cluster.
149    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150        self.name = input;
151        self
152    }
153    /// The user-specified name of the Cluster.
154    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
155        &self.name
156    }
157    /// Network settings that connect the Nodes in the Cluster to one or more of the Networks that the Cluster is associated with.
158    pub fn network_settings(mut self, input: crate::types::ClusterNetworkSettings) -> Self {
159        self.network_settings = ::std::option::Option::Some(input);
160        self
161    }
162    /// Network settings that connect the Nodes in the Cluster to one or more of the Networks that the Cluster is associated with.
163    pub fn set_network_settings(mut self, input: ::std::option::Option<crate::types::ClusterNetworkSettings>) -> Self {
164        self.network_settings = input;
165        self
166    }
167    /// Network settings that connect the Nodes in the Cluster to one or more of the Networks that the Cluster is associated with.
168    pub fn get_network_settings(&self) -> &::std::option::Option<crate::types::ClusterNetworkSettings> {
169        &self.network_settings
170    }
171    /// The current state of the Cluster.
172    pub fn state(mut self, input: crate::types::ClusterState) -> Self {
173        self.state = ::std::option::Option::Some(input);
174        self
175    }
176    /// The current state of the Cluster.
177    pub fn set_state(mut self, input: ::std::option::Option<crate::types::ClusterState>) -> Self {
178        self.state = input;
179        self
180    }
181    /// The current state of the Cluster.
182    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    /// Consumes the builder and constructs a [`UpdateClusterOutput`](crate::operation::update_cluster::UpdateClusterOutput).
195    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}