@scaleway/sdk 1.14.0 → 1.16.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.
Files changed (54) hide show
  1. package/dist/api/account/v2/api.gen.js +77 -60
  2. package/dist/api/applesilicon/v1alpha1/api.gen.js +174 -152
  3. package/dist/api/baremetal/v1/api.gen.js +434 -378
  4. package/dist/api/baremetal/v1/api.utils.js +19 -22
  5. package/dist/api/billing/v2alpha1/api.gen.js +21 -17
  6. package/dist/api/cockpit/v1beta1/api.gen.js +308 -232
  7. package/dist/api/container/v1beta1/api.gen.js +384 -337
  8. package/dist/api/domain/v2beta1/api.gen.js +754 -668
  9. package/dist/api/flexibleip/v1alpha1/api.gen.js +164 -151
  10. package/dist/api/function/v1beta1/api.gen.js +467 -407
  11. package/dist/api/iam/v1alpha1/api.gen.js +641 -557
  12. package/dist/api/instance/v1/api.gen.js +803 -677
  13. package/dist/api/instance/v1/api.utils.js +337 -325
  14. package/dist/api/instance/v1/content.gen.js +4 -1
  15. package/dist/api/instance/v1/index.js +1 -1
  16. package/dist/api/instance/v1/marshalling.gen.js +27 -4
  17. package/dist/api/iot/v1/api.gen.js +508 -452
  18. package/dist/api/ipfs/index.js +2 -0
  19. package/dist/api/ipfs/v1alpha1/api.gen.js +197 -0
  20. package/dist/api/ipfs/v1alpha1/content.gen.js +7 -0
  21. package/dist/api/ipfs/v1alpha1/index.gen.js +5 -0
  22. package/dist/api/ipfs/v1alpha1/marshalling.gen.js +125 -0
  23. package/dist/api/k8s/v1/api.gen.js +403 -342
  24. package/dist/api/k8s/v1/api.utils.js +7 -10
  25. package/dist/api/k8s/v1/marshalling.gen.js +19 -1
  26. package/dist/api/k8s/v1/validation-rules.gen.js +10 -1
  27. package/dist/api/lb/v1/api.gen.js +1501 -1363
  28. package/dist/api/lb/v1/api.utils.js +71 -75
  29. package/dist/api/lb/v1/marshalling.gen.js +6 -0
  30. package/dist/api/marketplace/v1/api.gen.js +35 -32
  31. package/dist/api/marketplace/v2/api.gen.js +117 -102
  32. package/dist/api/mnq/v1alpha1/api.gen.js +154 -137
  33. package/dist/api/rdb/v1/api.gen.js +897 -819
  34. package/dist/api/redis/v1/api.gen.js +358 -333
  35. package/dist/api/redis/v1/marshalling.gen.js +1 -0
  36. package/dist/api/registry/v1/api.gen.js +211 -189
  37. package/dist/api/secret/v1alpha1/api.gen.js +295 -246
  38. package/dist/api/secret/v1alpha1/marshalling.gen.js +10 -1
  39. package/dist/api/tem/v1alpha1/api.gen.js +182 -147
  40. package/dist/api/tem/v1alpha1/marshalling.gen.js +32 -1
  41. package/dist/api/test/v1/api.gen.js +116 -104
  42. package/dist/api/vpc/v1/api.gen.js +74 -65
  43. package/dist/api/vpc/v2/api.gen.js +200 -178
  44. package/dist/api/vpc/v2/marshalling.gen.js +1 -0
  45. package/dist/api/vpcgw/v1/api.gen.js +575 -501
  46. package/dist/api/webhosting/v1alpha1/api.gen.js +127 -117
  47. package/dist/api/webhosting/v1alpha1/content.gen.js +1 -1
  48. package/dist/index.cjs +924 -453
  49. package/dist/index.d.ts +2152 -1558
  50. package/dist/index.js +28 -26
  51. package/dist/internal/logger/console-logger.js +4 -5
  52. package/dist/scw/constants.js +1 -1
  53. package/dist/scw/errors/scw-error.js +2 -2
  54. package/package.json +2 -2
