@scaleway/sdk-mongodb 2.3.1 → 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,379 +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(data.available_volume_types, unmarshalNodeTypeVolumeType),
182
- beta: data.beta,
183
- description: data.description,
184
- disabled: data.disabled,
185
- instanceRange: data.instance_range,
186
- memory: data.memory,
187
- name: data.name,
188
- stockStatus: data.stock_status,
189
- vcpus: data.vcpus
190
- };
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
+ };
191
131
  };
192
132
  const unmarshalListNodeTypesResponse = (data) => {
193
- if (!isJSONObject(data)) {
194
- throw new TypeError(
195
- `Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary.`
196
- );
197
- }
198
- return {
199
- nodeTypes: unmarshalArrayOfObject(data.node_types, unmarshalNodeType),
200
- totalCount: data.total_count
201
- };
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
+ };
202
138
  };
203
139
  const unmarshalListSnapshotsResponse = (data) => {
204
- if (!isJSONObject(data)) {
205
- throw new TypeError(
206
- `Unmarshalling the type 'ListSnapshotsResponse' failed as data isn't a dictionary.`
207
- );
208
- }
209
- return {
210
- snapshots: unmarshalArrayOfObject(data.snapshots, unmarshalSnapshot),
211
- totalCount: data.total_count
212
- };
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
+ };
213
145
  };
214
146
  const unmarshalListUsersResponse = (data) => {
215
- if (!isJSONObject(data)) {
216
- throw new TypeError(
217
- `Unmarshalling the type 'ListUsersResponse' failed as data isn't a dictionary.`
218
- );
219
- }
220
- return {
221
- totalCount: data.total_count,
222
- users: unmarshalArrayOfObject(data.users, unmarshalUser)
223
- };
224
- };
225
- const unmarshalSetting = (data) => {
226
- if (!isJSONObject(data)) {
227
- throw new TypeError(
228
- `Unmarshalling the type 'Setting' failed as data isn't a dictionary.`
229
- );
230
- }
231
- return {
232
- defaultValue: data.default_value,
233
- description: data.description,
234
- floatMax: data.float_max,
235
- floatMin: data.float_min,
236
- hotConfigurable: data.hot_configurable,
237
- intMax: data.int_max,
238
- intMin: data.int_min,
239
- name: data.name,
240
- propertyType: data.property_type,
241
- stringConstraint: data.string_constraint,
242
- unit: data.unit
243
- };
244
- };
245
- const unmarshalVersion = (data) => {
246
- if (!isJSONObject(data)) {
247
- throw new TypeError(
248
- `Unmarshalling the type 'Version' failed as data isn't a dictionary.`
249
- );
250
- }
251
- return {
252
- availableSettings: unmarshalArrayOfObject(data.available_settings, unmarshalSetting),
253
- endOfLifeAt: unmarshalDate(data.end_of_life_at),
254
- version: data.version
255
- };
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
+ };
256
176
  };
257
177
  const unmarshalListVersionsResponse = (data) => {
258
- if (!isJSONObject(data)) {
259
- throw new TypeError(
260
- `Unmarshalling the type 'ListVersionsResponse' failed as data isn't a dictionary.`
261
- );
262
- }
263
- return {
264
- totalCount: data.total_count,
265
- versions: unmarshalArrayOfObject(data.versions, unmarshalVersion)
266
- };
267
- };
268
- const marshalEndpointSpecPrivateNetworkDetails = (request, defaults) => ({
269
- private_network_id: request.privateNetworkId
270
- });
271
- const marshalEndpointSpecPublicDetails = (request, defaults) => ({});
272
- const marshalEndpointSpec = (request, defaults) => ({
273
- ...resolveOneOf([
274
- {
275
- param: "public",
276
- value: request.public !== void 0 ? marshalEndpointSpecPublicDetails(request.public) : void 0
277
- },
278
- {
279
- param: "private_network",
280
- value: request.privateNetwork !== void 0 ? marshalEndpointSpecPrivateNetworkDetails(request.privateNetwork) : void 0
281
- }
282
- ])
283
- });
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
+ }]) });
284
193
  const marshalCreateEndpointRequest = (request, defaults) => ({
285
- endpoint: marshalEndpointSpec(request.endpoint),
286
- instance_id: request.instanceId
194
+ endpoint: marshalEndpointSpec(request.endpoint, defaults),
195
+ instance_id: request.instanceId
287
196
  });
