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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AssociateTransitGatewayConnectPeerInput {
    /// <p>The ID of the global network.</p>
    pub global_network_id: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the Connect peer.</p>
    pub transit_gateway_connect_peer_arn: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the device.</p>
    pub device_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the link.</p>
    pub link_id: ::std::option::Option<::std::string::String>,
}
impl AssociateTransitGatewayConnectPeerInput {
    /// <p>The ID of the global network.</p>
    pub fn global_network_id(&self) -> ::std::option::Option<&str> {
        self.global_network_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the Connect peer.</p>
    pub fn transit_gateway_connect_peer_arn(&self) -> ::std::option::Option<&str> {
        self.transit_gateway_connect_peer_arn.as_deref()
    }
    /// <p>The ID of the device.</p>
    pub fn device_id(&self) -> ::std::option::Option<&str> {
        self.device_id.as_deref()
    }
    /// <p>The ID of the link.</p>
    pub fn link_id(&self) -> ::std::option::Option<&str> {
        self.link_id.as_deref()
    }
}
impl AssociateTransitGatewayConnectPeerInput {
    /// Creates a new builder-style object to manufacture [`AssociateTransitGatewayConnectPeerInput`](crate::operation::associate_transit_gateway_connect_peer::AssociateTransitGatewayConnectPeerInput).
    pub fn builder() -> crate::operation::associate_transit_gateway_connect_peer::builders::AssociateTransitGatewayConnectPeerInputBuilder {
        crate::operation::associate_transit_gateway_connect_peer::builders::AssociateTransitGatewayConnectPeerInputBuilder::default()
    }
}

/// A builder for [`AssociateTransitGatewayConnectPeerInput`](crate::operation::associate_transit_gateway_connect_peer::AssociateTransitGatewayConnectPeerInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AssociateTransitGatewayConnectPeerInputBuilder {
    pub(crate) global_network_id: ::std::option::Option<::std::string::String>,
    pub(crate) transit_gateway_connect_peer_arn: ::std::option::Option<::std::string::String>,
    pub(crate) device_id: ::std::option::Option<::std::string::String>,
    pub(crate) link_id: ::std::option::Option<::std::string::String>,
}
impl AssociateTransitGatewayConnectPeerInputBuilder {
    /// <p>The ID of the global network.</p>
    /// This field is required.
    pub fn global_network_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.global_network_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the global network.</p>
    pub fn set_global_network_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.global_network_id = input;
        self
    }
    /// <p>The ID of the global network.</p>
    pub fn get_global_network_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.global_network_id
    }
    /// <p>The Amazon Resource Name (ARN) of the Connect peer.</p>
    /// This field is required.
    pub fn transit_gateway_connect_peer_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.transit_gateway_connect_peer_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Connect peer.</p>
    pub fn set_transit_gateway_connect_peer_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.transit_gateway_connect_peer_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Connect peer.</p>
    pub fn get_transit_gateway_connect_peer_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.transit_gateway_connect_peer_arn
    }
    /// <p>The ID of the device.</p>
    /// This field is required.
    pub fn device_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.device_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the device.</p>
    pub fn set_device_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.device_id = input;
        self
    }
    /// <p>The ID of the device.</p>
    pub fn get_device_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.device_id
    }
    /// <p>The ID of the link.</p>
    pub fn link_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.link_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the link.</p>
    pub fn set_link_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.link_id = input;
        self
    }
    /// <p>The ID of the link.</p>
    pub fn get_link_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.link_id
    }
    /// Consumes the builder and constructs a [`AssociateTransitGatewayConnectPeerInput`](crate::operation::associate_transit_gateway_connect_peer::AssociateTransitGatewayConnectPeerInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::associate_transit_gateway_connect_peer::AssociateTransitGatewayConnectPeerInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(
            crate::operation::associate_transit_gateway_connect_peer::AssociateTransitGatewayConnectPeerInput {
                global_network_id: self.global_network_id,
                transit_gateway_connect_peer_arn: self.transit_gateway_connect_peer_arn,
                device_id: self.device_id,
                link_id: self.link_id,
            },
        )
    }
}