1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// A request to update the state of a node.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateNodeStateInput {
/// The ID of the cluster
pub cluster_id: ::std::option::Option<::std::string::String>,
/// The ID of the node.
pub node_id: ::std::option::Option<::std::string::String>,
/// The state to apply to the Node. Set to ACTIVE (COMMISSIONED) to indicate that the Node is deployable. MediaLive Anywhere will consider this node it needs a Node to run a Channel on, or when it needs a Node to promote from a backup node to an active node. Set to DRAINING to isolate the Node so that MediaLive Anywhere won't use it.
pub state: ::std::option::Option<crate::types::UpdateNodeStateShape>,
}
impl UpdateNodeStateInput {
/// The ID of the cluster
pub fn cluster_id(&self) -> ::std::option::Option<&str> {
self.cluster_id.as_deref()
}
/// The ID of the node.
pub fn node_id(&self) -> ::std::option::Option<&str> {
self.node_id.as_deref()
}
/// The state to apply to the Node. Set to ACTIVE (COMMISSIONED) to indicate that the Node is deployable. MediaLive Anywhere will consider this node it needs a Node to run a Channel on, or when it needs a Node to promote from a backup node to an active node. Set to DRAINING to isolate the Node so that MediaLive Anywhere won't use it.
pub fn state(&self) -> ::std::option::Option<&crate::types::UpdateNodeStateShape> {
self.state.as_ref()
}
}
impl UpdateNodeStateInput {
/// Creates a new builder-style object to manufacture [`UpdateNodeStateInput`](crate::operation::update_node_state::UpdateNodeStateInput).
pub fn builder() -> crate::operation::update_node_state::builders::UpdateNodeStateInputBuilder {
crate::operation::update_node_state::builders::UpdateNodeStateInputBuilder::default()
}
}
/// A builder for [`UpdateNodeStateInput`](crate::operation::update_node_state::UpdateNodeStateInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateNodeStateInputBuilder {
pub(crate) cluster_id: ::std::option::Option<::std::string::String>,
pub(crate) node_id: ::std::option::Option<::std::string::String>,
pub(crate) state: ::std::option::Option<crate::types::UpdateNodeStateShape>,
}
impl UpdateNodeStateInputBuilder {
/// The ID of the cluster
/// This field is required.
pub fn cluster_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.cluster_id = ::std::option::Option::Some(input.into());
self
}
/// The ID of the cluster
pub fn set_cluster_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.cluster_id = input;
self
}
/// The ID of the cluster
pub fn get_cluster_id(&self) -> &::std::option::Option<::std::string::String> {
&self.cluster_id
}
/// The ID of the node.
/// This field is required.
pub fn node_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.node_id = ::std::option::Option::Some(input.into());
self
}
/// The ID of the node.
pub fn set_node_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.node_id = input;
self
}
/// The ID of the node.
pub fn get_node_id(&self) -> &::std::option::Option<::std::string::String> {
&self.node_id
}
/// The state to apply to the Node. Set to ACTIVE (COMMISSIONED) to indicate that the Node is deployable. MediaLive Anywhere will consider this node it needs a Node to run a Channel on, or when it needs a Node to promote from a backup node to an active node. Set to DRAINING to isolate the Node so that MediaLive Anywhere won't use it.
pub fn state(mut self, input: crate::types::UpdateNodeStateShape) -> Self {
self.state = ::std::option::Option::Some(input);
self
}
/// The state to apply to the Node. Set to ACTIVE (COMMISSIONED) to indicate that the Node is deployable. MediaLive Anywhere will consider this node it needs a Node to run a Channel on, or when it needs a Node to promote from a backup node to an active node. Set to DRAINING to isolate the Node so that MediaLive Anywhere won't use it.
pub fn set_state(mut self, input: ::std::option::Option<crate::types::UpdateNodeStateShape>) -> Self {
self.state = input;
self
}
/// The state to apply to the Node. Set to ACTIVE (COMMISSIONED) to indicate that the Node is deployable. MediaLive Anywhere will consider this node it needs a Node to run a Channel on, or when it needs a Node to promote from a backup node to an active node. Set to DRAINING to isolate the Node so that MediaLive Anywhere won't use it.
pub fn get_state(&self) -> &::std::option::Option<crate::types::UpdateNodeStateShape> {
&self.state
}
/// Consumes the builder and constructs a [`UpdateNodeStateInput`](crate::operation::update_node_state::UpdateNodeStateInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_node_state::UpdateNodeStateInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_node_state::UpdateNodeStateInput {
cluster_id: self.cluster_id,
node_id: self.node_id,
state: self.state,
})
}
}