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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The registered identity provider’s product related configuration settings such as the subnets to provision VPC endpoints, and the security group ID that is associated with the VPC endpoints. The security group should permit inbound TCP port 1688 communication from resources in the VPC.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Settings {
/// <p>The subnets defined for the registered identity provider.</p>
pub subnets: ::std::vec::Vec<::std::string::String>,
/// <p>A security group ID that allows inbound TCP port 1688 communication between resources in your VPC and the VPC endpoint for activation servers.</p>
pub security_group_id: ::std::string::String,
}
impl Settings {
/// <p>The subnets defined for the registered identity provider.</p>
pub fn subnets(&self) -> &[::std::string::String] {
use std::ops::Deref;
self.subnets.deref()
}
/// <p>A security group ID that allows inbound TCP port 1688 communication between resources in your VPC and the VPC endpoint for activation servers.</p>
pub fn security_group_id(&self) -> &str {
use std::ops::Deref;
self.security_group_id.deref()
}
}
impl Settings {
/// Creates a new builder-style object to manufacture [`Settings`](crate::types::Settings).
pub fn builder() -> crate::types::builders::SettingsBuilder {
crate::types::builders::SettingsBuilder::default()
}
}
/// A builder for [`Settings`](crate::types::Settings).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SettingsBuilder {
pub(crate) subnets: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) security_group_id: ::std::option::Option<::std::string::String>,
}
impl SettingsBuilder {
/// Appends an item to `subnets`.
///
/// To override the contents of this collection use [`set_subnets`](Self::set_subnets).
///
/// <p>The subnets defined for the registered identity provider.</p>
pub fn subnets(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.subnets.unwrap_or_default();
v.push(input.into());
self.subnets = ::std::option::Option::Some(v);
self
}
/// <p>The subnets defined for the registered identity provider.</p>
pub fn set_subnets(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.subnets = input;
self
}
/// <p>The subnets defined for the registered identity provider.</p>
pub fn get_subnets(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.subnets
}
/// <p>A security group ID that allows inbound TCP port 1688 communication between resources in your VPC and the VPC endpoint for activation servers.</p>
/// This field is required.
pub fn security_group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.security_group_id = ::std::option::Option::Some(input.into());
self
}
/// <p>A security group ID that allows inbound TCP port 1688 communication between resources in your VPC and the VPC endpoint for activation servers.</p>
pub fn set_security_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.security_group_id = input;
self
}
/// <p>A security group ID that allows inbound TCP port 1688 communication between resources in your VPC and the VPC endpoint for activation servers.</p>
pub fn get_security_group_id(&self) -> &::std::option::Option<::std::string::String> {
&self.security_group_id
}
/// Consumes the builder and constructs a [`Settings`](crate::types::Settings).
/// This method will fail if any of the following fields are not set:
/// - [`subnets`](crate::types::builders::SettingsBuilder::subnets)
/// - [`security_group_id`](crate::types::builders::SettingsBuilder::security_group_id)
pub fn build(self) -> ::std::result::Result<crate::types::Settings, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Settings {
subnets: self.subnets.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"subnets",
"subnets was not specified but it is required when building Settings",
)
})?,
security_group_id: self.security_group_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"security_group_id",
"security_group_id was not specified but it is required when building Settings",
)
})?,
})
}
}