1 1 | // Code generated by smithy-kotlin codegen. DO NOT EDIT!
|
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 |
|
8 8 | public class AssociateClientVpnTargetNetworkRequest private constructor(builder: Builder) {
|
9 + | /**
|
10 + | * The Availability Zone name for the Transit Gateway association. Required if when associating an Availability Zone with a Client VPN endpoint that uses a Transit Gateway. You cannot specify both `SubnetId` and `AvailabilityZone`.
|
11 + | */
|
12 + | public val availabilityZone: kotlin.String? = builder.availabilityZone
|
13 + | /**
|
14 + | * The Availability Zone ID for the Transit Gateway association. Required if when associating an Availability Zone with a Client VPN endpoint that uses a Transit Gateway. You cannot specify both `AvailabilityZone` and `AvailabilityZoneId`.
|
15 + | */
|
16 + | public val availabilityZoneId: kotlin.String? = builder.availabilityZoneId
|
9 17 | /**
|
10 18 | * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see [Ensuring idempotency](https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html).
|
11 19 | */
|
12 20 | public val clientToken: kotlin.String? = builder.clientToken
|
13 21 | /**
|
14 22 | * The ID of the Client VPN endpoint.
|
15 23 | */
|
16 24 | public val clientVpnEndpointId: kotlin.String? = builder.clientVpnEndpointId
|
17 25 | /**
|
18 26 | * Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
19 27 | */
|
20 28 | public val dryRun: kotlin.Boolean? = builder.dryRun
|
21 29 | /**
|
22 - | * The ID of the subnet to associate with the Client VPN endpoint.
|
30 + | * The ID of the subnet to associate with the Client VPN endpoint. Required for VPC-based endpoints. For Transit Gateway-based endpoints, use `AvailabilityZone` or `AvailabilityZoneId` instead.
|
23 31 | */
|
24 32 | public val subnetId: kotlin.String? = builder.subnetId
|
25 33 |
|
26 34 | public companion object {
|
27 35 | public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ec2.model.AssociateClientVpnTargetNetworkRequest = Builder().apply(block).build()
|
28 36 | }
|
29 37 |
|
30 38 | override fun toString(): kotlin.String = buildString {
|
31 39 | append("AssociateClientVpnTargetNetworkRequest(")
|
40 + | append("availabilityZone=$availabilityZone,")
|
41 + | append("availabilityZoneId=$availabilityZoneId,")
|
32 42 | append("clientToken=$clientToken,")
|
33 43 | append("clientVpnEndpointId=$clientVpnEndpointId,")
|
34 44 | append("dryRun=$dryRun,")
|
35 45 | append("subnetId=$subnetId")
|
36 46 | append(")")
|
37 47 | }
|
38 48 |
|
39 49 | override fun hashCode(): kotlin.Int {
|
40 - | var result = clientToken?.hashCode() ?: 0
|
50 + | var result = availabilityZone?.hashCode() ?: 0
|
51 + | result = 31 * result + (this.availabilityZoneId?.hashCode() ?: 0)
|
52 + | result = 31 * result + (this.clientToken?.hashCode() ?: 0)
|
41 53 | result = 31 * result + (this.clientVpnEndpointId?.hashCode() ?: 0)
|
42 54 | result = 31 * result + (this.dryRun?.hashCode() ?: 0)
|
43 55 | result = 31 * result + (this.subnetId?.hashCode() ?: 0)
|
44 56 | return result
|
45 57 | }
|
46 58 |
|
47 59 | override fun equals(other: kotlin.Any?): kotlin.Boolean {
|
48 60 | if (this === other) return true
|
49 61 | if (other == null || this::class != other::class) return false
|
50 62 |
|
51 63 | other as AssociateClientVpnTargetNetworkRequest
|
52 64 |
|
65 + | if (availabilityZone != other.availabilityZone) return false
|
66 + | if (availabilityZoneId != other.availabilityZoneId) return false
|
53 67 | if (clientToken != other.clientToken) return false
|
54 68 | if (clientVpnEndpointId != other.clientVpnEndpointId) return false
|
55 69 | if (dryRun != other.dryRun) return false
|
56 70 | if (subnetId != other.subnetId) return false
|
57 71 |
|
58 72 | return true
|
59 73 | }
|
60 74 |
|
61 75 | public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ec2.model.AssociateClientVpnTargetNetworkRequest = Builder(this).apply(block).build()
|
62 76 |
|
63 77 | @SdkDsl
|
64 78 | public class Builder {
|
79 + | /**
|
80 + | * The Availability Zone name for the Transit Gateway association. Required if when associating an Availability Zone with a Client VPN endpoint that uses a Transit Gateway. You cannot specify both `SubnetId` and `AvailabilityZone`.
|
81 + | */
|
82 + | public var availabilityZone: kotlin.String? = null
|
83 + | /**
|
84 + | * The Availability Zone ID for the Transit Gateway association. Required if when associating an Availability Zone with a Client VPN endpoint that uses a Transit Gateway. You cannot specify both `AvailabilityZone` and `AvailabilityZoneId`.
|
85 + | */
|
86 + | public var availabilityZoneId: kotlin.String? = null
|
65 87 | /**
|
66 88 | * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see [Ensuring idempotency](https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html).
|
67 89 | */
|
68 90 | public var clientToken: kotlin.String? = null
|
69 91 | /**
|
70 92 | * The ID of the Client VPN endpoint.
|
71 93 | */
|
72 94 | public var clientVpnEndpointId: kotlin.String? = null
|
73 95 | /**
|
74 96 | * Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is `DryRunOperation`. Otherwise, it is `UnauthorizedOperation`.
|
75 97 | */
|
76 98 | public var dryRun: kotlin.Boolean? = null
|
77 99 | /**
|
78 - | * The ID of the subnet to associate with the Client VPN endpoint.
|
100 + | * The ID of the subnet to associate with the Client VPN endpoint. Required for VPC-based endpoints. For Transit Gateway-based endpoints, use `AvailabilityZone` or `AvailabilityZoneId` instead.
|
79 101 | */
|
80 102 | public var subnetId: kotlin.String? = null
|
81 103 |
|
82 104 | @PublishedApi
|
83 105 | internal constructor()
|
84 106 | @PublishedApi
|
85 107 | internal constructor(x: aws.sdk.kotlin.services.ec2.model.AssociateClientVpnTargetNetworkRequest) : this() {
|
108 + | this.availabilityZone = x.availabilityZone
|
109 + | this.availabilityZoneId = x.availabilityZoneId
|
86 110 | this.clientToken = x.clientToken
|
87 111 | this.clientVpnEndpointId = x.clientVpnEndpointId
|
88 112 | this.dryRun = x.dryRun
|
89 113 | this.subnetId = x.subnetId
|
90 114 | }
|
91 115 |
|
92 116 | @PublishedApi
|
93 117 | internal fun build(): aws.sdk.kotlin.services.ec2.model.AssociateClientVpnTargetNetworkRequest = AssociateClientVpnTargetNetworkRequest(this)
|
94 118 |
|
95 119 | internal fun correctErrors(): Builder {
|