288
- const marshalCreateInstanceRequestVolumeDetails = (request, defaults) => ({
289
- volume_size: request.volumeSize,
290
- volume_type: request.volumeType
197
+ var marshalCreateInstanceRequestVolumeDetails = (request, defaults) => ({
198
+ volume_size: request.volumeSize,
199
+ volume_type: request.volumeType
291
200
  });
292
201
  const marshalCreateInstanceRequest = (request, defaults) => ({
293
- endpoints: request.endpoints !== void 0 ? request.endpoints.map((elt) => marshalEndpointSpec(elt)) : void 0,
294
- name: request.name || randomName("mgdb"),
295
- node_number: request.nodeNumber,
296
- node_type: request.nodeType,
297
- password: request.password,
298
- project_id: request.projectId ?? defaults.defaultProjectId,
299
- tags: request.tags,
300
- user_name: request.userName,
301
- version: request.version,
302
- 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
303
212
  });
304
213
  const marshalCreateSnapshotRequest = (request, defaults) => ({
305
- expires_at: request.expiresAt,
306
- name: request.name
214
+ expires_at: request.expiresAt,
215
+ name: request.name
307
216
  });
308
217
  const marshalCreateUserRequest = (request, defaults) => ({
309
- name: request.name,
310
- password: request.password
311
- });
312
- const marshalRestoreSnapshotRequestVolumeDetails = (request, defaults) => ({
313
- volume_type: request.volumeType
218
+ name: request.name,
219
+ password: request.password
314
220
  });
221
+ var marshalRestoreSnapshotRequestVolumeDetails = (request, defaults) => ({ volume_type: request.volumeType });
315
222
  const marshalRestoreSnapshotRequest = (request, defaults) => ({
316
- instance_name: request.instanceName,
317
- node_number: request.nodeNumber,
318
- node_type: request.nodeType,
319
- 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)
320
227
  });
321
- const marshalUserRole = (request, defaults) => ({
322
- role: request.role,
323
- ...resolveOneOf([
324
- {
325
- param: "database",
326
- value: request.database
327
- },
328
- {
329
- param: "any_database",
330
- value: request.anyDatabase
331
- }
332
- ])
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
+ }])
333
237
  });
334
238
  const marshalSetUserRoleRequest = (request, defaults) => ({
335
- roles: request.roles !== void 0 ? request.roles.map((elt) => marshalUserRole(elt)) : void 0,
336
- user_name: request.userName
239
+ roles: request.roles !== void 0 ? request.roles.map((elt) => marshalUserRole(elt, defaults)) : void 0,
240
+ user_name: request.userName
337
241
  });
338
242
  const marshalUpdateInstanceRequest = (request, defaults) => ({
339
- name: request.name,
340
- tags: request.tags
243
+ name: request.name,
244
+ tags: request.tags
341
245
  });
342
246
  const marshalUpdateSnapshotRequest = (request, defaults) => ({
343
- expires_at: request.expiresAt,
344
- name: request.name
247
+ expires_at: request.expiresAt,
248
+ name: request.name
345
249
  });
346
- const marshalUpdateUserRequest = (request, defaults) => ({
347
- password: request.password
348
- });
349
- const marshalUpgradeInstanceRequest = (request, defaults) => ({
350
- ...resolveOneOf([
351
- {
352
- param: "volume_size",
353
- value: request.volumeSize
354
- }
355
- ])
356
- });
357
- export {
358
- marshalCreateEndpointRequest,
359
- marshalCreateInstanceRequest,
360
- marshalCreateSnapshotRequest,
361
- marshalCreateUserRequest,
362
- marshalRestoreSnapshotRequest,
363
- marshalSetUserRoleRequest,
364
- marshalUpdateInstanceRequest,
365
- marshalUpdateSnapshotRequest,
366
- marshalUpdateUserRequest,
367
- marshalUpgradeInstanceRequest,
368
- unmarshalEndpoint,
369
- unmarshalInstance,
370
- unmarshalInstanceSetting,
371
- unmarshalListInstancesResponse,
372
- unmarshalListNodeTypesResponse,
373
- unmarshalListSnapshotsResponse,
374
- unmarshalListUsersResponse,
375
- unmarshalListVersionsResponse,
376
- unmarshalSnapshot,
377
- unmarshalUser,
378
- unmarshalVolume
379
- };
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 };