@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.
- package/README.md +1 -1
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/index.gen.js +3 -6
- package/dist/v1/api.gen.js +336 -489
- package/dist/v1/content.gen.js +13 -16
- package/dist/v1/index.gen.js +33 -31
- package/dist/v1/marshalling.gen.js +226 -370
- package/dist/v1/validation-rules.gen.js +162 -190
- package/dist/v1alpha1/api.gen.js +283 -410
- package/dist/v1alpha1/content.gen.js +11 -12
- package/dist/v1alpha1/index.gen.js +31 -29
- package/dist/v1alpha1/marshalling.gen.js +213 -337
- package/dist/v1alpha1/validation-rules.gen.js +135 -157
- package/package.json +4 -4
|
@@ -1,379 +1,255 @@
|
|
|
1
|
+
import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
|
|
1
2
|
import randomName from "@scaleway/random-name";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
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
|
-
|
|
140
|
-
|
|
141
|
-
|
|
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
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
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
|
-
|
|
194
|
-
|
|
195
|
-
|
|
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
|
-
|
|
205
|
-
|
|
206
|
-
|
|
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
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
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
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
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
|
-
|
|
286
|
-
|
|
194
|
+
endpoint: marshalEndpointSpec(request.endpoint, defaults),
|
|
195
|
+
instance_id: request.instanceId
|
|
287
196
|
});
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
197
|
+
var marshalCreateInstanceRequestVolumeDetails = (request, defaults) => ({
|
|
198
|
+
volume_size: request.volumeSize,
|
|
199
|
+
volume_type: request.volumeType
|
|
291
200
|
});
|
|
292
201
|
const marshalCreateInstanceRequest = (request, defaults) => ({
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
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
|
-
|
|
306
|
-
|
|
214
|
+
expires_at: request.expiresAt,
|
|
215
|
+
name: request.name
|
|
307
216
|
});
|
|
308
217
|
const marshalCreateUserRequest = (request, defaults) => ({
|
|
309
|
-
|
|
310
|
-
|
|
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
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
223
|
+
instance_name: request.instanceName,
|
|
224
|
+
node_number: request.nodeNumber,
|
|
225
|
+
node_type: request.nodeType,
|
|
226
|
+
volume: marshalRestoreSnapshotRequestVolumeDetails(request.volume, defaults)
|
|
320
227
|
});
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
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
|
-
|
|
336
|
-
|
|
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
|
-
|
|
340
|
-
|
|
243
|
+
name: request.name,
|
|
244
|
+
tags: request.tags
|
|
341
245
|
});
|
|
342
246
|
const marshalUpdateSnapshotRequest = (request, defaults) => ({
|
|
343
|
-
|
|
344
|
-
|
|
247
|
+
expires_at: request.expiresAt,
|
|
248
|
+
name: request.name
|
|
345
249
|
});
|
|
346
|
-
const marshalUpdateUserRequest = (request, defaults) => ({
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
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 };
|