@scaleway/sdk-mongodb 2.3.0 → 2.4.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.
@@ -1,376 +1,255 @@
1
+ import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
1
2
  import randomName from "@scaleway/random-name";
2
- import { resolveOneOf, isJSONObject, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
3
- const unmarshalEndpointPrivateNetworkDetails = (data) => {
4
- if (!isJSONObject(data)) {
5
- throw new TypeError(
6
- `Unmarshalling the type 'EndpointPrivateNetworkDetails' failed as data isn't a dictionary.`
7
- );
8
- }
9
- return {
10
- privateNetworkId: data.private_network_id
11
- };
3
+ var unmarshalEndpointPrivateNetworkDetails = (data) => {
4
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EndpointPrivateNetworkDetails' failed as data isn't a dictionary.`);
5
+ return { privateNetworkId: data.private_network_id };
12
6
  };
13
- const unmarshalEndpointPublicDetails = (data) => {
14
- if (!isJSONObject(data)) {
15
- throw new TypeError(
16
- `Unmarshalling the type 'EndpointPublicDetails' failed as data isn't a dictionary.`
17
- );
18
- }
19
- return {};
7
+ var unmarshalEndpointPublicDetails = (data) => {
8
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EndpointPublicDetails' failed as data isn't a dictionary.`);
9
+ return {};
20
10
  };
21
11
  const unmarshalEndpoint = (data) => {
22
- if (!isJSONObject(data)) {
23
- throw new TypeError(
24
- `Unmarshalling the type 'Endpoint' failed as data isn't a dictionary.`
25
- );
26
- }
27
- return {
28
- dnsRecords: data.dns_records,
29
- id: data.id,
30
- ips: data.ips,
31
- port: data.port,
32
- privateNetwork: data.private_network ? unmarshalEndpointPrivateNetworkDetails(data.private_network) : void 0,
33
- public: data.public ? unmarshalEndpointPublicDetails(data.public) : void 0
34
- };
12
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Endpoint' failed as data isn't a dictionary.`);
13
+ return {
14
+ dnsRecords: data.dns_records,
15
+ id: data.id,
16
+ ips: data.ips,
17
+ port: data.port,
18
+ privateNetwork: data.private_network ? unmarshalEndpointPrivateNetworkDetails(data.private_network) : void 0,
19
+ public: data.public ? unmarshalEndpointPublicDetails(data.public) : void 0
20
+ };
35
21
  };
36
22
  const unmarshalInstanceSetting = (data) => {
37
- if (!isJSONObject(data)) {
38
- throw new TypeError(
39
- `Unmarshalling the type 'InstanceSetting' failed as data isn't a dictionary.`
40
- );
41
- }
42
- return {
43
- name: data.name,
44
- value: data.value
45
- };
46
- };
47
- const unmarshalInstanceSnapshotSchedule = (data) => {
48
- if (!isJSONObject(data)) {
49
- throw new TypeError(
50
- `Unmarshalling the type 'InstanceSnapshotSchedule' failed as data isn't a dictionary.`
51
- );
52
- }
53
- return {
54
- enabled: data.enabled,
55
- frequencyHours: data.frequency_hours,
56
- lastRun: unmarshalDate(data.last_run),
57
- nextUpdate: unmarshalDate(data.next_update),
58
- retentionDays: data.retention_days
59
- };
23
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'InstanceSetting' failed as data isn't a dictionary.`);
24
+ return {
25
+ name: data.name,
26
+ value: data.value
27
+ };
28
+ };
29
+ var unmarshalInstanceSnapshotSchedule = (data) => {
30
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'InstanceSnapshotSchedule' failed as data isn't a dictionary.`);
31
+ return {
32
+ enabled: data.enabled,
33
+ frequencyHours: data.frequency_hours,
34
+ lastRun: unmarshalDate(data.last_run),
35
+ nextUpdate: unmarshalDate(data.next_update),
36
+ retentionDays: data.retention_days
37
+ };
60
38
  };
