@scaleway/sdk-s2s-vpn 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/index.gen.js +2 -4
- package/dist/v1alpha1/api.gen.js +320 -477
- package/dist/v1alpha1/content.gen.js +5 -6
- package/dist/v1alpha1/index.gen.d.ts +2 -2
- package/dist/v1alpha1/index.gen.js +30 -28
- package/dist/v1alpha1/marshalling.gen.js +246 -328
- package/dist/v1alpha1/types.gen.d.ts +31 -2
- package/dist/v1alpha1/validation-rules.gen.js +99 -131
- package/package.json +4 -4
|
@@ -1,374 +1,292 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
peerPrivateIp: data.peer_private_ip,
|
|
10
|
-
privateIp: data.private_ip,
|
|
11
|
-
routingPolicyId: data.routing_policy_id
|
|
12
|
-
};
|
|
1
|
+
import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
|
|
2
|
+
var unmarshalBgpSession = (data) => {
|
|
3
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BgpSession' failed as data isn't a dictionary.`);
|
|
4
|
+
return {
|
|
5
|
+
peerPrivateIp: data.peer_private_ip,
|
|
6
|
+
privateIp: data.private_ip,
|
|
7
|
+
routingPolicyId: data.routing_policy_id
|
|
8
|
+
};
|
|
13
9
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
dhGroup: data.dh_group ? data.dh_group : void 0,
|
|
22
|
-
encryption: data.encryption,
|
|
23
|
-
integrity: data.integrity ? data.integrity : void 0
|
|
24
|
-
};
|
|
10
|
+
var unmarshalConnectionCipher = (data) => {
|
|
11
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ConnectionCipher' failed as data isn't a dictionary.`);
|
|
12
|
+
return {
|
|
13
|
+
dhGroup: data.dh_group ? data.dh_group : void 0,
|
|
14
|
+
encryption: data.encryption,
|
|
15
|
+
integrity: data.integrity ? data.integrity : void 0
|
|
16
|
+
};
|
|
25
17
|
};
|
|
26
18
|
const unmarshalConnection = (data) => {
|
|
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
|
-
secretId: data.secret_id,
|
|
56
|
-
secretRevision: data.secret_revision,
|
|
57
|
-
status: data.status,
|
|
58
|
-
tags: data.tags,
|
|
59
|
-
tunnelStatus: data.tunnel_status,
|
|
60
|
-
tunnelStatusIpv4: data.tunnel_status_ipv4 ? data.tunnel_status_ipv4 : void 0,
|
|
61
|
-
tunnelStatusIpv6: data.tunnel_status_ipv6 ? data.tunnel_status_ipv6 : void 0,
|
|
62
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
63
|
-
vpnGatewayId: data.vpn_gateway_id
|
|
64
|
-
};
|
|
19
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Connection' failed as data isn't a dictionary.`);
|
|
20
|
+
return {
|
|
21
|
+
bgpSessionIpv4: data.bgp_session_ipv4 ? unmarshalBgpSession(data.bgp_session_ipv4) : void 0,
|
|
22
|
+
bgpSessionIpv6: data.bgp_session_ipv6 ? unmarshalBgpSession(data.bgp_session_ipv6) : void 0,
|
|
23
|
+
bgpStatusIpv4: data.bgp_status_ipv4,
|
|
24
|
+
bgpStatusIpv6: data.bgp_status_ipv6,
|
|
25
|
+
createdAt: unmarshalDate(data.created_at),
|
|
26
|
+
customerGatewayId: data.customer_gateway_id,
|
|
27
|
+
espCiphers: unmarshalArrayOfObject(data.esp_ciphers, unmarshalConnectionCipher),
|
|
28
|
+
id: data.id,
|
|
29
|
+
ikev2Ciphers: unmarshalArrayOfObject(data.ikev2_ciphers, unmarshalConnectionCipher),
|
|
30
|
+
initiationPolicy: data.initiation_policy,
|
|
31
|
+
isIpv6: data.is_ipv6,
|
|
32
|
+
name: data.name,
|
|
33
|
+
organizationId: data.organization_id,
|
|
34
|
+
projectId: data.project_id,
|
|
35
|
+
region: data.region,
|
|
36
|
+
routePropagationEnabled: data.route_propagation_enabled,
|
|
37
|
+
secretId: data.secret_id,
|
|
38
|
+
secretRevision: data.secret_revision,
|
|
39
|
+
status: data.status,
|
|
40
|
+
tags: data.tags,
|
|
41
|
+
tunnelStatus: data.tunnel_status,
|
|
42
|
+
tunnelStatusIpv4: data.tunnel_status_ipv4 ? data.tunnel_status_ipv4 : void 0,
|
|
43
|
+
tunnelStatusIpv6: data.tunnel_status_ipv6 ? data.tunnel_status_ipv6 : void 0,
|
|
44
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
45
|
+
vpnGatewayId: data.vpn_gateway_id
|
|
46
|
+
};
|
|
65
47
|
};
|
|
66
48
|
const unmarshalCustomerGateway = (data) => {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
region: data.region,
|
|
83
|
-
tags: data.tags,
|
|
84
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
85
|
-
};
|
|
49
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CustomerGateway' failed as data isn't a dictionary.`);
|
|
50
|
+
return {
|
|
51
|
+
asn: data.asn,
|
|
52
|
+
connectionIds: data.connection_ids,
|
|
53
|
+
createdAt: unmarshalDate(data.created_at),
|
|
54
|
+
id: data.id,
|
|
55
|
+
name: data.name,
|
|
56
|
+
organizationId: data.organization_id,
|
|
57
|
+
projectId: data.project_id,
|
|
58
|
+
publicIpv4: data.public_ipv4,
|
|
59
|
+
publicIpv6: data.public_ipv6,
|
|
60
|
+
region: data.region,
|
|
61
|
+
tags: data.tags,
|
|
62
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
63
|
+
};
|
|
86
64
|
};
|
|
87
65
|
const unmarshalRoutingPolicy = (data) => {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
region: data.region,
|
|
103
|
-
tags: data.tags,
|
|
104
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
105
|
-
};
|
|
66
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RoutingPolicy' failed as data isn't a dictionary.`);
|
|
67
|
+
return {
|
|
68
|
+
createdAt: unmarshalDate(data.created_at),
|
|
69
|
+
id: data.id,
|
|
70
|
+
isIpv6: data.is_ipv6,
|
|
71
|
+
name: data.name,
|
|
72
|
+
organizationId: data.organization_id,
|
|
73
|
+
prefixFilterIn: data.prefix_filter_in,
|
|
74
|
+
prefixFilterOut: data.prefix_filter_out,
|
|
75
|
+
projectId: data.project_id,
|
|
76
|
+
region: data.region,
|
|
77
|
+
tags: data.tags,
|
|
78
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
79
|
+
};
|
|
106
80
|
};
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
`Unmarshalling the type 'VpnGatewayPrivateConfig' failed as data isn't a dictionary.`
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
return {};
|
|
81
|
+
var unmarshalVpnGatewayPrivateConfig = (data) => {
|
|
82
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VpnGatewayPrivateConfig' failed as data isn't a dictionary.`);
|
|
83
|
+
return {};
|
|
114
84
|
};
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
return {
|
|
122
|
-
ipamIpv4Id: data.ipam_ipv4_id,
|
|
123
|
-
ipamIpv6Id: data.ipam_ipv6_id
|
|
124
|
-
};
|
|
85
|
+
var unmarshalVpnGatewayPublicConfig = (data) => {
|
|
86
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VpnGatewayPublicConfig' failed as data isn't a dictionary.`);
|
|
87
|
+
return {
|
|
88
|
+
ipamIpv4Id: data.ipam_ipv4_id,
|
|
89
|
+
ipamIpv6Id: data.ipam_ipv6_id
|
|
90
|
+
};
|
|
125
91
|
};
|
|
126
92
|
const unmarshalVpnGateway = (data) => {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
tags: data.tags,
|
|
149
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
150
|
-
zone: data.zone
|
|
151
|
-
};
|
|
93
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VpnGateway' failed as data isn't a dictionary.`);
|
|
94
|
+
return {
|
|
95
|
+
asn: data.asn,
|
|
96
|
+
connectionIds: data.connection_ids,
|
|
97
|
+
createdAt: unmarshalDate(data.created_at),
|
|
98
|
+
gatewayType: data.gateway_type,
|
|
99
|
+
id: data.id,
|
|
100
|
+
ipamPrivateIpv4Id: data.ipam_private_ipv4_id,
|
|
101
|
+
ipamPrivateIpv6Id: data.ipam_private_ipv6_id,
|
|
102
|
+
name: data.name,
|
|
103
|
+
organizationId: data.organization_id,
|
|
104
|
+
privateConfig: data.private_config ? unmarshalVpnGatewayPrivateConfig(data.private_config) : void 0,
|
|
105
|
+
privateNetworkId: data.private_network_id,
|
|
106
|
+
projectId: data.project_id,
|
|
107
|
+
publicConfig: data.public_config ? unmarshalVpnGatewayPublicConfig(data.public_config) : void 0,
|
|
108
|
+
region: data.region,
|
|
109
|
+
status: data.status,
|
|
110
|
+
tags: data.tags,
|
|
111
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
112
|
+
zone: data.zone
|
|
113
|
+
};
|
|
152
114
|
};
|
|
153
115
|
const unmarshalCreateConnectionResponse = (data) => {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
return {
|
|
160
|
-
connection: data.connection ? unmarshalConnection(data.connection) : void 0,
|
|
161
|
-
preSharedKey: data.pre_shared_key
|
|
162
|
-
};
|
|
116
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CreateConnectionResponse' failed as data isn't a dictionary.`);
|
|
117
|
+
return {
|
|
118
|
+
connection: data.connection ? unmarshalConnection(data.connection) : void 0,
|
|
119
|
+
preSharedKey: data.pre_shared_key
|
|
120
|
+
};
|
|
163
121
|
};
|
|
164
122
|
const unmarshalListConnectionsResponse = (data) => {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
return {
|
|
171
|
-
connections: unmarshalArrayOfObject(data.connections, unmarshalConnection),
|
|
172
|
-
totalCount: data.total_count
|
|
173
|
-
};
|
|
123
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListConnectionsResponse' failed as data isn't a dictionary.`);
|
|
124
|
+
return {
|
|
125
|
+
connections: unmarshalArrayOfObject(data.connections, unmarshalConnection),
|
|
126
|
+
totalCount: data.total_count
|
|
127
|
+
};
|
|
174
128
|
};
|
|
175
129
|
const unmarshalListCustomerGatewaysResponse = (data) => {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
return {
|
|
182
|
-
gateways: unmarshalArrayOfObject(data.gateways, unmarshalCustomerGateway),
|
|
183
|
-
totalCount: data.total_count
|
|
184
|
-
};
|
|
130
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListCustomerGatewaysResponse' failed as data isn't a dictionary.`);
|
|
131
|
+
return {
|
|
132
|
+
gateways: unmarshalArrayOfObject(data.gateways, unmarshalCustomerGateway),
|
|
133
|
+
totalCount: data.total_count
|
|
134
|
+
};
|
|
185
135
|
};
|
|
186
136
|
const unmarshalListRoutingPoliciesResponse = (data) => {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
return {
|
|
193
|
-
routingPolicies: unmarshalArrayOfObject(
|
|
194
|
-
data.routing_policies,
|
|
195
|
-
unmarshalRoutingPolicy
|
|
196
|
-
),
|
|
197
|
-
totalCount: data.total_count
|
|
198
|
-
};
|
|
137
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListRoutingPoliciesResponse' failed as data isn't a dictionary.`);
|
|
138
|
+
return {
|
|
139
|
+
routingPolicies: unmarshalArrayOfObject(data.routing_policies, unmarshalRoutingPolicy),
|
|
140
|
+
totalCount: data.total_count
|
|
141
|
+
};
|
|
199
142
|
};
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
name: data.name,
|
|
210
|
-
region: data.region,
|
|
211
|
-
zones: data.zones
|
|
212
|
-
};
|
|
143
|
+
var unmarshalGatewayType = (data) => {
|
|
144
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GatewayType' failed as data isn't a dictionary.`);
|
|
145
|
+
return {
|
|
146
|
+
allowedConnections: data.allowed_connections,
|
|
147
|
+
bandwidth: data.bandwidth,
|
|
148
|
+
name: data.name,
|
|
149
|
+
region: data.region,
|
|
150
|
+
zones: data.zones
|
|
151
|
+
};
|
|
213
152
|
};
|
|
214
153
|
const unmarshalListVpnGatewayTypesResponse = (data) => {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
return {
|
|
221
|
-
gatewayTypes: unmarshalArrayOfObject(
|
|
222
|
-
data.gateway_types,
|
|
223
|
-
unmarshalGatewayType
|
|
224
|
-
),
|
|
225
|
-
totalCount: data.total_count
|
|
226
|
-
};
|
|
154
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListVpnGatewayTypesResponse' failed as data isn't a dictionary.`);
|
|
155
|
+
return {
|
|
156
|
+
gatewayTypes: unmarshalArrayOfObject(data.gateway_types, unmarshalGatewayType),
|
|
157
|
+
totalCount: data.total_count
|
|
158
|
+
};
|
|
227
159
|
};
|
|
228
160
|
const unmarshalListVpnGatewaysResponse = (data) => {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
return {
|
|
235
|
-
gateways: unmarshalArrayOfObject(data.gateways, unmarshalVpnGateway),
|
|
236
|
-
totalCount: data.total_count
|
|
237
|
-
};
|
|
161
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListVpnGatewaysResponse' failed as data isn't a dictionary.`);
|
|
162
|
+
return {
|
|
163
|
+
gateways: unmarshalArrayOfObject(data.gateways, unmarshalVpnGateway),
|
|
164
|
+
totalCount: data.total_count
|
|
165
|
+
};
|
|
238
166
|
};
|
|
239
167
|
const unmarshalRenewConnectionPskResponse = (data) => {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
return {
|
|
246
|
-
connection: data.connection ? unmarshalConnection(data.connection) : void 0,
|
|
247
|
-
preSharedKey: data.pre_shared_key
|
|
248
|
-
};
|
|
168
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RenewConnectionPskResponse' failed as data isn't a dictionary.`);
|
|
169
|
+
return {
|
|
170
|
+
connection: data.connection ? unmarshalConnection(data.connection) : void 0,
|
|
171
|
+
preSharedKey: data.pre_shared_key
|
|
172
|
+
};
|
|
249
173
|
};
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
174
|
+
var marshalConnectionCipher = (request, defaults) => ({
|
|
175
|
+
dh_group: request.dhGroup,
|
|
176
|
+
encryption: request.encryption,
|
|
177
|
+
integrity: request.integrity
|
|
254
178
|
});
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
179
|
+
var marshalCreateConnectionRequestBgpConfig = (request, defaults) => ({
|
|
180
|
+
peer_private_ip: request.peerPrivateIp,
|
|
181
|
+
private_ip: request.privateIp,
|
|
182
|
+
routing_policy_id: request.routingPolicyId
|
|
259
183
|
});
|
|
260
184
|
const marshalCreateConnectionRequest = (request, defaults) => ({
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
name: request.name,
|
|
274
|
-
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
275
|
-
tags: request.tags,
|
|
276
|
-
vpn_gateway_id: request.vpnGatewayId
|
|
185
|
+
bgp_config_ipv4: request.bgpConfigIpv4 !== void 0 ? marshalCreateConnectionRequestBgpConfig(request.bgpConfigIpv4, defaults) : void 0,
|
|
186
|
+
bgp_config_ipv6: request.bgpConfigIpv6 !== void 0 ? marshalCreateConnectionRequestBgpConfig(request.bgpConfigIpv6, defaults) : void 0,
|
|
187
|
+
customer_gateway_id: request.customerGatewayId,
|
|
188
|
+
enable_route_propagation: request.enableRoutePropagation,
|
|
189
|
+
esp_ciphers: request.espCiphers.map((elt) => marshalConnectionCipher(elt, defaults)),
|
|
190
|
+
ikev2_ciphers: request.ikev2Ciphers.map((elt) => marshalConnectionCipher(elt, defaults)),
|
|
191
|
+
initiation_policy: request.initiationPolicy,
|
|
192
|
+
is_ipv6: request.isIpv6,
|
|
193
|
+
name: request.name,
|
|
194
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
195
|
+
tags: request.tags,
|
|
196
|
+
vpn_gateway_id: request.vpnGatewayId
|
|
277
197
|
});
|
|
278
198
|
const marshalCreateCustomerGatewayRequest = (request, defaults) => ({
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
199
|
+
asn: request.asn,
|
|
200
|
+
ipv4_public: request.ipv4Public,
|
|
201
|
+
ipv6_public: request.ipv6Public,
|
|
202
|
+
name: request.name,
|
|
203
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
204
|
+
tags: request.tags
|
|
285
205
|
});
|
|
286
206
|
const marshalCreateRoutingPolicyRequest = (request, defaults) => ({
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
207
|
+
is_ipv6: request.isIpv6,
|
|
208
|
+
name: request.name,
|
|
209
|
+
prefix_filter_in: request.prefixFilterIn,
|
|
210
|
+
prefix_filter_out: request.prefixFilterOut,
|
|
211
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
212
|
+
tags: request.tags
|
|
293
213
|
});
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
214
|
+
var marshalCreateVpnGatewayRequestDualIpTunnel = (request, defaults) => ({
|
|
215
|
+
ipam_ipv4_id: request.ipamIpv4Id,
|
|
216
|
+
ipam_ipv6_id: request.ipamIpv6Id
|
|
297
217
|
});
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
name: request.name,
|
|
303
|
-
private_network_id: request.privateNetworkId,
|
|
304
|
-
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
305
|
-
tags: request.tags,
|
|
306
|
-
zone: request.zone ?? defaults.defaultZone,
|
|
307
|
-
...resolveOneOf([
|
|
308
|
-
{
|
|
309
|
-
param: "public_config",
|
|
310
|
-
value: request.publicConfig !== void 0 ? marshalCreateVpnGatewayRequestPublicConfig(
|
|
311
|
-
request.publicConfig
|
|
312
|
-
) : void 0
|
|
313
|
-
}
|
|
314
|
-
])
|
|
315
|
-
});
|
|
316
|
-
const marshalDetachRoutingPolicyRequest = (request, defaults) => ({
|
|
317
|
-
...resolveOneOf([
|
|
318
|
-
{ param: "routing_policy_v4", value: request.routingPolicyV4 },
|
|
319
|
-
{ param: "routing_policy_v6", value: request.routingPolicyV6 }
|
|
320
|
-
])
|
|
218
|
+
var marshalCreateVpnGatewayRequestSingleIpTunnel = (request, defaults) => ({ ipam_id: request.ipamId });
|
|
219
|
+
var marshalCreateVpnGatewayRequestPublicConfig = (request, defaults) => ({
|
|
220
|
+
ipam_ipv4_id: request.ipamIpv4Id,
|
|
221
|
+
ipam_ipv6_id: request.ipamIpv6Id
|
|
321
222
|
});
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
223
|
+
var marshalCreateVpnGatewayRequestPublicTunnelConfig = (request, defaults) => ({ ...resolveOneOf([
|
|
224
|
+
{
|
|
225
|
+
param: "single_ipv4_tunnel",
|
|
226
|
+
value: request.singleIpv4Tunnel !== void 0 ? marshalCreateVpnGatewayRequestSingleIpTunnel(request.singleIpv4Tunnel, defaults) : void 0
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
param: "single_ipv6_tunnel",
|
|
230
|
+
value: request.singleIpv6Tunnel !== void 0 ? marshalCreateVpnGatewayRequestSingleIpTunnel(request.singleIpv6Tunnel, defaults) : void 0
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
param: "dual_ipv4v6_tunnel",
|
|
234
|
+
value: request.dualIpv4V6Tunnel !== void 0 ? marshalCreateVpnGatewayRequestDualIpTunnel(request.dualIpv4V6Tunnel, defaults) : void 0
|
|
235
|
+
}
|
|
236
|
+
]) });
|
|
237
|
+
const marshalCreateVpnGatewayRequest = (request, defaults) => ({
|
|
238
|
+
gateway_type: request.gatewayType,
|
|
239
|
+
ipam_private_ipv4_id: request.ipamPrivateIpv4Id,
|
|
240
|
+
ipam_private_ipv6_id: request.ipamPrivateIpv6Id,
|
|
241
|
+
name: request.name,
|
|
242
|
+
private_network_id: request.privateNetworkId,
|
|
243
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
244
|
+
tags: request.tags,
|
|
245
|
+
zone: request.zone ?? defaults.defaultZone,
|
|
246
|
+
...resolveOneOf([{
|
|
247
|
+
param: "public_config",
|
|
248
|
+
value: request.publicConfig !== void 0 ? marshalCreateVpnGatewayRequestPublicConfig(request.publicConfig, defaults) : void 0
|
|
249
|
+
}, {
|
|
250
|
+
param: "public_tunnel_config",
|
|
251
|
+
value: request.publicTunnelConfig !== void 0 ? marshalCreateVpnGatewayRequestPublicTunnelConfig(request.publicTunnelConfig, defaults) : void 0
|
|
252
|
+
}])
|
|
327
253
|
});
|
|
254
|
+
const marshalDetachRoutingPolicyRequest = (request, defaults) => ({ ...resolveOneOf([{
|
|
255
|
+
param: "routing_policy_v4",
|
|
256
|
+
value: request.routingPolicyV4
|
|
257
|
+
}, {
|
|
258
|
+
param: "routing_policy_v6",
|
|
259
|
+
value: request.routingPolicyV6
|
|
260
|
+
}]) });
|
|
261
|
+
const marshalSetRoutingPolicyRequest = (request, defaults) => ({ ...resolveOneOf([{
|
|
262
|
+
param: "routing_policy_v4",
|
|
263
|
+
value: request.routingPolicyV4
|
|
264
|
+
}, {
|
|
265
|
+
param: "routing_policy_v6",
|
|
266
|
+
value: request.routingPolicyV6
|
|
267
|
+
}]) });
|
|
328
268
|
const marshalUpdateConnectionRequest = (request, defaults) => ({
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
269
|
+
esp_ciphers: request.espCiphers !== void 0 ? request.espCiphers.map((elt) => marshalConnectionCipher(elt, defaults)) : void 0,
|
|
270
|
+
ikev2_ciphers: request.ikev2Ciphers !== void 0 ? request.ikev2Ciphers.map((elt) => marshalConnectionCipher(elt, defaults)) : void 0,
|
|
271
|
+
initiation_policy: request.initiationPolicy,
|
|
272
|
+
name: request.name,
|
|
273
|
+
tags: request.tags
|
|
334
274
|
});
|
|
335
275
|
const marshalUpdateCustomerGatewayRequest = (request, defaults) => ({
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
276
|
+
asn: request.asn,
|
|
277
|
+
ipv4_public: request.ipv4Public,
|
|
278
|
+
ipv6_public: request.ipv6Public,
|
|
279
|
+
name: request.name,
|
|
280
|
+
tags: request.tags
|
|
341
281
|
});
|
|
342
282
|
const marshalUpdateRoutingPolicyRequest = (request, defaults) => ({
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
283
|
+
name: request.name,
|
|
284
|
+
prefix_filter_in: request.prefixFilterIn,
|
|
285
|
+
prefix_filter_out: request.prefixFilterOut,
|
|
286
|
+
tags: request.tags
|
|
347
287
|
});
|
|
348
288
|
const marshalUpdateVpnGatewayRequest = (request, defaults) => ({
|
|
349
|
-
|
|
350
|
-
|
|
289
|
+
name: request.name,
|
|
290
|
+
tags: request.tags
|
|
351
291
|
});
|
|
352
|
-
export {
|
|
353
|
-
marshalCreateConnectionRequest,
|
|
354
|
-
marshalCreateCustomerGatewayRequest,
|
|
355
|
-
marshalCreateRoutingPolicyRequest,
|
|
356
|
-
marshalCreateVpnGatewayRequest,
|
|
357
|
-
marshalDetachRoutingPolicyRequest,
|
|
358
|
-
marshalSetRoutingPolicyRequest,
|
|
359
|
-
marshalUpdateConnectionRequest,
|
|
360
|
-
marshalUpdateCustomerGatewayRequest,
|
|
361
|
-
marshalUpdateRoutingPolicyRequest,
|
|
362
|
-
marshalUpdateVpnGatewayRequest,
|
|
363
|
-
unmarshalConnection,
|
|
364
|
-
unmarshalCreateConnectionResponse,
|
|
365
|
-
unmarshalCustomerGateway,
|
|
366
|
-
unmarshalListConnectionsResponse,
|
|
367
|
-
unmarshalListCustomerGatewaysResponse,
|
|
368
|
-
unmarshalListRoutingPoliciesResponse,
|
|
369
|
-
unmarshalListVpnGatewayTypesResponse,
|
|
370
|
-
unmarshalListVpnGatewaysResponse,
|
|
371
|
-
unmarshalRenewConnectionPskResponse,
|
|
372
|
-
unmarshalRoutingPolicy,
|
|
373
|
-
unmarshalVpnGateway
|
|
374
|
-
};
|
|
292
|
+
export { marshalCreateConnectionRequest, marshalCreateCustomerGatewayRequest, marshalCreateRoutingPolicyRequest, marshalCreateVpnGatewayRequest, marshalDetachRoutingPolicyRequest, marshalSetRoutingPolicyRequest, marshalUpdateConnectionRequest, marshalUpdateCustomerGatewayRequest, marshalUpdateRoutingPolicyRequest, marshalUpdateVpnGatewayRequest, unmarshalConnection, unmarshalCreateConnectionResponse, unmarshalCustomerGateway, unmarshalListConnectionsResponse, unmarshalListCustomerGatewaysResponse, unmarshalListRoutingPoliciesResponse, unmarshalListVpnGatewayTypesResponse, unmarshalListVpnGatewaysResponse, unmarshalRenewConnectionPskResponse, unmarshalRoutingPolicy, unmarshalVpnGateway };
|