2 2 |
|
3 3 | package aws.sdk.kotlin.services.ec2.model
|
4 4 |
|
5 5 | import aws.smithy.kotlin.runtime.SdkDsl
|
6 6 |
|
7 7 | private val awsSdkKotlinServicesEc2ModelClientConnectOptionsDslBuilderRef = aws.sdk.kotlin.services.ec2.model.ClientConnectOptions
|
8 8 | private val awsSdkKotlinServicesEc2ModelClientLoginBannerOptionsDslBuilderRef = aws.sdk.kotlin.services.ec2.model.ClientLoginBannerOptions
|
9 9 | private val awsSdkKotlinServicesEc2ModelClientRouteEnforcementOptionsDslBuilderRef = aws.sdk.kotlin.services.ec2.model.ClientRouteEnforcementOptions
|
10 10 | private val awsSdkKotlinServicesEc2ModelConnectionLogOptionsDslBuilderRef = aws.sdk.kotlin.services.ec2.model.ConnectionLogOptions
|
11 11 | private val awsSdkKotlinServicesEc2ModelDnsServersOptionsModifyStructureDslBuilderRef = aws.sdk.kotlin.services.ec2.model.DnsServersOptionsModifyStructure
|
12 + | private val awsSdkKotlinServicesEc2ModelTransitGatewayConfigurationInputStructureDslBuilderRef = aws.sdk.kotlin.services.ec2.model.TransitGatewayConfigurationInputStructure
|
12 13 |
|
13 14 | public class ModifyClientVpnEndpointRequest private constructor(builder: Builder) {
|
14 15 | /**
|
15 16 | * The options for managing connection authorization for new client connections.
|
16 17 | */
|
17 18 | public val clientConnectOptions: aws.sdk.kotlin.services.ec2.model.ClientConnectOptions? = builder.clientConnectOptions
|
18 19 | /**
|
19 20 | * Options for enabling a customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.
|
20 21 | */
|
21 22 | public val clientLoginBannerOptions: aws.sdk.kotlin.services.ec2.model.ClientLoginBannerOptions? = builder.clientLoginBannerOptions
|
22 23 | /**
|
23 24 | * Client route enforcement is a feature of the Client VPN service that helps enforce administrator defined routes on devices connected through the VPN. T his feature helps improve your security posture by ensuring that network traffic originating from a connected client is not inadvertently sent outside the VPN tunnel.
|
24 25 | *
|
25 26 | * Client route enforcement works by monitoring the route table of a connected device for routing policy changes to the VPN connection. If the feature detects any VPN routing policy modifications, it will automatically force an update to the route table, reverting it back to the expected route configurations.
|
26 27 | */
|
27 28 | public val clientRouteEnforcementOptions: aws.sdk.kotlin.services.ec2.model.ClientRouteEnforcementOptions? = builder.clientRouteEnforcementOptions
|
28 29 | /**
|
29 30 | * The ID of the Client VPN endpoint to modify.
|
30 31 | */
|
31 32 | public val clientVpnEndpointId: kotlin.String? = builder.clientVpnEndpointId
|
32 33 | /**
|
33 34 | * Information about the client connection logging options.
|
34 35 | *
|
35 36 | * If you enable client connection logging, data about client connections is sent to a Cloudwatch Logs log stream. The following information is logged:
|
36 37 | * + Client connection requests
|
37 38 | * + Client connection results (successful and unsuccessful)
|
38 39 | * + Reasons for unsuccessful client connection requests
|
39 40 | * + Client connection termination time
|
40 41 | */
|
41 42 | public val connectionLogOptions: aws.sdk.kotlin.services.ec2.model.ConnectionLogOptions? = builder.connectionLogOptions
|
74 75 | *
|
75 76 | * Default value: `24`
|
76 77 | */
|
77 78 | public val sessionTimeoutHours: kotlin.Int? = builder.sessionTimeoutHours
|
78 79 | /**
|
79 80 | * Indicates whether the VPN is split-tunnel.
|
80 81 | *
|
81 82 | * For information about split-tunnel VPN endpoints, see [Split-tunnel Client VPN endpoint](https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/split-tunnel-vpn.html) in the *Client VPN Administrator Guide*.
|
82 83 | */
|
83 84 | public val splitTunnel: kotlin.Boolean? = builder.splitTunnel
|
85 + | /**
|
86 + | * The Transit Gateway configuration for the Client VPN endpoint. This option is currently not supported.
|
87 + | */
|
88 + | public val transitGatewayConfiguration: aws.sdk.kotlin.services.ec2.model.TransitGatewayConfigurationInputStructure? = builder.transitGatewayConfiguration
|
84 89 | /**
|
85 90 | * The ID of the VPC to associate with the Client VPN endpoint.
|
86 91 | */
|
87 92 | public val vpcId: kotlin.String? = builder.vpcId
|
88 93 | /**
|
89 94 | * The port number to assign to the Client VPN endpoint for TCP and UDP traffic.
|
90 95 | *
|
91 96 | * Valid Values: `443` | `1194`
|
92 97 | *
|
93 98 | * Default Value: `443`
|
94 99 | */
|
95 100 | public val vpnPort: kotlin.Int? = builder.vpnPort
|
96 101 |
|
97 102 | public companion object {
|
98 103 | public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ec2.model.ModifyClientVpnEndpointRequest = Builder().apply(block).build()
|
99 104 | }
|
100 105 |
|
101 106 | override fun toString(): kotlin.String = buildString {
|
102 107 | append("ModifyClientVpnEndpointRequest(")
|
103 108 | append("clientConnectOptions=$clientConnectOptions,")
|
104 109 | append("clientLoginBannerOptions=$clientLoginBannerOptions,")
|
105 110 | append("clientRouteEnforcementOptions=$clientRouteEnforcementOptions,")
|
106 111 | append("clientVpnEndpointId=$clientVpnEndpointId,")
|
107 112 | append("connectionLogOptions=$connectionLogOptions,")
|
108 113 | append("description=$description,")
|
109 114 | append("disconnectOnSessionTimeout=$disconnectOnSessionTimeout,")
|
110 115 | append("dnsServers=$dnsServers,")
|
111 116 | append("dryRun=$dryRun,")
|
112 117 | append("securityGroupIds=$securityGroupIds,")
|
113 118 | append("selfServicePortal=$selfServicePortal,")
|
114 119 | append("serverCertificateArn=$serverCertificateArn,")
|
115 120 | append("sessionTimeoutHours=$sessionTimeoutHours,")
|
116 121 | append("splitTunnel=$splitTunnel,")
|
122 + | append("transitGatewayConfiguration=$transitGatewayConfiguration,")
|
117 123 | append("vpcId=$vpcId,")
|
118 124 | append("vpnPort=$vpnPort")
|
119 125 | append(")")
|
120 126 | }
|
121 127 |
|
122 128 | override fun hashCode(): kotlin.Int {
|
123 129 | var result = clientConnectOptions?.hashCode() ?: 0
|
124 130 | result = 31 * result + (this.clientLoginBannerOptions?.hashCode() ?: 0)
|
125 131 | result = 31 * result + (this.clientRouteEnforcementOptions?.hashCode() ?: 0)
|
126 132 | result = 31 * result + (this.clientVpnEndpointId?.hashCode() ?: 0)
|
127 133 | result = 31 * result + (this.connectionLogOptions?.hashCode() ?: 0)
|
128 134 | result = 31 * result + (this.description?.hashCode() ?: 0)
|
129 135 | result = 31 * result + (this.disconnectOnSessionTimeout?.hashCode() ?: 0)
|
130 136 | result = 31 * result + (this.dnsServers?.hashCode() ?: 0)
|
131 137 | result = 31 * result + (this.dryRun?.hashCode() ?: 0)
|
132 138 | result = 31 * result + (this.securityGroupIds?.hashCode() ?: 0)
|
133 139 | result = 31 * result + (this.selfServicePortal?.hashCode() ?: 0)
|
134 140 | result = 31 * result + (this.serverCertificateArn?.hashCode() ?: 0)
|
135 141 | result = 31 * result + (this.sessionTimeoutHours ?: 0)
|
136 142 | result = 31 * result + (this.splitTunnel?.hashCode() ?: 0)
|
143 + | result = 31 * result + (this.transitGatewayConfiguration?.hashCode() ?: 0)
|
137 144 | result = 31 * result + (this.vpcId?.hashCode() ?: 0)
|
138 145 | result = 31 * result + (this.vpnPort ?: 0)
|
139 146 | return result
|
140 147 | }
|
141 148 |
|
142 149 | override fun equals(other: kotlin.Any?): kotlin.Boolean {
|
143 150 | if (this === other) return true
|
144 151 | if (other == null || this::class != other::class) return false
|
145 152 |
|
146 153 | other as ModifyClientVpnEndpointRequest
|
147 154 |
|
148 155 | if (clientConnectOptions != other.clientConnectOptions) return false
|
149 156 | if (clientLoginBannerOptions != other.clientLoginBannerOptions) return false
|
150 157 | if (clientRouteEnforcementOptions != other.clientRouteEnforcementOptions) return false
|
151 158 | if (clientVpnEndpointId != other.clientVpnEndpointId) return false
|
152 159 | if (connectionLogOptions != other.connectionLogOptions) return false
|
153 160 | if (description != other.description) return false
|
154 161 | if (disconnectOnSessionTimeout != other.disconnectOnSessionTimeout) return false
|
155 162 | if (dnsServers != other.dnsServers) return false
|
156 163 | if (dryRun != other.dryRun) return false
|
157 164 | if (securityGroupIds != other.securityGroupIds) return false
|
158 165 | if (selfServicePortal != other.selfServicePortal) return false
|
159 166 | if (serverCertificateArn != other.serverCertificateArn) return false
|
160 167 | if (sessionTimeoutHours != other.sessionTimeoutHours) return false
|
161 168 | if (splitTunnel != other.splitTunnel) return false
|
169 + | if (transitGatewayConfiguration != other.transitGatewayConfiguration) return false
|
162 170 | if (vpcId != other.vpcId) return false
|
163 171 | if (vpnPort != other.vpnPort) return false
|
164 172 |
|
165 173 | return true
|
166 174 | }
|
167 175 |
|
168 176 | public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ec2.model.ModifyClientVpnEndpointRequest = Builder(this).apply(block).build()
|
169 177 |
|
170 178 | @SdkDsl
|
171 179 | public class Builder {
|
232 240 | *
|
233 241 | * Default value: `24`
|
234 242 | */
|
235 243 | public var sessionTimeoutHours: kotlin.Int? = null
|
236 244 | /**
|
237 245 | * Indicates whether the VPN is split-tunnel.
|
238 246 | *
|
239 247 | * For information about split-tunnel VPN endpoints, see [Split-tunnel Client VPN endpoint](https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/split-tunnel-vpn.html) in the *Client VPN Administrator Guide*.
|
240 248 | */
|
241 249 | public var splitTunnel: kotlin.Boolean? = null
|
250 + | /**
|
251 + | * The Transit Gateway configuration for the Client VPN endpoint. This option is currently not supported.
|
252 + | */
|
253 + | public var transitGatewayConfiguration: aws.sdk.kotlin.services.ec2.model.TransitGatewayConfigurationInputStructure? = null
|
242 254 | /**
|
243 255 | * The ID of the VPC to associate with the Client VPN endpoint.
|
244 256 | */
|
245 257 | public var vpcId: kotlin.String? = null
|
246 258 | /**
|
247 259 | * The port number to assign to the Client VPN endpoint for TCP and UDP traffic.
|
248 260 | *
|
249 261 | * Valid Values: `443` | `1194`
|
250 262 | *
|
251 263 | * Default Value: `443`
|
252 264 | */
|
253 265 | public var vpnPort: kotlin.Int? = null
|
254 266 |
|
255 267 | @PublishedApi
|
256 268 | internal constructor()
|
257 269 | @PublishedApi
|
258 270 | internal constructor(x: aws.sdk.kotlin.services.ec2.model.ModifyClientVpnEndpointRequest) : this() {
|
259 271 | this.clientConnectOptions = x.clientConnectOptions
|
260 272 | this.clientLoginBannerOptions = x.clientLoginBannerOptions
|
261 273 | this.clientRouteEnforcementOptions = x.clientRouteEnforcementOptions
|
262 274 | this.clientVpnEndpointId = x.clientVpnEndpointId
|
263 275 | this.connectionLogOptions = x.connectionLogOptions
|
264 276 | this.description = x.description
|
265 277 | this.disconnectOnSessionTimeout = x.disconnectOnSessionTimeout
|
266 278 | this.dnsServers = x.dnsServers
|
267 279 | this.dryRun = x.dryRun
|
268 280 | this.securityGroupIds = x.securityGroupIds
|
269 281 | this.selfServicePortal = x.selfServicePortal
|
270 282 | this.serverCertificateArn = x.serverCertificateArn
|
271 283 | this.sessionTimeoutHours = x.sessionTimeoutHours
|
272 284 | this.splitTunnel = x.splitTunnel
|
285 + | this.transitGatewayConfiguration = x.transitGatewayConfiguration
|
273 286 | this.vpcId = x.vpcId
|
274 287 | this.vpnPort = x.vpnPort
|
275 288 | }
|
276 289 |
|
277 290 | @PublishedApi
|
278 291 | internal fun build(): aws.sdk.kotlin.services.ec2.model.ModifyClientVpnEndpointRequest = ModifyClientVpnEndpointRequest(this)
|
279 292 |
|
280 293 | /**
|
281 294 | * construct an [aws.sdk.kotlin.services.ec2.model.ClientConnectOptions] inside the given [block]
|
282 295 | */
|
283 296 | public fun clientConnectOptions(block: aws.sdk.kotlin.services.ec2.model.ClientConnectOptions.Builder.() -> kotlin.Unit) {
|
284 297 | this.clientConnectOptions = awsSdkKotlinServicesEc2ModelClientConnectOptionsDslBuilderRef(block)
|
285 298 | }
|
286 299 |
|
287 300 | /**
|
288 301 | * construct an [aws.sdk.kotlin.services.ec2.model.ClientLoginBannerOptions] inside the given [block]
|
289 302 | */
|
290 303 | public fun clientLoginBannerOptions(block: aws.sdk.kotlin.services.ec2.model.ClientLoginBannerOptions.Builder.() -> kotlin.Unit) {
|
291 304 | this.clientLoginBannerOptions = awsSdkKotlinServicesEc2ModelClientLoginBannerOptionsDslBuilderRef(block)
|
292 305 | }
|
293 306 |
|
294 307 | /**
|
295 308 | * construct an [aws.sdk.kotlin.services.ec2.model.ClientRouteEnforcementOptions] inside the given [block]
|
296 309 | */
|
297 310 | public fun clientRouteEnforcementOptions(block: aws.sdk.kotlin.services.ec2.model.ClientRouteEnforcementOptions.Builder.() -> kotlin.Unit) {
|
298 311 | this.clientRouteEnforcementOptions = awsSdkKotlinServicesEc2ModelClientRouteEnforcementOptionsDslBuilderRef(block)
|
299 312 | }
|
300 313 |
|
301 314 | /**
|
302 315 | * construct an [aws.sdk.kotlin.services.ec2.model.ConnectionLogOptions] inside the given [block]
|
303 316 | */
|
304 317 | public fun connectionLogOptions(block: aws.sdk.kotlin.services.ec2.model.ConnectionLogOptions.Builder.() -> kotlin.Unit) {
|
305 318 | this.connectionLogOptions = awsSdkKotlinServicesEc2ModelConnectionLogOptionsDslBuilderRef(block)
|
306 319 | }
|
307 320 |
|
308 321 | /**
|
309 322 | * construct an [aws.sdk.kotlin.services.ec2.model.DnsServersOptionsModifyStructure] inside the given [block]
|
310 323 | */
|
311 324 | public fun dnsServers(block: aws.sdk.kotlin.services.ec2.model.DnsServersOptionsModifyStructure.Builder.() -> kotlin.Unit) {
|
312 325 | this.dnsServers = awsSdkKotlinServicesEc2ModelDnsServersOptionsModifyStructureDslBuilderRef(block)
|
313 326 | }
|
314 327 |
|
328 + | /**
|
329 + | * construct an [aws.sdk.kotlin.services.ec2.model.TransitGatewayConfigurationInputStructure] inside the given [block]
|
330 + | */
|
331 + | public fun transitGatewayConfiguration(block: aws.sdk.kotlin.services.ec2.model.TransitGatewayConfigurationInputStructure.Builder.() -> kotlin.Unit) {
|
332 + | this.transitGatewayConfiguration = awsSdkKotlinServicesEc2ModelTransitGatewayConfigurationInputStructureDslBuilderRef(block)
|
333 + | }
|
334 + |
|
315 335 | internal fun correctErrors(): Builder {
|
316 336 | return this
|
317 337 | }
|
318 338 | }
|
319 339 | }
|