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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// A request to update the node.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateNodeInput {
/// The ID of the cluster
pub cluster_id: ::std::option::Option<::std::string::String>,
/// Include this parameter only if you want to change the current name of the Node. Specify a name that is unique in the Cluster. You can't change the name. Names are case-sensitive.
pub name: ::std::option::Option<::std::string::String>,
/// The ID of the node.
pub node_id: ::std::option::Option<::std::string::String>,
/// The initial role of the Node in the Cluster. ACTIVE means the Node is available for encoding. BACKUP means the Node is a redundant Node and might get used if an ACTIVE Node fails.
pub role: ::std::option::Option<crate::types::NodeRole>,
/// The mappings of a SDI capture card port to a logical SDI data stream
pub sdi_source_mappings: ::std::option::Option<::std::vec::Vec<crate::types::SdiSourceMappingUpdateRequest>>,
}
impl UpdateNodeInput {
/// The ID of the cluster
pub fn cluster_id(&self) -> ::std::option::Option<&str> {
self.cluster_id.as_deref()
}
/// Include this parameter only if you want to change the current name of the Node. Specify a name that is unique in the Cluster. You can't change the name. Names are case-sensitive.
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// The ID of the node.
pub fn node_id(&self) -> ::std::option::Option<&str> {
self.node_id.as_deref()
}
/// The initial role of the Node in the Cluster. ACTIVE means the Node is available for encoding. BACKUP means the Node is a redundant Node and might get used if an ACTIVE Node fails.
pub fn role(&self) -> ::std::option::Option<&crate::types::NodeRole> {
self.role.as_ref()
}
/// The mappings of a SDI capture card port to a logical SDI data stream
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.sdi_source_mappings.is_none()`.
pub fn sdi_source_mappings(&self) -> &[crate::types::SdiSourceMappingUpdateRequest] {
self.sdi_source_mappings.as_deref().unwrap_or_default()
}
}
impl UpdateNodeInput {
/// Creates a new builder-style object to manufacture [`UpdateNodeInput`](crate::operation::update_node::UpdateNodeInput).
pub fn builder() -> crate::operation::update_node::builders::UpdateNodeInputBuilder {
crate::operation::update_node::builders::UpdateNodeInputBuilder::default()
}
}
/// A builder for [`UpdateNodeInput`](crate::operation::update_node::UpdateNodeInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateNodeInputBuilder {
pub(crate) cluster_id: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) node_id: ::std::option::Option<::std::string::String>,
pub(crate) role: ::std::option::Option<crate::types::NodeRole>,
pub(crate) sdi_source_mappings: ::std::option::Option<::std::vec::Vec<crate::types::SdiSourceMappingUpdateRequest>>,
}
impl UpdateNodeInputBuilder {
/// 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
}
/// Include this parameter only if you want to change the current name of the Node. Specify a name that is unique in the Cluster. You can't change the name. Names are case-sensitive.
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// Include this parameter only if you want to change the current name of the Node. Specify a name that is unique in the Cluster. You can't change the name. Names are case-sensitive.
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// Include this parameter only if you want to change the current name of the Node. Specify a name that is unique in the Cluster. You can't change the name. Names are case-sensitive.
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// 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 initial role of the Node in the Cluster. ACTIVE means the Node is available for encoding. BACKUP means the Node is a redundant Node and might get used if an ACTIVE Node fails.
pub fn role(mut self, input: crate::types::NodeRole) -> Self {
self.role = ::std::option::Option::Some(input);
self
}
/// The initial role of the Node in the Cluster. ACTIVE means the Node is available for encoding. BACKUP means the Node is a redundant Node and might get used if an ACTIVE Node fails.
pub fn set_role(mut self, input: ::std::option::Option<crate::types::NodeRole>) -> Self {
self.role = input;
self
}
/// The initial role of the Node in the Cluster. ACTIVE means the Node is available for encoding. BACKUP means the Node is a redundant Node and might get used if an ACTIVE Node fails.
pub fn get_role(&self) -> &::std::option::Option<crate::types::NodeRole> {
&self.role
}
/// Appends an item to `sdi_source_mappings`.
///
/// To override the contents of this collection use [`set_sdi_source_mappings`](Self::set_sdi_source_mappings).
///
/// The mappings of a SDI capture card port to a logical SDI data stream
pub fn sdi_source_mappings(mut self, input: crate::types::SdiSourceMappingUpdateRequest) -> Self {
let mut v = self.sdi_source_mappings.unwrap_or_default();
v.push(input);
self.sdi_source_mappings = ::std::option::Option::Some(v);
self
}
/// The mappings of a SDI capture card port to a logical SDI data stream
pub fn set_sdi_source_mappings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SdiSourceMappingUpdateRequest>>) -> Self {
self.sdi_source_mappings = input;
self
}
/// The mappings of a SDI capture card port to a logical SDI data stream
pub fn get_sdi_source_mappings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SdiSourceMappingUpdateRequest>> {
&self.sdi_source_mappings
}
/// Consumes the builder and constructs a [`UpdateNodeInput`](crate::operation::update_node::UpdateNodeInput).
pub fn build(self) -> ::std::result::Result<crate::operation::update_node::UpdateNodeInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_node::UpdateNodeInput {
cluster_id: self.cluster_id,
name: self.name,
node_id: self.node_id,
role: self.role,
sdi_source_mappings: self.sdi_source_mappings,
})
}
}