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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// A request to update the network.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateNetworkInput {
/// Include this parameter only if you want to change the pool of IP addresses in the network. An array of IpPoolCreateRequests that identify a collection of IP addresses in this network that you want to reserve for use in MediaLive Anywhere. MediaLive Anywhere uses these IP addresses for Push inputs (in both Bridge and NAT networks) and for output destinations (only in Bridge networks). Each IpPoolUpdateRequest specifies one CIDR block.
pub ip_pools: ::std::option::Option<::std::vec::Vec<crate::types::IpPoolUpdateRequest>>,
/// Include this parameter only if you want to change the name of the Network. Specify a name that is unique in the AWS account. Names are case-sensitive.
pub name: ::std::option::Option<::std::string::String>,
/// The ID of the network
pub network_id: ::std::option::Option<::std::string::String>,
/// Include this parameter only if you want to change or add routes in the Network. An array of Routes that MediaLive Anywhere needs to know about in order to route encoding traffic.
pub routes: ::std::option::Option<::std::vec::Vec<crate::types::RouteUpdateRequest>>,
}
impl UpdateNetworkInput {
/// Include this parameter only if you want to change the pool of IP addresses in the network. An array of IpPoolCreateRequests that identify a collection of IP addresses in this network that you want to reserve for use in MediaLive Anywhere. MediaLive Anywhere uses these IP addresses for Push inputs (in both Bridge and NAT networks) and for output destinations (only in Bridge networks). Each IpPoolUpdateRequest specifies one CIDR block.
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.ip_pools.is_none()`.
pub fn ip_pools(&self) -> &[crate::types::IpPoolUpdateRequest] {
self.ip_pools.as_deref().unwrap_or_default()
}
/// Include this parameter only if you want to change the name of the Network. Specify a name that is unique in the AWS account. Names are case-sensitive.
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// The ID of the network
pub fn network_id(&self) -> ::std::option::Option<&str> {
self.network_id.as_deref()
}
/// Include this parameter only if you want to change or add routes in the Network. An array of Routes that MediaLive Anywhere needs to know about in order to route encoding traffic.
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.routes.is_none()`.
pub fn routes(&self) -> &[crate::types::RouteUpdateRequest] {
self.routes.as_deref().unwrap_or_default()
}
}
impl UpdateNetworkInput {
/// Creates a new builder-style object to manufacture [`UpdateNetworkInput`](crate::operation::update_network::UpdateNetworkInput).
pub fn builder() -> crate::operation::update_network::builders::UpdateNetworkInputBuilder {
crate::operation::update_network::builders::UpdateNetworkInputBuilder::default()
}
}
/// A builder for [`UpdateNetworkInput`](crate::operation::update_network::UpdateNetworkInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateNetworkInputBuilder {
pub(crate) ip_pools: ::std::option::Option<::std::vec::Vec<crate::types::IpPoolUpdateRequest>>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) network_id: ::std::option::Option<::std::string::String>,
pub(crate) routes: ::std::option::Option<::std::vec::Vec<crate::types::RouteUpdateRequest>>,
}
impl UpdateNetworkInputBuilder {
/// Appends an item to `ip_pools`.
///
/// To override the contents of this collection use [`set_ip_pools`](Self::set_ip_pools).
///
/// Include this parameter only if you want to change the pool of IP addresses in the network. An array of IpPoolCreateRequests that identify a collection of IP addresses in this network that you want to reserve for use in MediaLive Anywhere. MediaLive Anywhere uses these IP addresses for Push inputs (in both Bridge and NAT networks) and for output destinations (only in Bridge networks). Each IpPoolUpdateRequest specifies one CIDR block.
pub fn ip_pools(mut self, input: crate::types::IpPoolUpdateRequest) -> Self {
let mut v = self.ip_pools.unwrap_or_default();
v.push(input);
self.ip_pools = ::std::option::Option::Some(v);
self
}
/// Include this parameter only if you want to change the pool of IP addresses in the network. An array of IpPoolCreateRequests that identify a collection of IP addresses in this network that you want to reserve for use in MediaLive Anywhere. MediaLive Anywhere uses these IP addresses for Push inputs (in both Bridge and NAT networks) and for output destinations (only in Bridge networks). Each IpPoolUpdateRequest specifies one CIDR block.
pub fn set_ip_pools(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::IpPoolUpdateRequest>>) -> Self {
self.ip_pools = input;
self
}
/// Include this parameter only if you want to change the pool of IP addresses in the network. An array of IpPoolCreateRequests that identify a collection of IP addresses in this network that you want to reserve for use in MediaLive Anywhere. MediaLive Anywhere uses these IP addresses for Push inputs (in both Bridge and NAT networks) and for output destinations (only in Bridge networks). Each IpPoolUpdateRequest specifies one CIDR block.
pub fn get_ip_pools(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::IpPoolUpdateRequest>> {
&self.ip_pools
}
/// Include this parameter only if you want to change the name of the Network. Specify a name that is unique in the AWS account. 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 name of the Network. Specify a name that is unique in the AWS account. 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 name of the Network. Specify a name that is unique in the AWS account. Names are case-sensitive.
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// The ID of the network
/// This field is required.
pub fn network_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.network_id = ::std::option::Option::Some(input.into());
self
}
/// The ID of the network
pub fn set_network_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.network_id = input;
self
}
/// The ID of the network
pub fn get_network_id(&self) -> &::std::option::Option<::std::string::String> {
&self.network_id
}
/// Appends an item to `routes`.
///
/// To override the contents of this collection use [`set_routes`](Self::set_routes).
///
/// Include this parameter only if you want to change or add routes in the Network. An array of Routes that MediaLive Anywhere needs to know about in order to route encoding traffic.
pub fn routes(mut self, input: crate::types::RouteUpdateRequest) -> Self {
let mut v = self.routes.unwrap_or_default();
v.push(input);
self.routes = ::std::option::Option::Some(v);
self
}
/// Include this parameter only if you want to change or add routes in the Network. An array of Routes that MediaLive Anywhere needs to know about in order to route encoding traffic.
pub fn set_routes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RouteUpdateRequest>>) -> Self {
self.routes = input;
self
}
/// Include this parameter only if you want to change or add routes in the Network. An array of Routes that MediaLive Anywhere needs to know about in order to route encoding traffic.
pub fn get_routes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RouteUpdateRequest>> {
&self.routes
}
/// Consumes the builder and constructs a [`UpdateNetworkInput`](crate::operation::update_network::UpdateNetworkInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_network::UpdateNetworkInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_network::UpdateNetworkInput {
ip_pools: self.ip_pools,
name: self.name,
network_id: self.network_id,
routes: self.routes,
})
}
}