aws_sdk_ec2/types/
_transit_gateway_propagation.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct TransitGatewayPropagation {
7 pub transit_gateway_attachment_id: ::std::option::Option<::std::string::String>,
9 pub resource_id: ::std::option::Option<::std::string::String>,
11 pub resource_type: ::std::option::Option<crate::types::TransitGatewayAttachmentResourceType>,
13 pub transit_gateway_route_table_id: ::std::option::Option<::std::string::String>,
15 pub state: ::std::option::Option<crate::types::TransitGatewayPropagationState>,
17 pub transit_gateway_route_table_announcement_id: ::std::option::Option<::std::string::String>,
19}
20impl TransitGatewayPropagation {
21 pub fn transit_gateway_attachment_id(&self) -> ::std::option::Option<&str> {
23 self.transit_gateway_attachment_id.as_deref()
24 }
25 pub fn resource_id(&self) -> ::std::option::Option<&str> {
27 self.resource_id.as_deref()
28 }
29 pub fn resource_type(&self) -> ::std::option::Option<&crate::types::TransitGatewayAttachmentResourceType> {
31 self.resource_type.as_ref()
32 }
33 pub fn transit_gateway_route_table_id(&self) -> ::std::option::Option<&str> {
35 self.transit_gateway_route_table_id.as_deref()
36 }
37 pub fn state(&self) -> ::std::option::Option<&crate::types::TransitGatewayPropagationState> {
39 self.state.as_ref()
40 }
41 pub fn transit_gateway_route_table_announcement_id(&self) -> ::std::option::Option<&str> {
43 self.transit_gateway_route_table_announcement_id.as_deref()
44 }
45}
46impl TransitGatewayPropagation {
47 pub fn builder() -> crate::types::builders::TransitGatewayPropagationBuilder {
49 crate::types::builders::TransitGatewayPropagationBuilder::default()
50 }
51}
52
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
55#[non_exhaustive]
56pub struct TransitGatewayPropagationBuilder {
57 pub(crate) transit_gateway_attachment_id: ::std::option::Option<::std::string::String>,
58 pub(crate) resource_id: ::std::option::Option<::std::string::String>,
59 pub(crate) resource_type: ::std::option::Option<crate::types::TransitGatewayAttachmentResourceType>,
60 pub(crate) transit_gateway_route_table_id: ::std::option::Option<::std::string::String>,
61 pub(crate) state: ::std::option::Option<crate::types::TransitGatewayPropagationState>,
62 pub(crate) transit_gateway_route_table_announcement_id: ::std::option::Option<::std::string::String>,
63}
64impl TransitGatewayPropagationBuilder {
65 pub fn transit_gateway_attachment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67 self.transit_gateway_attachment_id = ::std::option::Option::Some(input.into());
68 self
69 }
70 pub fn set_transit_gateway_attachment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72 self.transit_gateway_attachment_id = input;
73 self
74 }
75 pub fn get_transit_gateway_attachment_id(&self) -> &::std::option::Option<::std::string::String> {
77 &self.transit_gateway_attachment_id
78 }
79 pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81 self.resource_id = ::std::option::Option::Some(input.into());
82 self
83 }
84 pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86 self.resource_id = input;
87 self
88 }
89 pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
91 &self.resource_id
92 }
93 pub fn resource_type(mut self, input: crate::types::TransitGatewayAttachmentResourceType) -> Self {
95 self.resource_type = ::std::option::Option::Some(input);
96 self
97 }
98 pub fn set_resource_type(mut self, input: ::std::option::Option<crate::types::TransitGatewayAttachmentResourceType>) -> Self {
100 self.resource_type = input;
101 self
102 }
103 pub fn get_resource_type(&self) -> &::std::option::Option<crate::types::TransitGatewayAttachmentResourceType> {
105 &self.resource_type
106 }
107 pub fn transit_gateway_route_table_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109 self.transit_gateway_route_table_id = ::std::option::Option::Some(input.into());
110 self
111 }
112 pub fn set_transit_gateway_route_table_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114 self.transit_gateway_route_table_id = input;
115 self
116 }
117 pub fn get_transit_gateway_route_table_id(&self) -> &::std::option::Option<::std::string::String> {
119 &self.transit_gateway_route_table_id
120 }
121 pub fn state(mut self, input: crate::types::TransitGatewayPropagationState) -> Self {
123 self.state = ::std::option::Option::Some(input);
124 self
125 }
126 pub fn set_state(mut self, input: ::std::option::Option<crate::types::TransitGatewayPropagationState>) -> Self {
128 self.state = input;
129 self
130 }
131 pub fn get_state(&self) -> &::std::option::Option<crate::types::TransitGatewayPropagationState> {
133 &self.state
134 }
135 pub fn transit_gateway_route_table_announcement_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
137 self.transit_gateway_route_table_announcement_id = ::std::option::Option::Some(input.into());
138 self
139 }
140 pub fn set_transit_gateway_route_table_announcement_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
142 self.transit_gateway_route_table_announcement_id = input;
143 self
144 }
145 pub fn get_transit_gateway_route_table_announcement_id(&self) -> &::std::option::Option<::std::string::String> {
147 &self.transit_gateway_route_table_announcement_id
148 }
149 pub fn build(self) -> crate::types::TransitGatewayPropagation {
151 crate::types::TransitGatewayPropagation {
152 transit_gateway_attachment_id: self.transit_gateway_attachment_id,
153 resource_id: self.resource_id,
154 resource_type: self.resource_type,
155 transit_gateway_route_table_id: self.transit_gateway_route_table_id,
156 state: self.state,
157 transit_gateway_route_table_announcement_id: self.transit_gateway_route_table_announcement_id,
158 }
159 }
160}