61
39
  const unmarshalVolume = (data) => {
62
- if (!isJSONObject(data)) {
63
- throw new TypeError(
64
- `Unmarshalling the type 'Volume' failed as data isn't a dictionary.`
65
- );
66
- }
67
- return {
68
- size: data.size,
69
- type: data.type
70
- };
40
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Volume' failed as data isn't a dictionary.`);
41
+ return {
42
+ size: data.size,
43
+ type: data.type
44
+ };
71
45
  };
72
46
  const unmarshalInstance = (data) => {
73
- if (!isJSONObject(data)) {
74
- throw new TypeError(
75
- `Unmarshalling the type 'Instance' failed as data isn't a dictionary.`
76
- );
77
- }
78
- return {
79
- createdAt: unmarshalDate(data.created_at),
80
- endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
81
- id: data.id,
82
- name: data.name,
83
- nodeNumber: data.node_number,
84
- nodeType: data.node_type,
85
- projectId: data.project_id,
86
- region: data.region,
87
- settings: unmarshalArrayOfObject(data.settings, unmarshalInstanceSetting),
88
- snapshotSchedule: data.snapshot_schedule ? unmarshalInstanceSnapshotSchedule(data.snapshot_schedule) : void 0,
89
- status: data.status,
90
- tags: data.tags,
91
- version: data.version,
92
- volume: data.volume ? unmarshalVolume(data.volume) : void 0
93
- };
94
- };
95
- const unmarshalSnapshotVolumeType = (data) => {
96
- if (!isJSONObject(data)) {
97
- throw new TypeError(
98
- `Unmarshalling the type 'SnapshotVolumeType' failed as data isn't a dictionary.`
99
- );
100
- }
101
- return {
102
- type: data.type
103
- };
47
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Instance' failed as data isn't a dictionary.`);
48
+ return {
49
+ createdAt: unmarshalDate(data.created_at),
50
+ endpoints: unmarshalArrayOfObject(data.endpoints, unmarshalEndpoint),
51
+ id: data.id,
52
+ name: data.name,
53
+ nodeNumber: data.node_number,
54
+ nodeType: data.node_type,
55
+ projectId: data.project_id,
56
+ region: data.region,
57
+ settings: unmarshalArrayOfObject(data.settings, unmarshalInstanceSetting),
58
+ snapshotSchedule: data.snapshot_schedule ? unmarshalInstanceSnapshotSchedule(data.snapshot_schedule) : void 0,
59
+ status: data.status,
60
+ tags: data.tags,
61
+ version: data.version,
62
+ volume: data.volume ? unmarshalVolume(data.volume) : void 0
63
+ };
64
+ };
65
+ var unmarshalSnapshotVolumeType = (data) => {
66
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SnapshotVolumeType' failed as data isn't a dictionary.`);
67
+ return { type: data.type };
104
68
  };
105
69
  const unmarshalSnapshot = (data) => {
106
- if (!isJSONObject(data)) {
107
- throw new TypeError(
108
- `Unmarshalling the type 'Snapshot' failed as data isn't a dictionary.`
109
- );
110
- }
111
- return {
112
- createdAt: unmarshalDate(data.created_at),
113
- expiresAt: unmarshalDate(data.expires_at),
114
- id: data.id,
115
- instanceId: data.instance_id,
116
- instanceName: data.instance_name,
117
- name: data.name,
118
- nodeType: data.node_type,
119
- region: data.region,
120
- size: data.size,
121
- status: data.status,
122
- updatedAt: unmarshalDate(data.updated_at),
123
- volumeType: data.volume_type ? unmarshalSnapshotVolumeType(data.volume_type) : void 0
124
- };
125
- };
126
- const unmarshalUserRole = (data) => {
127
- if (!isJSONObject(data)) {
128
- throw new TypeError(
129
- `Unmarshalling the type 'UserRole' failed as data isn't a dictionary.`
130
- );
131
- }
132
- return {
133
- anyDatabase: data.any_database,
134
- database: data.database,
135
- role: data.role
136
- };
70
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Snapshot' failed as data isn't a dictionary.`);
71
+ return {
72
+ createdAt: unmarshalDate(data.created_at),
73
+ expiresAt: unmarshalDate(data.expires_at),
74
+ id: data.id,
75
+ instanceId: data.instance_id,
76
+ instanceName: data.instance_name,
77
+ name: data.name,
78
+ nodeType: data.node_type,
79
+ region: data.region,
80
+ size: data.size,
81
+ status: data.status,
82
+ updatedAt: unmarshalDate(data.updated_at),
83
+ volumeType: data.volume_type ? unmarshalSnapshotVolumeType(data.volume_type) : void 0
84
+ };
85
+ };
86
+ var unmarshalUserRole = (data) => {
87
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'UserRole' failed as data isn't a dictionary.`);
88
+ return {
89
+ anyDatabase: data.any_database,
90
+ database: data.database,
91
+ role: data.role
92
+ };
137
93
  };
