@scaleway/sdk-s2s-vpn 2.4.1 → 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 -466
- package/dist/v1alpha1/content.gen.js +5 -6
- package/dist/v1alpha1/index.gen.js +30 -28
- package/dist/v1alpha1/marshalling.gen.js +245 -348
- package/dist/v1alpha1/validation-rules.gen.js +99 -131
- package/package.json +4 -4
|
@@ -1,395 +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
|
-
tunnelStatusIpv6: data.tunnel_status_ipv6 ? data.tunnel_status_ipv6 : void 0,
|
|
56
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
57
|
-
vpnGatewayId: data.vpn_gateway_id
|
|
58
|
-
};
|
|
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
|
+
};
|
|
59
47
|
};
|
|
60
48
|
const unmarshalCustomerGateway = (data) => {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
region: data.region,
|
|
77
|
-
tags: data.tags,
|
|
78
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
79
|
-
};
|
|
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
|
+
};
|
|
80
64
|
};
|
|
81
65
|
const unmarshalRoutingPolicy = (data) => {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
region: data.region,
|
|
97
|
-
tags: data.tags,
|
|
98
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
99
|
-
};
|
|
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
|
+
};
|
|
100
80
|
};
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
`Unmarshalling the type 'VpnGatewayPrivateConfig' failed as data isn't a dictionary.`
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
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 {};
|
|
108
84
|
};
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
return {
|
|
116
|
-
ipamIpv4Id: data.ipam_ipv4_id,
|
|
117
|
-
ipamIpv6Id: data.ipam_ipv6_id
|
|
118
|
-
};
|
|
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
|
+
};
|
|
119
91
|
};
|
|
120
92
|
const unmarshalVpnGateway = (data) => {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
tags: data.tags,
|
|
143
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
144
|
-
zone: data.zone
|
|
145
|
-
};
|
|
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
|
+
};
|
|
146
114
|
};
|
|
147
115
|
const unmarshalCreateConnectionResponse = (data) => {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
return {
|
|
154
|
-
connection: data.connection ? unmarshalConnection(data.connection) : void 0,
|
|
155
|
-
preSharedKey: data.pre_shared_key
|
|
156
|
-
};
|
|
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
|
+
};
|
|
157
121
|
};
|
|
158
122
|
const unmarshalListConnectionsResponse = (data) => {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
return {
|
|
165
|
-
connections: unmarshalArrayOfObject(data.connections, unmarshalConnection),
|
|
166
|
-
totalCount: data.total_count
|
|
167
|
-
};
|
|
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
|
+
};
|
|
168
128
|
};
|
|
169
129
|
const unmarshalListCustomerGatewaysResponse = (data) => {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
return {
|
|
176
|
-
gateways: unmarshalArrayOfObject(data.gateways, unmarshalCustomerGateway),
|
|
177
|
-
totalCount: data.total_count
|
|
178
|
-
};
|
|
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
|
+
};
|
|
179
135
|
};
|
|
180
136
|
const unmarshalListRoutingPoliciesResponse = (data) => {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
return {
|
|
187
|
-
routingPolicies: unmarshalArrayOfObject(data.routing_policies, unmarshalRoutingPolicy),
|
|
188
|
-
totalCount: data.total_count
|
|
189
|
-
};
|
|
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
|
+
};
|
|
190
142
|
};
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
name: data.name,
|
|
201
|
-
region: data.region,
|
|
202
|
-
zones: data.zones
|
|
203
|
-
};
|
|
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
|
+
};
|
|
204
152
|
};
|
|
205
153
|
const unmarshalListVpnGatewayTypesResponse = (data) => {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
return {
|
|
212
|
-
gatewayTypes: unmarshalArrayOfObject(data.gateway_types, unmarshalGatewayType),
|
|
213
|
-
totalCount: data.total_count
|
|
214
|
-
};
|
|
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
|
+
};
|
|
215
159
|
};
|
|
216
160
|
const unmarshalListVpnGatewaysResponse = (data) => {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
return {
|
|
223
|
-
gateways: unmarshalArrayOfObject(data.gateways, unmarshalVpnGateway),
|
|
224
|
-
totalCount: data.total_count
|
|
225
|
-
};
|
|
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
|
+
};
|
|
226
166
|
};
|
|
227
167
|
const unmarshalRenewConnectionPskResponse = (data) => {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
return {
|
|
234
|
-
connection: data.connection ? unmarshalConnection(data.connection) : void 0,
|
|
235
|
-
preSharedKey: data.pre_shared_key
|
|
236
|
-
};
|
|
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
|
+
};
|
|
237
173
|
};
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
174
|
+
var marshalConnectionCipher = (request, defaults) => ({
|
|
175
|
+
dh_group: request.dhGroup,
|
|
176
|
+
encryption: request.encryption,
|
|
177
|
+
integrity: request.integrity
|
|
242
178
|
});
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
179
|
+
var marshalCreateConnectionRequestBgpConfig = (request, defaults) => ({
|
|
180
|
+
peer_private_ip: request.peerPrivateIp,
|
|
181
|
+
private_ip: request.privateIp,
|
|
182
|
+
routing_policy_id: request.routingPolicyId
|
|
247
183
|
});
|
|
248
184
|
const marshalCreateConnectionRequest = (request, defaults) => ({
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
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
|
|
261
197
|
});
|
|
262
198
|
const marshalCreateCustomerGatewayRequest = (request, defaults) => ({
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
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
|
|
269
205
|
});
|
|
270
206
|
const marshalCreateRoutingPolicyRequest = (request, defaults) => ({
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
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
|
|
277
213
|
});
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
214
|
+
var marshalCreateVpnGatewayRequestDualIpTunnel = (request, defaults) => ({
|
|
215
|
+
ipam_ipv4_id: request.ipamIpv4Id,
|
|
216
|
+
ipam_ipv6_id: request.ipamIpv6Id
|
|
281
217
|
});
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
ipam_ipv4_id: request.ipamIpv4Id,
|
|
287
|
-
ipam_ipv6_id: request.ipamIpv6Id
|
|
288
|
-
});
|
|
289
|
-
const marshalCreateVpnGatewayRequestPublicTunnelConfig = (request, defaults) => ({
|
|
290
|
-
...resolveOneOf([
|
|
291
|
-
{
|
|
292
|
-
param: "single_ipv4_tunnel",
|
|
293
|
-
value: request.singleIpv4Tunnel !== void 0 ? marshalCreateVpnGatewayRequestSingleIpTunnel(request.singleIpv4Tunnel) : void 0
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
param: "single_ipv6_tunnel",
|
|
297
|
-
value: request.singleIpv6Tunnel !== void 0 ? marshalCreateVpnGatewayRequestSingleIpTunnel(request.singleIpv6Tunnel) : void 0
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
param: "dual_ipv4v6_tunnel",
|
|
301
|
-
value: request.dualIpv4V6Tunnel !== void 0 ? marshalCreateVpnGatewayRequestDualIpTunnel(request.dualIpv4V6Tunnel) : void 0
|
|
302
|
-
}
|
|
303
|
-
])
|
|
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
|
|
304
222
|
});
|
|
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
|
+
]) });
|
|
305
237
|
const marshalCreateVpnGatewayRequest = (request, defaults) => ({
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
value: request.publicTunnelConfig !== void 0 ? marshalCreateVpnGatewayRequestPublicTunnelConfig(request.publicTunnelConfig) : void 0
|
|
322
|
-
}
|
|
323
|
-
])
|
|
324
|
-
});
|
|
325
|
-
const marshalDetachRoutingPolicyRequest = (request, defaults) => ({
|
|
326
|
-
...resolveOneOf([
|
|
327
|
-
{
|
|
328
|
-
param: "routing_policy_v4",
|
|
329
|
-
value: request.routingPolicyV4
|
|
330
|
-
},
|
|
331
|
-
{
|
|
332
|
-
param: "routing_policy_v6",
|
|
333
|
-
value: request.routingPolicyV6
|
|
334
|
-
}
|
|
335
|
-
])
|
|
336
|
-
});
|
|
337
|
-
const marshalSetRoutingPolicyRequest = (request, defaults) => ({
|
|
338
|
-
...resolveOneOf([
|
|
339
|
-
{
|
|
340
|
-
param: "routing_policy_v4",
|
|
341
|
-
value: request.routingPolicyV4
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
param: "routing_policy_v6",
|
|
345
|
-
value: request.routingPolicyV6
|
|
346
|
-
}
|
|
347
|
-
])
|
|
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
|
+
}])
|
|
348
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
|
+
}]) });
|
|
349
268
|
const marshalUpdateConnectionRequest = (request, defaults) => ({
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
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
|
|
355
274
|
});
|
|
356
275
|
const marshalUpdateCustomerGatewayRequest = (request, defaults) => ({
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
276
|
+
asn: request.asn,
|
|
277
|
+
ipv4_public: request.ipv4Public,
|
|
278
|
+
ipv6_public: request.ipv6Public,
|
|
279
|
+
name: request.name,
|
|
280
|
+
tags: request.tags
|
|
362
281
|
});
|
|
363
282
|
const marshalUpdateRoutingPolicyRequest = (request, defaults) => ({
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
283
|
+
name: request.name,
|
|
284
|
+
prefix_filter_in: request.prefixFilterIn,
|
|
285
|
+
prefix_filter_out: request.prefixFilterOut,
|
|
286
|
+
tags: request.tags
|
|
368
287
|
});
|
|
369
288
|
const marshalUpdateVpnGatewayRequest = (request, defaults) => ({
|
|
370
|
-
|
|
371
|
-
|
|
289
|
+
name: request.name,
|
|
290
|
+
tags: request.tags
|
|
372
291
|
});
|
|
373
|
-
export {
|
|
374
|
-
marshalCreateConnectionRequest,
|
|
375
|
-
marshalCreateCustomerGatewayRequest,
|
|
376
|
-
marshalCreateRoutingPolicyRequest,
|
|
377
|
-
marshalCreateVpnGatewayRequest,
|
|
378
|
-
marshalDetachRoutingPolicyRequest,
|
|
379
|
-
marshalSetRoutingPolicyRequest,
|
|
380
|
-
marshalUpdateConnectionRequest,
|
|
381
|
-
marshalUpdateCustomerGatewayRequest,
|
|
382
|
-
marshalUpdateRoutingPolicyRequest,
|
|
383
|
-
marshalUpdateVpnGatewayRequest,
|
|
384
|
-
unmarshalConnection,
|
|
385
|
-
unmarshalCreateConnectionResponse,
|
|
386
|
-
unmarshalCustomerGateway,
|
|
387
|
-
unmarshalListConnectionsResponse,
|
|
388
|
-
unmarshalListCustomerGatewaysResponse,
|
|
389
|
-
unmarshalListRoutingPoliciesResponse,
|
|
390
|
-
unmarshalListVpnGatewayTypesResponse,
|
|
391
|
-
unmarshalListVpnGatewaysResponse,
|
|
392
|
-
unmarshalRenewConnectionPskResponse,
|
|
393
|
-
unmarshalRoutingPolicy,
|
|
394
|
-
unmarshalVpnGateway
|
|
395
|
-
};
|
|
292
|
+
export { marshalCreateConnectionRequest, marshalCreateCustomerGatewayRequest, marshalCreateRoutingPolicyRequest, marshalCreateVpnGatewayRequest, marshalDetachRoutingPolicyRequest, marshalSetRoutingPolicyRequest, marshalUpdateConnectionRequest, marshalUpdateCustomerGatewayRequest, marshalUpdateRoutingPolicyRequest, marshalUpdateVpnGatewayRequest, unmarshalConnection, unmarshalCreateConnectionResponse, unmarshalCustomerGateway, unmarshalListConnectionsResponse, unmarshalListCustomerGatewaysResponse, unmarshalListRoutingPoliciesResponse, unmarshalListVpnGatewayTypesResponse, unmarshalListVpnGatewaysResponse, unmarshalRenewConnectionPskResponse, unmarshalRoutingPolicy, unmarshalVpnGateway };
|