@scaleway/sdk 0.1.0-beta.9 → 1.0.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/api/account/index.js +2 -2
- package/dist/api/account/v2/api.gen.js +5 -18
- package/dist/api/account/v2/index.gen.js +3 -0
- package/dist/api/account/v2/marshalling.gen.js +0 -2
- package/dist/api/account/v2alpha1/api.gen.js +3 -13
- package/dist/api/account/v2alpha1/marshalling.gen.js +0 -5
- package/dist/api/applesilicon/index.js +2 -2
- package/dist/api/applesilicon/v1alpha1/api.gen.js +7 -27
- package/dist/api/applesilicon/v1alpha1/index.gen.js +4 -0
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +1 -14
- package/dist/api/baremetal/v1/api.gen.js +47 -49
- package/dist/api/baremetal/v1/api.utils.js +2 -10
- package/dist/api/baremetal/v1/content.gen.js +6 -3
- package/dist/api/baremetal/v1/index.js +4 -1
- package/dist/api/baremetal/v1/marshalling.gen.js +44 -45
- package/dist/api/baremetal/v1/validation-rules.gen.js +109 -0
- package/dist/api/container/index.js +2 -2
- package/dist/api/container/v1beta1/api.gen.js +5 -51
- package/dist/api/container/v1beta1/content.gen.js +4 -4
- package/dist/api/container/v1beta1/{index.js → index.gen.js} +3 -1
- package/dist/api/container/v1beta1/marshalling.gen.js +12 -26
- package/dist/api/domain/index.js +2 -2
- package/dist/api/domain/v2beta1/api.gen.js +55 -85
- package/dist/api/domain/v2beta1/content.gen.js +22 -1
- package/dist/api/domain/v2beta1/index.gen.js +4 -0
- package/dist/api/domain/v2beta1/marshalling.gen.js +47 -165
- package/dist/api/flexibleip/index.js +2 -2
- package/dist/api/flexibleip/v1alpha1/api.gen.js +5 -22
- package/dist/api/flexibleip/v1alpha1/content.gen.js +1 -1
- package/dist/api/flexibleip/v1alpha1/index.gen.js +6 -0
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +0 -7
- package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +14 -0
- package/dist/api/function/index.js +2 -2
- package/dist/api/function/v1beta1/api.gen.js +54 -57
- package/dist/api/function/v1beta1/content.gen.js +8 -5
- package/dist/api/function/v1beta1/index.gen.js +4 -0
- package/dist/api/function/v1beta1/marshalling.gen.js +125 -33
- package/dist/api/iam/index.js +2 -2
- package/dist/api/iam/v1alpha1/api.gen.js +15 -62
- package/dist/api/iam/v1alpha1/index.gen.js +5 -0
- package/dist/api/iam/v1alpha1/marshalling.gen.js +7 -29
- package/dist/api/iam/v1alpha1/validation-rules.gen.js +184 -0
- package/dist/api/instance/v1/api.gen.js +38 -118
- package/dist/api/instance/v1/api.utils.js +59 -51
- package/dist/api/instance/v1/content.gen.js +7 -7
- package/dist/api/instance/v1/marshalling.gen.js +46 -168
- package/dist/api/instance/v1/marshalling.utils.js +63 -0
- package/dist/api/iot/index.js +2 -2
- package/dist/api/iot/v1/api.gen.js +5 -56
- package/dist/api/iot/v1/index.gen.js +4 -0
- package/dist/api/iot/v1/marshalling.gen.js +2 -51
- package/dist/api/k8s/index.js +2 -2
- package/dist/api/k8s/v1/api.gen.js +17 -43
- package/dist/api/k8s/v1/content.gen.js +2 -2
- package/dist/api/k8s/v1/index.gen.js +6 -0
- package/dist/api/k8s/v1/marshalling.gen.js +18 -36
- package/dist/api/k8s/v1/validation-rules.gen.js +92 -0
- package/dist/api/lb/v1/api.gen.js +8 -163
- package/dist/api/lb/v1/api.utils.js +3 -9
- package/dist/api/lb/v1/content.gen.js +3 -3
- package/dist/api/lb/v1/marshalling.gen.js +74 -101
- package/dist/api/marketplace/index.js +4 -2
- package/dist/api/marketplace/v1/api.gen.js +3 -13
- package/dist/api/marketplace/v1/index.gen.js +3 -0
- package/dist/api/marketplace/v1/marshalling.gen.js +0 -13
- package/dist/api/marketplace/v2/api.gen.js +85 -0
- package/dist/api/marketplace/v2/index.gen.js +3 -0
- package/dist/api/marketplace/v2/marshalling.gen.js +92 -0
- package/dist/api/mnq/index.js +2 -2
- package/dist/api/mnq/v1alpha1/api.gen.js +7 -25
- package/dist/api/mnq/v1alpha1/index.gen.js +3 -0
- package/dist/api/mnq/v1alpha1/marshalling.gen.js +7 -46
- package/dist/api/rdb/index.js +2 -2
- package/dist/api/rdb/v1/api.gen.js +15 -89
- package/dist/api/rdb/v1/content.gen.js +10 -4
- package/dist/api/rdb/v1/index.gen.js +4 -0
- package/dist/api/rdb/v1/marshalling.gen.js +25 -81
- package/dist/api/redis/index.js +2 -2
- package/dist/api/redis/{v1alpha1 → v1}/api.gen.js +45 -77
- package/dist/api/redis/{v1alpha1 → v1}/content.gen.js +1 -1
- package/dist/api/redis/v1/index.gen.js +4 -0
- package/dist/api/redis/{v1alpha1 → v1}/marshalling.gen.js +42 -59
- package/dist/api/registry/index.js +2 -2
- package/dist/api/registry/v1/api.gen.js +5 -29
- package/dist/api/registry/v1/content.gen.js +2 -2
- package/dist/api/registry/v1/{index.js → index.gen.js} +3 -1
- package/dist/api/registry/v1/marshalling.gen.js +2 -8
- package/dist/api/secret/index.js +2 -0
- package/dist/api/secret/v1alpha1/api.gen.js +135 -0
- package/dist/api/secret/v1alpha1/index.gen.js +3 -0
- package/dist/api/secret/v1alpha1/marshalling.gen.js +82 -0
- package/dist/api/tem/index.js +2 -0
- package/dist/api/tem/v1alpha1/api.gen.js +109 -0
- package/dist/api/tem/v1alpha1/content.gen.js +10 -0
- package/dist/api/tem/v1alpha1/index.gen.js +4 -0
- package/dist/api/tem/v1alpha1/marshalling.gen.js +132 -0
- package/dist/api/test/index.js +2 -2
- package/dist/api/test/v1/api.gen.js +6 -20
- package/dist/api/test/v1/index.gen.js +4 -0
- package/dist/api/test/v1/marshalling.gen.js +2 -5
- package/dist/api/vpc/index.js +2 -2
- package/dist/api/vpc/v1/api.gen.js +6 -17
- package/dist/api/vpc/v1/index.gen.js +3 -0
- package/dist/api/vpc/v1/marshalling.gen.js +1 -3
- package/dist/api/vpcgw/index.js +2 -2
- package/dist/api/vpcgw/v1/api.gen.js +5 -64
- package/dist/api/vpcgw/v1/content.gen.js +2 -2
- package/dist/api/vpcgw/v1/{index.js → index.gen.js} +3 -1
- package/dist/api/vpcgw/v1/marshalling.gen.js +3 -24
- package/dist/helpers/json.js +1 -2
- package/dist/helpers/marshalling.js +7 -20
- package/dist/index.cjs +3864 -2945
- package/dist/index.d.ts +7212 -4332
- package/dist/index.js +10 -6
- package/dist/internal/async/interval-retrier.js +10 -16
- package/dist/internal/interceptors/interceptor.js +3 -1
- package/dist/internal/interceptors/request.js +1 -3
- package/dist/internal/logger/console-logger.js +3 -5
- package/dist/internal/logger/index.js +3 -5
- package/dist/internal/logger/level-resolver.js +0 -3
- package/dist/internal/validations/string-validation.js +8 -10
- package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.1/node_modules/@scaleway/random-name/dist/index.js +13 -0
- package/dist/scw/api.js +3 -4
- package/dist/scw/auth.js +3 -5
- package/dist/scw/client-ini-factory.js +32 -15
- package/dist/scw/client-ini-profile.js +10 -4
- package/dist/scw/client-settings.js +32 -15
- package/dist/scw/client.js +5 -6
- package/dist/scw/constants.js +1 -1
- package/dist/scw/custom-marshalling.js +8 -14
- package/dist/scw/errors/error-parser.js +2 -21
- package/dist/scw/errors/non-standard/invalid-request-mapper.js +17 -15
- package/dist/scw/errors/non-standard/unknown-resource-mapper.js +7 -6
- package/dist/scw/errors/scw-error.js +20 -20
- package/dist/scw/errors/standard/already-exists-error.js +3 -4
- package/dist/scw/errors/standard/denied-authentication-error.js +4 -11
- package/dist/scw/errors/standard/invalid-arguments-error.js +1 -10
- package/dist/scw/errors/standard/out-of-stock-error.js +0 -3
- package/dist/scw/errors/standard/permissions-denied-error.js +1 -4
- package/dist/scw/errors/standard/precondition-failed-error.js +4 -8
- package/dist/scw/errors/standard/quotas-exceeded-error.js +14 -14
- package/dist/scw/errors/standard/resource-expired-error.js +3 -4
- package/dist/scw/errors/standard/resource-locked-error.js +3 -4
- package/dist/scw/errors/standard/resource-not-found-error.js +3 -4
- package/dist/scw/errors/standard/too-many-requests-error.js +3 -16
- package/dist/scw/errors/standard/transient-state-error.js +3 -4
- package/dist/scw/errors/types.js +0 -3
- package/dist/scw/fetch/build-fetcher.js +1 -9
- package/dist/scw/fetch/http-dumper.js +4 -7
- package/dist/scw/fetch/http-interceptors.js +9 -12
- package/dist/scw/fetch/resource-paginator.js +18 -16
- package/dist/scw/fetch/response-parser.js +17 -23
- package/node_modules/@scaleway/random-name/CHANGELOG.md +42 -63
- package/node_modules/@scaleway/random-name/dist/index.js +5 -246
- package/node_modules/@scaleway/random-name/package.json +6 -5
- package/package.json +4 -5
- package/dist/api/account/v2/index.js +0 -1
- package/dist/api/applesilicon/v1alpha1/index.js +0 -2
- package/dist/api/domain/v2beta1/index.js +0 -2
- package/dist/api/flexibleip/v1alpha1/index.js +0 -2
- package/dist/api/function/v1beta1/index.js +0 -2
- package/dist/api/iam/v1alpha1/index.js +0 -1
- package/dist/api/iot/v1/index.js +0 -2
- package/dist/api/k8s/v1/index.js +0 -2
- package/dist/api/marketplace/v1/index.js +0 -1
- package/dist/api/mnq/v1alpha1/index.js +0 -1
- package/dist/api/rdb/v1/index.js +0 -2
- package/dist/api/redis/v1alpha1/index.js +0 -2
- package/dist/api/test/v1/index.js +0 -1
- package/dist/api/vpc/v1/index.js +0 -1
- package/dist/node_modules/.pnpm/@scaleway_random-name@3.0.2/node_modules/@scaleway/random-name/dist/index.js +0 -254
- package/node_modules/@scaleway/random-name/dist/index.browser.js +0 -256
|
@@ -1,25 +1,21 @@
|
|
|
1
|
-
import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@
|
|
1
|
+
import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@4.0.1/node_modules/@scaleway/random-name/dist/index.js';
|
|
2
2
|
import { isJSONObject } from '../../../helpers/json.js';
|
|
3
|
-
import {
|
|
3
|
+
import { unmarshalDate, unmarshalMapOfObject, unmarshalArrayOfObject, resolveOneOf } from '../../../helpers/marshalling.js';
|
|
4
4
|
|
|
5
5
|
// This file was automatically generated. DO NOT EDIT.
|
|
6
|
-
|
|
7
6
|
const unmarshalServerSummary = data => {
|
|
8
7
|
if (!isJSONObject(data)) {
|
|
9
8
|
throw new TypeError(`Unmarshalling the type 'ServerSummary' failed as data isn't a dictionary.`);
|
|
10
9
|
}
|
|
11
|
-
|
|
12
10
|
return {
|
|
13
11
|
id: data.id,
|
|
14
12
|
name: data.name
|
|
15
13
|
};
|
|
16
14
|
};
|
|
17
|
-
|
|
18
15
|
const unmarshalBootscript = data => {
|
|
19
16
|
if (!isJSONObject(data)) {
|
|
20
17
|
throw new TypeError(`Unmarshalling the type 'Bootscript' failed as data isn't a dictionary.`);
|
|
21
18
|
}
|
|
22
|
-
|
|
23
19
|
return {
|
|
24
20
|
arch: data.arch,
|
|
25
21
|
bootcmdargs: data.bootcmdargs,
|
|
@@ -35,34 +31,28 @@ const unmarshalBootscript = data => {
|
|
|
35
31
|
zone: data.zone
|
|
36
32
|
};
|
|
37
33
|
};
|
|
38
|
-
|
|
39
34
|
const unmarshalServerTypeNetworkInterface = data => {
|
|
40
35
|
if (!isJSONObject(data)) {
|
|
41
36
|
throw new TypeError(`Unmarshalling the type 'ServerTypeNetworkInterface' failed as data isn't a dictionary.`);
|
|
42
37
|
}
|
|
43
|
-
|
|
44
38
|
return {
|
|
45
39
|
internalBandwidth: data.internal_bandwidth,
|
|
46
40
|
internetBandwidth: data.internet_bandwidth
|
|
47
41
|
};
|
|
48
42
|
};
|
|
49
|
-
|
|
50
43
|
const unmarshalServerTypeVolumeConstraintSizes = data => {
|
|
51
44
|
if (!isJSONObject(data)) {
|
|
52
45
|
throw new TypeError(`Unmarshalling the type 'ServerTypeVolumeConstraintSizes' failed as data isn't a dictionary.`);
|
|
53
46
|
}
|
|
54
|
-
|
|
55
47
|
return {
|
|
56
48
|
maxSize: data.max_size,
|
|
57
49
|
minSize: data.min_size
|
|
58
50
|
};
|
|
59
51
|
};
|
|
60
|
-
|
|
61
52
|
const unmarshalVolume = data => {
|
|
62
53
|
if (!isJSONObject(data)) {
|
|
63
54
|
throw new TypeError(`Unmarshalling the type 'Volume' failed as data isn't a dictionary.`);
|
|
64
55
|
}
|
|
65
|
-
|
|
66
56
|
return {
|
|
67
57
|
creationDate: unmarshalDate(data.creation_date),
|
|
68
58
|
exportUri: data.export_uri,
|
|
@@ -79,12 +69,10 @@ const unmarshalVolume = data => {
|
|
|
79
69
|
zone: data.zone
|
|
80
70
|
};
|
|
81
71
|
};
|
|
82
|
-
|
|
83
72
|
const unmarshalVolumeSummary = data => {
|
|
84
73
|
if (!isJSONObject(data)) {
|
|
85
74
|
throw new TypeError(`Unmarshalling the type 'VolumeSummary' failed as data isn't a dictionary.`);
|
|
86
75
|
}
|
|
87
|
-
|
|
88
76
|
return {
|
|
89
77
|
id: data.id,
|
|
90
78
|
name: data.name,
|
|
@@ -92,12 +80,10 @@ const unmarshalVolumeSummary = data => {
|
|
|
92
80
|
volumeType: data.volume_type
|
|
93
81
|
};
|
|
94
82
|
};
|
|
95
|
-
|
|
96
83
|
const unmarshalImage = data => {
|
|
97
84
|
if (!isJSONObject(data)) {
|
|
98
85
|
throw new TypeError(`Unmarshalling the type 'Image' failed as data isn't a dictionary.`);
|
|
99
86
|
}
|
|
100
|
-
|
|
101
87
|
return {
|
|
102
88
|
arch: data.arch,
|
|
103
89
|
creationDate: unmarshalDate(data.creation_date),
|
|
@@ -116,12 +102,10 @@ const unmarshalImage = data => {
|
|
|
116
102
|
zone: data.zone
|
|
117
103
|
};
|
|
118
104
|
};
|
|
119
|
-
|
|
120
105
|
const unmarshalPlacementGroup = data => {
|
|
121
106
|
if (!isJSONObject(data)) {
|
|
122
107
|
throw new TypeError(`Unmarshalling the type 'PlacementGroup' failed as data isn't a dictionary.`);
|
|
123
108
|
}
|
|
124
|
-
|
|
125
109
|
return {
|
|
126
110
|
id: data.id,
|
|
127
111
|
name: data.name,
|
|
@@ -134,12 +118,10 @@ const unmarshalPlacementGroup = data => {
|
|
|
134
118
|
zone: data.zone
|
|
135
119
|
};
|
|
136
120
|
};
|
|
137
|
-
|
|
138
121
|
const unmarshalPrivateNIC = data => {
|
|
139
122
|
if (!isJSONObject(data)) {
|
|
140
123
|
throw new TypeError(`Unmarshalling the type 'PrivateNIC' failed as data isn't a dictionary.`);
|
|
141
124
|
}
|
|
142
|
-
|
|
143
125
|
return {
|
|
144
126
|
id: data.id,
|
|
145
127
|
macAddress: data.mac_address,
|
|
@@ -148,47 +130,39 @@ const unmarshalPrivateNIC = data => {
|
|
|
148
130
|
state: data.state
|
|
149
131
|
};
|
|
150
132
|
};
|
|
151
|
-
|
|
152
133
|
const unmarshalSecurityGroupSummary = data => {
|
|
153
134
|
if (!isJSONObject(data)) {
|
|
154
135
|
throw new TypeError(`Unmarshalling the type 'SecurityGroupSummary' failed as data isn't a dictionary.`);
|
|
155
136
|
}
|
|
156
|
-
|
|
157
137
|
return {
|
|
158
138
|
id: data.id,
|
|
159
139
|
name: data.name
|
|
160
140
|
};
|
|
161
141
|
};
|
|
162
|
-
|
|
163
142
|
const unmarshalServerIp = data => {
|
|
164
143
|
if (!isJSONObject(data)) {
|
|
165
144
|
throw new TypeError(`Unmarshalling the type 'ServerIp' failed as data isn't a dictionary.`);
|
|
166
145
|
}
|
|
167
|
-
|
|
168
146
|
return {
|
|
169
147
|
address: data.address,
|
|
170
148
|
dynamic: data.dynamic,
|
|
171
149
|
id: data.id
|
|
172
150
|
};
|
|
173
151
|
};
|
|
174
|
-
|
|
175
152
|
const unmarshalServerIpv6 = data => {
|
|
176
153
|
if (!isJSONObject(data)) {
|
|
177
154
|
throw new TypeError(`Unmarshalling the type 'ServerIpv6' failed as data isn't a dictionary.`);
|
|
178
155
|
}
|
|
179
|
-
|
|
180
156
|
return {
|
|
181
157
|
address: data.address,
|
|
182
158
|
gateway: data.gateway,
|
|
183
159
|
netmask: data.netmask
|
|
184
160
|
};
|
|
185
161
|
};
|
|
186
|
-
|
|
187
162
|
const unmarshalServerLocation = data => {
|
|
188
163
|
if (!isJSONObject(data)) {
|
|
189
164
|
throw new TypeError(`Unmarshalling the type 'ServerLocation' failed as data isn't a dictionary.`);
|
|
190
165
|
}
|
|
191
|
-
|
|
192
166
|
return {
|
|
193
167
|
clusterId: data.cluster_id,
|
|
194
168
|
hypervisorId: data.hypervisor_id,
|
|
@@ -197,20 +171,27 @@ const unmarshalServerLocation = data => {
|
|
|
197
171
|
zoneId: data.zone_id
|
|
198
172
|
};
|
|
199
173
|
};
|
|
200
|
-
|
|
201
174
|
const unmarshalServerMaintenance = data => {
|
|
202
175
|
if (!isJSONObject(data)) {
|
|
203
176
|
throw new TypeError(`Unmarshalling the type 'ServerMaintenance' failed as data isn't a dictionary.`);
|
|
204
177
|
}
|
|
205
|
-
|
|
206
|
-
|
|
178
|
+
return {
|
|
179
|
+
reason: data.reason
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
const unmarshalServerTypeCapabilities = data => {
|
|
183
|
+
if (!isJSONObject(data)) {
|
|
184
|
+
throw new TypeError(`Unmarshalling the type 'ServerTypeCapabilities' failed as data isn't a dictionary.`);
|
|
185
|
+
}
|
|
186
|
+
return {
|
|
187
|
+
blockStorage: data.block_storage,
|
|
188
|
+
bootTypes: data.boot_types
|
|
189
|
+
};
|
|
207
190
|
};
|
|
208
|
-
|
|
209
191
|
const unmarshalServerTypeNetwork = data => {
|
|
210
192
|
if (!isJSONObject(data)) {
|
|
211
193
|
throw new TypeError(`Unmarshalling the type 'ServerTypeNetwork' failed as data isn't a dictionary.`);
|
|
212
194
|
}
|
|
213
|
-
|
|
214
195
|
return {
|
|
215
196
|
interfaces: unmarshalArrayOfObject(data.interfaces, unmarshalServerTypeNetworkInterface),
|
|
216
197
|
ipv6Support: data.ipv6_support,
|
|
@@ -218,33 +199,27 @@ const unmarshalServerTypeNetwork = data => {
|
|
|
218
199
|
sumInternetBandwidth: data.sum_internet_bandwidth
|
|
219
200
|
};
|
|
220
201
|
};
|
|
221
|
-
|
|
222
202
|
const unmarshalServerTypeVolumeConstraintsByType = data => {
|
|
223
203
|
if (!isJSONObject(data)) {
|
|
224
204
|
throw new TypeError(`Unmarshalling the type 'ServerTypeVolumeConstraintsByType' failed as data isn't a dictionary.`);
|
|
225
205
|
}
|
|
226
|
-
|
|
227
206
|
return {
|
|
228
207
|
lSsd: data.l_ssd ? unmarshalServerTypeVolumeConstraintSizes(data.l_ssd) : undefined
|
|
229
208
|
};
|
|
230
209
|
};
|
|
231
|
-
|
|
232
210
|
const unmarshalSnapshotBaseVolume = data => {
|
|
233
211
|
if (!isJSONObject(data)) {
|
|
234
212
|
throw new TypeError(`Unmarshalling the type 'SnapshotBaseVolume' failed as data isn't a dictionary.`);
|
|
235
213
|
}
|
|
236
|
-
|
|
237
214
|
return {
|
|
238
215
|
id: data.id,
|
|
239
216
|
name: data.name
|
|
240
217
|
};
|
|
241
218
|
};
|
|
242
|
-
|
|
243
219
|
const unmarshalVolumeServer = data => {
|
|
244
220
|
if (!isJSONObject(data)) {
|
|
245
221
|
throw new TypeError(`Unmarshalling the type 'VolumeServer' failed as data isn't a dictionary.`);
|
|
246
222
|
}
|
|
247
|
-
|
|
248
223
|
return {
|
|
249
224
|
boot: data.boot,
|
|
250
225
|
creationDate: unmarshalDate(data.creation_date),
|
|
@@ -261,33 +236,27 @@ const unmarshalVolumeServer = data => {
|
|
|
261
236
|
zone: data.zone
|
|
262
237
|
};
|
|
263
238
|
};
|
|
264
|
-
|
|
265
239
|
const unmarshalVolumeTypeCapabilities = data => {
|
|
266
240
|
if (!isJSONObject(data)) {
|
|
267
241
|
throw new TypeError(`Unmarshalling the type 'VolumeTypeCapabilities' failed as data isn't a dictionary.`);
|
|
268
242
|
}
|
|
269
|
-
|
|
270
243
|
return {
|
|
271
244
|
snapshot: data.snapshot
|
|
272
245
|
};
|
|
273
246
|
};
|
|
274
|
-
|
|
275
247
|
const unmarshalVolumeTypeConstraints = data => {
|
|
276
248
|
if (!isJSONObject(data)) {
|
|
277
249
|
throw new TypeError(`Unmarshalling the type 'VolumeTypeConstraints' failed as data isn't a dictionary.`);
|
|
278
250
|
}
|
|
279
|
-
|
|
280
251
|
return {
|
|
281
252
|
max: data.max,
|
|
282
253
|
min: data.min
|
|
283
254
|
};
|
|
284
255
|
};
|
|
285
|
-
|
|
286
256
|
const unmarshalDashboard = data => {
|
|
287
257
|
if (!isJSONObject(data)) {
|
|
288
258
|
throw new TypeError(`Unmarshalling the type 'Dashboard' failed as data isn't a dictionary.`);
|
|
289
259
|
}
|
|
290
|
-
|
|
291
260
|
return {
|
|
292
261
|
imagesCount: data.images_count,
|
|
293
262
|
ipsCount: data.ips_count,
|
|
@@ -306,22 +275,18 @@ const unmarshalDashboard = data => {
|
|
|
306
275
|
volumesLSsdTotalSize: data.volumes_l_ssd_total_size
|
|
307
276
|
};
|
|
308
277
|
};
|
|
309
|
-
|
|
310
278
|
const unmarshalGetServerTypesAvailabilityResponseAvailability = data => {
|
|
311
279
|
if (!isJSONObject(data)) {
|
|
312
280
|
throw new TypeError(`Unmarshalling the type 'GetServerTypesAvailabilityResponseAvailability' failed as data isn't a dictionary.`);
|
|
313
281
|
}
|
|
314
|
-
|
|
315
282
|
return {
|
|
316
283
|
availability: data.availability
|
|
317
284
|
};
|
|
318
285
|
};
|
|
319
|
-
|
|
320
286
|
const unmarshalIp = data => {
|
|
321
287
|
if (!isJSONObject(data)) {
|
|
322
288
|
throw new TypeError(`Unmarshalling the type 'Ip' failed as data isn't a dictionary.`);
|
|
323
289
|
}
|
|
324
|
-
|
|
325
290
|
return {
|
|
326
291
|
address: data.address,
|
|
327
292
|
id: data.id,
|
|
@@ -333,24 +298,20 @@ const unmarshalIp = data => {
|
|
|
333
298
|
zone: data.zone
|
|
334
299
|
};
|
|
335
300
|
};
|
|
336
|
-
|
|
337
301
|
const unmarshalPlacementGroupServer = data => {
|
|
338
302
|
if (!isJSONObject(data)) {
|
|
339
303
|
throw new TypeError(`Unmarshalling the type 'PlacementGroupServer' failed as data isn't a dictionary.`);
|
|
340
304
|
}
|
|
341
|
-
|
|
342
305
|
return {
|
|
343
306
|
id: data.id,
|
|
344
307
|
name: data.name,
|
|
345
308
|
policyRespected: data.policy_respected
|
|
346
309
|
};
|
|
347
310
|
};
|
|
348
|
-
|
|
349
311
|
const unmarshalSecurityGroup = data => {
|
|
350
312
|
if (!isJSONObject(data)) {
|
|
351
313
|
throw new TypeError(`Unmarshalling the type 'SecurityGroup' failed as data isn't a dictionary.`);
|
|
352
314
|
}
|
|
353
|
-
|
|
354
315
|
return {
|
|
355
316
|
creationDate: unmarshalDate(data.creation_date),
|
|
356
317
|
description: data.description,
|
|
@@ -371,12 +332,10 @@ const unmarshalSecurityGroup = data => {
|
|
|
371
332
|
zone: data.zone
|
|
372
333
|
};
|
|
373
334
|
};
|
|
374
|
-
|
|
375
335
|
const unmarshalSecurityGroupRule = data => {
|
|
376
336
|
if (!isJSONObject(data)) {
|
|
377
337
|
throw new TypeError(`Unmarshalling the type 'SecurityGroupRule' failed as data isn't a dictionary.`);
|
|
378
338
|
}
|
|
379
|
-
|
|
380
339
|
return {
|
|
381
340
|
action: data.action,
|
|
382
341
|
destPortFrom: data.dest_port_from,
|
|
@@ -390,12 +349,10 @@ const unmarshalSecurityGroupRule = data => {
|
|
|
390
349
|
zone: data.zone
|
|
391
350
|
};
|
|
392
351
|
};
|
|
393
|
-
|
|
394
352
|
const unmarshalServer = data => {
|
|
395
353
|
if (!isJSONObject(data)) {
|
|
396
354
|
throw new TypeError(`Unmarshalling the type 'Server' failed as data isn't a dictionary.`);
|
|
397
355
|
}
|
|
398
|
-
|
|
399
356
|
return {
|
|
400
357
|
allowedActions: data.allowed_actions,
|
|
401
358
|
arch: data.arch,
|
|
@@ -428,16 +385,15 @@ const unmarshalServer = data => {
|
|
|
428
385
|
zone: data.zone
|
|
429
386
|
};
|
|
430
387
|
};
|
|
431
|
-
|
|
432
388
|
const unmarshalServerType = data => {
|
|
433
389
|
if (!isJSONObject(data)) {
|
|
434
390
|
throw new TypeError(`Unmarshalling the type 'ServerType' failed as data isn't a dictionary.`);
|
|
435
391
|
}
|
|
436
|
-
|
|
437
392
|
return {
|
|
438
393
|
altNames: data.alt_names,
|
|
439
394
|
arch: data.arch,
|
|
440
395
|
baremetal: data.baremetal,
|
|
396
|
+
capabilities: data.capabilities ? unmarshalServerTypeCapabilities(data.capabilities) : undefined,
|
|
441
397
|
gpu: data.gpu,
|
|
442
398
|
hourlyPrice: data.hourly_price,
|
|
443
399
|
monthlyPrice: data.monthly_price,
|
|
@@ -448,12 +404,10 @@ const unmarshalServerType = data => {
|
|
|
448
404
|
volumesConstraint: data.volumes_constraint ? unmarshalServerTypeVolumeConstraintSizes(data.volumes_constraint) : undefined
|
|
449
405
|
};
|
|
450
406
|
};
|
|
451
|
-
|
|
452
407
|
const unmarshalSnapshot = data => {
|
|
453
408
|
if (!isJSONObject(data)) {
|
|
454
409
|
throw new TypeError(`Unmarshalling the type 'Snapshot' failed as data isn't a dictionary.`);
|
|
455
410
|
}
|
|
456
|
-
|
|
457
411
|
return {
|
|
458
412
|
baseVolume: data.base_volume ? unmarshalSnapshotBaseVolume(data.base_volume) : undefined,
|
|
459
413
|
creationDate: unmarshalDate(data.creation_date),
|
|
@@ -470,12 +424,10 @@ const unmarshalSnapshot = data => {
|
|
|
470
424
|
zone: data.zone
|
|
471
425
|
};
|
|
472
426
|
};
|
|
473
|
-
|
|
474
427
|
const unmarshalTask = data => {
|
|
475
428
|
if (!isJSONObject(data)) {
|
|
476
429
|
throw new TypeError(`Unmarshalling the type 'Task' failed as data isn't a dictionary.`);
|
|
477
430
|
}
|
|
478
|
-
|
|
479
431
|
return {
|
|
480
432
|
description: data.description,
|
|
481
433
|
hrefFrom: data.href_from,
|
|
@@ -488,44 +440,36 @@ const unmarshalTask = data => {
|
|
|
488
440
|
zone: data.zone
|
|
489
441
|
};
|
|
490
442
|
};
|
|
491
|
-
|
|
492
443
|
const unmarshalVolumeType = data => {
|
|
493
444
|
if (!isJSONObject(data)) {
|
|
494
445
|
throw new TypeError(`Unmarshalling the type 'VolumeType' failed as data isn't a dictionary.`);
|
|
495
446
|
}
|
|
496
|
-
|
|
497
447
|
return {
|
|
498
448
|
capabilities: data.capabilities ? unmarshalVolumeTypeCapabilities(data.capabilities) : undefined,
|
|
499
449
|
constraints: data.constraints ? unmarshalVolumeTypeConstraints(data.constraints) : undefined,
|
|
500
450
|
displayName: data.display_name
|
|
501
451
|
};
|
|
502
452
|
};
|
|
503
|
-
|
|
504
453
|
const unmarshalCreateImageResponse = data => {
|
|
505
454
|
if (!isJSONObject(data)) {
|
|
506
455
|
throw new TypeError(`Unmarshalling the type 'CreateImageResponse' failed as data isn't a dictionary.`);
|
|
507
456
|
}
|
|
508
|
-
|
|
509
457
|
return {
|
|
510
|
-
image: data.image ? unmarshalImage(data.image) : undefined
|
|
511
|
-
location: data.Location
|
|
458
|
+
image: data.image ? unmarshalImage(data.image) : undefined
|
|
512
459
|
};
|
|
513
460
|
};
|
|
514
461
|
const unmarshalCreateIpResponse = data => {
|
|
515
462
|
if (!isJSONObject(data)) {
|
|
516
463
|
throw new TypeError(`Unmarshalling the type 'CreateIpResponse' failed as data isn't a dictionary.`);
|
|
517
464
|
}
|
|
518
|
-
|
|
519
465
|
return {
|
|
520
|
-
ip: data.ip ? unmarshalIp(data.ip) : undefined
|
|
521
|
-
location: data.Location
|
|
466
|
+
ip: data.ip ? unmarshalIp(data.ip) : undefined
|
|
522
467
|
};
|
|
523
468
|
};
|
|
524
469
|
const unmarshalCreatePlacementGroupResponse = data => {
|
|
525
470
|
if (!isJSONObject(data)) {
|
|
526
471
|
throw new TypeError(`Unmarshalling the type 'CreatePlacementGroupResponse' failed as data isn't a dictionary.`);
|
|
527
472
|
}
|
|
528
|
-
|
|
529
473
|
return {
|
|
530
474
|
placementGroup: data.placement_group ? unmarshalPlacementGroup(data.placement_group) : undefined
|
|
531
475
|
};
|
|
@@ -534,7 +478,6 @@ const unmarshalCreatePrivateNICResponse = data => {
|
|
|
534
478
|
if (!isJSONObject(data)) {
|
|
535
479
|
throw new TypeError(`Unmarshalling the type 'CreatePrivateNICResponse' failed as data isn't a dictionary.`);
|
|
536
480
|
}
|
|
537
|
-
|
|
538
481
|
return {
|
|
539
482
|
privateNic: data.private_nic ? unmarshalPrivateNIC(data.private_nic) : undefined
|
|
540
483
|
};
|
|
@@ -543,7 +486,6 @@ const unmarshalCreateSecurityGroupResponse = data => {
|
|
|
543
486
|
if (!isJSONObject(data)) {
|
|
544
487
|
throw new TypeError(`Unmarshalling the type 'CreateSecurityGroupResponse' failed as data isn't a dictionary.`);
|
|
545
488
|
}
|
|
546
|
-
|
|
547
489
|
return {
|
|
548
490
|
securityGroup: data.security_group ? unmarshalSecurityGroup(data.security_group) : undefined
|
|
549
491
|
};
|
|
@@ -552,7 +494,6 @@ const unmarshalCreateSecurityGroupRuleResponse = data => {
|
|
|
552
494
|
if (!isJSONObject(data)) {
|
|
553
495
|
throw new TypeError(`Unmarshalling the type 'CreateSecurityGroupRuleResponse' failed as data isn't a dictionary.`);
|
|
554
496
|
}
|
|
555
|
-
|
|
556
497
|
return {
|
|
557
498
|
rule: data.rule ? unmarshalSecurityGroupRule(data.rule) : undefined
|
|
558
499
|
};
|
|
@@ -561,7 +502,6 @@ const unmarshalCreateServerResponse = data => {
|
|
|
561
502
|
if (!isJSONObject(data)) {
|
|
562
503
|
throw new TypeError(`Unmarshalling the type 'CreateServerResponse' failed as data isn't a dictionary.`);
|
|
563
504
|
}
|
|
564
|
-
|
|
565
505
|
return {
|
|
566
506
|
server: data.server ? unmarshalServer(data.server) : undefined
|
|
567
507
|
};
|
|
@@ -570,7 +510,6 @@ const unmarshalCreateSnapshotResponse = data => {
|
|
|
570
510
|
if (!isJSONObject(data)) {
|
|
571
511
|
throw new TypeError(`Unmarshalling the type 'CreateSnapshotResponse' failed as data isn't a dictionary.`);
|
|
572
512
|
}
|
|
573
|
-
|
|
574
513
|
return {
|
|
575
514
|
snapshot: data.snapshot ? unmarshalSnapshot(data.snapshot) : undefined,
|
|
576
515
|
task: data.task ? unmarshalTask(data.task) : undefined
|
|
@@ -580,9 +519,7 @@ const unmarshalCreateVolumeResponse = data => {
|
|
|
580
519
|
if (!isJSONObject(data)) {
|
|
581
520
|
throw new TypeError(`Unmarshalling the type 'CreateVolumeResponse' failed as data isn't a dictionary.`);
|
|
582
521
|
}
|
|
583
|
-
|
|
584
522
|
return {
|
|
585
|
-
location: data.Location,
|
|
586
523
|
volume: data.volume ? unmarshalVolume(data.volume) : undefined
|
|
587
524
|
};
|
|
588
525
|
};
|
|
@@ -590,7 +527,6 @@ const unmarshalExportSnapshotResponse = data => {
|
|
|
590
527
|
if (!isJSONObject(data)) {
|
|
591
528
|
throw new TypeError(`Unmarshalling the type 'ExportSnapshotResponse' failed as data isn't a dictionary.`);
|
|
592
529
|
}
|
|
593
|
-
|
|
594
530
|
return {
|
|
595
531
|
task: data.task ? unmarshalTask(data.task) : undefined
|
|
596
532
|
};
|
|
@@ -599,7 +535,6 @@ const unmarshalGetBootscriptResponse = data => {
|
|
|
599
535
|
if (!isJSONObject(data)) {
|
|
600
536
|
throw new TypeError(`Unmarshalling the type 'GetBootscriptResponse' failed as data isn't a dictionary.`);
|
|
601
537
|
}
|
|
602
|
-
|
|
603
538
|
return {
|
|
604
539
|
bootscript: data.bootscript ? unmarshalBootscript(data.bootscript) : undefined
|
|
605
540
|
};
|
|
@@ -608,7 +543,6 @@ const unmarshalGetDashboardResponse = data => {
|
|
|
608
543
|
if (!isJSONObject(data)) {
|
|
609
544
|
throw new TypeError(`Unmarshalling the type 'GetDashboardResponse' failed as data isn't a dictionary.`);
|
|
610
545
|
}
|
|
611
|
-
|
|
612
546
|
return {
|
|
613
547
|
dashboard: data.dashboard ? unmarshalDashboard(data.dashboard) : undefined
|
|
614
548
|
};
|
|
@@ -617,7 +551,6 @@ const unmarshalGetImageResponse = data => {
|
|
|
617
551
|
if (!isJSONObject(data)) {
|
|
618
552
|
throw new TypeError(`Unmarshalling the type 'GetImageResponse' failed as data isn't a dictionary.`);
|
|
619
553
|
}
|
|
620
|
-
|
|
621
554
|
return {
|
|
622
555
|
image: data.image ? unmarshalImage(data.image) : undefined
|
|
623
556
|
};
|
|
@@ -626,7 +559,6 @@ const unmarshalGetIpResponse = data => {
|
|
|
626
559
|
if (!isJSONObject(data)) {
|
|
627
560
|
throw new TypeError(`Unmarshalling the type 'GetIpResponse' failed as data isn't a dictionary.`);
|
|
628
561
|
}
|
|
629
|
-
|
|
630
562
|
return {
|
|
631
563
|
ip: data.ip ? unmarshalIp(data.ip) : undefined
|
|
632
564
|
};
|
|
@@ -635,7 +567,6 @@ const unmarshalGetPlacementGroupResponse = data => {
|
|
|
635
567
|
if (!isJSONObject(data)) {
|
|
636
568
|
throw new TypeError(`Unmarshalling the type 'GetPlacementGroupResponse' failed as data isn't a dictionary.`);
|
|
637
569
|
}
|
|
638
|
-
|
|
639
570
|
return {
|
|
640
571
|
placementGroup: data.placement_group ? unmarshalPlacementGroup(data.placement_group) : undefined
|
|
641
572
|
};
|
|
@@ -644,7 +575,6 @@ const unmarshalGetPlacementGroupServersResponse = data => {
|
|
|
644
575
|
if (!isJSONObject(data)) {
|
|
645
576
|
throw new TypeError(`Unmarshalling the type 'GetPlacementGroupServersResponse' failed as data isn't a dictionary.`);
|
|
646
577
|
}
|
|
647
|
-
|
|
648
578
|
return {
|
|
649
579
|
servers: unmarshalArrayOfObject(data.servers, unmarshalPlacementGroupServer)
|
|
650
580
|
};
|
|
@@ -653,7 +583,6 @@ const unmarshalGetPrivateNICResponse = data => {
|
|
|
653
583
|
if (!isJSONObject(data)) {
|
|
654
584
|
throw new TypeError(`Unmarshalling the type 'GetPrivateNICResponse' failed as data isn't a dictionary.`);
|
|
655
585
|
}
|
|
656
|
-
|
|
657
586
|
return {
|
|
658
587
|
privateNic: data.private_nic ? unmarshalPrivateNIC(data.private_nic) : undefined
|
|
659
588
|
};
|
|
@@ -662,7 +591,6 @@ const unmarshalGetSecurityGroupResponse = data => {
|
|
|
662
591
|
if (!isJSONObject(data)) {
|
|
663
592
|
throw new TypeError(`Unmarshalling the type 'GetSecurityGroupResponse' failed as data isn't a dictionary.`);
|
|
664
593
|
}
|
|
665
|
-
|
|
666
594
|
return {
|
|
667
595
|
securityGroup: data.security_group ? unmarshalSecurityGroup(data.security_group) : undefined
|
|
668
596
|
};
|
|
@@ -671,7 +599,6 @@ const unmarshalGetSecurityGroupRuleResponse = data => {
|
|
|
671
599
|
if (!isJSONObject(data)) {
|
|
672
600
|
throw new TypeError(`Unmarshalling the type 'GetSecurityGroupRuleResponse' failed as data isn't a dictionary.`);
|
|
673
601
|
}
|
|
674
|
-
|
|
675
602
|
return {
|
|
676
603
|
rule: data.rule ? unmarshalSecurityGroupRule(data.rule) : undefined
|
|
677
604
|
};
|
|
@@ -680,7 +607,6 @@ const unmarshalGetServerResponse = data => {
|
|
|
680
607
|
if (!isJSONObject(data)) {
|
|
681
608
|
throw new TypeError(`Unmarshalling the type 'GetServerResponse' failed as data isn't a dictionary.`);
|
|
682
609
|
}
|
|
683
|
-
|
|
684
610
|
return {
|
|
685
611
|
server: data.server ? unmarshalServer(data.server) : undefined
|
|
686
612
|
};
|
|
@@ -689,7 +615,6 @@ const unmarshalGetServerTypesAvailabilityResponse = data => {
|
|
|
689
615
|
if (!isJSONObject(data)) {
|
|
690
616
|
throw new TypeError(`Unmarshalling the type 'GetServerTypesAvailabilityResponse' failed as data isn't a dictionary.`);
|
|
691
617
|
}
|
|
692
|
-
|
|
693
618
|
return {
|
|
694
619
|
servers: unmarshalMapOfObject(data.servers, unmarshalGetServerTypesAvailabilityResponseAvailability)
|
|
695
620
|
};
|
|
@@ -698,7 +623,6 @@ const unmarshalGetSnapshotResponse = data => {
|
|
|
698
623
|
if (!isJSONObject(data)) {
|
|
699
624
|
throw new TypeError(`Unmarshalling the type 'GetSnapshotResponse' failed as data isn't a dictionary.`);
|
|
700
625
|
}
|
|
701
|
-
|
|
702
626
|
return {
|
|
703
627
|
snapshot: data.snapshot ? unmarshalSnapshot(data.snapshot) : undefined
|
|
704
628
|
};
|
|
@@ -707,7 +631,6 @@ const unmarshalGetVolumeResponse = data => {
|
|
|
707
631
|
if (!isJSONObject(data)) {
|
|
708
632
|
throw new TypeError(`Unmarshalling the type 'GetVolumeResponse' failed as data isn't a dictionary.`);
|
|
709
633
|
}
|
|
710
|
-
|
|
711
634
|
return {
|
|
712
635
|
volume: data.volume ? unmarshalVolume(data.volume) : undefined
|
|
713
636
|
};
|
|
@@ -716,7 +639,6 @@ const unmarshalListBootscriptsResponse = data => {
|
|
|
716
639
|
if (!isJSONObject(data)) {
|
|
717
640
|
throw new TypeError(`Unmarshalling the type 'ListBootscriptsResponse' failed as data isn't a dictionary.`);
|
|
718
641
|
}
|
|
719
|
-
|
|
720
642
|
return {
|
|
721
643
|
bootscripts: unmarshalArrayOfObject(data.bootscripts, unmarshalBootscript),
|
|
722
644
|
totalCount: data.total_count
|
|
@@ -726,7 +648,6 @@ const unmarshalListImagesResponse = data => {
|
|
|
726
648
|
if (!isJSONObject(data)) {
|
|
727
649
|
throw new TypeError(`Unmarshalling the type 'ListImagesResponse' failed as data isn't a dictionary.`);
|
|
728
650
|
}
|
|
729
|
-
|
|
730
651
|
return {
|
|
731
652
|
images: unmarshalArrayOfObject(data.images, unmarshalImage),
|
|
732
653
|
totalCount: data.total_count
|
|
@@ -736,7 +657,6 @@ const unmarshalListIpsResponse = data => {
|
|
|
736
657
|
if (!isJSONObject(data)) {
|
|
737
658
|
throw new TypeError(`Unmarshalling the type 'ListIpsResponse' failed as data isn't a dictionary.`);
|
|
738
659
|
}
|
|
739
|
-
|
|
740
660
|
return {
|
|
741
661
|
ips: unmarshalArrayOfObject(data.ips, unmarshalIp),
|
|
742
662
|
totalCount: data.total_count
|
|
@@ -746,7 +666,6 @@ const unmarshalListPlacementGroupsResponse = data => {
|
|
|
746
666
|
if (!isJSONObject(data)) {
|
|
747
667
|
throw new TypeError(`Unmarshalling the type 'ListPlacementGroupsResponse' failed as data isn't a dictionary.`);
|
|
748
668
|
}
|
|
749
|
-
|
|
750
669
|
return {
|
|
751
670
|
placementGroups: unmarshalArrayOfObject(data.placement_groups, unmarshalPlacementGroup),
|
|
752
671
|
totalCount: data.total_count
|
|
@@ -756,7 +675,6 @@ const unmarshalListPrivateNICsResponse = data => {
|
|
|
756
675
|
if (!isJSONObject(data)) {
|
|
757
676
|
throw new TypeError(`Unmarshalling the type 'ListPrivateNICsResponse' failed as data isn't a dictionary.`);
|
|
758
677
|
}
|
|
759
|
-
|
|
760
678
|
return {
|
|
761
679
|
privateNics: unmarshalArrayOfObject(data.private_nics, unmarshalPrivateNIC)
|
|
762
680
|
};
|
|
@@ -765,7 +683,6 @@ const unmarshalListSecurityGroupRulesResponse = data => {
|
|
|
765
683
|
if (!isJSONObject(data)) {
|
|
766
684
|
throw new TypeError(`Unmarshalling the type 'ListSecurityGroupRulesResponse' failed as data isn't a dictionary.`);
|
|
767
685
|
}
|
|
768
|
-
|
|
769
686
|
return {
|
|
770
687
|
rules: unmarshalArrayOfObject(data.rules, unmarshalSecurityGroupRule),
|
|
771
688
|
totalCount: data.total_count
|
|
@@ -775,7 +692,6 @@ const unmarshalListSecurityGroupsResponse = data => {
|
|
|
775
692
|
if (!isJSONObject(data)) {
|
|
776
693
|
throw new TypeError(`Unmarshalling the type 'ListSecurityGroupsResponse' failed as data isn't a dictionary.`);
|
|
777
694
|
}
|
|
778
|
-
|
|
779
695
|
return {
|
|
780
696
|
securityGroups: unmarshalArrayOfObject(data.security_groups, unmarshalSecurityGroup),
|
|
781
697
|
totalCount: data.total_count
|
|
@@ -785,7 +701,6 @@ const unmarshalListServerActionsResponse = data => {
|
|
|
785
701
|
if (!isJSONObject(data)) {
|
|
786
702
|
throw new TypeError(`Unmarshalling the type 'ListServerActionsResponse' failed as data isn't a dictionary.`);
|
|
787
703
|
}
|
|
788
|
-
|
|
789
704
|
return {
|
|
790
705
|
actions: data.actions
|
|
791
706
|
};
|
|
@@ -794,7 +709,6 @@ const unmarshalListServerUserDataResponse = data => {
|
|
|
794
709
|
if (!isJSONObject(data)) {
|
|
795
710
|
throw new TypeError(`Unmarshalling the type 'ListServerUserDataResponse' failed as data isn't a dictionary.`);
|
|
796
711
|
}
|
|
797
|
-
|
|
798
712
|
return {
|
|
799
713
|
userData: data.user_data
|
|
800
714
|
};
|
|
@@ -803,7 +717,6 @@ const unmarshalListServersResponse = data => {
|
|
|
803
717
|
if (!isJSONObject(data)) {
|
|
804
718
|
throw new TypeError(`Unmarshalling the type 'ListServersResponse' failed as data isn't a dictionary.`);
|
|
805
719
|
}
|
|
806
|
-
|
|
807
720
|
return {
|
|
808
721
|
servers: unmarshalArrayOfObject(data.servers, unmarshalServer),
|
|
809
722
|
totalCount: data.total_count
|
|
@@ -813,7 +726,6 @@ const unmarshalListServersTypesResponse = data => {
|
|
|
813
726
|
if (!isJSONObject(data)) {
|
|
814
727
|
throw new TypeError(`Unmarshalling the type 'ListServersTypesResponse' failed as data isn't a dictionary.`);
|
|
815
728
|
}
|
|
816
|
-
|
|
817
729
|
return {
|
|
818
730
|
servers: unmarshalMapOfObject(data.servers, unmarshalServerType),
|
|
819
731
|
totalCount: data.total_count
|
|
@@ -823,7 +735,6 @@ const unmarshalListSnapshotsResponse = data => {
|
|
|
823
735
|
if (!isJSONObject(data)) {
|
|
824
736
|
throw new TypeError(`Unmarshalling the type 'ListSnapshotsResponse' failed as data isn't a dictionary.`);
|
|
825
737
|
}
|
|
826
|
-
|
|
827
738
|
return {
|
|
828
739
|
snapshots: unmarshalArrayOfObject(data.snapshots, unmarshalSnapshot),
|
|
829
740
|
totalCount: data.total_count
|
|
@@ -833,7 +744,6 @@ const unmarshalListVolumesResponse = data => {
|
|
|
833
744
|
if (!isJSONObject(data)) {
|
|
834
745
|
throw new TypeError(`Unmarshalling the type 'ListVolumesResponse' failed as data isn't a dictionary.`);
|
|
835
746
|
}
|
|
836
|
-
|
|
837
747
|
return {
|
|
838
748
|
totalCount: data.total_count,
|
|
839
749
|
volumes: unmarshalArrayOfObject(data.volumes, unmarshalVolume)
|
|
@@ -843,7 +753,6 @@ const unmarshalListVolumesTypesResponse = data => {
|
|
|
843
753
|
if (!isJSONObject(data)) {
|
|
844
754
|
throw new TypeError(`Unmarshalling the type 'ListVolumesTypesResponse' failed as data isn't a dictionary.`);
|
|
845
755
|
}
|
|
846
|
-
|
|
847
756
|
return {
|
|
848
757
|
totalCount: data.total_count,
|
|
849
758
|
volumes: unmarshalMapOfObject(data.volumes, unmarshalVolumeType)
|
|
@@ -853,7 +762,6 @@ const unmarshalServerActionResponse = data => {
|
|
|
853
762
|
if (!isJSONObject(data)) {
|
|
854
763
|
throw new TypeError(`Unmarshalling the type 'ServerActionResponse' failed as data isn't a dictionary.`);
|
|
855
764
|
}
|
|
856
|
-
|
|
857
765
|
return {
|
|
858
766
|
task: data.task ? unmarshalTask(data.task) : undefined
|
|
859
767
|
};
|
|
@@ -862,7 +770,6 @@ const unmarshalSetImageResponse = data => {
|
|
|
862
770
|
if (!isJSONObject(data)) {
|
|
863
771
|
throw new TypeError(`Unmarshalling the type 'SetImageResponse' failed as data isn't a dictionary.`);
|
|
864
772
|
}
|
|
865
|
-
|
|
866
773
|
return {
|
|
867
774
|
image: data.image ? unmarshalImage(data.image) : undefined
|
|
868
775
|
};
|
|
@@ -871,7 +778,6 @@ const unmarshalSetPlacementGroupResponse = data => {
|
|
|
871
778
|
if (!isJSONObject(data)) {
|
|
872
779
|
throw new TypeError(`Unmarshalling the type 'SetPlacementGroupResponse' failed as data isn't a dictionary.`);
|
|
873
780
|
}
|
|
874
|
-
|
|
875
781
|
return {
|
|
876
782
|
placementGroup: data.placement_group ? unmarshalPlacementGroup(data.placement_group) : undefined
|
|
877
783
|
};
|
|
@@ -880,7 +786,6 @@ const unmarshalSetPlacementGroupServersResponse = data => {
|
|
|
880
786
|
if (!isJSONObject(data)) {
|
|
881
787
|
throw new TypeError(`Unmarshalling the type 'SetPlacementGroupServersResponse' failed as data isn't a dictionary.`);
|
|
882
788
|
}
|
|
883
|
-
|
|
884
789
|
return {
|
|
885
790
|
servers: unmarshalArrayOfObject(data.servers, unmarshalPlacementGroupServer)
|
|
886
791
|
};
|
|
@@ -889,7 +794,6 @@ const unmarshalSetSecurityGroupResponse = data => {
|
|
|
889
794
|
if (!isJSONObject(data)) {
|
|
890
795
|
throw new TypeError(`Unmarshalling the type 'SetSecurityGroupResponse' failed as data isn't a dictionary.`);
|
|
891
796
|
}
|
|
892
|
-
|
|
893
797
|
return {
|
|
894
798
|
securityGroup: data.security_group ? unmarshalSecurityGroup(data.security_group) : undefined
|
|
895
799
|
};
|
|
@@ -898,7 +802,6 @@ const unmarshalSetSecurityGroupRuleResponse = data => {
|
|
|
898
802
|
if (!isJSONObject(data)) {
|
|
899
803
|
throw new TypeError(`Unmarshalling the type 'SetSecurityGroupRuleResponse' failed as data isn't a dictionary.`);
|
|
900
804
|
}
|
|
901
|
-
|
|
902
805
|
return {
|
|
903
806
|
rule: data.rule ? unmarshalSecurityGroupRule(data.rule) : undefined
|
|
904
807
|
};
|
|
@@ -907,7 +810,6 @@ const unmarshalSetSecurityGroupRulesResponse = data => {
|
|
|
907
810
|
if (!isJSONObject(data)) {
|
|
908
811
|
throw new TypeError(`Unmarshalling the type 'SetSecurityGroupRulesResponse' failed as data isn't a dictionary.`);
|
|
909
812
|
}
|
|
910
|
-
|
|
911
813
|
return {
|
|
912
814
|
rules: unmarshalArrayOfObject(data.rules, unmarshalSecurityGroupRule)
|
|
913
815
|
};
|
|
@@ -916,7 +818,6 @@ const unmarshalSetServerResponse = data => {
|
|
|
916
818
|
if (!isJSONObject(data)) {
|
|
917
819
|
throw new TypeError(`Unmarshalling the type 'SetServerResponse' failed as data isn't a dictionary.`);
|
|
918
820
|
}
|
|
919
|
-
|
|
920
821
|
return {
|
|
921
822
|
server: data.server ? unmarshalServer(data.server) : undefined
|
|
922
823
|
};
|
|
@@ -925,7 +826,6 @@ const unmarshalSetSnapshotResponse = data => {
|
|
|
925
826
|
if (!isJSONObject(data)) {
|
|
926
827
|
throw new TypeError(`Unmarshalling the type 'SetSnapshotResponse' failed as data isn't a dictionary.`);
|
|
927
828
|
}
|
|
928
|
-
|
|
929
829
|
return {
|
|
930
830
|
snapshot: data.snapshot ? unmarshalSnapshot(data.snapshot) : undefined
|
|
931
831
|
};
|
|
@@ -934,7 +834,6 @@ const unmarshalUpdateIpResponse = data => {
|
|
|
934
834
|
if (!isJSONObject(data)) {
|
|
935
835
|
throw new TypeError(`Unmarshalling the type 'UpdateIpResponse' failed as data isn't a dictionary.`);
|
|
936
836
|
}
|
|
937
|
-
|
|
938
837
|
return {
|
|
939
838
|
ip: data.ip ? unmarshalIp(data.ip) : undefined
|
|
940
839
|
};
|
|
@@ -943,7 +842,6 @@ const unmarshalUpdatePlacementGroupResponse = data => {
|
|
|
943
842
|
if (!isJSONObject(data)) {
|
|
944
843
|
throw new TypeError(`Unmarshalling the type 'UpdatePlacementGroupResponse' failed as data isn't a dictionary.`);
|
|
945
844
|
}
|
|
946
|
-
|
|
947
845
|
return {
|
|
948
846
|
placementGroup: data.placement_group ? unmarshalPlacementGroup(data.placement_group) : undefined
|
|
949
847
|
};
|
|
@@ -952,7 +850,6 @@ const unmarshalUpdatePlacementGroupServersResponse = data => {
|
|
|
952
850
|
if (!isJSONObject(data)) {
|
|
953
851
|
throw new TypeError(`Unmarshalling the type 'UpdatePlacementGroupServersResponse' failed as data isn't a dictionary.`);
|
|
954
852
|
}
|
|
955
|
-
|
|
956
853
|
return {
|
|
957
854
|
servers: unmarshalArrayOfObject(data.servers, unmarshalPlacementGroupServer)
|
|
958
855
|
};
|
|
@@ -961,7 +858,6 @@ const unmarshalUpdateServerResponse = data => {
|
|
|
961
858
|
if (!isJSONObject(data)) {
|
|
962
859
|
throw new TypeError(`Unmarshalling the type 'UpdateServerResponse' failed as data isn't a dictionary.`);
|
|
963
860
|
}
|
|
964
|
-
|
|
965
861
|
return {
|
|
966
862
|
server: data.server ? unmarshalServer(data.server) : undefined
|
|
967
863
|
};
|
|
@@ -970,17 +866,14 @@ const unmarshalUpdateVolumeResponse = data => {
|
|
|
970
866
|
if (!isJSONObject(data)) {
|
|
971
867
|
throw new TypeError(`Unmarshalling the type 'UpdateVolumeResponse' failed as data isn't a dictionary.`);
|
|
972
868
|
}
|
|
973
|
-
|
|
974
869
|
return {
|
|
975
870
|
volume: data.volume ? unmarshalVolume(data.volume) : undefined
|
|
976
871
|
};
|
|
977
872
|
};
|
|
978
|
-
|
|
979
873
|
const marshalServerSummary = (request, defaults) => ({
|
|
980
874
|
id: request.id,
|
|
981
875
|
name: request.name
|
|
982
876
|
});
|
|
983
|
-
|
|
984
877
|
const marshalBootscript = (request, defaults) => ({
|
|
985
878
|
arch: request.arch,
|
|
986
879
|
bootcmdargs: request.bootcmdargs,
|
|
@@ -995,7 +888,6 @@ const marshalBootscript = (request, defaults) => ({
|
|
|
995
888
|
title: request.title,
|
|
996
889
|
zone: request.zone
|
|
997
890
|
});
|
|
998
|
-
|
|
999
891
|
const marshalVolume = (request, defaults) => ({
|
|
1000
892
|
creation_date: request.creationDate,
|
|
1001
893
|
export_uri: request.exportUri,
|
|
@@ -1011,21 +903,20 @@ const marshalVolume = (request, defaults) => ({
|
|
|
1011
903
|
volume_type: request.volumeType,
|
|
1012
904
|
zone: request.zone
|
|
1013
905
|
});
|
|
1014
|
-
|
|
1015
906
|
const marshalVolumeSummary = (request, defaults) => ({
|
|
1016
907
|
id: request.id,
|
|
1017
908
|
name: request.name,
|
|
1018
909
|
size: request.size,
|
|
1019
910
|
volume_type: request.volumeType
|
|
1020
911
|
});
|
|
1021
|
-
|
|
1022
912
|
const marshalImage = (request, defaults) => ({
|
|
1023
913
|
arch: request.arch,
|
|
1024
914
|
creation_date: request.creationDate,
|
|
1025
915
|
default_bootscript: request.defaultBootscript ? marshalBootscript(request.defaultBootscript) : undefined,
|
|
1026
916
|
extra_volumes: Object.entries(request.extraVolumes).reduce((acc, _ref) => {
|
|
1027
917
|
let [key, value] = _ref;
|
|
1028
|
-
return {
|
|
918
|
+
return {
|
|
919
|
+
...acc,
|
|
1029
920
|
[key]: marshalVolume(value)
|
|
1030
921
|
};
|
|
1031
922
|
}, {}),
|
|
@@ -1041,12 +932,6 @@ const marshalImage = (request, defaults) => ({
|
|
|
1041
932
|
tags: request.tags,
|
|
1042
933
|
zone: request.zone
|
|
1043
934
|
});
|
|
1044
|
-
|
|
1045
|
-
const marshalNullableStringValue = (request, defaults) => ({
|
|
1046
|
-
null: request.null,
|
|
1047
|
-
value: request.value
|
|
1048
|
-
});
|
|
1049
|
-
|
|
1050
935
|
const marshalPlacementGroup = (request, defaults) => ({
|
|
1051
936
|
id: request.id,
|
|
1052
937
|
name: request.name,
|
|
@@ -1058,7 +943,6 @@ const marshalPlacementGroup = (request, defaults) => ({
|
|
|
1058
943
|
tags: request.tags,
|
|
1059
944
|
zone: request.zone
|
|
1060
945
|
});
|
|
1061
|
-
|
|
1062
946
|
const marshalPrivateNIC = (request, defaults) => ({
|
|
1063
947
|
id: request.id,
|
|
1064
948
|
mac_address: request.macAddress,
|
|
@@ -1066,33 +950,27 @@ const marshalPrivateNIC = (request, defaults) => ({
|
|
|
1066
950
|
server_id: request.serverId,
|
|
1067
951
|
state: request.state
|
|
1068
952
|
});
|
|
1069
|
-
|
|
1070
953
|
const marshalSecurityGroupSummary = (request, defaults) => ({
|
|
1071
954
|
id: request.id,
|
|
1072
955
|
name: request.name
|
|
1073
956
|
});
|
|
1074
|
-
|
|
1075
957
|
const marshalSecurityGroupTemplate = (request, defaults) => ({
|
|
1076
958
|
id: request.id,
|
|
1077
959
|
name: request.name
|
|
1078
960
|
});
|
|
1079
|
-
|
|
1080
961
|
const marshalServerActionRequestVolumeBackupTemplate = (request, defaults) => ({
|
|
1081
962
|
volume_type: request.volumeType
|
|
1082
963
|
});
|
|
1083
|
-
|
|
1084
964
|
const marshalServerIp = (request, defaults) => ({
|
|
1085
965
|
address: request.address,
|
|
1086
966
|
dynamic: request.dynamic,
|
|
1087
967
|
id: request.id
|
|
1088
968
|
});
|
|
1089
|
-
|
|
1090
969
|
const marshalServerIpv6 = (request, defaults) => ({
|
|
1091
970
|
address: request.address,
|
|
1092
971
|
gateway: request.gateway,
|
|
1093
972
|
netmask: request.netmask
|
|
1094
973
|
});
|
|
1095
|
-
|
|
1096
974
|
const marshalServerLocation = (request, defaults) => ({
|
|
1097
975
|
cluster_id: request.clusterId,
|
|
1098
976
|
hypervisor_id: request.hypervisorId,
|
|
@@ -1100,9 +978,9 @@ const marshalServerLocation = (request, defaults) => ({
|
|
|
1100
978
|
platform_id: request.platformId,
|
|
1101
979
|
zone_id: request.zoneId
|
|
1102
980
|
});
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
981
|
+
const marshalServerMaintenance = (request, defaults) => ({
|
|
982
|
+
reason: request.reason
|
|
983
|
+
});
|
|
1106
984
|
const marshalSetSecurityGroupRulesRequestRule = (request, defaults) => ({
|
|
1107
985
|
action: request.action,
|
|
1108
986
|
dest_port_from: request.destPortFrom,
|
|
@@ -1115,12 +993,10 @@ const marshalSetSecurityGroupRulesRequestRule = (request, defaults) => ({
|
|
|
1115
993
|
protocol: request.protocol,
|
|
1116
994
|
zone: request.zone
|
|
1117
995
|
});
|
|
1118
|
-
|
|
1119
996
|
const marshalSnapshotBaseVolume = (request, defaults) => ({
|
|
1120
997
|
id: request.id,
|
|
1121
998
|
name: request.name
|
|
1122
999
|
});
|
|
1123
|
-
|
|
1124
1000
|
const marshalVolumeServerTemplate = (request, defaults) => ({
|
|
1125
1001
|
base_snapshot: request.baseSnapshot,
|
|
1126
1002
|
boot: request.boot,
|
|
@@ -1131,30 +1007,27 @@ const marshalVolumeServerTemplate = (request, defaults) => ({
|
|
|
1131
1007
|
size: request.size,
|
|
1132
1008
|
volume_type: request.volumeType
|
|
1133
1009
|
});
|
|
1134
|
-
|
|
1135
1010
|
const marshalVolumeTemplate = (request, defaults) => ({
|
|
1136
1011
|
id: request.id,
|
|
1137
1012
|
name: request.name,
|
|
1138
1013
|
size: request.size,
|
|
1139
1014
|
volume_type: request.volumeType,
|
|
1140
1015
|
...resolveOneOf([{
|
|
1141
|
-
default: defaults.defaultProjectId,
|
|
1142
1016
|
param: 'project',
|
|
1143
1017
|
value: request.project
|
|
1144
1018
|
}, {
|
|
1145
|
-
default: defaults.defaultOrganizationId,
|
|
1146
1019
|
param: 'organization',
|
|
1147
1020
|
value: request.organization
|
|
1148
1021
|
}])
|
|
1149
1022
|
});
|
|
1150
|
-
|
|
1151
1023
|
const marshalCreateImageRequest = (request, defaults) => ({
|
|
1152
1024
|
arch: request.arch,
|
|
1153
1025
|
default_bootscript: request.defaultBootscript,
|
|
1154
1026
|
extra_volumes: request.extraVolumes ? Object.entries(request.extraVolumes).reduce((acc, _ref2) => {
|
|
1155
1027
|
let [key, value] = _ref2;
|
|
1156
|
-
return {
|
|
1157
|
-
|
|
1028
|
+
return {
|
|
1029
|
+
...acc,
|
|
1030
|
+
[key]: marshalVolumeTemplate(value)
|
|
1158
1031
|
};
|
|
1159
1032
|
}, {}) : undefined,
|
|
1160
1033
|
name: request.name || randomName('img'),
|
|
@@ -1186,8 +1059,8 @@ const marshalCreateIpRequest = (request, defaults) => ({
|
|
|
1186
1059
|
});
|
|
1187
1060
|
const marshalCreatePlacementGroupRequest = (request, defaults) => ({
|
|
1188
1061
|
name: request.name || randomName('pg'),
|
|
1189
|
-
policy_mode: request.policyMode,
|
|
1190
|
-
policy_type: request.policyType,
|
|
1062
|
+
policy_mode: request.policyMode ?? 'optional',
|
|
1063
|
+
policy_type: request.policyType ?? 'max_availability',
|
|
1191
1064
|
tags: request.tags,
|
|
1192
1065
|
...resolveOneOf([{
|
|
1193
1066
|
default: defaults.defaultProjectId,
|
|
@@ -1205,9 +1078,9 @@ const marshalCreatePrivateNICRequest = (request, defaults) => ({
|
|
|
1205
1078
|
const marshalCreateSecurityGroupRequest = (request, defaults) => ({
|
|
1206
1079
|
description: request.description,
|
|
1207
1080
|
enable_default_security: request.enableDefaultSecurity,
|
|
1208
|
-
inbound_default_policy: request.inboundDefaultPolicy,
|
|
1081
|
+
inbound_default_policy: request.inboundDefaultPolicy ?? 'accept',
|
|
1209
1082
|
name: request.name || randomName('sg'),
|
|
1210
|
-
outbound_default_policy: request.outboundDefaultPolicy,
|
|
1083
|
+
outbound_default_policy: request.outboundDefaultPolicy ?? 'accept',
|
|
1211
1084
|
stateful: request.stateful,
|
|
1212
1085
|
tags: request.tags,
|
|
1213
1086
|
...resolveOneOf([{
|
|
@@ -1251,7 +1124,8 @@ const marshalCreateServerRequest = (request, defaults) => ({
|
|
|
1251
1124
|
tags: request.tags,
|
|
1252
1125
|
volumes: request.volumes ? Object.entries(request.volumes).reduce((acc, _ref3) => {
|
|
1253
1126
|
let [key, value] = _ref3;
|
|
1254
|
-
return {
|
|
1127
|
+
return {
|
|
1128
|
+
...acc,
|
|
1255
1129
|
[key]: marshalVolumeServerTemplate(value)
|
|
1256
1130
|
};
|
|
1257
1131
|
}, {}) : undefined,
|
|
@@ -1272,7 +1146,7 @@ const marshalCreateSnapshotRequest = (request, defaults) => ({
|
|
|
1272
1146
|
size: request.size,
|
|
1273
1147
|
tags: request.tags,
|
|
1274
1148
|
volume_id: request.volumeId,
|
|
1275
|
-
volume_type: request.volumeType,
|
|
1149
|
+
volume_type: request.volumeType ?? 'unknown_volume_type',
|
|
1276
1150
|
...resolveOneOf([{
|
|
1277
1151
|
default: defaults.defaultProjectId,
|
|
1278
1152
|
param: 'project',
|
|
@@ -1286,7 +1160,7 @@ const marshalCreateSnapshotRequest = (request, defaults) => ({
|
|
|
1286
1160
|
const marshalCreateVolumeRequest = (request, defaults) => ({
|
|
1287
1161
|
name: request.name || randomName('vol'),
|
|
1288
1162
|
tags: request.tags,
|
|
1289
|
-
volume_type: request.volumeType,
|
|
1163
|
+
volume_type: request.volumeType ?? 'l_ssd',
|
|
1290
1164
|
...resolveOneOf([{
|
|
1291
1165
|
default: defaults.defaultProjectId,
|
|
1292
1166
|
param: 'project',
|
|
@@ -1312,11 +1186,12 @@ const marshalExportSnapshotRequest = (request, defaults) => ({
|
|
|
1312
1186
|
key: request.key
|
|
1313
1187
|
});
|
|
1314
1188
|
const marshalServerActionRequest = (request, defaults) => ({
|
|
1315
|
-
action: request.action,
|
|
1189
|
+
action: request.action ?? 'poweron',
|
|
1316
1190
|
name: request.name,
|
|
1317
1191
|
volumes: request.volumes ? Object.entries(request.volumes).reduce((acc, _ref4) => {
|
|
1318
1192
|
let [key, value] = _ref4;
|
|
1319
|
-
return {
|
|
1193
|
+
return {
|
|
1194
|
+
...acc,
|
|
1320
1195
|
[key]: marshalServerActionRequestVolumeBackupTemplate(value)
|
|
1321
1196
|
};
|
|
1322
1197
|
}, {}) : undefined
|
|
@@ -1327,7 +1202,8 @@ const marshalSetImageRequest = (request, defaults) => ({
|
|
|
1327
1202
|
default_bootscript: request.defaultBootscript ? marshalBootscript(request.defaultBootscript) : undefined,
|
|
1328
1203
|
extra_volumes: request.extraVolumes ? Object.entries(request.extraVolumes).reduce((acc, _ref5) => {
|
|
1329
1204
|
let [key, value] = _ref5;
|
|
1330
|
-
return {
|
|
1205
|
+
return {
|
|
1206
|
+
...acc,
|
|
1331
1207
|
[key]: marshalVolume(value)
|
|
1332
1208
|
};
|
|
1333
1209
|
}, {}) : undefined,
|
|
@@ -1395,7 +1271,7 @@ const marshalSetServerRequest = (request, defaults) => ({
|
|
|
1395
1271
|
image: request.image ? marshalImage(request.image) : undefined,
|
|
1396
1272
|
ipv6: request.ipv6 ? marshalServerIpv6(request.ipv6) : undefined,
|
|
1397
1273
|
location: request.location ? marshalServerLocation(request.location) : undefined,
|
|
1398
|
-
maintenances: request.maintenances ? request.maintenances.map(elt => marshalServerMaintenance()) : undefined,
|
|
1274
|
+
maintenances: request.maintenances ? request.maintenances.map(elt => marshalServerMaintenance(elt)) : undefined,
|
|
1399
1275
|
modification_date: request.modificationDate,
|
|
1400
1276
|
name: request.name,
|
|
1401
1277
|
organization: request.organization,
|
|
@@ -1411,7 +1287,8 @@ const marshalSetServerRequest = (request, defaults) => ({
|
|
|
1411
1287
|
tags: request.tags,
|
|
1412
1288
|
volumes: request.volumes ? Object.entries(request.volumes).reduce((acc, _ref6) => {
|
|
1413
1289
|
let [key, value] = _ref6;
|
|
1414
|
-
return {
|
|
1290
|
+
return {
|
|
1291
|
+
...acc,
|
|
1415
1292
|
[key]: marshalVolume(value)
|
|
1416
1293
|
};
|
|
1417
1294
|
}, {}) : undefined
|
|
@@ -1430,8 +1307,8 @@ const marshalSetSnapshotRequest = (request, defaults) => ({
|
|
|
1430
1307
|
volume_type: request.volumeType
|
|
1431
1308
|
});
|
|
1432
1309
|
const marshalUpdateIpRequest = (request, defaults) => ({
|
|
1433
|
-
reverse: request.reverse
|
|
1434
|
-
server: request.server
|
|
1310
|
+
reverse: request.reverse,
|
|
1311
|
+
server: request.server,
|
|
1435
1312
|
tags: request.tags
|
|
1436
1313
|
});
|
|
1437
1314
|
const marshalUpdatePlacementGroupRequest = (request, defaults) => ({
|
|
@@ -1449,14 +1326,15 @@ const marshalUpdateServerRequest = (request, defaults) => ({
|
|
|
1449
1326
|
dynamic_ip_required: request.dynamicIpRequired,
|
|
1450
1327
|
enable_ipv6: request.enableIpv6,
|
|
1451
1328
|
name: request.name,
|
|
1452
|
-
placement_group: request.placementGroup
|
|
1329
|
+
placement_group: request.placementGroup,
|
|
1453
1330
|
private_nics: request.privateNics ? request.privateNics.map(elt => marshalPrivateNIC(elt)) : undefined,
|
|
1454
1331
|
protected: request.protected,
|
|
1455
1332
|
security_group: request.securityGroup ? marshalSecurityGroupTemplate(request.securityGroup) : undefined,
|
|
1456
1333
|
tags: request.tags,
|
|
1457
1334
|
volumes: request.volumes ? Object.entries(request.volumes).reduce((acc, _ref7) => {
|
|
1458
1335
|
let [key, value] = _ref7;
|
|
1459
|
-
return {
|
|
1336
|
+
return {
|
|
1337
|
+
...acc,
|
|
1460
1338
|
[key]: marshalVolumeServerTemplate(value)
|
|
1461
1339
|
};
|
|
1462
1340
|
}, {}) : undefined
|