138
94
  const unmarshalUser = (data) => {
139
- if (!isJSONObject(data)) {
140
- throw new TypeError(
141
- `Unmarshalling the type 'User' failed as data isn't a dictionary.`
142
- );
143
- }
144
- return {
145
- name: data.name,
146
- roles: unmarshalArrayOfObject(data.roles, unmarshalUserRole)
147
- };
95
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'User' failed as data isn't a dictionary.`);
96
+ return {
97
+ name: data.name,
98
+ roles: unmarshalArrayOfObject(data.roles, unmarshalUserRole)
99
+ };
148
100
  };
149
101
  const unmarshalListInstancesResponse = (data) => {
150
- if (!isJSONObject(data)) {
151
- throw new TypeError(
152
- `Unmarshalling the type 'ListInstancesResponse' failed as data isn't a dictionary.`
153
- );
154
- }
155
- return {
156
- instances: unmarshalArrayOfObject(data.instances, unmarshalInstance),
157
- totalCount: data.total_count
158
- };
159
- };
160
- const unmarshalNodeTypeVolumeType = (data) => {
161
- if (!isJSONObject(data)) {
162
- throw new TypeError(
163
- `Unmarshalling the type 'NodeTypeVolumeType' failed as data isn't a dictionary.`
164
- );
165
- }
166
- return {
167
- chunkSize: data.chunk_size,
168
- description: data.description,
169
- maxSize: data.max_size,
170
- minSize: data.min_size,
171
- type: data.type
172
- };
173
- };
174
- const unmarshalNodeType = (data) => {
175
- if (!isJSONObject(data)) {
176
- throw new TypeError(
177
- `Unmarshalling the type 'NodeType' failed as data isn't a dictionary.`
178
- );
179
- }
180
- return {
181
- availableVolumeTypes: unmarshalArrayOfObject(
182
- data.available_volume_types,
183
- unmarshalNodeTypeVolumeType
184
- ),
185
- beta: data.beta,
186
- description: data.description,
187
- disabled: data.disabled,
188
- instanceRange: data.instance_range,
189
- memory: data.memory,
190
- name: data.name,
191
- stockStatus: data.stock_status,
192
- vcpus: data.vcpus
193
- };
102
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListInstancesResponse' failed as data isn't a dictionary.`);
103
+ return {
104
+ instances: unmarshalArrayOfObject(data.instances, unmarshalInstance),
105
+ totalCount: data.total_count
106
+ };
107
+ };
108
+ var unmarshalNodeTypeVolumeType = (data) => {
109
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'NodeTypeVolumeType' failed as data isn't a dictionary.`);
110
+ return {
111
+ chunkSize: data.chunk_size,
112
+ description: data.description,
113
+ maxSize: data.max_size,
114
+ minSize: data.min_size,
115
+ type: data.type
116
+ };
117
+ };
118
+ var unmarshalNodeType = (data) => {
119
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'NodeType' failed as data isn't a dictionary.`);
120
+ return {
121
+ availableVolumeTypes: unmarshalArrayOfObject(data.available_volume_types, unmarshalNodeTypeVolumeType),
122
+ beta: data.beta,
123
+ description: data.description,
124
+ disabled: data.disabled,
125
+ instanceRange: data.instance_range,
126
+ memory: data.memory,
127
+ name: data.name,
128
+ stockStatus: data.stock_status,
129
+ vcpus: data.vcpus
130
+ };
194
131
  };