@@ -11,17 +11,18 @@ const jsonContentHeaders = {
11
11
 
12
12
  /** Instance API. */
13
13
  class API extends API$1 {
14
- constructor() {
15
- var _this;
16
- super(...arguments);
17
- _this = this;
18
- /**
19
- * Get availability. Get availability for all Instance types.
20
- *
21
- * @param request - The request {@link GetServerTypesAvailabilityRequest}
22
- * @returns A Promise of GetServerTypesAvailabilityResponse
23
- */
24
- this.getServerTypesAvailability = function (request) {
14
+ /** Lists the available zones of the API. */
15
+ static LOCALITIES = ['fr-par-1', 'fr-par-2', 'fr-par-3', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2'];
16
+
17
+ /**
18
+ * Get availability. Get availability for all Instance types.
19
+ *
20
+ * @param request - The request {@link GetServerTypesAvailabilityRequest}
21
+ * @returns A Promise of GetServerTypesAvailabilityResponse
22
+ */
23
+ getServerTypesAvailability = (() => {
24
+ var _this = this;
25
+ return function (request) {
25
26
  if (request === void 0) {
26
27
  request = {};
27
28
  }
@@ -31,805 +32,930 @@ class API extends API$1 {
31
32
  urlParams: urlParams(['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize])
32
33
  }, unmarshalGetServerTypesAvailabilityResponse);
33
34
  };
34
- /**
35
- * List Instance types. List available Instance types and their technical
36
- * details.
37
- *
38
- * @param request - The request {@link ListServersTypesRequest}
39
- * @returns A Promise of ListServersTypesResponse
40
- */
41
- this.listServersTypes = function (request) {
35
+ })();
36
+
37
+ /**
38
+ * List Instance types. List available Instance types and their technical
39
+ * details.
40
+ *
41
+ * @param request - The request {@link ListServersTypesRequest}
42
+ * @returns A Promise of ListServersTypesResponse
43
+ */
44
+ listServersTypes = (() => {
45
+ var _this2 = this;
46
+ return function (request) {
42
47
  if (request === void 0) {
43
48
  request = {};
44
49
  }
45
- return _this.client.fetch({
50
+ return _this2.client.fetch({
46
51
  method: 'GET',
47
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/products/servers`,
48
- urlParams: urlParams(['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize])
52
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this2.client.settings.defaultZone)}/products/servers`,
53
+ urlParams: urlParams(['page', request.page], ['per_page', request.perPage ?? _this2.client.settings.defaultPageSize])
49
54
  }, unmarshalListServersTypesResponse);
50
55
  };
51
- /**
52
- * List volume types. List all volume types and their technical details.
53
- *
54
- * @param request - The request {@link ListVolumesTypesRequest}
55
- * @returns A Promise of ListVolumesTypesResponse
56
- */
57
- this.listVolumesTypes = function (request) {
56
+ })();
57
+
58
+ /**
59
+ * List volume types. List all volume types and their technical details.
60
+ *
61
+ * @param request - The request {@link ListVolumesTypesRequest}
62
+ * @returns A Promise of ListVolumesTypesResponse
63
+ */
64
+ listVolumesTypes = (() => {
65
+ var _this3 = this;
66
+ return function (request) {
58
67
  if (request === void 0) {
59
68
  request = {};
60
69
  }
61
- return _this.client.fetch({
70
+ return _this3.client.fetch({
62
71
  method: 'GET',
63
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/products/volumes`,
64
- urlParams: urlParams(['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize])
72
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this3.client.settings.defaultZone)}/products/volumes`,
73
+ urlParams: urlParams(['page', request.page], ['per_page', request.perPage ?? _this3.client.settings.defaultPageSize])
65
74
  }, unmarshalListVolumesTypesResponse);
66
75
  };
67
- this.pageOfListServers = function (request) {
76
+ })();
77
+ pageOfListServers = (() => {
78
+ var _this4 = this;
79
+ return function (request) {
68
80
  if (request === void 0) {
69
81
  request = {};
70
82
  }
71
- return _this.client.fetch({
83
+ return _this4.client.fetch({
72
84
  method: 'GET',
73
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/servers`,
74
- urlParams: urlParams(['commercial_type', request.commercialType], ['name', request.name], ['order', request.order], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize], ['private_ip', request.privateIp], ['private_network', request.privateNetwork], ['project', request.project], ['state', request.state], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined], ['without_ip', request.withoutIp])
85
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this4.client.settings.defaultZone)}/servers`,
86
+ urlParams: urlParams(['commercial_type', request.commercialType], ['name', request.name], ['order', request.order], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this4.client.settings.defaultPageSize], ['private_ip', request.privateIp], ['private_network', request.privateNetwork], ['project', request.project], ['state', request.state], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined], ['without_ip', request.withoutIp])
75
87
  }, unmarshalListServersResponse);
76
88
  };
77
- /**
78
- * List all Instances. List all Instances in a specified Availability Zone,
79
- * e.g. `fr-par-1`.
80
- *
81
- * @param request - The request {@link ListServersRequest}
82
- * @returns A Promise of ListServersResponse
83
- */
84
- this.listServers = function (request) {
89
+ })();
90
+
91
+ /**
92
+ * List all Instances. List all Instances in a specified Availability Zone,
93
+ * e.g. `fr-par-1`.
94
+ *
95
+ * @param request - The request {@link ListServersRequest}
96
+ * @returns A Promise of ListServersResponse
97
+ */
98
+ listServers = (() => {
99
+ var _this5 = this;
100
+ return function (request) {
85
101
  if (request === void 0) {
86
102
  request = {};
87
103
  }
88
- return enrichForPagination('servers', _this.pageOfListServers, request);
104
+ return enrichForPagination('servers', _this5.pageOfListServers, request);
89
105
  };
90
- this._createServer = request => this.client.fetch({
91
- body: JSON.stringify(marshalCreateServerRequest(request, this.client.settings)),
92
- headers: jsonContentHeaders,
93
- method: 'POST',
94
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers`
95
- }, unmarshalCreateServerResponse);
96
- /**
97
- * Delete an Instance. Delete the Instance with the specified ID.
98
- *
99
- * @param request - The request {@link DeleteServerRequest}
100
- */
101
- this.deleteServer = request => this.client.fetch({
102
- method: 'DELETE',
103
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}`
104
- });
105
- /**
106
- * Get an Instance. Get the details of a specified Instance.
107
- *
108
- * @param request - The request {@link GetServerRequest}
109
- * @returns A Promise of GetServerResponse
110
- */
111
- this.getServer = request => this.client.fetch({
112
- method: 'GET',
113
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}`
114
- }, unmarshalGetServerResponse);
115
- this._setServer = request => this.client.fetch({
116
- body: JSON.stringify(marshalSetServerRequest(request, this.client.settings)),
117
- headers: jsonContentHeaders,
118
- method: 'PUT',
119
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('id', request.id)}`
120
- }, unmarshalSetServerResponse);
121
- this._updateServer = request => this.client.fetch({
122
- body: JSON.stringify(marshalUpdateServerRequest(request, this.client.settings)),
123
- headers: jsonContentHeaders,
124
- method: 'PATCH',
125
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}`
126
- }, unmarshalUpdateServerResponse);
127
- /**
128
- * List Instance actions. List all actions (e.g. power on, power off, reboot)
129
- * that can currently be performed on an Instance.
130
- *
131
- * @param request - The request {@link ListServerActionsRequest}
132
- * @returns A Promise of ListServerActionsResponse
133
- */
134
- this.listServerActions = request => this.client.fetch({
135
- method: 'GET',
136
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/action`
137
- }, unmarshalListServerActionsResponse);
138
- /**
139
- * Perform action. Perform an action on an Instance. Available actions are:
140
- * `poweron`: Start a stopped Instance. `poweroff`: Fully stop the Instance
141
- * and release the hypervisor slot. `stop_in_place`: Stop the Instance, but
142
- * keep the slot on the hypervisor. `reboot`: Stop the instance and restart
143
- * it. `backup`: Create an image with all the volumes of an Instance.
144
- * `terminate`: Delete the Instance along with all attached volumes.
145
- *
146
- * Keep in mind that terminating an Instance will result in the deletion of
147
- * all attached volumes, including local and block storage. If you want to
148
- * preserve your local volumes, you should use the `archive` action instead of
149
- * `terminate`. Similarly, if you want to keep your block storage volumes, you
150
- * must first detach them before issuing the `terminate` command. For more
151
- * information, read the [Volumes](#path-volumes-list-volumes) documentation.
152
- *
153
- * @param request - The request {@link ServerActionRequest}
154
- * @returns A Promise of ServerActionResponse
155
- */
156
- this.serverAction = request => this.client.fetch({
157
- body: JSON.stringify(marshalServerActionRequest(request, this.client.settings)),
158
- headers: jsonContentHeaders,
159
- method: 'POST',
160
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/action`
161
- }, unmarshalServerActionResponse);
162
- /**
163
- * List user data. List all user data keys registered on a specified Instance.
164
- *
165
- * @param request - The request {@link ListServerUserDataRequest}
166
- * @returns A Promise of ListServerUserDataResponse
167
- */
168
- this.listServerUserData = request => this.client.fetch({
169
- method: 'GET',
170
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/user_data`
171
- }, unmarshalListServerUserDataResponse);
172
- /**
173
- * Delete user data. Delete the specified key from an Instance's user data.
174
- *
175
- * @param request - The request {@link DeleteServerUserDataRequest}
176
- */
177
- this.deleteServerUserData = request => this.client.fetch({
178
- method: 'DELETE',
179
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/user_data/${validatePathParam('key', request.key)}`
180
- });
181
- this.pageOfListImages = function (request) {
106
+ })();
107
+ _createServer = request => this.client.fetch({
108
+ body: JSON.stringify(marshalCreateServerRequest(request, this.client.settings)),
109
+ headers: jsonContentHeaders,
110
+ method: 'POST',
111
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers`
112
+ }, unmarshalCreateServerResponse);
113
+
114
+ /**
115
+ * Delete an Instance. Delete the Instance with the specified ID.
116
+ *
117
+ * @param request - The request {@link DeleteServerRequest}
118
+ */
119
+ deleteServer = request => this.client.fetch({
120
+ method: 'DELETE',
121
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}`
122
+ });
123
+
124
+ /**
125
+ * Get an Instance. Get the details of a specified Instance.
126
+ *
127
+ * @param request - The request {@link GetServerRequest}
128
+ * @returns A Promise of GetServerResponse
129
+ */
130
+ getServer = request => this.client.fetch({
131
+ method: 'GET',
132
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}`
133
+ }, unmarshalGetServerResponse);
134
+ _setServer = request => this.client.fetch({
135
+ body: JSON.stringify(marshalSetServerRequest(request, this.client.settings)),
136
+ headers: jsonContentHeaders,
137
+ method: 'PUT',
138
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('id', request.id)}`
139
+ }, unmarshalSetServerResponse);
140
+ _updateServer = request => this.client.fetch({
141
+ body: JSON.stringify(marshalUpdateServerRequest(request, this.client.settings)),
142
+ headers: jsonContentHeaders,
143
+ method: 'PATCH',
144
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}`
145
+ }, unmarshalUpdateServerResponse);
146
+
147
+ /**
148
+ * List Instance actions. List all actions (e.g. power on, power off, reboot)
149
+ * that can currently be performed on an Instance.
150
+ *
151
+ * @param request - The request {@link ListServerActionsRequest}
152
+ * @returns A Promise of ListServerActionsResponse
153
+ */
154
+ listServerActions = request => this.client.fetch({
155
+ method: 'GET',
156
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/action`
157
+ }, unmarshalListServerActionsResponse);
158
+
159
+ /**
160
+ * Perform action. Perform an action on an Instance. Available actions are:
161
+ * `poweron`: Start a stopped Instance. `poweroff`: Fully stop the Instance
162
+ * and release the hypervisor slot. `stop_in_place`: Stop the Instance, but
163
+ * keep the slot on the hypervisor. `reboot`: Stop the instance and restart
164
+ * it. `backup`: Create an image with all the volumes of an Instance.
165
+ * `terminate`: Delete the Instance along with all attached volumes.
166
+ * `enable_routed_ip`: Migrate the Instance to the new network stack.
167
+ *
168
+ * Keep in mind that terminating an Instance will result in the deletion of
169
+ * all attached volumes, including local and block storage. If you want to
170
+ * preserve your local volumes, you should use the `archive` action instead of
171
+ * `terminate`. Similarly, if you want to keep your block storage volumes, you
172
+ * must first detach them before issuing the `terminate` command. For more
173
+ * information, read the [Volumes](#path-volumes-list-volumes) documentation.
174
+ *
175
+ * @param request - The request {@link ServerActionRequest}
176
+ * @returns A Promise of ServerActionResponse
177
+ */
178
+ serverAction = request => this.client.fetch({
179
+ body: JSON.stringify(marshalServerActionRequest(request, this.client.settings)),
180
+ headers: jsonContentHeaders,
181
+ method: 'POST',
182
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/action`
183
+ }, unmarshalServerActionResponse);
184
+
185
+ /**
186
+ * List user data. List all user data keys registered on a specified Instance.
187
+ *
188
+ * @param request - The request {@link ListServerUserDataRequest}
189
+ * @returns A Promise of ListServerUserDataResponse
190
+ */
191
+ listServerUserData = request => this.client.fetch({
192
+ method: 'GET',
193
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/user_data`
194
+ }, unmarshalListServerUserDataResponse);
195
+
196
+ /**
197
+ * Delete user data. Delete the specified key from an Instance's user data.
198
+ *
199
+ * @param request - The request {@link DeleteServerUserDataRequest}
200
+ */
201
+ deleteServerUserData = request => this.client.fetch({
202
+ method: 'DELETE',
203
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/user_data/${validatePathParam('key', request.key)}`
204
+ });
205
+ pageOfListImages = (() => {
206
+ var _this6 = this;
207
+ return function (request) {
182
208
  if (request === void 0) {
183
209
  request = {};
184
210
  }
185
- return _this.client.fetch({
211
+ return _this6.client.fetch({
186
212
  method: 'GET',
187
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/images`,
188
- urlParams: urlParams(['arch', request.arch], ['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize], ['project', request.project], ['public', request.public], ['tags', request.tags])
213
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this6.client.settings.defaultZone)}/images`,
214
+ urlParams: urlParams(['arch', request.arch], ['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this6.client.settings.defaultPageSize], ['project', request.project], ['public', request.public], ['tags', request.tags])
189
215
  }, unmarshalListImagesResponse);
190
216
  };
191
- /**
192
- * List Instance images. List all existing Instance images.
193
- *
194
- * @param request - The request {@link ListImagesRequest}
195
- * @returns A Promise of ListImagesResponse
196
- */
197
- this.listImages = function (request) {
217
+ })();
218
+
219
+ /**
220
+ * List Instance images. List all existing Instance images.
221
+ *
222
+ * @param request - The request {@link ListImagesRequest}
223
+ * @returns A Promise of ListImagesResponse
224
+ */
225
+ listImages = (() => {
226
+ var _this7 = this;
227
+ return function (request) {
198
228
  if (request === void 0) {
199
229
  request = {};
200
230
  }
201
- return enrichForPagination('images', _this.pageOfListImages, request);
231
+ return enrichForPagination('images', _this7.pageOfListImages, request);
202
232
  };
203
- /**
204
- * Get an Instance image. Get details of an image with the specified ID.
205
- *
206
- * @param request - The request {@link GetImageRequest}
207
- * @returns A Promise of GetImageResponse
208
- */
209
- this.getImage = request => this.client.fetch({
210
- method: 'GET',
211
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/images/${validatePathParam('imageId', request.imageId)}`
212
- }, unmarshalGetImageResponse);
213
- /**
214
- * Create an Instance image. Create an Instance image from the specified
215
- * snapshot ID.
216
- *
217
- * @param request - The request {@link CreateImageRequest}
218
- * @returns A Promise of CreateImageResponse
219
- */
220
- this.createImage = request => this.client.fetch({
221
- body: JSON.stringify(marshalCreateImageRequest(request, this.client.settings)),
222
- headers: jsonContentHeaders,
223
- method: 'POST',
224
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/images`
225
- }, unmarshalCreateImageResponse);
226
- this._setImage = request => this.client.fetch({
227
- body: JSON.stringify(marshalSetImageRequest(request, this.client.settings)),
228
- headers: jsonContentHeaders,
229
- method: 'PUT',
230
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/images/${validatePathParam('id', request.id)}`
231
- }, unmarshalSetImageResponse);
232
- /**
233
- * Delete an Instance image. Delete the image with the specified ID.
234
- *
235
- * @param request - The request {@link DeleteImageRequest}
236
- */
237
- this.deleteImage = request => this.client.fetch({
238
- method: 'DELETE',
239
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/images/${validatePathParam('imageId', request.imageId)}`
240
- });
241
- this.pageOfListSnapshots = function (request) {
233
+ })();
234
+
235
+ /**
236
+ * Get an Instance image. Get details of an image with the specified ID.
237
+ *
238
+ * @param request - The request {@link GetImageRequest}
239
+ * @returns A Promise of GetImageResponse
240
+ */
241
+ getImage = request => this.client.fetch({
242
+ method: 'GET',
243
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/images/${validatePathParam('imageId', request.imageId)}`
244
+ }, unmarshalGetImageResponse);
245
+
246
+ /**
247
+ * Create an Instance image. Create an Instance image from the specified
248
+ * snapshot ID.
249
+ *
250
+ * @param request - The request {@link CreateImageRequest}
251
+ * @returns A Promise of CreateImageResponse
252
+ */
253
+ createImage = request => this.client.fetch({
254
+ body: JSON.stringify(marshalCreateImageRequest(request, this.client.settings)),
255
+ headers: jsonContentHeaders,
256
+ method: 'POST',
257
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/images`
258
+ }, unmarshalCreateImageResponse);
259
+ _setImage = request => this.client.fetch({
260
+ body: JSON.stringify(marshalSetImageRequest(request, this.client.settings)),
261
+ headers: jsonContentHeaders,
262
+ method: 'PUT',
263
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/images/${validatePathParam('id', request.id)}`
264
+ }, unmarshalSetImageResponse);
265
+
266
+ /**
267
+ * Delete an Instance image. Delete the image with the specified ID.
268
+ *
269
+ * @param request - The request {@link DeleteImageRequest}
270
+ */
271
+ deleteImage = request => this.client.fetch({
272
+ method: 'DELETE',
273
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/images/${validatePathParam('imageId', request.imageId)}`
274
+ });
275
+ pageOfListSnapshots = (() => {
276
+ var _this8 = this;
277
+ return function (request) {
242
278
  if (request === void 0) {
243
279
  request = {};
244
280
  }
245
- return _this.client.fetch({
281
+ return _this8.client.fetch({
246
282
  method: 'GET',
247
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/snapshots`,
248
- urlParams: urlParams(['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize], ['project', request.project], ['tags', request.tags])
283
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this8.client.settings.defaultZone)}/snapshots`,
284
+ urlParams: urlParams(['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this8.client.settings.defaultPageSize], ['project', request.project], ['tags', request.tags])
249
285
  }, unmarshalListSnapshotsResponse);
250
286
  };
251
- /**
252
- * List snapshots. List all snapshots of an Organization in a specified
253
- * Availability Zone.
254
- *
255
- * @param request - The request {@link ListSnapshotsRequest}
256
- * @returns A Promise of ListSnapshotsResponse
257
- */
258
- this.listSnapshots = function (request) {
287
+ })();
288
+
289
+ /**
290
+ * List snapshots. List all snapshots of an Organization in a specified
291
+ * Availability Zone.
292
+ *
293
+ * @param request - The request {@link ListSnapshotsRequest}
294
+ * @returns A Promise of ListSnapshotsResponse
295
+ */
296
+ listSnapshots = (() => {
297
+ var _this9 = this;
298
+ return function (request) {
259
299
  if (request === void 0) {
260
300
  request = {};
261
301
  }
262
- return enrichForPagination('snapshots', _this.pageOfListSnapshots, request);
302
+ return enrichForPagination('snapshots', _this9.pageOfListSnapshots, request);
263
303
  };
264
- /**
265
- * Create a snapshot from a specified volume or from a QCOW2 file. Create a
266
- * snapshot from a specified volume or from a QCOW2 file in a specified
267
- * Availability Zone.
268
- *
269
- * @param request - The request {@link CreateSnapshotRequest}
270
- * @returns A Promise of CreateSnapshotResponse
271
- */
272
- this.createSnapshot = function (request) {
304
+ })();
305
+
306
+ /**
307
+ * Create a snapshot from a specified volume or from a QCOW2 file. Create a
308
+ * snapshot from a specified volume or from a QCOW2 file in a specified
309
+ * Availability Zone.
310
+ *
311
+ * @param request - The request {@link CreateSnapshotRequest}
312
+ * @returns A Promise of CreateSnapshotResponse
313
+ */
314
+ createSnapshot = (() => {
315
+ var _this10 = this;
316
+ return function (request) {
273
317
  if (request === void 0) {
274
318
  request = {};
275
319
  }
276
- return _this.client.fetch({
277
- body: JSON.stringify(marshalCreateSnapshotRequest(request, _this.client.settings)),
320
+ return _this10.client.fetch({
321
+ body: JSON.stringify(marshalCreateSnapshotRequest(request, _this10.client.settings)),
278
322
  headers: jsonContentHeaders,
279
323
  method: 'POST',
280
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/snapshots`
324
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this10.client.settings.defaultZone)}/snapshots`
281
325
  }, unmarshalCreateSnapshotResponse);
282
326
  };
283
- /**
284
- * Get a snapshot. Get details of a snapshot with the specified ID.
285
- *
286
- * @param request - The request {@link GetSnapshotRequest}
287
- * @returns A Promise of GetSnapshotResponse
288
- */
289
- this.getSnapshot = request => this.client.fetch({
290
- method: 'GET',
291
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
292
- }, unmarshalGetSnapshotResponse);
293
- this._setSnapshot = request => this.client.fetch({
294
- body: JSON.stringify(marshalSetSnapshotRequest(request, this.client.settings)),
295
- headers: jsonContentHeaders,
296
- method: 'PUT',
297
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
298
- }, unmarshalSetSnapshotResponse);
299
- /**
300
- * Delete a snapshot. Delete the snapshot with the specified ID.
301
- *
302
- * @param request - The request {@link DeleteSnapshotRequest}
303
- */
304
- this.deleteSnapshot = request => this.client.fetch({
305
- method: 'DELETE',
306
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
307
- });
308
- /**
309
- * Export a snapshot. Export a snapshot to a specified S3 bucket in the same
310
- * region.
311
- *
312
- * @param request - The request {@link ExportSnapshotRequest}
313
- * @returns A Promise of ExportSnapshotResponse
314
- */
315
- this.exportSnapshot = request => this.client.fetch({
316
- body: JSON.stringify(marshalExportSnapshotRequest(request, this.client.settings)),
317
- headers: jsonContentHeaders,
318
- method: 'POST',
319
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}/export`
320
- }, unmarshalExportSnapshotResponse);
321
- this.pageOfListVolumes = function (request) {
327
+ })();
328
+
329
+ /**
330
+ * Get a snapshot. Get details of a snapshot with the specified ID.
331
+ *
332
+ * @param request - The request {@link GetSnapshotRequest}
333
+ * @returns A Promise of GetSnapshotResponse
334
+ */
335
+ getSnapshot = request => this.client.fetch({
336
+ method: 'GET',
337
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
338
+ }, unmarshalGetSnapshotResponse);
339
+ _setSnapshot = request => this.client.fetch({
340
+ body: JSON.stringify(marshalSetSnapshotRequest(request, this.client.settings)),
341
+ headers: jsonContentHeaders,
342
+ method: 'PUT',
343
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
344
+ }, unmarshalSetSnapshotResponse);
345
+
346
+ /**
347
+ * Delete a snapshot. Delete the snapshot with the specified ID.
348
+ *
349
+ * @param request - The request {@link DeleteSnapshotRequest}
350
+ */
351
+ deleteSnapshot = request => this.client.fetch({
352
+ method: 'DELETE',
353
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}`
354
+ });
355
+
356
+ /**
357
+ * Export a snapshot. Export a snapshot to a specified S3 bucket in the same
358
+ * region.
359
+ *
360
+ * @param request - The request {@link ExportSnapshotRequest}
361
+ * @returns A Promise of ExportSnapshotResponse
362
+ */
363
+ exportSnapshot = request => this.client.fetch({
364
+ body: JSON.stringify(marshalExportSnapshotRequest(request, this.client.settings)),
365
+ headers: jsonContentHeaders,
366
+ method: 'POST',
367
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/snapshots/${validatePathParam('snapshotId', request.snapshotId)}/export`
368
+ }, unmarshalExportSnapshotResponse);
369
+ pageOfListVolumes = (() => {
370
+ var _this11 = this;
371
+ return function (request) {
322
372
  if (request === void 0) {
323
373
  request = {};
324
374
  }
325
- return _this.client.fetch({
375
+ return _this11.client.fetch({
326
376
  method: 'GET',
327
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/volumes`,
328
- urlParams: urlParams(['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize], ['project', request.project], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined], ['volume_type', request.volumeType])
377
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this11.client.settings.defaultZone)}/volumes`,
378
+ urlParams: urlParams(['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this11.client.settings.defaultPageSize], ['project', request.project], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined], ['volume_type', request.volumeType])
329
379
  }, unmarshalListVolumesResponse);
330
380
  };
331
- /**
332
- * List volumes. List volumes in the specified Availability Zone. You can
333
- * filter the output by volume type.
334
- *
335
- * @param request - The request {@link ListVolumesRequest}
336
- * @returns A Promise of ListVolumesResponse
337
- */
338
- this.listVolumes = function (request) {
381
+ })();
382
+
383
+ /**
384
+ * List volumes. List volumes in the specified Availability Zone. You can
385
+ * filter the output by volume type.
386
+ *
387
+ * @param request - The request {@link ListVolumesRequest}
388
+ * @returns A Promise of ListVolumesResponse
389
+ */
390
+ listVolumes = (() => {
391
+ var _this12 = this;
392
+ return function (request) {
339
393
  if (request === void 0) {
340
394
  request = {};
341
395
  }
342
- return enrichForPagination('volumes', _this.pageOfListVolumes, request);
396
+ return enrichForPagination('volumes', _this12.pageOfListVolumes, request);
343
397
  };
344
- /**
345
- * Create a volume. Create a volume of a specified type in an Availability
346
- * Zone.
347
- *
348
- * @param request - The request {@link CreateVolumeRequest}
349
- * @returns A Promise of CreateVolumeResponse
350
- */
351
- this.createVolume = function (request) {
398
+ })();
399
+
400
+ /**
401
+ * Create a volume. Create a volume of a specified type in an Availability
402
+ * Zone.
403
+ *
404
+ * @param request - The request {@link CreateVolumeRequest}
405
+ * @returns A Promise of CreateVolumeResponse
406
+ */
407
+ createVolume = (() => {
408
+ var _this13 = this;
409
+ return function (request) {
352
410
  if (request === void 0) {
353
411
  request = {};
354
412
  }
355
- return _this.client.fetch({
356
- body: JSON.stringify(marshalCreateVolumeRequest(request, _this.client.settings)),
413
+ return _this13.client.fetch({
414
+ body: JSON.stringify(marshalCreateVolumeRequest(request, _this13.client.settings)),
357
415
  headers: jsonContentHeaders,
358
416
  method: 'POST',
359
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/volumes`
417
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this13.client.settings.defaultZone)}/volumes`
360
418
  }, unmarshalCreateVolumeResponse);
361
419
  };
362
- /**
363
- * Get a volume. Get details of a volume with the specified ID.
364
- *
365
- * @param request - The request {@link GetVolumeRequest}
366
- * @returns A Promise of GetVolumeResponse
367
- */
368
- this.getVolume = request => this.client.fetch({
369
- method: 'GET',
370
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam('volumeId', request.volumeId)}`
371
- }, unmarshalGetVolumeResponse);
372
- /**
373
- * Update a volume. Replace the name and/or size properties of a volume
374
- * specified by its ID, with the specified value(s). Any volume name can be
375
- * changed, however only `b_ssd` volumes can currently be increased in size.
376
- *
377
- * @param request - The request {@link UpdateVolumeRequest}
378
- * @returns A Promise of UpdateVolumeResponse
379
- */
380
- this.updateVolume = request => this.client.fetch({
381
- body: JSON.stringify(marshalUpdateVolumeRequest(request, this.client.settings)),
382
- headers: jsonContentHeaders,
383
- method: 'PATCH',
384
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam('volumeId', request.volumeId)}`
385
- }, unmarshalUpdateVolumeResponse);
386
- /**
387
- * Delete a volume. Delete the volume with the specified ID.
388
- *
389
- * @param request - The request {@link DeleteVolumeRequest}
390
- */
391
- this.deleteVolume = request => this.client.fetch({
392
- method: 'DELETE',
393
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam('volumeId', request.volumeId)}`
394
- });
395
- this.pageOfListSecurityGroups = function (request) {
420
+ })();
421
+
422
+ /**
423
+ * Get a volume. Get details of a volume with the specified ID.
424
+ *
425
+ * @param request - The request {@link GetVolumeRequest}
426
+ * @returns A Promise of GetVolumeResponse
427
+ */
428
+ getVolume = request => this.client.fetch({
429
+ method: 'GET',
430
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam('volumeId', request.volumeId)}`
431
+ }, unmarshalGetVolumeResponse);
432
+
433
+ /**
434
+ * Update a volume. Replace the name and/or size properties of a volume
435
+ * specified by its ID, with the specified value(s). Any volume name can be
436
+ * changed, however only `b_ssd` volumes can currently be increased in size.
437
+ *
438
+ * @param request - The request {@link UpdateVolumeRequest}
439
+ * @returns A Promise of UpdateVolumeResponse
440
+ */
441
+ updateVolume = request => this.client.fetch({
442
+ body: JSON.stringify(marshalUpdateVolumeRequest(request, this.client.settings)),
443
+ headers: jsonContentHeaders,
444
+ method: 'PATCH',
445
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam('volumeId', request.volumeId)}`
446
+ }, unmarshalUpdateVolumeResponse);
447
+
448
+ /**
449
+ * Delete a volume. Delete the volume with the specified ID.
450
+ *
451
+ * @param request - The request {@link DeleteVolumeRequest}
452
+ */
453
+ deleteVolume = request => this.client.fetch({
454
+ method: 'DELETE',
455
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/volumes/${validatePathParam('volumeId', request.volumeId)}`
456
+ });
457
+ pageOfListSecurityGroups = (() => {
458
+ var _this14 = this;
459
+ return function (request) {
396
460
  if (request === void 0) {
397
461
  request = {};
398
462
  }
399
- return _this.client.fetch({
463
+ return _this14.client.fetch({
400
464
  method: 'GET',
401
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/security_groups`,
402
- urlParams: urlParams(['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize], ['project', request.project], ['project_default', request.projectDefault], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined])
465
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this14.client.settings.defaultZone)}/security_groups`,
466
+ urlParams: urlParams(['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this14.client.settings.defaultPageSize], ['project', request.project], ['project_default', request.projectDefault], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined])
403
467
  }, unmarshalListSecurityGroupsResponse);
404
468
  };
405
- /**
406
- * List security groups. List all existing security groups.
407
- *
408
- * @param request - The request {@link ListSecurityGroupsRequest}
409
- * @returns A Promise of ListSecurityGroupsResponse
410
- */
411
- this.listSecurityGroups = function (request) {
469
+ })();
470
+
471
+ /**
472
+ * List security groups. List all existing security groups.
473
+ *
474
+ * @param request - The request {@link ListSecurityGroupsRequest}
475
+ * @returns A Promise of ListSecurityGroupsResponse
476
+ */
477
+ listSecurityGroups = (() => {
478
+ var _this15 = this;
479
+ return function (request) {
412
480
  if (request === void 0) {
413
481
  request = {};
414
482
  }
415
- return enrichForPagination('securityGroups', _this.pageOfListSecurityGroups, request);
483
+ return enrichForPagination('securityGroups', _this15.pageOfListSecurityGroups, request);
416
484
  };
417
- /**
418
- * Create a security group. Create a security group with a specified name and
419
- * description.
420
- *
421
- * @param request - The request {@link CreateSecurityGroupRequest}
422
- * @returns A Promise of CreateSecurityGroupResponse
423
- */
424
- this.createSecurityGroup = request => this.client.fetch({
425
- body: JSON.stringify(marshalCreateSecurityGroupRequest(request, this.client.settings)),
426
- headers: jsonContentHeaders,
427
- method: 'POST',
428
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups`
429
- }, unmarshalCreateSecurityGroupResponse);
430
- /**
431
- * Get a security group. Get the details of a security group with the
432
- * specified ID.
433
- *
434
- * @param request - The request {@link GetSecurityGroupRequest}
435
- * @returns A Promise of GetSecurityGroupResponse
436
- */
437
- this.getSecurityGroup = request => this.client.fetch({
438
- method: 'GET',
439
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}`
440
- }, unmarshalGetSecurityGroupResponse);
441
- /**
442
- * Delete a security group. Delete a security group with the specified ID.
443
- *
444
- * @param request - The request {@link DeleteSecurityGroupRequest}
445
- */
446
- this.deleteSecurityGroup = request => this.client.fetch({
447
- method: 'DELETE',
448
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}`
449
- });
450
- this._setSecurityGroup = request => this.client.fetch({
451
- body: JSON.stringify(marshalSetSecurityGroupRequest(request, this.client.settings)),
452
- headers: jsonContentHeaders,
453
- method: 'PUT',
454
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('id', request.id)}`
455
- }, unmarshalSetSecurityGroupResponse);
456
- /**
457
- * Get default rules. Lists the default rules applied to all the security
458
- * groups.
459
- *
460
- * @param request - The request {@link ListDefaultSecurityGroupRulesRequest}
461
- * @returns A Promise of ListSecurityGroupRulesResponse
462
- */
463
- this.listDefaultSecurityGroupRules = function (request) {
485
+ })();
486
+
487
+ /**
488
+ * Create a security group. Create a security group with a specified name and
489
+ * description.
490
+ *
491
+ * @param request - The request {@link CreateSecurityGroupRequest}
492
+ * @returns A Promise of CreateSecurityGroupResponse
493
+ */
494
+ createSecurityGroup = request => this.client.fetch({
495
+ body: JSON.stringify(marshalCreateSecurityGroupRequest(request, this.client.settings)),
496
+ headers: jsonContentHeaders,
497
+ method: 'POST',
498
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups`
499
+ }, unmarshalCreateSecurityGroupResponse);
500
+
501
+ /**
502
+ * Get a security group. Get the details of a security group with the
503
+ * specified ID.
504
+ *
505
+ * @param request - The request {@link GetSecurityGroupRequest}
506
+ * @returns A Promise of GetSecurityGroupResponse
507
+ */
508
+ getSecurityGroup = request => this.client.fetch({
509
+ method: 'GET',
510
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}`
511
+ }, unmarshalGetSecurityGroupResponse);
512
+
513
+ /**
514
+ * Delete a security group. Delete a security group with the specified ID.
515
+ *
516
+ * @param request - The request {@link DeleteSecurityGroupRequest}
517
+ */
518
+ deleteSecurityGroup = request => this.client.fetch({
519
+ method: 'DELETE',
520
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}`
521
+ });
522
+ _setSecurityGroup = request => this.client.fetch({
523
+ body: JSON.stringify(marshalSetSecurityGroupRequest(request, this.client.settings)),
524
+ headers: jsonContentHeaders,
525
+ method: 'PUT',
526
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('id', request.id)}`
527
+ }, unmarshalSetSecurityGroupResponse);
528
+
529
+ /**
530
+ * Get default rules. Lists the default rules applied to all the security
531
+ * groups.
532
+ *
533
+ * @param request - The request {@link ListDefaultSecurityGroupRulesRequest}
534
+ * @returns A Promise of ListSecurityGroupRulesResponse
535
+ */
536
+ listDefaultSecurityGroupRules = (() => {
537
+ var _this16 = this;
538
+ return function (request) {
464
539
  if (request === void 0) {
465
540
  request = {};
466
541
  }
467
- return _this.client.fetch({
542
+ return _this16.client.fetch({
468
543
  method: 'GET',
469
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/security_groups/default/rules`
544
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this16.client.settings.defaultZone)}/security_groups/default/rules`
470
545
  }, unmarshalListSecurityGroupRulesResponse);
471
546
  };
472
- this.pageOfListSecurityGroupRules = request => this.client.fetch({
473
- method: 'GET',
474
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules`,
475
- urlParams: urlParams(['page', request.page], ['per_page', request.perPage ?? this.client.settings.defaultPageSize])
476
- }, unmarshalListSecurityGroupRulesResponse);
477
- /**
478
- * List rules. List the rules of the a specified security group ID.
479
- *
480
- * @param request - The request {@link ListSecurityGroupRulesRequest}
481
- * @returns A Promise of ListSecurityGroupRulesResponse
482
- */
483
- this.listSecurityGroupRules = request => enrichForPagination('rules', this.pageOfListSecurityGroupRules, request);
484
- /**
485
- * Create rule. Create a rule in the specified security group ID.
486
- *
487
- * @param request - The request {@link CreateSecurityGroupRuleRequest}
488
- * @returns A Promise of CreateSecurityGroupRuleResponse
489
- */
490
- this.createSecurityGroupRule = request => this.client.fetch({
491
- body: JSON.stringify(marshalCreateSecurityGroupRuleRequest(request, this.client.settings)),
492
- headers: jsonContentHeaders,
493
- method: 'POST',
494
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules`
495
- }, unmarshalCreateSecurityGroupRuleResponse);
496
- /**
497
- * Update all the rules of a security group. Replaces the existing rules of
498
- * the security group with the rules provided. This endpoint supports the
499
- * update of existing rules, creation of new rules and deletion of existing
500
- * rules when they are not passed in the request.
501
- *
502
- * @param request - The request {@link SetSecurityGroupRulesRequest}
503
- * @returns A Promise of SetSecurityGroupRulesResponse
504
- */
505
- this.setSecurityGroupRules = request => this.client.fetch({
506
- body: JSON.stringify(marshalSetSecurityGroupRulesRequest(request, this.client.settings)),
507
- headers: jsonContentHeaders,
508
- method: 'PUT',
509
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules`
510
- }, unmarshalSetSecurityGroupRulesResponse);
511
- /**
512
- * Delete rule. Delete a security group rule with the specified ID.
513
- *
514
- * @param request - The request {@link DeleteSecurityGroupRuleRequest}
515
- */
516
- this.deleteSecurityGroupRule = request => this.client.fetch({
517
- method: 'DELETE',
518
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules/${validatePathParam('securityGroupRuleId', request.securityGroupRuleId)}`
519
- });
520
- /**
521
- * Get rule. Get details of a security group rule with the specified ID.
522
- *
523
- * @param request - The request {@link GetSecurityGroupRuleRequest}
524
- * @returns A Promise of GetSecurityGroupRuleResponse
525
- */
526
- this.getSecurityGroupRule = request => this.client.fetch({
527
- method: 'GET',
528
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules/${validatePathParam('securityGroupRuleId', request.securityGroupRuleId)}`
529
- }, unmarshalGetSecurityGroupRuleResponse);
530
- this._setSecurityGroupRule = request => this.client.fetch({
531
- body: JSON.stringify(marshalSetSecurityGroupRuleRequest(request, this.client.settings)),
532
- headers: jsonContentHeaders,
533
- method: 'PUT',
534
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules/${validatePathParam('securityGroupRuleId', request.securityGroupRuleId)}`
535
- }, unmarshalSetSecurityGroupRuleResponse);
536
- this.pageOfListPlacementGroups = function (request) {
547
+ })();
548
+ pageOfListSecurityGroupRules = request => this.client.fetch({
549
+ method: 'GET',
550
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules`,
551
+ urlParams: urlParams(['page', request.page], ['per_page', request.perPage ?? this.client.settings.defaultPageSize])
552
+ }, unmarshalListSecurityGroupRulesResponse);
553
+
554
+ /**
555
+ * List rules. List the rules of the a specified security group ID.
556
+ *
557
+ * @param request - The request {@link ListSecurityGroupRulesRequest}
558
+ * @returns A Promise of ListSecurityGroupRulesResponse
559
+ */
560
+ listSecurityGroupRules = request => enrichForPagination('rules', this.pageOfListSecurityGroupRules, request);
561
+
562
+ /**
563
+ * Create rule. Create a rule in the specified security group ID.
564
+ *
565
+ * @param request - The request {@link CreateSecurityGroupRuleRequest}
566
+ * @returns A Promise of CreateSecurityGroupRuleResponse
567
+ */
568
+ createSecurityGroupRule = request => this.client.fetch({
569
+ body: JSON.stringify(marshalCreateSecurityGroupRuleRequest(request, this.client.settings)),
570
+ headers: jsonContentHeaders,
571
+ method: 'POST',
572
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules`
573
+ }, unmarshalCreateSecurityGroupRuleResponse);
574
+
575
+ /**
576
+ * Update all the rules of a security group. Replaces the existing rules of
577
+ * the security group with the rules provided. This endpoint supports the
578
+ * update of existing rules, creation of new rules and deletion of existing
579
+ * rules when they are not passed in the request.
580
+ *
581
+ * @param request - The request {@link SetSecurityGroupRulesRequest}
582
+ * @returns A Promise of SetSecurityGroupRulesResponse
583
+ */
584
+ setSecurityGroupRules = request => this.client.fetch({
585
+ body: JSON.stringify(marshalSetSecurityGroupRulesRequest(request, this.client.settings)),
586
+ headers: jsonContentHeaders,
587
+ method: 'PUT',
588
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules`
589
+ }, unmarshalSetSecurityGroupRulesResponse);
590
+
591
+ /**
592
+ * Delete rule. Delete a security group rule with the specified ID.
593
+ *
594
+ * @param request - The request {@link DeleteSecurityGroupRuleRequest}
595
+ */
596
+ deleteSecurityGroupRule = request => this.client.fetch({
597
+ method: 'DELETE',
598
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules/${validatePathParam('securityGroupRuleId', request.securityGroupRuleId)}`
599
+ });
600
+
601
+ /**
602
+ * Get rule. Get details of a security group rule with the specified ID.
603
+ *
604
+ * @param request - The request {@link GetSecurityGroupRuleRequest}
605
+ * @returns A Promise of GetSecurityGroupRuleResponse
606
+ */
607
+ getSecurityGroupRule = request => this.client.fetch({
608
+ method: 'GET',
609
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules/${validatePathParam('securityGroupRuleId', request.securityGroupRuleId)}`
610
+ }, unmarshalGetSecurityGroupRuleResponse);
611
+ _setSecurityGroupRule = request => this.client.fetch({
612
+ body: JSON.stringify(marshalSetSecurityGroupRuleRequest(request, this.client.settings)),
613
+ headers: jsonContentHeaders,
614
+ method: 'PUT',
615
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/security_groups/${validatePathParam('securityGroupId', request.securityGroupId)}/rules/${validatePathParam('securityGroupRuleId', request.securityGroupRuleId)}`
616
+ }, unmarshalSetSecurityGroupRuleResponse);
617
+ pageOfListPlacementGroups = (() => {
618
+ var _this17 = this;
619
+ return function (request) {
537
620
  if (request === void 0) {
538
621
  request = {};
539
622
  }
540
- return _this.client.fetch({
623
+ return _this17.client.fetch({
541
624
  method: 'GET',
542
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/placement_groups`,
543
- urlParams: urlParams(['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize], ['project', request.project], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined])
625
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this17.client.settings.defaultZone)}/placement_groups`,
626
+ urlParams: urlParams(['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this17.client.settings.defaultPageSize], ['project', request.project], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined])
544
627
  }, unmarshalListPlacementGroupsResponse);
545
628
  };
546
- /**
547
- * List placement groups. List all placement groups in a specified
548
- * Availability Zone.
549
- *
550
- * @param request - The request {@link ListPlacementGroupsRequest}
551
- * @returns A Promise of ListPlacementGroupsResponse
552
- */
553
- this.listPlacementGroups = function (request) {
629
+ })();
630
+
631
+ /**
632
+ * List placement groups. List all placement groups in a specified
633
+ * Availability Zone.
634
+ *
635
+ * @param request - The request {@link ListPlacementGroupsRequest}
636
+ * @returns A Promise of ListPlacementGroupsResponse
637
+ */
638
+ listPlacementGroups = (() => {
639
+ var _this18 = this;
640
+ return function (request) {
554
641
  if (request === void 0) {
555
642
  request = {};
556
643
  }
557
- return enrichForPagination('placementGroups', _this.pageOfListPlacementGroups, request);
644
+ return enrichForPagination('placementGroups', _this18.pageOfListPlacementGroups, request);
558
645
  };
559
- /**
560
- * Create a placement group. Create a new placement group in a specified
561
- * Availability Zone.
562
- *
563
- * @param request - The request {@link CreatePlacementGroupRequest}
564
- * @returns A Promise of CreatePlacementGroupResponse
565
- */
566
- this.createPlacementGroup = function (request) {
646
+ })();
647
+
648
+ /**
649
+ * Create a placement group. Create a new placement group in a specified
650
+ * Availability Zone.
651
+ *
652
+ * @param request - The request {@link CreatePlacementGroupRequest}
653
+ * @returns A Promise of CreatePlacementGroupResponse
654
+ */
655
+ createPlacementGroup = (() => {
656
+ var _this19 = this;
657
+ return function (request) {
567
658
  if (request === void 0) {
568
659
  request = {};
569
660
  }
570
- return _this.client.fetch({
571
- body: JSON.stringify(marshalCreatePlacementGroupRequest(request, _this.client.settings)),
661
+ return _this19.client.fetch({
662
+ body: JSON.stringify(marshalCreatePlacementGroupRequest(request, _this19.client.settings)),
572
663
  headers: jsonContentHeaders,
573
664
  method: 'POST',
574
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/placement_groups`
665
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this19.client.settings.defaultZone)}/placement_groups`
575
666
  }, unmarshalCreatePlacementGroupResponse);
576
667
  };
577
- /**
578
- * Get a placement group. Get the specified placement group.
579
- *
580
- * @param request - The request {@link GetPlacementGroupRequest}
581
- * @returns A Promise of GetPlacementGroupResponse
582
- */
583
- this.getPlacementGroup = request => this.client.fetch({
584
- method: 'GET',
585
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}`
586
- }, unmarshalGetPlacementGroupResponse);
587
- /**
588
- * Set placement group. Set all parameters of the specified placement group.
589
- *
590
- * @param request - The request {@link SetPlacementGroupRequest}
591
- * @returns A Promise of SetPlacementGroupResponse
592
- */
593
- this.setPlacementGroup = request => this.client.fetch({
594
- body: JSON.stringify(marshalSetPlacementGroupRequest(request, this.client.settings)),
595
- headers: jsonContentHeaders,
596
- method: 'PUT',
597
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}`
598
- }, unmarshalSetPlacementGroupResponse);
599
- /**
600
- * Update a placement group. Update one or more parameter of the specified
601
- * placement group.
602
- *
603
- * @param request - The request {@link UpdatePlacementGroupRequest}
604
- * @returns A Promise of UpdatePlacementGroupResponse
605
- */
606
- this.updatePlacementGroup = request => this.client.fetch({
607
- body: JSON.stringify(marshalUpdatePlacementGroupRequest(request, this.client.settings)),
608
- headers: jsonContentHeaders,
609
- method: 'PATCH',
610
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}`
611
- }, unmarshalUpdatePlacementGroupResponse);
612
- /**
613
- * Delete the specified placement group.
614
- *
615
- * @param request - The request {@link DeletePlacementGroupRequest}
616
- */
617
- this.deletePlacementGroup = request => this.client.fetch({
618
- method: 'DELETE',
619
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}`
620
- });
621
- /**
622
- * Get placement group servers. Get all Instances belonging to the specified
623
- * placement group.
624
- *
625
- * @param request - The request {@link GetPlacementGroupServersRequest}
626
- * @returns A Promise of GetPlacementGroupServersResponse
627
- */
628
- this.getPlacementGroupServers = request => this.client.fetch({
629
- method: 'GET',
630
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}/servers`
631
- }, unmarshalGetPlacementGroupServersResponse);
632
- /**
633
- * Set placement group servers. Set all Instances belonging to the specified
634
- * placement group.
635
- *
636
- * @param request - The request {@link SetPlacementGroupServersRequest}
637
- * @returns A Promise of SetPlacementGroupServersResponse
638
- */
639
- this.setPlacementGroupServers = request => this.client.fetch({
640
- body: JSON.stringify(marshalSetPlacementGroupServersRequest(request, this.client.settings)),
641
- headers: jsonContentHeaders,
642
- method: 'PUT',
643
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}/servers`
644
- }, unmarshalSetPlacementGroupServersResponse);
645
- /**
646
- * Update placement group servers. Update all Instances belonging to the
647
- * specified placement group.
648
- *
649
- * @param request - The request {@link UpdatePlacementGroupServersRequest}
650
- * @returns A Promise of UpdatePlacementGroupServersResponse
651
- */
652
- this.updatePlacementGroupServers = request => this.client.fetch({
653
- body: JSON.stringify(marshalUpdatePlacementGroupServersRequest(request, this.client.settings)),
654
- headers: jsonContentHeaders,
655
- method: 'PATCH',
656
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}/servers`
657
- }, unmarshalUpdatePlacementGroupServersResponse);
658
- this.pageOfListIps = function (request) {
668
+ })();
669
+
670
+ /**
671
+ * Get a placement group. Get the specified placement group.
672
+ *
673
+ * @param request - The request {@link GetPlacementGroupRequest}
674
+ * @returns A Promise of GetPlacementGroupResponse
675
+ */
676
+ getPlacementGroup = request => this.client.fetch({
677
+ method: 'GET',
678
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}`
679
+ }, unmarshalGetPlacementGroupResponse);
680
+
681
+ /**
682
+ * Set placement group. Set all parameters of the specified placement group.
683
+ *
684
+ * @param request - The request {@link SetPlacementGroupRequest}
685
+ * @returns A Promise of SetPlacementGroupResponse
686
+ */
687
+ setPlacementGroup = request => this.client.fetch({
688
+ body: JSON.stringify(marshalSetPlacementGroupRequest(request, this.client.settings)),
689
+ headers: jsonContentHeaders,
690
+ method: 'PUT',
691
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}`
692
+ }, unmarshalSetPlacementGroupResponse);
693
+
694
+ /**
695
+ * Update a placement group. Update one or more parameter of the specified
696
+ * placement group.
697
+ *
698
+ * @param request - The request {@link UpdatePlacementGroupRequest}
699
+ * @returns A Promise of UpdatePlacementGroupResponse
700
+ */
701
+ updatePlacementGroup = request => this.client.fetch({
702
+ body: JSON.stringify(marshalUpdatePlacementGroupRequest(request, this.client.settings)),
703
+ headers: jsonContentHeaders,
704
+ method: 'PATCH',
705
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}`
706
+ }, unmarshalUpdatePlacementGroupResponse);
707
+
708
+ /**
709
+ * Delete the specified placement group.
710
+ *
711
+ * @param request - The request {@link DeletePlacementGroupRequest}
712
+ */
713
+ deletePlacementGroup = request => this.client.fetch({
714
+ method: 'DELETE',
715
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}`
716
+ });
717
+
718
+ /**
719
+ * Get placement group servers. Get all Instances belonging to the specified
720
+ * placement group.
721
+ *
722
+ * @param request - The request {@link GetPlacementGroupServersRequest}
723
+ * @returns A Promise of GetPlacementGroupServersResponse
724
+ */
725
+ getPlacementGroupServers = request => this.client.fetch({
726
+ method: 'GET',
727
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}/servers`
728
+ }, unmarshalGetPlacementGroupServersResponse);
729
+
730
+ /**
731
+ * Set placement group servers. Set all Instances belonging to the specified
732
+ * placement group.
733
+ *
734
+ * @param request - The request {@link SetPlacementGroupServersRequest}
735
+ * @returns A Promise of SetPlacementGroupServersResponse
736
+ */
737
+ setPlacementGroupServers = request => this.client.fetch({
738
+ body: JSON.stringify(marshalSetPlacementGroupServersRequest(request, this.client.settings)),
739
+ headers: jsonContentHeaders,
740
+ method: 'PUT',
741
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}/servers`
742
+ }, unmarshalSetPlacementGroupServersResponse);
743
+
744
+ /**
745
+ * Update placement group servers. Update all Instances belonging to the
746
+ * specified placement group.
747
+ *
748
+ * @param request - The request {@link UpdatePlacementGroupServersRequest}
749
+ * @returns A Promise of UpdatePlacementGroupServersResponse
750
+ */
751
+ updatePlacementGroupServers = request => this.client.fetch({
752
+ body: JSON.stringify(marshalUpdatePlacementGroupServersRequest(request, this.client.settings)),
753
+ headers: jsonContentHeaders,
754
+ method: 'PATCH',
755
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/placement_groups/${validatePathParam('placementGroupId', request.placementGroupId)}/servers`
756
+ }, unmarshalUpdatePlacementGroupServersResponse);
757
+ pageOfListIps = (() => {
758
+ var _this20 = this;
759
+ return function (request) {
659
760
  if (request === void 0) {
660
761
  request = {};
661
762
  }
662
- return _this.client.fetch({
763
+ return _this20.client.fetch({
663
764
  method: 'GET',
664
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/ips`,
665
- urlParams: urlParams(['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize], ['project', request.project], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined])
765
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this20.client.settings.defaultZone)}/ips`,
766
+ urlParams: urlParams(['name', request.name], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this20.client.settings.defaultPageSize], ['project', request.project], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined])
666
767
  }, unmarshalListIpsResponse);
667
768
  };
668
- /**
669
- * List all flexible IPs. List all flexible IPs in a specified zone.
670
- *
671
- * @param request - The request {@link ListIpsRequest}
672
- * @returns A Promise of ListIpsResponse
673
- */
674
- this.listIps = function (request) {
769
+ })();
770
+
771
+ /**
772
+ * List all flexible IPs. List all flexible IPs in a specified zone.
773
+ *
774
+ * @param request - The request {@link ListIpsRequest}
775
+ * @returns A Promise of ListIpsResponse
776
+ */
777
+ listIps = (() => {
778
+ var _this21 = this;
779
+ return function (request) {
675
780
  if (request === void 0) {
676
781
  request = {};
677
782
  }
678
- return enrichForPagination('ips', _this.pageOfListIps, request);
783
+ return enrichForPagination('ips', _this21.pageOfListIps, request);
679
784
  };
680
- /**
681
- * Reserve a flexible IP. Reserve a flexible IP and attach it to the specified
682
- * Instance.
683
- *
684
- * @param request - The request {@link CreateIpRequest}
685
- * @returns A Promise of CreateIpResponse
686
- */
687
- this.createIp = function (request) {
785
+ })();
786
+
787
+ /**
788
+ * Reserve a flexible IP. Reserve a flexible IP and attach it to the specified
789
+ * Instance.
790
+ *
791
+ * @param request - The request {@link CreateIpRequest}
792
+ * @returns A Promise of CreateIpResponse
793
+ */
794
+ createIp = (() => {
795
+ var _this22 = this;
796
+ return function (request) {
688
797
  if (request === void 0) {
689
798
  request = {};
690
799
  }
691
- return _this.client.fetch({
692
- body: JSON.stringify(marshalCreateIpRequest(request, _this.client.settings)),
800
+ return _this22.client.fetch({
801
+ body: JSON.stringify(marshalCreateIpRequest(request, _this22.client.settings)),
693
802
  headers: jsonContentHeaders,
694
803
  method: 'POST',
695
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/ips`
804
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this22.client.settings.defaultZone)}/ips`
696
805
  }, unmarshalCreateIpResponse);
697
806
  };
698
- /**
699
- * Get a flexible IP. Get details of an IP with the specified ID or address.
700
- *
701
- * @param request - The request {@link GetIpRequest}
702
- * @returns A Promise of GetIpResponse
703
- */
704
- this.getIp = request => this.client.fetch({
705
- method: 'GET',
706
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam('ip', request.ip)}`
707
- }, unmarshalGetIpResponse);
708
- /**
709
- * Update a flexible IP. Update a flexible IP in the specified zone with the
710
- * specified ID.
711
- *
712
- * @param request - The request {@link UpdateIpRequest}
713
- * @returns A Promise of UpdateIpResponse
714
- */
715
- this.updateIp = request => this.client.fetch({
716
- body: JSON.stringify(marshalUpdateIpRequest(request, this.client.settings)),
717
- headers: jsonContentHeaders,
718
- method: 'PATCH',
719
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam('ip', request.ip)}`
720
- }, unmarshalUpdateIpResponse);
721
- /**
722
- * Delete a flexible IP. Delete the IP with the specified ID.
723
- *
724
- * @param request - The request {@link DeleteIpRequest}
725
- */
726
- this.deleteIp = request => this.client.fetch({
727
- method: 'DELETE',
728
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam('ip', request.ip)}`
729
- });
730
- this.pageOfListPrivateNICs = request => this.client.fetch({
731
- method: 'GET',
732
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private_nics`,
733
- urlParams: urlParams(['page', request.page], ['per_page', request.perPage ?? this.client.settings.defaultPageSize], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined])
734
- }, unmarshalListPrivateNICsResponse);
735
- /**
736
- * List all private NICs. List all private NICs of a specified Instance.
737
- *
738
- * @param request - The request {@link ListPrivateNICsRequest}
739
- * @returns A Promise of ListPrivateNICsResponse
740
- */
741
- this.listPrivateNICs = request => enrichForPagination('privateNics', this.pageOfListPrivateNICs, request);
742
- /**
743
- * Create a private NIC connecting an Instance to a Private Network.
744
- *
745
- * @param request - The request {@link CreatePrivateNICRequest}
746
- * @returns A Promise of CreatePrivateNICResponse
747
- */
748
- this.createPrivateNIC = request => this.client.fetch({
749
- body: JSON.stringify(marshalCreatePrivateNICRequest(request, this.client.settings)),
750
- headers: jsonContentHeaders,
751
- method: 'POST',
752
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private_nics`
753
- }, unmarshalCreatePrivateNICResponse);
754
- /**
755
- * Get a private NIC. Get private NIC properties.
756
- *
757
- * @param request - The request {@link GetPrivateNICRequest}
758
- * @returns A Promise of GetPrivateNICResponse
759
- */
760
- this.getPrivateNIC = request => this.client.fetch({
761
- method: 'GET',
762
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private_nics/${validatePathParam('privateNicId', request.privateNicId)}`
763
- }, unmarshalGetPrivateNICResponse);
764
- /**
765
- * Update a private NIC. Update one or more parameter(s) of a specified
766
- * private NIC.
767
- *
768
- * @param request - The request {@link UpdatePrivateNICRequest}
769
- * @returns A Promise of PrivateNIC
770
- */
771
- this.updatePrivateNIC = request => this.client.fetch({
772
- body: JSON.stringify(marshalUpdatePrivateNICRequest(request, this.client.settings)),
773
- headers: jsonContentHeaders,
774
- method: 'PATCH',
775
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private_nics/${validatePathParam('privateNicId', request.privateNicId)}`
776
- }, unmarshalPrivateNIC);
777
- /**
778
- * Delete a private NIC.
779
- *
780
- * @param request - The request {@link DeletePrivateNICRequest}
781
- */
782
- this.deletePrivateNIC = request => this.client.fetch({
783
- method: 'DELETE',
784
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private_nics/${validatePathParam('privateNicId', request.privateNicId)}`
785
- });
786
- this.pageOfListBootscripts = function (request) {
807
+ })();
808
+
809
+ /**
810
+ * Get a flexible IP. Get details of an IP with the specified ID or address.
811
+ *
812
+ * @param request - The request {@link GetIpRequest}
813
+ * @returns A Promise of GetIpResponse
814
+ */
815
+ getIp = request => this.client.fetch({
816
+ method: 'GET',
817
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam('ip', request.ip)}`
818
+ }, unmarshalGetIpResponse);
819
+
820
+ /**
821
+ * Update a flexible IP. Update a flexible IP in the specified zone with the
822
+ * specified ID.
823
+ *
824
+ * @param request - The request {@link UpdateIpRequest}
825
+ * @returns A Promise of UpdateIpResponse
826
+ */
827
+ updateIp = request => this.client.fetch({
828
+ body: JSON.stringify(marshalUpdateIpRequest(request, this.client.settings)),
829
+ headers: jsonContentHeaders,
830
+ method: 'PATCH',
831
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam('ip', request.ip)}`
832
+ }, unmarshalUpdateIpResponse);
833
+
834
+ /**
835
+ * Delete a flexible IP. Delete the IP with the specified ID.
836
+ *
837
+ * @param request - The request {@link DeleteIpRequest}
838
+ */
839
+ deleteIp = request => this.client.fetch({
840
+ method: 'DELETE',
841
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam('ip', request.ip)}`
842
+ });
843
+ pageOfListPrivateNICs = request => this.client.fetch({
844
+ method: 'GET',
845
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private_nics`,
846
+ urlParams: urlParams(['page', request.page], ['per_page', request.perPage ?? this.client.settings.defaultPageSize], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined])
847
+ }, unmarshalListPrivateNICsResponse);
848
+
849
+ /**
850
+ * List all private NICs. List all private NICs of a specified Instance.
851
+ *
852
+ * @param request - The request {@link ListPrivateNICsRequest}
853
+ * @returns A Promise of ListPrivateNICsResponse
854
+ */
855
+ listPrivateNICs = request => enrichForPagination('privateNics', this.pageOfListPrivateNICs, request);
856
+
857
+ /**
858
+ * Create a private NIC connecting an Instance to a Private Network.
859
+ *
860
+ * @param request - The request {@link CreatePrivateNICRequest}
861
+ * @returns A Promise of CreatePrivateNICResponse
862
+ */
863
+ createPrivateNIC = request => this.client.fetch({
864
+ body: JSON.stringify(marshalCreatePrivateNICRequest(request, this.client.settings)),
865
+ headers: jsonContentHeaders,
866
+ method: 'POST',
867
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private_nics`
868
+ }, unmarshalCreatePrivateNICResponse);
869
+
870
+ /**
871
+ * Get a private NIC. Get private NIC properties.
872
+ *
873
+ * @param request - The request {@link GetPrivateNICRequest}
874
+ * @returns A Promise of GetPrivateNICResponse
875
+ */
876
+ getPrivateNIC = request => this.client.fetch({
877
+ method: 'GET',
878
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private_nics/${validatePathParam('privateNicId', request.privateNicId)}`
879
+ }, unmarshalGetPrivateNICResponse);
880
+
881
+ /**
882
+ * Update a private NIC. Update one or more parameter(s) of a specified
883
+ * private NIC.
884
+ *
885
+ * @param request - The request {@link UpdatePrivateNICRequest}
886
+ * @returns A Promise of PrivateNIC
887
+ */
888
+ updatePrivateNIC = request => this.client.fetch({
889
+ body: JSON.stringify(marshalUpdatePrivateNICRequest(request, this.client.settings)),
890
+ headers: jsonContentHeaders,
891
+ method: 'PATCH',
892
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private_nics/${validatePathParam('privateNicId', request.privateNicId)}`
893
+ }, unmarshalPrivateNIC);
894
+
895
+ /**
896
+ * Delete a private NIC.
897
+ *
898
+ * @param request - The request {@link DeletePrivateNICRequest}
899
+ */
900
+ deletePrivateNIC = request => this.client.fetch({
901
+ method: 'DELETE',
902
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private_nics/${validatePathParam('privateNicId', request.privateNicId)}`
903
+ });
904
+ pageOfListBootscripts = (() => {
905
+ var _this23 = this;
906
+ return function (request) {
787
907
  if (request === void 0) {
788
908
  request = {};
789
909
  }
790
- return _this.client.fetch({
910
+ return _this23.client.fetch({
791
911
  method: 'GET',
792
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/bootscripts`,
793
- urlParams: urlParams(['arch', request.arch], ['default', request.default], ['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize], ['public', request.public], ['title', request.title])
912
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this23.client.settings.defaultZone)}/bootscripts`,
913
+ urlParams: urlParams(['arch', request.arch], ['default', request.default], ['page', request.page], ['per_page', request.perPage ?? _this23.client.settings.defaultPageSize], ['public', request.public], ['title', request.title])
794
914
  }, unmarshalListBootscriptsResponse);
795
915
  };
796
- /**
797
- * List bootscripts.
798
- *
799
- * @deprecated
800
- * @param request - The request {@link ListBootscriptsRequest}
801
- * @returns A Promise of ListBootscriptsResponse
802
- */
803
- this.listBootscripts = function (request) {
916
+ })();
917
+
918
+ /**
919
+ * List bootscripts.
920
+ *
921
+ * @deprecated
922
+ * @param request - The request {@link ListBootscriptsRequest}
923
+ * @returns A Promise of ListBootscriptsResponse
924
+ */
925
+ listBootscripts = (() => {
926
+ var _this24 = this;
927
+ return function (request) {
804
928
  if (request === void 0) {
805
929
  request = {};
806
930
  }
807
- return enrichForPagination('bootscripts', _this.pageOfListBootscripts, request);
931
+ return enrichForPagination('bootscripts', _this24.pageOfListBootscripts, request);
808
932
  };
809
- /**
810
- * Get bootscripts. Get details of a bootscript with the specified ID.
811
- *
812
- * @deprecated
813
- * @param request - The request {@link GetBootscriptRequest}
814
- * @returns A Promise of GetBootscriptResponse
815
- */
816
- this.getBootscript = request => this.client.fetch({
817
- method: 'GET',
818
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/bootscripts/${validatePathParam('bootscriptId', request.bootscriptId)}`
819
- }, unmarshalGetBootscriptResponse);
820
- this.getDashboard = function (request) {
933
+ })();
934
+
935
+ /**
936
+ * Get bootscripts. Get details of a bootscript with the specified ID.
937
+ *
938
+ * @deprecated
939
+ * @param request - The request {@link GetBootscriptRequest}
940
+ * @returns A Promise of GetBootscriptResponse
941
+ */
942
+ getBootscript = request => this.client.fetch({
943
+ method: 'GET',
944
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/bootscripts/${validatePathParam('bootscriptId', request.bootscriptId)}`
945
+ }, unmarshalGetBootscriptResponse);
946
+ getDashboard = (() => {
947
+ var _this25 = this;
948
+ return function (request) {
821
949
  if (request === void 0) {
822
950
  request = {};
823
951
  }
824
- return _this.client.fetch({
952
+ return _this25.client.fetch({
825
953
  method: 'GET',
826
- path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/dashboard`,
954
+ path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this25.client.settings.defaultZone)}/dashboard`,
827
955
  urlParams: urlParams(['organization', request.organization], ['project', request.project])
828
956
  }, unmarshalGetDashboardResponse);
829
957
  };
830
- }
958
+ })();
831
959
  }
832
- /** Lists the available zones of the API. */
833
- API.LOCALITIES = ['fr-par-1', 'fr-par-2', 'fr-par-3', 'nl-ams-1', 'nl-ams-2', 'pl-waw-1', 'pl-waw-2'];
834
960
 
835
961
  export { API };