@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.
- 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 -506
- package/dist/v1/content.gen.js +12 -13
- package/dist/v1/index.gen.d.ts +1 -1
- package/dist/v1/index.gen.js +33 -31
- package/dist/v1/marshalling.gen.js +226 -368
- package/dist/v1/validation-rules.gen.js +162 -190
- package/dist/v1alpha1/api.gen.js +283 -419
- package/dist/v1alpha1/content.gen.js +11 -12
- package/dist/v1alpha1/index.gen.d.ts +1 -1
- package/dist/v1alpha1/index.gen.js +31 -29
- package/dist/v1alpha1/marshalling.gen.js +213 -334
- package/dist/v1alpha1/validation-rules.gen.js +135 -157
- package/package.json +4 -4
|
@@ -1,376 +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(
|
|
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
|
-
|
|
197
|
-
|
|
198
|
-
|
|
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
|
-
|
|
208
|
-
|
|
209
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
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
|
-
|
|
294
|
-
|
|
194
|
+
endpoint: marshalEndpointSpec(request.endpoint, defaults),
|
|
195
|
+
instance_id: request.instanceId
|
|
295
196
|
});
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
197
|
+
var marshalCreateInstanceRequestVolumeDetails = (request, defaults) => ({
|
|
198
|
+
volume_size: request.volumeSize,
|
|
199
|
+
volume_type: request.volumeType
|
|
299
200
|
});
|
|
300
201
|
const marshalCreateInstanceRequest = (request, defaults) => ({
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
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
|
-
|
|
314
|
-
|
|
214
|
+
expires_at: request.expiresAt,
|
|
215
|
+
name: request.name
|
|
315
216
|
});
|
|
316
217
|
const marshalCreateUserRequest = (request, defaults) => ({
|
|
317
|
-
|
|
318
|
-
|
|
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
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
223
|
+
instance_name: request.instanceName,
|
|
224
|
+
node_number: request.nodeNumber,
|
|
225
|
+
node_type: request.nodeType,
|
|
226
|
+
volume: marshalRestoreSnapshotRequestVolumeDetails(request.volume, defaults)
|
|
328
227
|
});
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
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
|
-
|
|
338
|
-
|
|
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
|
-
|
|
342
|
-
|
|
243
|
+
name: request.name,
|
|
244
|
+
tags: request.tags
|
|
343
245
|
});
|
|
344
246
|
const marshalUpdateSnapshotRequest = (request, defaults) => ({
|
|
345
|
-
|
|
346
|
-
|
|
247
|
+
expires_at: request.expiresAt,
|
|
248
|
+
name: request.name
|
|
347
249
|
});
|
|
348
|
-
const marshalUpdateUserRequest = (request, defaults) => ({
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
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 };
|