195
132
  const unmarshalListNodeTypesResponse = (data) => {
196
- if (!isJSONObject(data)) {
197
- throw new TypeError(
198
- `Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary.`
199
- );
200
- }
201
- return {
202
- nodeTypes: unmarshalArrayOfObject(data.node_types, unmarshalNodeType),
203
- totalCount: data.total_count
204
- };
133
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary.`);
134
+ return {
135
+ nodeTypes: unmarshalArrayOfObject(data.node_types, unmarshalNodeType),
136
+ totalCount: data.total_count
137
+ };
205
138
  };
206
139
  const unmarshalListSnapshotsResponse = (data) => {
207
- if (!isJSONObject(data)) {
208
- throw new TypeError(
209
- `Unmarshalling the type 'ListSnapshotsResponse' failed as data isn't a dictionary.`
210
- );
211
- }
212
- return {
213
- snapshots: unmarshalArrayOfObject(data.snapshots, unmarshalSnapshot),
214
- totalCount: data.total_count
215
- };
140
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSnapshotsResponse' failed as data isn't a dictionary.`);
141
+ return {
142
+ snapshots: unmarshalArrayOfObject(data.snapshots, unmarshalSnapshot),
143
+ totalCount: data.total_count
144
+ };
216
145
  };
217
146
  const unmarshalListUsersResponse = (data) => {
218
- if (!isJSONObject(data)) {
219
- throw new TypeError(
220
- `Unmarshalling the type 'ListUsersResponse' failed as data isn't a dictionary.`
221
- );
222
- }
223
- return {
224
- totalCount: data.total_count,
225
- users: unmarshalArrayOfObject(data.users, unmarshalUser)
226
- };
227
- };
228
- const unmarshalSetting = (data) => {
229
- if (!isJSONObject(data)) {
230
- throw new TypeError(
231
- `Unmarshalling the type 'Setting' failed as data isn't a dictionary.`
232
- );
233
- }
234
- return {
235
- defaultValue: data.default_value,
236
- description: data.description,
237
- floatMax: data.float_max,
238
- floatMin: data.float_min,
239
- hotConfigurable: data.hot_configurable,
240
- intMax: data.int_max,
241
- intMin: data.int_min,
242
- name: data.name,
243
- propertyType: data.property_type,
244
- stringConstraint: data.string_constraint,
245
- unit: data.unit
246
- };
247
- };
248
- const unmarshalVersion = (data) => {
249
- if (!isJSONObject(data)) {
250
- throw new TypeError(
251
- `Unmarshalling the type 'Version' failed as data isn't a dictionary.`
252
- );
253
- }
254
- return {
255
- availableSettings: unmarshalArrayOfObject(
256
- data.available_settings,
257
- unmarshalSetting
258
- ),
259
- endOfLifeAt: unmarshalDate(data.end_of_life_at),
260
- version: data.version
261
- };
147
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListUsersResponse' failed as data isn't a dictionary.`);
148
+ return {
149
+ totalCount: data.total_count,
150
+ users: unmarshalArrayOfObject(data.users, unmarshalUser)
151
+ };
152
+ };
153
+ var unmarshalSetting = (data) => {
154
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Setting' failed as data isn't a dictionary.`);
155
+ return {
156
+ defaultValue: data.default_value,
157
+ description: data.description,
158
+ floatMax: data.float_max,
159
+ floatMin: data.float_min,
160
+ hotConfigurable: data.hot_configurable,
161
+ intMax: data.int_max,
162
+ intMin: data.int_min,
163
+ name: data.name,
164
+ propertyType: data.property_type,
165
+ stringConstraint: data.string_constraint,
166
+ unit: data.unit
167
+ };
168
+ };
169
+ var unmarshalVersion = (data) => {
170
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Version' failed as data isn't a dictionary.`);
171
+ return {
172
+ availableSettings: unmarshalArrayOfObject(data.available_settings, unmarshalSetting),
173
+ endOfLifeAt: unmarshalDate(data.end_of_life_at),
174
+ version: data.version
175
+ };
262
176
  };
263
177
  const unmarshalListVersionsResponse = (data) => {
264
- if (!isJSONObject(data)) {
265
- throw new TypeError(
266
- `Unmarshalling the type 'ListVersionsResponse' failed as data isn't a dictionary.`
267
- );
268
- }
269
- return {
270
- totalCount: data.total_count,
271
- versions: unmarshalArrayOfObject(data.versions, unmarshalVersion)
272
- };
273
- };
274
- const marshalEndpointSpecPrivateNetworkDetails = (request, defaults) => ({
275
- private_network_id: request.privateNetworkId
276
- });
277
- const marshalEndpointSpecPublicDetails = (request, defaults) => ({});
278
- const marshalEndpointSpec = (request, defaults) => ({
279
- ...resolveOneOf([
280
- {
281
- param: "public",
282
- value: request.public !== void 0 ? marshalEndpointSpecPublicDetails(request.public) : void 0
283
- },
284
- {
285
- param: "private_network",
286
- value: request.privateNetwork !== void 0 ? marshalEndpointSpecPrivateNetworkDetails(
287
- request.privateNetwork
288
- ) : void 0
289
- }
290
- ])
291
- });
178
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListVersionsResponse' failed as data isn't a dictionary.`);
179
+ return {
180
+ totalCount: data.total_count,
181
+ versions: unmarshalArrayOfObject(data.versions, unmarshalVersion)
182
+ };
183
+ };
184
+ var marshalEndpointSpecPrivateNetworkDetails = (request, defaults) => ({ private_network_id: request.privateNetworkId });
185
+ var marshalEndpointSpecPublicDetails = (request, defaults) => ({});
186
+ var marshalEndpointSpec = (request, defaults) => ({ ...resolveOneOf([{
187
+ param: "public",
188
+ value: request.public !== void 0 ? marshalEndpointSpecPublicDetails(request.public, defaults) : void 0
189
+ }, {
190
+ param: "private_network",
191
+ value: request.privateNetwork !== void 0 ? marshalEndpointSpecPrivateNetworkDetails(request.privateNetwork, defaults) : void 0
192
+ }]) });
292
193
  const marshalCreateEndpointRequest = (request, defaults) => ({
293
- endpoint: marshalEndpointSpec(request.endpoint),
294
- instance_id: request.instanceId
194
+ endpoint: marshalEndpointSpec(request.endpoint, defaults),
195
+ instance_id: request.instanceId
295
196
  });
296
- const marshalCreateInstanceRequestVolumeDetails = (request, defaults) => ({
297
- volume_size: request.volumeSize,
298
- volume_type: request.volumeType
197
+ var marshalCreateInstanceRequestVolumeDetails = (request, defaults) => ({
198
+ volume_size: request.volumeSize,
199
+ volume_type: request.volumeType
299
200
  });
300
201
  const marshalCreateInstanceRequest = (request, defaults) => ({
301
- endpoints: request.endpoints !== void 0 ? request.endpoints.map((elt) => marshalEndpointSpec(elt)) : void 0,
302
- name: request.name || randomName("mgdb"),
303
- node_number: request.nodeNumber,
304
- node_type: request.nodeType,
305
- password: request.password,
306
- project_id: request.projectId ?? defaults.defaultProjectId,
307
- tags: request.tags,
308
- user_name: request.userName,
309
- version: request.version,
310
- volume: request.volume !== void 0 ? marshalCreateInstanceRequestVolumeDetails(request.volume) : void 0
202
+ endpoints: request.endpoints !== void 0 ? request.endpoints.map((elt) => marshalEndpointSpec(elt, defaults)) : void 0,
203
+ name: request.name || randomName("mgdb"),
204
+ node_number: request.nodeNumber,
205
+ node_type: request.nodeType,
206
+ password: request.password,
207
+ project_id: request.projectId ?? defaults.defaultProjectId,
208
+ tags: request.tags,
209
+ user_name: request.userName,
210
+ version: request.version,
211
+ volume: request.volume !== void 0 ? marshalCreateInstanceRequestVolumeDetails(request.volume, defaults) : void 0
311
212
  });
312
213
  const marshalCreateSnapshotRequest = (request, defaults) => ({
313
- expires_at: request.expiresAt,
314
- name: request.name
214
+ expires_at: request.expiresAt,
215
+ name: request.name
315
216
  });
316
217
  const marshalCreateUserRequest = (request, defaults) => ({
317
- name: request.name,
318
- password: request.password
319
- });
320
- const marshalRestoreSnapshotRequestVolumeDetails = (request, defaults) => ({
321
- volume_type: request.volumeType
218
+ name: request.name,
219
+ password: request.password
322
220
  });
221
+ var marshalRestoreSnapshotRequestVolumeDetails = (request, defaults) => ({ volume_type: request.volumeType });
323
222
  const marshalRestoreSnapshotRequest = (request, defaults) => ({
324
- instance_name: request.instanceName,
325
- node_number: request.nodeNumber,
326
- node_type: request.nodeType,
327
- volume: marshalRestoreSnapshotRequestVolumeDetails(request.volume)
223
+ instance_name: request.instanceName,
224
+ node_number: request.nodeNumber,
225
+ node_type: request.nodeType,
226
+ volume: marshalRestoreSnapshotRequestVolumeDetails(request.volume, defaults)
328
227
  });
329
- const marshalUserRole = (request, defaults) => ({
330
- role: request.role,
331
- ...resolveOneOf([
332
- { param: "database", value: request.database },
333
- { param: "any_database", value: request.anyDatabase }
334
- ])
228
+ var marshalUserRole = (request, defaults) => ({
229
+ role: request.role,
230
+ ...resolveOneOf([{
231
+ param: "database",
232
+ value: request.database
233
+ }, {
234
+ param: "any_database",
235
+ value: request.anyDatabase
236
+ }])
335
237
  });
336
238
  const marshalSetUserRoleRequest = (request, defaults) => ({
337
- roles: request.roles !== void 0 ? request.roles.map((elt) => marshalUserRole(elt)) : void 0,
338
- user_name: request.userName
239
+ roles: request.roles !== void 0 ? request.roles.map((elt) => marshalUserRole(elt, defaults)) : void 0,
240
+ user_name: request.userName
339
241
  });
340
242
  const marshalUpdateInstanceRequest = (request, defaults) => ({
341
- name: request.name,
342
- tags: request.tags
243
+ name: request.name,
244
+ tags: request.tags
343
245
  });
344
246
  const marshalUpdateSnapshotRequest = (request, defaults) => ({
345
- expires_at: request.expiresAt,
346
- name: request.name
247
+ expires_at: request.expiresAt,
248
+ name: request.name
347
249
  });
348
- const marshalUpdateUserRequest = (request, defaults) => ({
349
- password: request.password
350
- });
351
- const marshalUpgradeInstanceRequest = (request, defaults) => ({
352
- ...resolveOneOf([{ param: "volume_size", value: request.volumeSize }])
353
- });
354
- export {
355
- marshalCreateEndpointRequest,
356
- marshalCreateInstanceRequest,
357
- marshalCreateSnapshotRequest,
358
- marshalCreateUserRequest,
359
- marshalRestoreSnapshotRequest,
360
- marshalSetUserRoleRequest,
361
- marshalUpdateInstanceRequest,
362
- marshalUpdateSnapshotRequest,
363
- marshalUpdateUserRequest,
364
- marshalUpgradeInstanceRequest,
365
- unmarshalEndpoint,
366
- unmarshalInstance,
367
- unmarshalInstanceSetting,
368
- unmarshalListInstancesResponse,
369
- unmarshalListNodeTypesResponse,
370
- unmarshalListSnapshotsResponse,
371
- unmarshalListUsersResponse,
372
- unmarshalListVersionsResponse,
373
- unmarshalSnapshot,
374
- unmarshalUser,
375
- unmarshalVolume
376
- };
250
+ const marshalUpdateUserRequest = (request, defaults) => ({ password: request.password });
251
+ const marshalUpgradeInstanceRequest = (request, defaults) => ({ ...resolveOneOf([{
252
+ param: "volume_size",
253
+ value: request.volumeSize
254
+ }]) });
255
+ export { marshalCreateEndpointRequest, marshalCreateInstanceRequest, marshalCreateSnapshotRequest, marshalCreateUserRequest, marshalRestoreSnapshotRequest, marshalSetUserRoleRequest, marshalUpdateInstanceRequest, marshalUpdateSnapshotRequest, marshalUpdateUserRequest, marshalUpgradeInstanceRequest, unmarshalEndpoint, unmarshalInstance, unmarshalInstanceSetting, unmarshalListInstancesResponse, unmarshalListNodeTypesResponse, unmarshalListSnapshotsResponse, unmarshalListUsersResponse, unmarshalListVersionsResponse, unmarshalSnapshot, unmarshalUser, unmarshalVolume };