@scaleway/sdk 2.25.0 → 2.27.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/dist/api/account/index.cjs +6 -0
- package/dist/api/account/index.d.ts +2 -0
- package/dist/api/account/index.js +6 -4
- package/dist/api/account/v2/api.gen.cjs +116 -0
- package/dist/api/account/v2/api.gen.d.ts +67 -0
- package/dist/api/account/v2/api.gen.js +61 -44
- package/dist/api/account/v2/index.gen.cjs +4 -0
- package/dist/api/account/v2/index.gen.d.ts +2 -0
- package/dist/api/account/v2/index.gen.js +4 -4
- package/dist/api/account/v2/marshalling.gen.cjs +44 -0
- package/dist/api/account/v2/marshalling.gen.d.ts +6 -0
- package/dist/api/account/v2/marshalling.gen.js +18 -13
- package/dist/api/account/v2/types.gen.d.ts +62 -0
- package/dist/api/account/v3/api.gen.cjs +106 -0
- package/dist/api/account/v3/api.gen.d.ts +57 -0
- package/dist/api/account/v3/api.gen.js +61 -44
- package/dist/api/account/v3/index.gen.cjs +6 -0
- package/dist/api/account/v3/index.gen.d.ts +3 -0
- package/dist/api/account/v3/index.gen.js +6 -6
- package/dist/api/account/v3/marshalling.gen.cjs +44 -0
- package/dist/api/account/v3/marshalling.gen.d.ts +6 -0
- package/dist/api/account/v3/marshalling.gen.js +18 -13
- package/dist/api/account/v3/types.gen.d.ts +62 -0
- package/dist/api/account/v3/validation-rules.gen.cjs +39 -0
- package/dist/api/account/v3/validation-rules.gen.d.ts +34 -0
- package/dist/api/account/v3/validation-rules.gen.js +5 -5
- package/dist/api/applesilicon/index.cjs +4 -0
- package/dist/api/applesilicon/index.d.ts +1 -0
- package/dist/api/applesilicon/index.js +4 -2
- package/dist/api/applesilicon/v1alpha1/api.gen.cjs +222 -0
- package/dist/api/applesilicon/v1alpha1/api.gen.d.ts +119 -0
- package/dist/api/applesilicon/v1alpha1/api.gen.js +125 -83
- package/dist/api/applesilicon/v1alpha1/content.gen.cjs +11 -0
- package/dist/api/applesilicon/v1alpha1/content.gen.d.ts +3 -0
- package/dist/api/applesilicon/v1alpha1/content.gen.js +11 -7
- package/dist/api/applesilicon/v1alpha1/index.gen.cjs +6 -0
- package/dist/api/applesilicon/v1alpha1/index.gen.d.ts +3 -0
- package/dist/api/applesilicon/v1alpha1/index.gen.js +6 -5
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.cjs +147 -0
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.d.ts +11 -0
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +65 -31
- package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +203 -0
- package/dist/api/baremetal/index.cjs +4 -0
- package/dist/api/baremetal/index.d.ts +1 -0
- package/dist/api/baremetal/index.js +4 -2
- package/dist/api/baremetal/v1/api.gen.cjs +575 -0
- package/dist/api/baremetal/v1/api.gen.d.ts +287 -0
- package/dist/api/baremetal/v1/api.gen.js +353 -205
- package/dist/api/baremetal/v1/api.utils.cjs +36 -0
- package/dist/api/baremetal/v1/api.utils.d.ts +13 -0
- package/dist/api/baremetal/v1/api.utils.js +27 -18
- package/dist/api/baremetal/v1/content.gen.cjs +18 -0
- package/dist/api/baremetal/v1/content.gen.d.ts +7 -0
- package/dist/api/baremetal/v1/content.gen.js +18 -13
- package/dist/api/baremetal/v1/index.cjs +12 -0
- package/dist/api/baremetal/v1/index.d.ts +5 -0
- package/dist/api/baremetal/v1/index.gen.d.ts +4 -0
- package/dist/api/baremetal/v1/index.js +12 -5
- package/dist/api/baremetal/v1/marshalling.gen.cjs +502 -0
- package/dist/api/baremetal/v1/marshalling.gen.d.ts +30 -0
- package/dist/api/baremetal/v1/marshalling.gen.js +186 -90
- package/dist/api/baremetal/v1/types.gen.d.ts +682 -0
- package/dist/api/baremetal/v1/validation-rules.gen.cjs +116 -0
- package/dist/api/baremetal/v1/validation-rules.gen.d.ts +104 -0
- package/dist/api/baremetal/v1/validation-rules.gen.js +12 -5
- package/dist/api/billing/index.cjs +6 -0
- package/dist/api/billing/index.d.ts +2 -0
- package/dist/api/billing/index.js +6 -4
- package/dist/api/billing/v2alpha1/api.gen.cjs +92 -0
- package/dist/api/billing/v2alpha1/api.gen.d.ts +50 -0
- package/dist/api/billing/v2alpha1/api.gen.js +60 -39
- package/dist/api/billing/v2alpha1/index.gen.cjs +4 -0
- package/dist/api/billing/v2alpha1/index.gen.d.ts +2 -0
- package/dist/api/billing/v2alpha1/index.gen.js +4 -4
- package/dist/api/billing/v2alpha1/marshalling.gen.cjs +117 -0
- package/dist/api/billing/v2alpha1/marshalling.gen.d.ts +4 -0
- package/dist/api/billing/v2alpha1/marshalling.gen.js +48 -29
- package/dist/api/billing/v2alpha1/types.gen.d.ts +136 -0
- package/dist/api/billing/v2beta1/api.gen.cjs +175 -0
- package/dist/api/billing/v2beta1/api.gen.d.ts +79 -0
- package/dist/api/billing/v2beta1/api.gen.js +122 -65
- package/dist/api/billing/v2beta1/index.gen.cjs +4 -0
- package/dist/api/billing/v2beta1/index.gen.d.ts +2 -0
- package/dist/api/billing/v2beta1/index.gen.js +4 -4
- package/dist/api/billing/v2beta1/marshalling.gen.cjs +158 -0
- package/dist/api/billing/v2beta1/marshalling.gen.d.ts +6 -0
- package/dist/api/billing/v2beta1/marshalling.gen.js +61 -36
- package/dist/api/billing/v2beta1/types.gen.d.ts +269 -0
- package/dist/api/block/index.cjs +4 -0
- package/dist/api/block/index.d.ts +1 -0
- package/dist/api/block/index.js +4 -2
- package/dist/api/block/v1alpha1/api.gen.cjs +272 -0
- package/dist/api/block/v1alpha1/api.gen.d.ts +144 -0
- package/dist/api/block/v1alpha1/api.gen.js +167 -90
- package/dist/api/block/v1alpha1/content.gen.cjs +20 -0
- package/dist/api/block/v1alpha1/content.gen.d.ts +7 -0
- package/dist/api/block/v1alpha1/content.gen.js +20 -13
- package/dist/api/block/v1alpha1/index.gen.cjs +10 -0
- package/dist/api/block/v1alpha1/index.gen.d.ts +4 -0
- package/dist/api/block/v1alpha1/index.gen.js +10 -7
- package/dist/api/block/v1alpha1/marshalling.gen.cjs +194 -0
- package/dist/api/block/v1alpha1/marshalling.gen.d.ts +13 -0
- package/dist/api/block/v1alpha1/marshalling.gen.js +78 -42
- package/dist/api/block/v1alpha1/types.gen.d.ts +315 -0
- package/dist/api/block/v1alpha1/validation-rules.gen.cjs +56 -0
- package/dist/api/block/v1alpha1/validation-rules.gen.d.ts +47 -0
- package/dist/api/block/v1alpha1/validation-rules.gen.js +14 -5
- package/dist/api/cockpit/index.cjs +6 -0
- package/dist/api/cockpit/index.d.ts +2 -0
- package/dist/api/cockpit/index.js +6 -4
- package/dist/api/cockpit/v1/api.gen.cjs +629 -0
- package/dist/api/cockpit/v1/api.gen.d.ts +310 -0
- package/dist/api/cockpit/v1/api.gen.js +374 -201
- package/dist/api/cockpit/v1/index.gen.cjs +7 -0
- package/dist/api/cockpit/v1/index.gen.d.ts +3 -0
- package/dist/api/cockpit/v1/index.gen.js +7 -6
- package/dist/api/cockpit/v1/marshalling.gen.cjs +325 -0
- package/dist/api/cockpit/v1/marshalling.gen.d.ts +30 -0
- package/dist/api/cockpit/v1/marshalling.gen.js +131 -59
- package/dist/api/cockpit/v1/types.gen.d.ts +525 -0
- package/dist/api/cockpit/v1/validation-rules.gen.cjs +48 -0
- package/dist/api/cockpit/v1/validation-rules.gen.d.ts +41 -0
- package/dist/api/cockpit/v1/validation-rules.gen.js +10 -8
- package/dist/api/cockpit/v1beta1/api.gen.cjs +484 -0
- package/dist/api/cockpit/v1beta1/api.gen.d.ts +224 -0
- package/dist/api/cockpit/v1beta1/api.gen.js +298 -167
- package/dist/api/cockpit/v1beta1/content.gen.cjs +8 -0
- package/dist/api/cockpit/v1beta1/content.gen.d.ts +3 -0
- package/dist/api/cockpit/v1beta1/content.gen.js +8 -7
- package/dist/api/cockpit/v1beta1/index.gen.cjs +6 -0
- package/dist/api/cockpit/v1beta1/index.gen.d.ts +3 -0
- package/dist/api/cockpit/v1beta1/index.gen.js +6 -5
- package/dist/api/cockpit/v1beta1/marshalling.gen.cjs +343 -0
- package/dist/api/cockpit/v1beta1/marshalling.gen.d.ts +29 -0
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +131 -60
- package/dist/api/cockpit/v1beta1/types.gen.d.ts +385 -0
- package/dist/api/container/index.cjs +4 -0
- package/dist/api/container/index.d.ts +1 -0
- package/dist/api/container/index.js +4 -2
- package/dist/api/container/v1beta1/api.gen.cjs +621 -0
- package/dist/api/container/v1beta1/api.gen.d.ts +300 -0
- package/dist/api/container/v1beta1/api.gen.js +384 -228
- package/dist/api/container/v1beta1/content.gen.cjs +34 -0
- package/dist/api/container/v1beta1/content.gen.d.ts +13 -0
- package/dist/api/container/v1beta1/content.gen.js +34 -22
- package/dist/api/container/v1beta1/index.gen.cjs +13 -0
- package/dist/api/container/v1beta1/index.gen.d.ts +4 -0
- package/dist/api/container/v1beta1/index.gen.js +13 -7
- package/dist/api/container/v1beta1/marshalling.gen.cjs +408 -0
- package/dist/api/container/v1beta1/marshalling.gen.d.ts +24 -0
- package/dist/api/container/v1beta1/marshalling.gen.js +147 -71
- package/dist/api/container/v1beta1/types.gen.d.ts +785 -0
- package/dist/api/container/v1beta1/validation-rules.gen.cjs +45 -0
- package/dist/api/container/v1beta1/validation-rules.gen.d.ts +39 -0
- package/dist/api/container/v1beta1/validation-rules.gen.js +6 -5
- package/dist/api/dedibox/index.cjs +4 -0
- package/dist/api/dedibox/index.d.ts +1 -0
- package/dist/api/dedibox/index.js +4 -2
- package/dist/api/dedibox/v1/api.gen.cjs +1460 -0
- package/dist/api/dedibox/v1/api.gen.d.ts +560 -0
- package/dist/api/dedibox/v1/api.gen.js +1051 -565
- package/dist/api/dedibox/v1/content.gen.cjs +49 -0
- package/dist/api/dedibox/v1/content.gen.d.ts +19 -0
- package/dist/api/dedibox/v1/content.gen.js +49 -31
- package/dist/api/dedibox/v1/index.gen.cjs +22 -0
- package/dist/api/dedibox/v1/index.gen.d.ts +4 -0
- package/dist/api/dedibox/v1/index.gen.js +22 -7
- package/dist/api/dedibox/v1/marshalling.gen.cjs +1475 -0
- package/dist/api/dedibox/v1/marshalling.gen.d.ts +82 -0
- package/dist/api/dedibox/v1/marshalling.gen.js +514 -237
- package/dist/api/dedibox/v1/types.gen.d.ts +1900 -0
- package/dist/api/dedibox/v1/validation-rules.gen.cjs +626 -0
- package/dist/api/dedibox/v1/validation-rules.gen.d.ts +539 -0
- package/dist/api/dedibox/v1/validation-rules.gen.js +87 -5
- package/dist/api/document_db/index.cjs +4 -0
- package/dist/api/document_db/index.d.ts +1 -0
- package/dist/api/document_db/index.js +4 -2
- package/dist/api/document_db/v1beta1/api.gen.cjs +1018 -0
- package/dist/api/document_db/v1beta1/api.gen.d.ts +538 -0
- package/dist/api/document_db/v1beta1/api.gen.js +561 -339
- package/dist/api/document_db/v1beta1/content.gen.cjs +31 -0
- package/dist/api/document_db/v1beta1/content.gen.d.ts +11 -0
- package/dist/api/document_db/v1beta1/content.gen.js +31 -19
- package/dist/api/document_db/v1beta1/index.gen.cjs +12 -0
- package/dist/api/document_db/v1beta1/index.gen.d.ts +4 -0
- package/dist/api/document_db/v1beta1/index.gen.js +12 -7
- package/dist/api/document_db/v1beta1/marshalling.gen.cjs +829 -0
- package/dist/api/document_db/v1beta1/marshalling.gen.d.ts +50 -0
- package/dist/api/document_db/v1beta1/marshalling.gen.js +354 -181
- package/dist/api/document_db/v1beta1/types.gen.d.ts +1254 -0
- package/dist/api/document_db/v1beta1/validation-rules.gen.cjs +8 -0
- package/dist/api/document_db/v1beta1/validation-rules.gen.d.ts +5 -0
- package/dist/api/document_db/v1beta1/validation-rules.gen.js +3 -5
- package/dist/api/domain/index.cjs +4 -0
- package/dist/api/domain/index.d.ts +1 -0
- package/dist/api/domain/index.js +4 -2
- package/dist/api/domain/v2beta1/api.gen.cjs +1052 -0
- package/dist/api/domain/v2beta1/api.gen.d.ts +521 -0
- package/dist/api/domain/v2beta1/api.gen.js +638 -365
- package/dist/api/domain/v2beta1/content.gen.cjs +29 -0
- package/dist/api/domain/v2beta1/content.gen.d.ts +18 -0
- package/dist/api/domain/v2beta1/content.gen.js +29 -28
- package/dist/api/domain/v2beta1/index.gen.cjs +13 -0
- package/dist/api/domain/v2beta1/index.gen.d.ts +3 -0
- package/dist/api/domain/v2beta1/index.gen.js +13 -5
- package/dist/api/domain/v2beta1/marshalling.gen.cjs +1472 -0
- package/dist/api/domain/v2beta1/marshalling.gen.d.ts +59 -0
- package/dist/api/domain/v2beta1/marshalling.gen.js +676 -383
- package/dist/api/domain/v2beta1/types.gen.d.ts +1073 -0
- package/dist/api/flexibleip/index.cjs +4 -0
- package/dist/api/flexibleip/index.d.ts +1 -0
- package/dist/api/flexibleip/index.js +4 -2
- package/dist/api/flexibleip/v1alpha1/api.gen.cjs +227 -0
- package/dist/api/flexibleip/v1alpha1/api.gen.d.ts +117 -0
- package/dist/api/flexibleip/v1alpha1/api.gen.js +134 -86
- package/dist/api/flexibleip/v1alpha1/content.gen.cjs +12 -0
- package/dist/api/flexibleip/v1alpha1/content.gen.d.ts +5 -0
- package/dist/api/flexibleip/v1alpha1/content.gen.js +12 -10
- package/dist/api/flexibleip/v1alpha1/index.gen.cjs +9 -0
- package/dist/api/flexibleip/v1alpha1/index.gen.d.ts +4 -0
- package/dist/api/flexibleip/v1alpha1/index.gen.js +9 -7
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.cjs +115 -0
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.d.ts +13 -0
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +36 -18
- package/dist/api/flexibleip/v1alpha1/types.gen.d.ts +196 -0
- package/dist/api/flexibleip/v1alpha1/validation-rules.gen.cjs +12 -0
- package/dist/api/flexibleip/v1alpha1/validation-rules.gen.d.ts +9 -0
- package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +3 -5
- package/dist/api/function/index.cjs +4 -0
- package/dist/api/function/index.d.ts +1 -0
- package/dist/api/function/index.js +4 -2
- package/dist/api/function/v1beta1/api.gen.cjs +666 -0
- package/dist/api/function/v1beta1/api.gen.d.ts +326 -0
- package/dist/api/function/v1beta1/api.gen.js +406 -244
- package/dist/api/function/v1beta1/content.gen.cjs +34 -0
- package/dist/api/function/v1beta1/content.gen.d.ts +13 -0
- package/dist/api/function/v1beta1/content.gen.js +34 -22
- package/dist/api/function/v1beta1/index.gen.cjs +13 -0
- package/dist/api/function/v1beta1/index.gen.d.ts +4 -0
- package/dist/api/function/v1beta1/index.gen.js +13 -7
- package/dist/api/function/v1beta1/marshalling.gen.cjs +457 -0
- package/dist/api/function/v1beta1/marshalling.gen.d.ts +27 -0
- package/dist/api/function/v1beta1/marshalling.gen.js +167 -80
- package/dist/api/function/v1beta1/types.gen.d.ts +819 -0
- package/dist/api/function/v1beta1/validation-rules.gen.cjs +45 -0
- package/dist/api/function/v1beta1/validation-rules.gen.d.ts +39 -0
- package/dist/api/function/v1beta1/validation-rules.gen.js +6 -5
- package/dist/api/iam/index.cjs +4 -0
- package/dist/api/iam/index.d.ts +1 -0
- package/dist/api/iam/index.js +4 -2
- package/dist/api/iam/v1alpha1/api.gen.cjs +951 -0
- package/dist/api/iam/v1alpha1/api.gen.d.ts +475 -0
- package/dist/api/iam/v1alpha1/api.gen.js +560 -302
- package/dist/api/iam/v1alpha1/index.gen.cjs +6 -0
- package/dist/api/iam/v1alpha1/index.gen.d.ts +3 -0
- package/dist/api/iam/v1alpha1/index.gen.js +6 -6
- package/dist/api/iam/v1alpha1/marshalling.gen.cjs +504 -0
- package/dist/api/iam/v1alpha1/marshalling.gen.d.ts +42 -0
- package/dist/api/iam/v1alpha1/marshalling.gen.js +184 -119
- package/dist/api/iam/v1alpha1/types.gen.d.ts +886 -0
- package/dist/api/iam/v1alpha1/validation-rules.gen.cjs +235 -0
- package/dist/api/iam/v1alpha1/validation-rules.gen.d.ts +211 -0
- package/dist/api/iam/v1alpha1/validation-rules.gen.js +29 -10
- package/dist/api/index.d.ts +34 -0
- package/dist/api/instance/index.cjs +4 -0
- package/dist/api/instance/index.d.ts +1 -0
- package/dist/api/instance/index.js +4 -2
- package/dist/api/instance/v1/api.gen.cjs +1178 -0
- package/dist/api/instance/v1/api.gen.d.ts +528 -0
- package/dist/api/instance/v1/api.gen.js +763 -445
- package/dist/api/instance/v1/api.utils.cjs +279 -0
- package/dist/api/instance/v1/api.utils.d.ts +95 -0
- package/dist/api/instance/v1/api.utils.js +145 -109
- package/dist/api/instance/v1/content.gen.cjs +44 -0
- package/dist/api/instance/v1/content.gen.d.ts +21 -0
- package/dist/api/instance/v1/content.gen.js +44 -34
- package/dist/api/instance/v1/index.cjs +15 -0
- package/dist/api/instance/v1/index.d.ts +4 -0
- package/dist/api/instance/v1/index.gen.d.ts +4 -0
- package/dist/api/instance/v1/index.js +15 -2
- package/dist/api/instance/v1/marshalling.gen.cjs +1813 -0
- package/dist/api/instance/v1/marshalling.gen.d.ts +95 -0
- package/dist/api/instance/v1/marshalling.gen.js +736 -412
- package/dist/api/instance/v1/marshalling.utils.d.ts +3 -0
- package/dist/api/instance/v1/types.gen.d.ts +1818 -0
- package/dist/api/instance/v1/types.private.gen.d.ts +167 -0
- package/dist/api/instance/v1/types.utils.d.ts +35 -0
- package/dist/api/instance/v1/validation-rules.gen.d.ts +10 -0
- package/dist/api/iot/index.cjs +4 -0
- package/dist/api/iot/index.d.ts +1 -0
- package/dist/api/iot/index.js +4 -2
- package/dist/api/iot/v1/api.gen.cjs +621 -0
- package/dist/api/iot/v1/api.gen.d.ts +325 -0
- package/dist/api/iot/v1/api.gen.js +350 -238
- package/dist/api/iot/v1/content.gen.cjs +4 -0
- package/dist/api/iot/v1/content.gen.d.ts +3 -0
- package/dist/api/iot/v1/content.gen.js +4 -7
- package/dist/api/iot/v1/index.gen.cjs +6 -0
- package/dist/api/iot/v1/index.gen.d.ts +3 -0
- package/dist/api/iot/v1/index.gen.js +6 -5
- package/dist/api/iot/v1/marshalling.gen.cjs +534 -0
- package/dist/api/iot/v1/marshalling.gen.d.ts +31 -0
- package/dist/api/iot/v1/marshalling.gen.js +209 -114
- package/dist/api/iot/v1/types.gen.d.ts +916 -0
- package/dist/api/ipam/index.cjs +4 -0
- package/dist/api/ipam/index.d.ts +1 -0
- package/dist/api/ipam/index.js +4 -2
- package/dist/api/ipam/v1/api.gen.cjs +115 -0
- package/dist/api/ipam/v1/api.gen.d.ts +57 -0
- package/dist/api/ipam/v1/api.gen.js +73 -55
- package/dist/api/ipam/v1/index.gen.cjs +6 -0
- package/dist/api/ipam/v1/index.gen.d.ts +3 -0
- package/dist/api/ipam/v1/index.gen.js +6 -6
- package/dist/api/ipam/v1/marshalling.gen.cjs +98 -0
- package/dist/api/ipam/v1/marshalling.gen.d.ts +6 -0
- package/dist/api/ipam/v1/marshalling.gen.js +35 -29
- package/dist/api/ipam/v1/types.gen.d.ts +198 -0
- package/dist/api/ipam/v1/validation-rules.gen.cjs +9 -0
- package/dist/api/ipam/v1/validation-rules.gen.d.ts +6 -0
- package/dist/api/ipam/v1/validation-rules.gen.js +3 -5
- package/dist/api/ipfs/index.cjs +4 -0
- package/dist/api/ipfs/index.d.ts +1 -0
- package/dist/api/ipfs/index.js +4 -2
- package/dist/api/ipfs/v1alpha1/api.gen.cjs +374 -0
- package/dist/api/ipfs/v1alpha1/api.gen.d.ts +198 -0
- package/dist/api/ipfs/v1alpha1/api.gen.js +210 -133
- package/dist/api/ipfs/v1alpha1/content.gen.cjs +6 -0
- package/dist/api/ipfs/v1alpha1/content.gen.d.ts +5 -0
- package/dist/api/ipfs/v1alpha1/content.gen.js +6 -10
- package/dist/api/ipfs/v1alpha1/index.gen.cjs +8 -0
- package/dist/api/ipfs/v1alpha1/index.gen.d.ts +3 -0
- package/dist/api/ipfs/v1alpha1/index.gen.js +8 -5
- package/dist/api/ipfs/v1alpha1/marshalling.gen.cjs +208 -0
- package/dist/api/ipfs/v1alpha1/marshalling.gen.d.ts +18 -0
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +68 -33
- package/dist/api/ipfs/v1alpha1/types.gen.d.ts +317 -0
- package/dist/api/jobs/index.cjs +4 -0
- package/dist/api/jobs/index.d.ts +1 -0
- package/dist/api/jobs/index.js +4 -2
- package/dist/api/jobs/v1alpha1/api.gen.cjs +170 -0
- package/dist/api/jobs/v1alpha1/api.gen.d.ts +80 -0
- package/dist/api/jobs/v1alpha1/api.gen.js +109 -69
- package/dist/api/jobs/v1alpha1/content.gen.cjs +8 -0
- package/dist/api/jobs/v1alpha1/content.gen.d.ts +3 -0
- package/dist/api/jobs/v1alpha1/content.gen.js +8 -7
- package/dist/api/jobs/v1alpha1/index.gen.cjs +8 -0
- package/dist/api/jobs/v1alpha1/index.gen.d.ts +4 -0
- package/dist/api/jobs/v1alpha1/index.gen.js +8 -7
- package/dist/api/jobs/v1alpha1/marshalling.gen.cjs +150 -0
- package/dist/api/jobs/v1alpha1/marshalling.gen.d.ts +10 -0
- package/dist/api/jobs/v1alpha1/marshalling.gen.js +50 -26
- package/dist/api/jobs/v1alpha1/types.gen.d.ts +210 -0
- package/dist/api/jobs/v1alpha1/validation-rules.gen.cjs +97 -0
- package/dist/api/jobs/v1alpha1/validation-rules.gen.d.ts +87 -0
- package/dist/api/jobs/v1alpha1/validation-rules.gen.js +12 -7
- package/dist/api/k8s/index.cjs +4 -0
- package/dist/api/k8s/index.d.ts +1 -0
- package/dist/api/k8s/index.js +4 -2
- package/dist/api/k8s/v1/api.gen.cjs +550 -0
- package/dist/api/k8s/v1/api.gen.d.ts +280 -0
- package/dist/api/k8s/v1/api.gen.js +324 -188
- package/dist/api/k8s/v1/api.utils.cjs +13 -0
- package/dist/api/k8s/v1/api.utils.d.ts +11 -0
- package/dist/api/k8s/v1/api.utils.js +5 -5
- package/dist/api/k8s/v1/content.gen.cjs +23 -0
- package/dist/api/k8s/v1/content.gen.d.ts +7 -0
- package/dist/api/k8s/v1/content.gen.js +23 -13
- package/dist/api/k8s/v1/index.cjs +10 -0
- package/dist/api/k8s/v1/index.d.ts +4 -0
- package/dist/api/k8s/v1/index.gen.d.ts +4 -0
- package/dist/api/k8s/v1/index.js +10 -4
- package/dist/api/k8s/v1/marshalling.gen.cjs +510 -0
- package/dist/api/k8s/v1/marshalling.gen.d.ts +22 -0
- package/dist/api/k8s/v1/marshalling.gen.js +158 -79
- package/dist/api/k8s/v1/types.gen.d.ts +1123 -0
- package/dist/api/k8s/v1/validation-rules.gen.cjs +110 -0
- package/dist/api/k8s/v1/validation-rules.gen.d.ts +96 -0
- package/dist/api/k8s/v1/validation-rules.gen.js +14 -5
- package/dist/api/lb/index.cjs +4 -0
- package/dist/api/lb/index.d.ts +1 -0
- package/dist/api/lb/index.js +4 -2
- package/dist/api/lb/v1/api.gen.cjs +1984 -0
- package/dist/api/lb/v1/api.gen.d.ts +990 -0
- package/dist/api/lb/v1/api.gen.js +1186 -695
- package/dist/api/lb/v1/api.utils.cjs +116 -0
- package/dist/api/lb/v1/api.utils.d.ts +41 -0
- package/dist/api/lb/v1/api.utils.js +83 -48
- package/dist/api/lb/v1/content.gen.cjs +22 -0
- package/dist/api/lb/v1/content.gen.d.ts +9 -0
- package/dist/api/lb/v1/content.gen.js +22 -16
- package/dist/api/lb/v1/index.cjs +10 -0
- package/dist/api/lb/v1/index.d.ts +4 -0
- package/dist/api/lb/v1/index.gen.d.ts +3 -0
- package/dist/api/lb/v1/index.js +10 -2
- package/dist/api/lb/v1/marshalling.gen.cjs +1289 -0
- package/dist/api/lb/v1/marshalling.gen.d.ts +73 -0
- package/dist/api/lb/v1/marshalling.gen.js +576 -334
- package/dist/api/lb/v1/types.gen.d.ts +2729 -0
- package/dist/api/lb/v1/types.utils.d.ts +13 -0
- package/dist/api/llm_inference/index.cjs +4 -0
- package/dist/api/llm_inference/index.d.ts +1 -0
- package/dist/api/llm_inference/index.js +4 -2
- package/dist/api/llm_inference/v1beta1/api.gen.cjs +305 -0
- package/dist/api/llm_inference/v1beta1/api.gen.d.ts +147 -0
- package/dist/api/llm_inference/v1beta1/api.gen.js +192 -120
- package/dist/api/llm_inference/v1beta1/content.gen.cjs +8 -0
- package/dist/api/llm_inference/v1beta1/content.gen.d.ts +3 -0
- package/dist/api/llm_inference/v1beta1/content.gen.js +8 -7
- package/dist/api/llm_inference/v1beta1/index.gen.cjs +8 -0
- package/dist/api/llm_inference/v1beta1/index.gen.d.ts +4 -0
- package/dist/api/llm_inference/v1beta1/index.gen.js +8 -7
- package/dist/api/llm_inference/v1beta1/marshalling.gen.cjs +271 -0
- package/dist/api/llm_inference/v1beta1/marshalling.gen.d.ts +18 -0
- package/dist/api/llm_inference/v1beta1/marshalling.gen.js +98 -52
- package/dist/api/llm_inference/v1beta1/types.gen.d.ts +433 -0
- package/dist/api/llm_inference/v1beta1/validation-rules.gen.cjs +56 -0
- package/dist/api/llm_inference/v1beta1/validation-rules.gen.d.ts +50 -0
- package/dist/api/llm_inference/v1beta1/validation-rules.gen.js +6 -5
- package/dist/api/marketplace/index.cjs +4 -0
- package/dist/api/marketplace/index.d.ts +1 -0
- package/dist/api/marketplace/index.js +4 -2
- package/dist/api/marketplace/v2/api.gen.cjs +174 -0
- package/dist/api/marketplace/v2/api.gen.d.ts +90 -0
- package/dist/api/marketplace/v2/api.gen.js +111 -67
- package/dist/api/marketplace/v2/index.gen.cjs +4 -0
- package/dist/api/marketplace/v2/index.gen.d.ts +2 -0
- package/dist/api/marketplace/v2/index.gen.js +4 -4
- package/dist/api/marketplace/v2/marshalling.gen.cjs +115 -0
- package/dist/api/marketplace/v2/marshalling.gen.d.ts +9 -0
- package/dist/api/marketplace/v2/marshalling.gen.js +44 -23
- package/dist/api/marketplace/v2/types.gen.d.ts +135 -0
- package/dist/api/mnq/index.cjs +4 -0
- package/dist/api/mnq/index.d.ts +1 -0
- package/dist/api/mnq/index.js +4 -2
- package/dist/api/mnq/v1beta1/api.gen.cjs +500 -0
- package/dist/api/mnq/v1beta1/api.gen.d.ts +265 -0
- package/dist/api/mnq/v1beta1/api.gen.js +291 -184
- package/dist/api/mnq/v1beta1/index.gen.cjs +8 -0
- package/dist/api/mnq/v1beta1/index.gen.d.ts +3 -0
- package/dist/api/mnq/v1beta1/index.gen.js +8 -6
- package/dist/api/mnq/v1beta1/marshalling.gen.cjs +268 -0
- package/dist/api/mnq/v1beta1/marshalling.gen.d.ts +23 -0
- package/dist/api/mnq/v1beta1/marshalling.gen.js +105 -49
- package/dist/api/mnq/v1beta1/types.gen.d.ts +449 -0
- package/dist/api/mnq/v1beta1/validation-rules.gen.cjs +85 -0
- package/dist/api/mnq/v1beta1/validation-rules.gen.d.ts +72 -0
- package/dist/api/mnq/v1beta1/validation-rules.gen.js +13 -5
- package/dist/api/rdb/index.cjs +4 -0
- package/dist/api/rdb/index.d.ts +1 -0
- package/dist/api/rdb/index.js +4 -2
- package/dist/api/rdb/v1/api.gen.cjs +1192 -0
- package/dist/api/rdb/v1/api.gen.d.ts +626 -0
- package/dist/api/rdb/v1/api.gen.js +660 -393
- package/dist/api/rdb/v1/content.gen.cjs +38 -0
- package/dist/api/rdb/v1/content.gen.d.ts +13 -0
- package/dist/api/rdb/v1/content.gen.js +38 -22
- package/dist/api/rdb/v1/index.gen.cjs +13 -0
- package/dist/api/rdb/v1/index.gen.d.ts +4 -0
- package/dist/api/rdb/v1/index.gen.js +13 -7
- package/dist/api/rdb/v1/marshalling.gen.cjs +908 -0
- package/dist/api/rdb/v1/marshalling.gen.d.ts +59 -0
- package/dist/api/rdb/v1/marshalling.gen.js +385 -191
- package/dist/api/rdb/v1/types.gen.d.ts +1404 -0
- package/dist/api/rdb/v1/validation-rules.gen.cjs +8 -0
- package/dist/api/rdb/v1/validation-rules.gen.d.ts +5 -0
- package/dist/api/rdb/v1/validation-rules.gen.js +3 -5
- package/dist/api/redis/index.cjs +4 -0
- package/dist/api/redis/index.d.ts +1 -0
- package/dist/api/redis/index.js +4 -2
- package/dist/api/redis/v1/api.gen.cjs +476 -0
- package/dist/api/redis/v1/api.gen.d.ts +249 -0
- package/dist/api/redis/v1/api.gen.js +265 -162
- package/dist/api/redis/v1/content.gen.cjs +10 -0
- package/dist/api/redis/v1/content.gen.d.ts +3 -0
- package/dist/api/redis/v1/content.gen.js +10 -7
- package/dist/api/redis/v1/index.gen.cjs +6 -0
- package/dist/api/redis/v1/index.gen.d.ts +3 -0
- package/dist/api/redis/v1/index.gen.js +6 -5
- package/dist/api/redis/v1/marshalling.gen.cjs +355 -0
- package/dist/api/redis/v1/marshalling.gen.d.ts +24 -0
- package/dist/api/redis/v1/marshalling.gen.js +156 -84
- package/dist/api/redis/v1/types.gen.d.ts +473 -0
- package/dist/api/registry/index.cjs +4 -0
- package/dist/api/registry/index.d.ts +1 -0
- package/dist/api/registry/index.js +4 -2
- package/dist/api/registry/v1/api.gen.cjs +287 -0
- package/dist/api/registry/v1/api.gen.d.ts +156 -0
- package/dist/api/registry/v1/api.gen.js +161 -94
- package/dist/api/registry/v1/content.gen.cjs +8 -0
- package/dist/api/registry/v1/content.gen.d.ts +7 -0
- package/dist/api/registry/v1/content.gen.js +8 -13
- package/dist/api/registry/v1/index.gen.cjs +8 -0
- package/dist/api/registry/v1/index.gen.d.ts +3 -0
- package/dist/api/registry/v1/index.gen.js +8 -5
- package/dist/api/registry/v1/marshalling.gen.cjs +129 -0
- package/dist/api/registry/v1/marshalling.gen.d.ts +11 -0
- package/dist/api/registry/v1/marshalling.gen.js +51 -30
- package/dist/api/registry/v1/types.gen.d.ts +300 -0
- package/dist/api/secret/index.cjs +6 -0
- package/dist/api/secret/index.d.ts +2 -0
- package/dist/api/secret/index.js +6 -4
- package/dist/api/secret/v1alpha1/api.gen.cjs +483 -0
- package/dist/api/secret/v1alpha1/api.gen.d.ts +261 -0
- package/dist/api/secret/v1alpha1/api.gen.js +271 -176
- package/dist/api/secret/v1alpha1/index.gen.cjs +4 -0
- package/dist/api/secret/v1alpha1/index.gen.d.ts +2 -0
- package/dist/api/secret/v1alpha1/index.gen.js +4 -4
- package/dist/api/secret/v1alpha1/marshalling.gen.cjs +221 -0
- package/dist/api/secret/v1alpha1/marshalling.gen.d.ts +19 -0
- package/dist/api/secret/v1alpha1/marshalling.gen.js +67 -33
- package/dist/api/secret/v1alpha1/types.gen.d.ts +619 -0
- package/dist/api/secret/v1beta1/api.gen.cjs +359 -0
- package/dist/api/secret/v1beta1/api.gen.d.ts +181 -0
- package/dist/api/secret/v1beta1/api.gen.js +213 -135
- package/dist/api/secret/v1beta1/index.gen.cjs +6 -0
- package/dist/api/secret/v1beta1/index.gen.d.ts +3 -0
- package/dist/api/secret/v1beta1/index.gen.js +6 -6
- package/dist/api/secret/v1beta1/marshalling.gen.cjs +219 -0
- package/dist/api/secret/v1beta1/marshalling.gen.d.ts +14 -0
- package/dist/api/secret/v1beta1/marshalling.gen.js +76 -40
- package/dist/api/secret/v1beta1/types.gen.d.ts +513 -0
- package/dist/api/secret/v1beta1/validation-rules.gen.cjs +8 -0
- package/dist/api/secret/v1beta1/validation-rules.gen.d.ts +5 -0
- package/dist/api/secret/v1beta1/validation-rules.gen.js +3 -5
- package/dist/api/serverless_sqldb/index.cjs +4 -0
- package/dist/api/serverless_sqldb/index.d.ts +1 -0
- package/dist/api/serverless_sqldb/index.js +4 -2
- package/dist/api/serverless_sqldb/v1alpha1/api.gen.cjs +202 -0
- package/dist/api/serverless_sqldb/v1alpha1/api.gen.d.ts +109 -0
- package/dist/api/serverless_sqldb/v1alpha1/api.gen.js +118 -78
- package/dist/api/serverless_sqldb/v1alpha1/content.gen.cjs +8 -0
- package/dist/api/serverless_sqldb/v1alpha1/content.gen.d.ts +3 -0
- package/dist/api/serverless_sqldb/v1alpha1/content.gen.js +8 -7
- package/dist/api/serverless_sqldb/v1alpha1/index.gen.cjs +8 -0
- package/dist/api/serverless_sqldb/v1alpha1/index.gen.d.ts +4 -0
- package/dist/api/serverless_sqldb/v1alpha1/index.gen.js +8 -7
- package/dist/api/serverless_sqldb/v1alpha1/marshalling.gen.cjs +89 -0
- package/dist/api/serverless_sqldb/v1alpha1/marshalling.gen.d.ts +9 -0
- package/dist/api/serverless_sqldb/v1alpha1/marshalling.gen.js +27 -15
- package/dist/api/serverless_sqldb/v1alpha1/types.gen.d.ts +193 -0
- package/dist/api/serverless_sqldb/v1alpha1/validation-rules.gen.cjs +62 -0
- package/dist/api/serverless_sqldb/v1alpha1/validation-rules.gen.d.ts +55 -0
- package/dist/api/serverless_sqldb/v1alpha1/validation-rules.gen.js +9 -7
- package/dist/api/std/index.gen.cjs +1 -0
- package/dist/api/std/index.gen.d.ts +1 -0
- package/dist/api/std/types.gen.d.ts +1 -0
- package/dist/api/tem/index.cjs +4 -0
- package/dist/api/tem/index.d.ts +1 -0
- package/dist/api/tem/index.js +4 -2
- package/dist/api/tem/v1alpha1/api.gen.cjs +260 -0
- package/dist/api/tem/v1alpha1/api.gen.d.ts +130 -0
- package/dist/api/tem/v1alpha1/api.gen.js +154 -89
- package/dist/api/tem/v1alpha1/content.gen.cjs +6 -0
- package/dist/api/tem/v1alpha1/content.gen.d.ts +5 -0
- package/dist/api/tem/v1alpha1/content.gen.js +6 -10
- package/dist/api/tem/v1alpha1/index.gen.cjs +7 -0
- package/dist/api/tem/v1alpha1/index.gen.d.ts +3 -0
- package/dist/api/tem/v1alpha1/index.gen.js +7 -5
- package/dist/api/tem/v1alpha1/marshalling.gen.cjs +255 -0
- package/dist/api/tem/v1alpha1/marshalling.gen.d.ts +11 -0
- package/dist/api/tem/v1alpha1/marshalling.gen.js +90 -50
- package/dist/api/tem/v1alpha1/types.gen.d.ts +401 -0
- package/dist/api/test/index.cjs +4 -0
- package/dist/api/test/index.d.ts +1 -0
- package/dist/api/test/index.js +4 -2
- package/dist/api/test/v1/api.gen.cjs +164 -0
- package/dist/api/test/v1/api.gen.d.ts +84 -0
- package/dist/api/test/v1/api.gen.js +99 -71
- package/dist/api/test/v1/content.gen.cjs +4 -0
- package/dist/api/test/v1/content.gen.d.ts +3 -0
- package/dist/api/test/v1/content.gen.js +4 -7
- package/dist/api/test/v1/index.gen.cjs +6 -0
- package/dist/api/test/v1/index.gen.d.ts +3 -0
- package/dist/api/test/v1/index.gen.js +6 -5
- package/dist/api/test/v1/marshalling.gen.cjs +93 -0
- package/dist/api/test/v1/marshalling.gen.d.ts +8 -0
- package/dist/api/test/v1/marshalling.gen.js +34 -22
- package/dist/api/test/v1/types.gen.d.ts +91 -0
- package/dist/api/vpc/index.cjs +6 -0
- package/dist/api/vpc/index.d.ts +2 -0
- package/dist/api/vpc/index.js +6 -4
- package/dist/api/vpc/v1/api.gen.cjs +119 -0
- package/dist/api/vpc/v1/api.gen.d.ts +54 -0
- package/dist/api/vpc/v1/api.gen.js +76 -43
- package/dist/api/vpc/v1/index.gen.cjs +4 -0
- package/dist/api/vpc/v1/index.gen.d.ts +2 -0
- package/dist/api/vpc/v1/index.gen.js +4 -4
- package/dist/api/vpc/v1/marshalling.gen.cjs +52 -0
- package/dist/api/vpc/v1/marshalling.gen.d.ts +6 -0
- package/dist/api/vpc/v1/marshalling.gen.js +22 -14
- package/dist/api/vpc/v1/types.gen.d.ts +99 -0
- package/dist/api/vpc/v2/api.gen.cjs +303 -0
- package/dist/api/vpc/v2/api.gen.d.ts +144 -0
- package/dist/api/vpc/v2/api.gen.js +181 -112
- package/dist/api/vpc/v2/index.gen.cjs +4 -0
- package/dist/api/vpc/v2/index.gen.d.ts +2 -0
- package/dist/api/vpc/v2/index.gen.js +4 -4
- package/dist/api/vpc/v2/marshalling.gen.cjs +173 -0
- package/dist/api/vpc/v2/marshalling.gen.d.ts +17 -0
- package/dist/api/vpc/v2/marshalling.gen.js +70 -36
- package/dist/api/vpc/v2/types.gen.d.ts +338 -0
- package/dist/api/vpcgw/index.cjs +4 -0
- package/dist/api/vpcgw/index.d.ts +1 -0
- package/dist/api/vpcgw/index.js +4 -2
- package/dist/api/vpcgw/v1/api.gen.cjs +740 -0
- package/dist/api/vpcgw/v1/api.gen.d.ts +389 -0
- package/dist/api/vpcgw/v1/api.gen.js +408 -239
- package/dist/api/vpcgw/v1/content.gen.cjs +15 -0
- package/dist/api/vpcgw/v1/content.gen.d.ts +5 -0
- package/dist/api/vpcgw/v1/content.gen.js +15 -10
- package/dist/api/vpcgw/v1/index.gen.cjs +7 -0
- package/dist/api/vpcgw/v1/index.gen.d.ts +3 -0
- package/dist/api/vpcgw/v1/index.gen.js +7 -5
- package/dist/api/vpcgw/v1/marshalling.gen.cjs +437 -0
- package/dist/api/vpcgw/v1/marshalling.gen.d.ts +31 -0
- package/dist/api/vpcgw/v1/marshalling.gen.js +145 -74
- package/dist/api/vpcgw/v1/types.gen.d.ts +901 -0
- package/dist/api/webhosting/index.cjs +4 -0
- package/dist/api/webhosting/index.d.ts +1 -0
- package/dist/api/webhosting/index.js +4 -2
- package/dist/api/webhosting/v1alpha1/api.gen.cjs +226 -0
- package/dist/api/webhosting/v1alpha1/api.gen.d.ts +111 -0
- package/dist/api/webhosting/v1alpha1/api.gen.js +145 -75
- package/dist/api/webhosting/v1alpha1/content.gen.cjs +8 -0
- package/dist/api/webhosting/v1alpha1/content.gen.d.ts +3 -0
- package/dist/api/webhosting/v1alpha1/content.gen.js +8 -7
- package/dist/api/webhosting/v1alpha1/index.gen.cjs +8 -0
- package/dist/api/webhosting/v1alpha1/index.gen.d.ts +4 -0
- package/dist/api/webhosting/v1alpha1/index.gen.js +8 -7
- package/dist/api/webhosting/v1alpha1/marshalling.gen.cjs +236 -0
- package/dist/api/webhosting/v1alpha1/marshalling.gen.d.ts +11 -0
- package/dist/api/webhosting/v1alpha1/marshalling.gen.js +92 -37
- package/dist/api/webhosting/v1alpha1/types.gen.d.ts +379 -0
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.cjs +22 -0
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.d.ts +18 -0
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +4 -5
- package/dist/bridge.d.ts +11 -0
- package/dist/helpers/is-browser.cjs +7 -0
- package/dist/helpers/is-browser.d.ts +1 -0
- package/dist/helpers/is-browser.js +7 -5
- package/dist/helpers/is-response.cjs +4 -0
- package/dist/helpers/is-response.d.ts +8 -0
- package/dist/helpers/is-response.js +4 -10
- package/dist/helpers/json.cjs +7 -0
- package/dist/helpers/json.d.ts +13 -0
- package/dist/helpers/json.js +5 -9
- package/dist/helpers/marshalling.cjs +78 -0
- package/dist/helpers/marshalling.d.ts +63 -0
- package/dist/helpers/marshalling.js +40 -77
- package/dist/index.cjs +114 -32034
- package/dist/index.d.ts +15 -38373
- package/dist/index.js +115 -81
- package/dist/internal/async/interval-retrier.cjs +55 -0
- package/dist/internal/async/interval-retrier.d.ts +111 -0
- package/dist/internal/async/interval-retrier.js +30 -72
- package/dist/internal/async/sleep.cjs +6 -0
- package/dist/internal/async/sleep.d.ts +9 -0
- package/dist/internal/async/sleep.js +4 -11
- package/dist/internal/interceptors/composer.cjs +25 -0
- package/dist/internal/interceptors/composer.d.ts +25 -0
- package/dist/internal/interceptors/composer.js +15 -36
- package/dist/internal/interceptors/helpers.cjs +12 -0
- package/dist/internal/interceptors/helpers.d.ts +21 -0
- package/dist/internal/interceptors/helpers.js +7 -26
- package/dist/internal/interceptors/types.d.ts +89 -0
- package/dist/internal/logger/console-logger.cjs +24 -0
- package/dist/internal/logger/console-logger.d.ts +23 -0
- package/dist/internal/logger/console-logger.js +11 -19
- package/dist/internal/logger/index.cjs +12 -0
- package/dist/internal/logger/index.d.ts +25 -0
- package/dist/internal/logger/index.js +9 -30
- package/dist/internal/logger/level-resolver.cjs +13 -0
- package/dist/internal/logger/level-resolver.d.ts +9 -0
- package/dist/internal/logger/level-resolver.js +12 -12
- package/dist/internal/logger/logger.d.ts +13 -0
- package/dist/internal/validations/string-validation.cjs +30 -0
- package/dist/internal/validations/string-validation.d.ts +18 -0
- package/dist/internal/validations/string-validation.js +19 -27
- package/dist/internals.d.ts +10 -0
- package/dist/scw/api.cjs +8 -0
- package/dist/scw/api.d.ts +10 -0
- package/dist/scw/api.js +3 -7
- package/dist/scw/auth.cjs +28 -0
- package/dist/scw/auth.d.ts +57 -0
- package/dist/scw/auth.js +23 -62
- package/dist/scw/client-ini-factory.cjs +66 -0
- package/dist/scw/client-ini-factory.d.ts +111 -0
- package/dist/scw/client-ini-factory.js +33 -141
- package/dist/scw/client-ini-profile.cjs +23 -0
- package/dist/scw/client-ini-profile.d.ts +82 -0
- package/dist/scw/client-ini-profile.js +15 -46
- package/dist/scw/client-settings.cjs +51 -0
- package/dist/scw/client-settings.d.ts +59 -0
- package/dist/scw/client-settings.js +26 -53
- package/dist/scw/client.cjs +28 -0
- package/dist/scw/client.d.ts +72 -0
- package/dist/scw/client.js +14 -76
- package/dist/scw/constants.cjs +6 -0
- package/dist/scw/constants.d.ts +2 -0
- package/dist/scw/constants.js +5 -3
- package/dist/scw/custom-marshalling.cjs +92 -0
- package/dist/scw/custom-marshalling.d.ts +59 -0
- package/dist/scw/custom-marshalling.js +38 -77
- package/dist/scw/errors/error-parser.cjs +76 -0
- package/dist/scw/errors/error-parser.d.ts +12 -0
- package/dist/scw/errors/error-parser.js +33 -64
- package/dist/scw/errors/non-standard/invalid-request-mapper.cjs +36 -0
- package/dist/scw/errors/non-standard/invalid-request-mapper.d.ts +12 -0
- package/dist/scw/errors/non-standard/invalid-request-mapper.js +26 -23
- package/dist/scw/errors/non-standard/unknown-resource-mapper.cjs +23 -0
- package/dist/scw/errors/non-standard/unknown-resource-mapper.d.ts +11 -0
- package/dist/scw/errors/non-standard/unknown-resource-mapper.js +16 -20
- package/dist/scw/errors/scw-error.cjs +43 -0
- package/dist/scw/errors/scw-error.d.ts +25 -0
- package/dist/scw/errors/scw-error.js +19 -35
- package/dist/scw/errors/standard/already-exists-error.cjs +31 -0
- package/dist/scw/errors/standard/already-exists-error.d.ts +16 -0
- package/dist/scw/errors/standard/already-exists-error.js +18 -13
- package/dist/scw/errors/standard/denied-authentication-error.cjs +37 -0
- package/dist/scw/errors/standard/denied-authentication-error.d.ts +15 -0
- package/dist/scw/errors/standard/denied-authentication-error.js +9 -24
- package/dist/scw/errors/standard/index.cjs +28 -0
- package/dist/scw/errors/standard/index.d.ts +17 -0
- package/dist/scw/errors/standard/index.js +28 -13
- package/dist/scw/errors/standard/invalid-arguments-error.cjs +55 -0
- package/dist/scw/errors/standard/invalid-arguments-error.d.ts +24 -0
- package/dist/scw/errors/standard/invalid-arguments-error.js +26 -38
- package/dist/scw/errors/standard/out-of-stock-error.cjs +18 -0
- package/dist/scw/errors/standard/out-of-stock-error.d.ts +14 -0
- package/dist/scw/errors/standard/out-of-stock-error.js +7 -11
- package/dist/scw/errors/standard/permissions-denied-error.cjs +30 -0
- package/dist/scw/errors/standard/permissions-denied-error.d.ts +23 -0
- package/dist/scw/errors/standard/permissions-denied-error.js +20 -35
- package/dist/scw/errors/standard/precondition-failed-error.cjs +32 -0
- package/dist/scw/errors/standard/precondition-failed-error.d.ts +15 -0
- package/dist/scw/errors/standard/precondition-failed-error.js +14 -24
- package/dist/scw/errors/standard/quotas-exceeded-error.cjs +44 -0
- package/dist/scw/errors/standard/quotas-exceeded-error.d.ts +34 -0
- package/dist/scw/errors/standard/quotas-exceeded-error.js +29 -53
- package/dist/scw/errors/standard/resource-expired-error.cjs +31 -0
- package/dist/scw/errors/standard/resource-expired-error.d.ts +16 -0
- package/dist/scw/errors/standard/resource-expired-error.js +18 -13
- package/dist/scw/errors/standard/resource-locked-error.cjs +20 -0
- package/dist/scw/errors/standard/resource-locked-error.d.ts +15 -0
- package/dist/scw/errors/standard/resource-locked-error.js +6 -11
- package/dist/scw/errors/standard/resource-not-found-error.cjs +24 -0
- package/dist/scw/errors/standard/resource-not-found-error.d.ts +15 -0
- package/dist/scw/errors/standard/resource-not-found-error.js +11 -12
- package/dist/scw/errors/standard/too-many-requests-error.cjs +59 -0
- package/dist/scw/errors/standard/too-many-requests-error.d.ts +32 -0
- package/dist/scw/errors/standard/too-many-requests-error.js +20 -31
- package/dist/scw/errors/standard/transient-state-error.cjs +31 -0
- package/dist/scw/errors/standard/transient-state-error.d.ts +16 -0
- package/dist/scw/errors/standard/transient-state-error.js +18 -13
- package/dist/scw/errors/types.cjs +15 -0
- package/dist/scw/errors/types.d.ts +9 -0
- package/dist/scw/errors/types.js +6 -14
- package/dist/scw/fetch/build-fetcher.cjs +60 -0
- package/dist/scw/fetch/build-fetcher.d.ts +23 -0
- package/dist/scw/fetch/build-fetcher.js +29 -38
- package/dist/scw/fetch/http-dumper.cjs +20 -0
- package/dist/scw/fetch/http-dumper.d.ts +18 -0
- package/dist/scw/fetch/http-dumper.js +19 -50
- package/dist/scw/fetch/http-interceptors.cjs +43 -0
- package/dist/scw/fetch/http-interceptors.d.ts +38 -0
- package/dist/scw/fetch/http-interceptors.js +23 -66
- package/dist/scw/fetch/resource-paginator.cjs +37 -0
- package/dist/scw/fetch/resource-paginator.d.ts +47 -0
- package/dist/scw/fetch/resource-paginator.js +12 -45
- package/dist/scw/fetch/response-parser.cjs +57 -0
- package/dist/scw/fetch/response-parser.d.ts +25 -0
- package/dist/scw/fetch/response-parser.js +31 -46
- package/package.json +7 -3
- package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.3/node_modules/@scaleway/random-name/dist/index.js +0 -11
|
@@ -0,0 +1,1813 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const randomName = require("@scaleway/random-name");
|
|
4
|
+
const json = require("../../../helpers/json.cjs");
|
|
5
|
+
const marshalling = require("../../../helpers/marshalling.cjs");
|
|
6
|
+
const unmarshalPrivateNIC = (data) => {
|
|
7
|
+
if (!json.isJSONObject(data)) {
|
|
8
|
+
throw new TypeError(
|
|
9
|
+
`Unmarshalling the type 'PrivateNIC' failed as data isn't a dictionary.`
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
return {
|
|
13
|
+
id: data.id,
|
|
14
|
+
macAddress: data.mac_address,
|
|
15
|
+
privateNetworkId: data.private_network_id,
|
|
16
|
+
serverId: data.server_id,
|
|
17
|
+
state: data.state,
|
|
18
|
+
tags: data.tags
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
const unmarshalServerSummary = (data) => {
|
|
22
|
+
if (!json.isJSONObject(data)) {
|
|
23
|
+
throw new TypeError(
|
|
24
|
+
`Unmarshalling the type 'ServerSummary' failed as data isn't a dictionary.`
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
id: data.id,
|
|
29
|
+
name: data.name
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
const unmarshalBootscript = (data) => {
|
|
33
|
+
if (!json.isJSONObject(data)) {
|
|
34
|
+
throw new TypeError(
|
|
35
|
+
`Unmarshalling the type 'Bootscript' failed as data isn't a dictionary.`
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
arch: data.arch,
|
|
40
|
+
bootcmdargs: data.bootcmdargs,
|
|
41
|
+
default: data.default,
|
|
42
|
+
dtb: data.dtb,
|
|
43
|
+
id: data.id,
|
|
44
|
+
initrd: data.initrd,
|
|
45
|
+
kernel: data.kernel,
|
|
46
|
+
organization: data.organization,
|
|
47
|
+
project: data.project,
|
|
48
|
+
public: data.public,
|
|
49
|
+
title: data.title,
|
|
50
|
+
zone: data.zone
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
const unmarshalVolume = (data) => {
|
|
54
|
+
if (!json.isJSONObject(data)) {
|
|
55
|
+
throw new TypeError(
|
|
56
|
+
`Unmarshalling the type 'Volume' failed as data isn't a dictionary.`
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
creationDate: marshalling.unmarshalDate(data.creation_date),
|
|
61
|
+
exportUri: data.export_uri,
|
|
62
|
+
id: data.id,
|
|
63
|
+
modificationDate: marshalling.unmarshalDate(data.modification_date),
|
|
64
|
+
name: data.name,
|
|
65
|
+
organization: data.organization,
|
|
66
|
+
project: data.project,
|
|
67
|
+
server: data.server ? unmarshalServerSummary(data.server) : void 0,
|
|
68
|
+
size: data.size,
|
|
69
|
+
state: data.state,
|
|
70
|
+
tags: data.tags,
|
|
71
|
+
volumeType: data.volume_type,
|
|
72
|
+
zone: data.zone
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
const unmarshalVolumeSummary = (data) => {
|
|
76
|
+
if (!json.isJSONObject(data)) {
|
|
77
|
+
throw new TypeError(
|
|
78
|
+
`Unmarshalling the type 'VolumeSummary' failed as data isn't a dictionary.`
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
id: data.id,
|
|
83
|
+
name: data.name,
|
|
84
|
+
size: data.size,
|
|
85
|
+
volumeType: data.volume_type
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
const unmarshalImage = (data) => {
|
|
89
|
+
if (!json.isJSONObject(data)) {
|
|
90
|
+
throw new TypeError(
|
|
91
|
+
`Unmarshalling the type 'Image' failed as data isn't a dictionary.`
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
return {
|
|
95
|
+
arch: data.arch,
|
|
96
|
+
creationDate: marshalling.unmarshalDate(data.creation_date),
|
|
97
|
+
defaultBootscript: data.default_bootscript ? unmarshalBootscript(data.default_bootscript) : void 0,
|
|
98
|
+
extraVolumes: marshalling.unmarshalMapOfObject(data.extra_volumes, unmarshalVolume),
|
|
99
|
+
fromServer: data.from_server,
|
|
100
|
+
id: data.id,
|
|
101
|
+
modificationDate: marshalling.unmarshalDate(data.modification_date),
|
|
102
|
+
name: data.name,
|
|
103
|
+
organization: data.organization,
|
|
104
|
+
project: data.project,
|
|
105
|
+
public: data.public,
|
|
106
|
+
rootVolume: data.root_volume ? unmarshalVolumeSummary(data.root_volume) : void 0,
|
|
107
|
+
state: data.state,
|
|
108
|
+
tags: data.tags,
|
|
109
|
+
zone: data.zone
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
const unmarshalPlacementGroup = (data) => {
|
|
113
|
+
if (!json.isJSONObject(data)) {
|
|
114
|
+
throw new TypeError(
|
|
115
|
+
`Unmarshalling the type 'PlacementGroup' failed as data isn't a dictionary.`
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
id: data.id,
|
|
120
|
+
name: data.name,
|
|
121
|
+
organization: data.organization,
|
|
122
|
+
policyMode: data.policy_mode,
|
|
123
|
+
policyRespected: data.policy_respected,
|
|
124
|
+
policyType: data.policy_type,
|
|
125
|
+
project: data.project,
|
|
126
|
+
tags: data.tags,
|
|
127
|
+
zone: data.zone
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
const unmarshalSecurityGroupSummary = (data) => {
|
|
131
|
+
if (!json.isJSONObject(data)) {
|
|
132
|
+
throw new TypeError(
|
|
133
|
+
`Unmarshalling the type 'SecurityGroupSummary' failed as data isn't a dictionary.`
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
id: data.id,
|
|
138
|
+
name: data.name
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
const unmarshalServerIp = (data) => {
|
|
142
|
+
if (!json.isJSONObject(data)) {
|
|
143
|
+
throw new TypeError(
|
|
144
|
+
`Unmarshalling the type 'ServerIp' failed as data isn't a dictionary.`
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
return {
|
|
148
|
+
address: data.address,
|
|
149
|
+
dynamic: data.dynamic,
|
|
150
|
+
family: data.family,
|
|
151
|
+
gateway: data.gateway,
|
|
152
|
+
id: data.id,
|
|
153
|
+
ipamId: data.ipam_id,
|
|
154
|
+
netmask: data.netmask,
|
|
155
|
+
provisioningMode: data.provisioning_mode,
|
|
156
|
+
state: data.state,
|
|
157
|
+
tags: data.tags
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
const unmarshalServerIpv6 = (data) => {
|
|
161
|
+
if (!json.isJSONObject(data)) {
|
|
162
|
+
throw new TypeError(
|
|
163
|
+
`Unmarshalling the type 'ServerIpv6' failed as data isn't a dictionary.`
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
return {
|
|
167
|
+
address: data.address,
|
|
168
|
+
gateway: data.gateway,
|
|
169
|
+
netmask: data.netmask
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
const unmarshalServerLocation = (data) => {
|
|
173
|
+
if (!json.isJSONObject(data)) {
|
|
174
|
+
throw new TypeError(
|
|
175
|
+
`Unmarshalling the type 'ServerLocation' failed as data isn't a dictionary.`
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
return {
|
|
179
|
+
clusterId: data.cluster_id,
|
|
180
|
+
hypervisorId: data.hypervisor_id,
|
|
181
|
+
nodeId: data.node_id,
|
|
182
|
+
platformId: data.platform_id,
|
|
183
|
+
zoneId: data.zone_id
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
const unmarshalServerMaintenance = (data) => {
|
|
187
|
+
if (!json.isJSONObject(data)) {
|
|
188
|
+
throw new TypeError(
|
|
189
|
+
`Unmarshalling the type 'ServerMaintenance' failed as data isn't a dictionary.`
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
return {
|
|
193
|
+
reason: data.reason,
|
|
194
|
+
startDate: marshalling.unmarshalDate(data.start_date)
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
const unmarshalVolumeServer = (data) => {
|
|
198
|
+
if (!json.isJSONObject(data)) {
|
|
199
|
+
throw new TypeError(
|
|
200
|
+
`Unmarshalling the type 'VolumeServer' failed as data isn't a dictionary.`
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
return {
|
|
204
|
+
boot: data.boot,
|
|
205
|
+
creationDate: marshalling.unmarshalDate(data.creation_date),
|
|
206
|
+
exportUri: data.export_uri,
|
|
207
|
+
id: data.id,
|
|
208
|
+
modificationDate: marshalling.unmarshalDate(data.modification_date),
|
|
209
|
+
name: data.name,
|
|
210
|
+
organization: data.organization,
|
|
211
|
+
project: data.project,
|
|
212
|
+
server: data.server ? unmarshalServerSummary(data.server) : void 0,
|
|
213
|
+
size: data.size,
|
|
214
|
+
state: data.state,
|
|
215
|
+
volumeType: data.volume_type,
|
|
216
|
+
zone: data.zone
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
const unmarshalServer = (data) => {
|
|
220
|
+
if (!json.isJSONObject(data)) {
|
|
221
|
+
throw new TypeError(
|
|
222
|
+
`Unmarshalling the type 'Server' failed as data isn't a dictionary.`
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
return {
|
|
226
|
+
allowedActions: data.allowed_actions,
|
|
227
|
+
arch: data.arch,
|
|
228
|
+
bootType: data.boot_type,
|
|
229
|
+
bootscript: data.bootscript ? unmarshalBootscript(data.bootscript) : void 0,
|
|
230
|
+
commercialType: data.commercial_type,
|
|
231
|
+
creationDate: marshalling.unmarshalDate(data.creation_date),
|
|
232
|
+
dynamicIpRequired: data.dynamic_ip_required,
|
|
233
|
+
enableIpv6: data.enable_ipv6,
|
|
234
|
+
hostname: data.hostname,
|
|
235
|
+
id: data.id,
|
|
236
|
+
image: data.image ? unmarshalImage(data.image) : void 0,
|
|
237
|
+
ipv6: data.ipv6 ? unmarshalServerIpv6(data.ipv6) : void 0,
|
|
238
|
+
location: data.location ? unmarshalServerLocation(data.location) : void 0,
|
|
239
|
+
macAddress: data.mac_address,
|
|
240
|
+
maintenances: marshalling.unmarshalArrayOfObject(
|
|
241
|
+
data.maintenances,
|
|
242
|
+
unmarshalServerMaintenance
|
|
243
|
+
),
|
|
244
|
+
modificationDate: marshalling.unmarshalDate(data.modification_date),
|
|
245
|
+
name: data.name,
|
|
246
|
+
organization: data.organization,
|
|
247
|
+
placementGroup: data.placement_group ? unmarshalPlacementGroup(data.placement_group) : void 0,
|
|
248
|
+
privateIp: data.private_ip,
|
|
249
|
+
privateNics: marshalling.unmarshalArrayOfObject(data.private_nics, unmarshalPrivateNIC),
|
|
250
|
+
project: data.project,
|
|
251
|
+
protected: data.protected,
|
|
252
|
+
publicIp: data.public_ip ? unmarshalServerIp(data.public_ip) : void 0,
|
|
253
|
+
publicIps: marshalling.unmarshalArrayOfObject(data.public_ips, unmarshalServerIp),
|
|
254
|
+
routedIpEnabled: data.routed_ip_enabled,
|
|
255
|
+
securityGroup: data.security_group ? unmarshalSecurityGroupSummary(data.security_group) : void 0,
|
|
256
|
+
state: data.state,
|
|
257
|
+
stateDetail: data.state_detail,
|
|
258
|
+
tags: data.tags,
|
|
259
|
+
volumes: marshalling.unmarshalMapOfObject(data.volumes, unmarshalVolumeServer),
|
|
260
|
+
zone: data.zone
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
const unmarshalAttachServerVolumeResponse = (data) => {
|
|
264
|
+
if (!json.isJSONObject(data)) {
|
|
265
|
+
throw new TypeError(
|
|
266
|
+
`Unmarshalling the type 'AttachServerVolumeResponse' failed as data isn't a dictionary.`
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
return {
|
|
270
|
+
server: data.server ? unmarshalServer(data.server) : void 0
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
const unmarshalCreateImageResponse = (data) => {
|
|
274
|
+
if (!json.isJSONObject(data)) {
|
|
275
|
+
throw new TypeError(
|
|
276
|
+
`Unmarshalling the type 'CreateImageResponse' failed as data isn't a dictionary.`
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
return {
|
|
280
|
+
image: data.image ? unmarshalImage(data.image) : void 0
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
const unmarshalIp = (data) => {
|
|
284
|
+
if (!json.isJSONObject(data)) {
|
|
285
|
+
throw new TypeError(
|
|
286
|
+
`Unmarshalling the type 'Ip' failed as data isn't a dictionary.`
|
|
287
|
+
);
|
|
288
|
+
}
|
|
289
|
+
return {
|
|
290
|
+
address: data.address,
|
|
291
|
+
id: data.id,
|
|
292
|
+
ipamId: data.ipam_id,
|
|
293
|
+
organization: data.organization,
|
|
294
|
+
prefix: data.prefix,
|
|
295
|
+
project: data.project,
|
|
296
|
+
reverse: data.reverse,
|
|
297
|
+
server: data.server ? unmarshalServerSummary(data.server) : void 0,
|
|
298
|
+
state: data.state,
|
|
299
|
+
tags: data.tags,
|
|
300
|
+
type: data.type,
|
|
301
|
+
zone: data.zone
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
const unmarshalCreateIpResponse = (data) => {
|
|
305
|
+
if (!json.isJSONObject(data)) {
|
|
306
|
+
throw new TypeError(
|
|
307
|
+
`Unmarshalling the type 'CreateIpResponse' failed as data isn't a dictionary.`
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
return {
|
|
311
|
+
ip: data.ip ? unmarshalIp(data.ip) : void 0
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
const unmarshalCreatePlacementGroupResponse = (data) => {
|
|
315
|
+
if (!json.isJSONObject(data)) {
|
|
316
|
+
throw new TypeError(
|
|
317
|
+
`Unmarshalling the type 'CreatePlacementGroupResponse' failed as data isn't a dictionary.`
|
|
318
|
+
);
|
|
319
|
+
}
|
|
320
|
+
return {
|
|
321
|
+
placementGroup: data.placement_group ? unmarshalPlacementGroup(data.placement_group) : void 0
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
const unmarshalCreatePrivateNICResponse = (data) => {
|
|
325
|
+
if (!json.isJSONObject(data)) {
|
|
326
|
+
throw new TypeError(
|
|
327
|
+
`Unmarshalling the type 'CreatePrivateNICResponse' failed as data isn't a dictionary.`
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
return {
|
|
331
|
+
privateNic: data.private_nic ? unmarshalPrivateNIC(data.private_nic) : void 0
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
const unmarshalSecurityGroup = (data) => {
|
|
335
|
+
if (!json.isJSONObject(data)) {
|
|
336
|
+
throw new TypeError(
|
|
337
|
+
`Unmarshalling the type 'SecurityGroup' failed as data isn't a dictionary.`
|
|
338
|
+
);
|
|
339
|
+
}
|
|
340
|
+
return {
|
|
341
|
+
creationDate: marshalling.unmarshalDate(data.creation_date),
|
|
342
|
+
description: data.description,
|
|
343
|
+
enableDefaultSecurity: data.enable_default_security,
|
|
344
|
+
id: data.id,
|
|
345
|
+
inboundDefaultPolicy: data.inbound_default_policy,
|
|
346
|
+
modificationDate: marshalling.unmarshalDate(data.modification_date),
|
|
347
|
+
name: data.name,
|
|
348
|
+
organization: data.organization,
|
|
349
|
+
organizationDefault: data.organization_default,
|
|
350
|
+
outboundDefaultPolicy: data.outbound_default_policy,
|
|
351
|
+
project: data.project,
|
|
352
|
+
projectDefault: data.project_default,
|
|
353
|
+
servers: marshalling.unmarshalArrayOfObject(data.servers, unmarshalServerSummary),
|
|
354
|
+
state: data.state,
|
|
355
|
+
stateful: data.stateful,
|
|
356
|
+
tags: data.tags,
|
|
357
|
+
zone: data.zone
|
|
358
|
+
};
|
|
359
|
+
};
|
|
360
|
+
const unmarshalCreateSecurityGroupResponse = (data) => {
|
|
361
|
+
if (!json.isJSONObject(data)) {
|
|
362
|
+
throw new TypeError(
|
|
363
|
+
`Unmarshalling the type 'CreateSecurityGroupResponse' failed as data isn't a dictionary.`
|
|
364
|
+
);
|
|
365
|
+
}
|
|
366
|
+
return {
|
|
367
|
+
securityGroup: data.security_group ? unmarshalSecurityGroup(data.security_group) : void 0
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
const unmarshalSecurityGroupRule = (data) => {
|
|
371
|
+
if (!json.isJSONObject(data)) {
|
|
372
|
+
throw new TypeError(
|
|
373
|
+
`Unmarshalling the type 'SecurityGroupRule' failed as data isn't a dictionary.`
|
|
374
|
+
);
|
|
375
|
+
}
|
|
376
|
+
return {
|
|
377
|
+
action: data.action,
|
|
378
|
+
destPortFrom: data.dest_port_from,
|
|
379
|
+
destPortTo: data.dest_port_to,
|
|
380
|
+
direction: data.direction,
|
|
381
|
+
editable: data.editable,
|
|
382
|
+
id: data.id,
|
|
383
|
+
ipRange: data.ip_range,
|
|
384
|
+
position: data.position,
|
|
385
|
+
protocol: data.protocol,
|
|
386
|
+
zone: data.zone
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
const unmarshalCreateSecurityGroupRuleResponse = (data) => {
|
|
390
|
+
if (!json.isJSONObject(data)) {
|
|
391
|
+
throw new TypeError(
|
|
392
|
+
`Unmarshalling the type 'CreateSecurityGroupRuleResponse' failed as data isn't a dictionary.`
|
|
393
|
+
);
|
|
394
|
+
}
|
|
395
|
+
return {
|
|
396
|
+
rule: data.rule ? unmarshalSecurityGroupRule(data.rule) : void 0
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
const unmarshalCreateServerResponse = (data) => {
|
|
400
|
+
if (!json.isJSONObject(data)) {
|
|
401
|
+
throw new TypeError(
|
|
402
|
+
`Unmarshalling the type 'CreateServerResponse' failed as data isn't a dictionary.`
|
|
403
|
+
);
|
|
404
|
+
}
|
|
405
|
+
return {
|
|
406
|
+
server: data.server ? unmarshalServer(data.server) : void 0
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
|
+
const unmarshalSnapshotBaseVolume = (data) => {
|
|
410
|
+
if (!json.isJSONObject(data)) {
|
|
411
|
+
throw new TypeError(
|
|
412
|
+
`Unmarshalling the type 'SnapshotBaseVolume' failed as data isn't a dictionary.`
|
|
413
|
+
);
|
|
414
|
+
}
|
|
415
|
+
return {
|
|
416
|
+
id: data.id,
|
|
417
|
+
name: data.name
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
const unmarshalSnapshot = (data) => {
|
|
421
|
+
if (!json.isJSONObject(data)) {
|
|
422
|
+
throw new TypeError(
|
|
423
|
+
`Unmarshalling the type 'Snapshot' failed as data isn't a dictionary.`
|
|
424
|
+
);
|
|
425
|
+
}
|
|
426
|
+
return {
|
|
427
|
+
baseVolume: data.base_volume ? unmarshalSnapshotBaseVolume(data.base_volume) : void 0,
|
|
428
|
+
creationDate: marshalling.unmarshalDate(data.creation_date),
|
|
429
|
+
errorReason: data.error_reason,
|
|
430
|
+
id: data.id,
|
|
431
|
+
modificationDate: marshalling.unmarshalDate(data.modification_date),
|
|
432
|
+
name: data.name,
|
|
433
|
+
organization: data.organization,
|
|
434
|
+
project: data.project,
|
|
435
|
+
size: data.size,
|
|
436
|
+
state: data.state,
|
|
437
|
+
tags: data.tags,
|
|
438
|
+
volumeType: data.volume_type,
|
|
439
|
+
zone: data.zone
|
|
440
|
+
};
|
|
441
|
+
};
|
|
442
|
+
const unmarshalTask = (data) => {
|
|
443
|
+
if (!json.isJSONObject(data)) {
|
|
444
|
+
throw new TypeError(
|
|
445
|
+
`Unmarshalling the type 'Task' failed as data isn't a dictionary.`
|
|
446
|
+
);
|
|
447
|
+
}
|
|
448
|
+
return {
|
|
449
|
+
description: data.description,
|
|
450
|
+
hrefFrom: data.href_from,
|
|
451
|
+
hrefResult: data.href_result,
|
|
452
|
+
id: data.id,
|
|
453
|
+
progress: data.progress,
|
|
454
|
+
startedAt: marshalling.unmarshalDate(data.started_at),
|
|
455
|
+
status: data.status,
|
|
456
|
+
terminatedAt: marshalling.unmarshalDate(data.terminated_at),
|
|
457
|
+
zone: data.zone
|
|
458
|
+
};
|
|
459
|
+
};
|
|
460
|
+
const unmarshalCreateSnapshotResponse = (data) => {
|
|
461
|
+
if (!json.isJSONObject(data)) {
|
|
462
|
+
throw new TypeError(
|
|
463
|
+
`Unmarshalling the type 'CreateSnapshotResponse' failed as data isn't a dictionary.`
|
|
464
|
+
);
|
|
465
|
+
}
|
|
466
|
+
return {
|
|
467
|
+
snapshot: data.snapshot ? unmarshalSnapshot(data.snapshot) : void 0,
|
|
468
|
+
task: data.task ? unmarshalTask(data.task) : void 0
|
|
469
|
+
};
|
|
470
|
+
};
|
|
471
|
+
const unmarshalCreateVolumeResponse = (data) => {
|
|
472
|
+
if (!json.isJSONObject(data)) {
|
|
473
|
+
throw new TypeError(
|
|
474
|
+
`Unmarshalling the type 'CreateVolumeResponse' failed as data isn't a dictionary.`
|
|
475
|
+
);
|
|
476
|
+
}
|
|
477
|
+
return {
|
|
478
|
+
volume: data.volume ? unmarshalVolume(data.volume) : void 0
|
|
479
|
+
};
|
|
480
|
+
};
|
|
481
|
+
const unmarshalDetachServerVolumeResponse = (data) => {
|
|
482
|
+
if (!json.isJSONObject(data)) {
|
|
483
|
+
throw new TypeError(
|
|
484
|
+
`Unmarshalling the type 'DetachServerVolumeResponse' failed as data isn't a dictionary.`
|
|
485
|
+
);
|
|
486
|
+
}
|
|
487
|
+
return {
|
|
488
|
+
server: data.server ? unmarshalServer(data.server) : void 0
|
|
489
|
+
};
|
|
490
|
+
};
|
|
491
|
+
const unmarshalExportSnapshotResponse = (data) => {
|
|
492
|
+
if (!json.isJSONObject(data)) {
|
|
493
|
+
throw new TypeError(
|
|
494
|
+
`Unmarshalling the type 'ExportSnapshotResponse' failed as data isn't a dictionary.`
|
|
495
|
+
);
|
|
496
|
+
}
|
|
497
|
+
return {
|
|
498
|
+
task: data.task ? unmarshalTask(data.task) : void 0
|
|
499
|
+
};
|
|
500
|
+
};
|
|
501
|
+
const unmarshalGetBootscriptResponse = (data) => {
|
|
502
|
+
if (!json.isJSONObject(data)) {
|
|
503
|
+
throw new TypeError(
|
|
504
|
+
`Unmarshalling the type 'GetBootscriptResponse' failed as data isn't a dictionary.`
|
|
505
|
+
);
|
|
506
|
+
}
|
|
507
|
+
return {
|
|
508
|
+
bootscript: data.bootscript ? unmarshalBootscript(data.bootscript) : void 0
|
|
509
|
+
};
|
|
510
|
+
};
|
|
511
|
+
const unmarshalDashboard = (data) => {
|
|
512
|
+
if (!json.isJSONObject(data)) {
|
|
513
|
+
throw new TypeError(
|
|
514
|
+
`Unmarshalling the type 'Dashboard' failed as data isn't a dictionary.`
|
|
515
|
+
);
|
|
516
|
+
}
|
|
517
|
+
return {
|
|
518
|
+
imagesCount: data.images_count,
|
|
519
|
+
ipsCount: data.ips_count,
|
|
520
|
+
ipsUnused: data.ips_unused,
|
|
521
|
+
placementGroupsCount: data.placement_groups_count,
|
|
522
|
+
privateNicsCount: data.private_nics_count,
|
|
523
|
+
runningServersCount: data.running_servers_count,
|
|
524
|
+
securityGroupsCount: data.security_groups_count,
|
|
525
|
+
serversByTypes: data.servers_by_types,
|
|
526
|
+
serversCount: data.servers_count,
|
|
527
|
+
snapshotsCount: data.snapshots_count,
|
|
528
|
+
volumesBSsdCount: data.volumes_b_ssd_count,
|
|
529
|
+
volumesBSsdTotalSize: data.volumes_b_ssd_total_size,
|
|
530
|
+
volumesCount: data.volumes_count,
|
|
531
|
+
volumesLSsdCount: data.volumes_l_ssd_count,
|
|
532
|
+
volumesLSsdTotalSize: data.volumes_l_ssd_total_size
|
|
533
|
+
};
|
|
534
|
+
};
|
|
535
|
+
const unmarshalGetDashboardResponse = (data) => {
|
|
536
|
+
if (!json.isJSONObject(data)) {
|
|
537
|
+
throw new TypeError(
|
|
538
|
+
`Unmarshalling the type 'GetDashboardResponse' failed as data isn't a dictionary.`
|
|
539
|
+
);
|
|
540
|
+
}
|
|
541
|
+
return {
|
|
542
|
+
dashboard: data.dashboard ? unmarshalDashboard(data.dashboard) : void 0
|
|
543
|
+
};
|
|
544
|
+
};
|
|
545
|
+
const unmarshalGetImageResponse = (data) => {
|
|
546
|
+
if (!json.isJSONObject(data)) {
|
|
547
|
+
throw new TypeError(
|
|
548
|
+
`Unmarshalling the type 'GetImageResponse' failed as data isn't a dictionary.`
|
|
549
|
+
);
|
|
550
|
+
}
|
|
551
|
+
return {
|
|
552
|
+
image: data.image ? unmarshalImage(data.image) : void 0
|
|
553
|
+
};
|
|
554
|
+
};
|
|
555
|
+
const unmarshalGetIpResponse = (data) => {
|
|
556
|
+
if (!json.isJSONObject(data)) {
|
|
557
|
+
throw new TypeError(
|
|
558
|
+
`Unmarshalling the type 'GetIpResponse' failed as data isn't a dictionary.`
|
|
559
|
+
);
|
|
560
|
+
}
|
|
561
|
+
return {
|
|
562
|
+
ip: data.ip ? unmarshalIp(data.ip) : void 0
|
|
563
|
+
};
|
|
564
|
+
};
|
|
565
|
+
const unmarshalGetPlacementGroupResponse = (data) => {
|
|
566
|
+
if (!json.isJSONObject(data)) {
|
|
567
|
+
throw new TypeError(
|
|
568
|
+
`Unmarshalling the type 'GetPlacementGroupResponse' failed as data isn't a dictionary.`
|
|
569
|
+
);
|
|
570
|
+
}
|
|
571
|
+
return {
|
|
572
|
+
placementGroup: data.placement_group ? unmarshalPlacementGroup(data.placement_group) : void 0
|
|
573
|
+
};
|
|
574
|
+
};
|
|
575
|
+
const unmarshalPlacementGroupServer = (data) => {
|
|
576
|
+
if (!json.isJSONObject(data)) {
|
|
577
|
+
throw new TypeError(
|
|
578
|
+
`Unmarshalling the type 'PlacementGroupServer' failed as data isn't a dictionary.`
|
|
579
|
+
);
|
|
580
|
+
}
|
|
581
|
+
return {
|
|
582
|
+
id: data.id,
|
|
583
|
+
name: data.name,
|
|
584
|
+
policyRespected: data.policy_respected
|
|
585
|
+
};
|
|
586
|
+
};
|
|
587
|
+
const unmarshalGetPlacementGroupServersResponse = (data) => {
|
|
588
|
+
if (!json.isJSONObject(data)) {
|
|
589
|
+
throw new TypeError(
|
|
590
|
+
`Unmarshalling the type 'GetPlacementGroupServersResponse' failed as data isn't a dictionary.`
|
|
591
|
+
);
|
|
592
|
+
}
|
|
593
|
+
return {
|
|
594
|
+
servers: marshalling.unmarshalArrayOfObject(
|
|
595
|
+
data.servers,
|
|
596
|
+
unmarshalPlacementGroupServer
|
|
597
|
+
)
|
|
598
|
+
};
|
|
599
|
+
};
|
|
600
|
+
const unmarshalGetPrivateNICResponse = (data) => {
|
|
601
|
+
if (!json.isJSONObject(data)) {
|
|
602
|
+
throw new TypeError(
|
|
603
|
+
`Unmarshalling the type 'GetPrivateNICResponse' failed as data isn't a dictionary.`
|
|
604
|
+
);
|
|
605
|
+
}
|
|
606
|
+
return {
|
|
607
|
+
privateNic: data.private_nic ? unmarshalPrivateNIC(data.private_nic) : void 0
|
|
608
|
+
};
|
|
609
|
+
};
|
|
610
|
+
const unmarshalGetSecurityGroupResponse = (data) => {
|
|
611
|
+
if (!json.isJSONObject(data)) {
|
|
612
|
+
throw new TypeError(
|
|
613
|
+
`Unmarshalling the type 'GetSecurityGroupResponse' failed as data isn't a dictionary.`
|
|
614
|
+
);
|
|
615
|
+
}
|
|
616
|
+
return {
|
|
617
|
+
securityGroup: data.security_group ? unmarshalSecurityGroup(data.security_group) : void 0
|
|
618
|
+
};
|
|
619
|
+
};
|
|
620
|
+
const unmarshalGetSecurityGroupRuleResponse = (data) => {
|
|
621
|
+
if (!json.isJSONObject(data)) {
|
|
622
|
+
throw new TypeError(
|
|
623
|
+
`Unmarshalling the type 'GetSecurityGroupRuleResponse' failed as data isn't a dictionary.`
|
|
624
|
+
);
|
|
625
|
+
}
|
|
626
|
+
return {
|
|
627
|
+
rule: data.rule ? unmarshalSecurityGroupRule(data.rule) : void 0
|
|
628
|
+
};
|
|
629
|
+
};
|
|
630
|
+
const unmarshalGetServerResponse = (data) => {
|
|
631
|
+
if (!json.isJSONObject(data)) {
|
|
632
|
+
throw new TypeError(
|
|
633
|
+
`Unmarshalling the type 'GetServerResponse' failed as data isn't a dictionary.`
|
|
634
|
+
);
|
|
635
|
+
}
|
|
636
|
+
return {
|
|
637
|
+
server: data.server ? unmarshalServer(data.server) : void 0
|
|
638
|
+
};
|
|
639
|
+
};
|
|
640
|
+
const unmarshalGetServerTypesAvailabilityResponseAvailability = (data) => {
|
|
641
|
+
if (!json.isJSONObject(data)) {
|
|
642
|
+
throw new TypeError(
|
|
643
|
+
`Unmarshalling the type 'GetServerTypesAvailabilityResponseAvailability' failed as data isn't a dictionary.`
|
|
644
|
+
);
|
|
645
|
+
}
|
|
646
|
+
return {
|
|
647
|
+
availability: data.availability
|
|
648
|
+
};
|
|
649
|
+
};
|
|
650
|
+
const unmarshalGetServerTypesAvailabilityResponse = (data) => {
|
|
651
|
+
if (!json.isJSONObject(data)) {
|
|
652
|
+
throw new TypeError(
|
|
653
|
+
`Unmarshalling the type 'GetServerTypesAvailabilityResponse' failed as data isn't a dictionary.`
|
|
654
|
+
);
|
|
655
|
+
}
|
|
656
|
+
return {
|
|
657
|
+
servers: marshalling.unmarshalMapOfObject(
|
|
658
|
+
data.servers,
|
|
659
|
+
unmarshalGetServerTypesAvailabilityResponseAvailability
|
|
660
|
+
),
|
|
661
|
+
totalCount: data.total_count
|
|
662
|
+
};
|
|
663
|
+
};
|
|
664
|
+
const unmarshalGetSnapshotResponse = (data) => {
|
|
665
|
+
if (!json.isJSONObject(data)) {
|
|
666
|
+
throw new TypeError(
|
|
667
|
+
`Unmarshalling the type 'GetSnapshotResponse' failed as data isn't a dictionary.`
|
|
668
|
+
);
|
|
669
|
+
}
|
|
670
|
+
return {
|
|
671
|
+
snapshot: data.snapshot ? unmarshalSnapshot(data.snapshot) : void 0
|
|
672
|
+
};
|
|
673
|
+
};
|
|
674
|
+
const unmarshalGetVolumeResponse = (data) => {
|
|
675
|
+
if (!json.isJSONObject(data)) {
|
|
676
|
+
throw new TypeError(
|
|
677
|
+
`Unmarshalling the type 'GetVolumeResponse' failed as data isn't a dictionary.`
|
|
678
|
+
);
|
|
679
|
+
}
|
|
680
|
+
return {
|
|
681
|
+
volume: data.volume ? unmarshalVolume(data.volume) : void 0
|
|
682
|
+
};
|
|
683
|
+
};
|
|
684
|
+
const unmarshalListBootscriptsResponse = (data) => {
|
|
685
|
+
if (!json.isJSONObject(data)) {
|
|
686
|
+
throw new TypeError(
|
|
687
|
+
`Unmarshalling the type 'ListBootscriptsResponse' failed as data isn't a dictionary.`
|
|
688
|
+
);
|
|
689
|
+
}
|
|
690
|
+
return {
|
|
691
|
+
bootscripts: marshalling.unmarshalArrayOfObject(data.bootscripts, unmarshalBootscript),
|
|
692
|
+
totalCount: data.total_count
|
|
693
|
+
};
|
|
694
|
+
};
|
|
695
|
+
const unmarshalListImagesResponse = (data) => {
|
|
696
|
+
if (!json.isJSONObject(data)) {
|
|
697
|
+
throw new TypeError(
|
|
698
|
+
`Unmarshalling the type 'ListImagesResponse' failed as data isn't a dictionary.`
|
|
699
|
+
);
|
|
700
|
+
}
|
|
701
|
+
return {
|
|
702
|
+
images: marshalling.unmarshalArrayOfObject(data.images, unmarshalImage),
|
|
703
|
+
totalCount: data.total_count
|
|
704
|
+
};
|
|
705
|
+
};
|
|
706
|
+
const unmarshalListIpsResponse = (data) => {
|
|
707
|
+
if (!json.isJSONObject(data)) {
|
|
708
|
+
throw new TypeError(
|
|
709
|
+
`Unmarshalling the type 'ListIpsResponse' failed as data isn't a dictionary.`
|
|
710
|
+
);
|
|
711
|
+
}
|
|
712
|
+
return {
|
|
713
|
+
ips: marshalling.unmarshalArrayOfObject(data.ips, unmarshalIp),
|
|
714
|
+
totalCount: data.total_count
|
|
715
|
+
};
|
|
716
|
+
};
|
|
717
|
+
const unmarshalListPlacementGroupsResponse = (data) => {
|
|
718
|
+
if (!json.isJSONObject(data)) {
|
|
719
|
+
throw new TypeError(
|
|
720
|
+
`Unmarshalling the type 'ListPlacementGroupsResponse' failed as data isn't a dictionary.`
|
|
721
|
+
);
|
|
722
|
+
}
|
|
723
|
+
return {
|
|
724
|
+
placementGroups: marshalling.unmarshalArrayOfObject(
|
|
725
|
+
data.placement_groups,
|
|
726
|
+
unmarshalPlacementGroup
|
|
727
|
+
),
|
|
728
|
+
totalCount: data.total_count
|
|
729
|
+
};
|
|
730
|
+
};
|
|
731
|
+
const unmarshalListPrivateNICsResponse = (data) => {
|
|
732
|
+
if (!json.isJSONObject(data)) {
|
|
733
|
+
throw new TypeError(
|
|
734
|
+
`Unmarshalling the type 'ListPrivateNICsResponse' failed as data isn't a dictionary.`
|
|
735
|
+
);
|
|
736
|
+
}
|
|
737
|
+
return {
|
|
738
|
+
privateNics: marshalling.unmarshalArrayOfObject(data.private_nics, unmarshalPrivateNIC),
|
|
739
|
+
totalCount: data.total_count
|
|
740
|
+
};
|
|
741
|
+
};
|
|
742
|
+
const unmarshalListSecurityGroupRulesResponse = (data) => {
|
|
743
|
+
if (!json.isJSONObject(data)) {
|
|
744
|
+
throw new TypeError(
|
|
745
|
+
`Unmarshalling the type 'ListSecurityGroupRulesResponse' failed as data isn't a dictionary.`
|
|
746
|
+
);
|
|
747
|
+
}
|
|
748
|
+
return {
|
|
749
|
+
rules: marshalling.unmarshalArrayOfObject(data.rules, unmarshalSecurityGroupRule),
|
|
750
|
+
totalCount: data.total_count
|
|
751
|
+
};
|
|
752
|
+
};
|
|
753
|
+
const unmarshalListSecurityGroupsResponse = (data) => {
|
|
754
|
+
if (!json.isJSONObject(data)) {
|
|
755
|
+
throw new TypeError(
|
|
756
|
+
`Unmarshalling the type 'ListSecurityGroupsResponse' failed as data isn't a dictionary.`
|
|
757
|
+
);
|
|
758
|
+
}
|
|
759
|
+
return {
|
|
760
|
+
securityGroups: marshalling.unmarshalArrayOfObject(
|
|
761
|
+
data.security_groups,
|
|
762
|
+
unmarshalSecurityGroup
|
|
763
|
+
),
|
|
764
|
+
totalCount: data.total_count
|
|
765
|
+
};
|
|
766
|
+
};
|
|
767
|
+
const unmarshalListServerActionsResponse = (data) => {
|
|
768
|
+
if (!json.isJSONObject(data)) {
|
|
769
|
+
throw new TypeError(
|
|
770
|
+
`Unmarshalling the type 'ListServerActionsResponse' failed as data isn't a dictionary.`
|
|
771
|
+
);
|
|
772
|
+
}
|
|
773
|
+
return {
|
|
774
|
+
actions: data.actions
|
|
775
|
+
};
|
|
776
|
+
};
|
|
777
|
+
const unmarshalListServerUserDataResponse = (data) => {
|
|
778
|
+
if (!json.isJSONObject(data)) {
|
|
779
|
+
throw new TypeError(
|
|
780
|
+
`Unmarshalling the type 'ListServerUserDataResponse' failed as data isn't a dictionary.`
|
|
781
|
+
);
|
|
782
|
+
}
|
|
783
|
+
return {
|
|
784
|
+
userData: data.user_data
|
|
785
|
+
};
|
|
786
|
+
};
|
|
787
|
+
const unmarshalListServersResponse = (data) => {
|
|
788
|
+
if (!json.isJSONObject(data)) {
|
|
789
|
+
throw new TypeError(
|
|
790
|
+
`Unmarshalling the type 'ListServersResponse' failed as data isn't a dictionary.`
|
|
791
|
+
);
|
|
792
|
+
}
|
|
793
|
+
return {
|
|
794
|
+
servers: marshalling.unmarshalArrayOfObject(data.servers, unmarshalServer),
|
|
795
|
+
totalCount: data.total_count
|
|
796
|
+
};
|
|
797
|
+
};
|
|
798
|
+
const unmarshalServerTypeNetworkInterface = (data) => {
|
|
799
|
+
if (!json.isJSONObject(data)) {
|
|
800
|
+
throw new TypeError(
|
|
801
|
+
`Unmarshalling the type 'ServerTypeNetworkInterface' failed as data isn't a dictionary.`
|
|
802
|
+
);
|
|
803
|
+
}
|
|
804
|
+
return {
|
|
805
|
+
internalBandwidth: data.internal_bandwidth,
|
|
806
|
+
internetBandwidth: data.internet_bandwidth
|
|
807
|
+
};
|
|
808
|
+
};
|
|
809
|
+
const unmarshalServerTypeVolumeConstraintSizes = (data) => {
|
|
810
|
+
if (!json.isJSONObject(data)) {
|
|
811
|
+
throw new TypeError(
|
|
812
|
+
`Unmarshalling the type 'ServerTypeVolumeConstraintSizes' failed as data isn't a dictionary.`
|
|
813
|
+
);
|
|
814
|
+
}
|
|
815
|
+
return {
|
|
816
|
+
maxSize: data.max_size,
|
|
817
|
+
minSize: data.min_size
|
|
818
|
+
};
|
|
819
|
+
};
|
|
820
|
+
const unmarshalServerTypeCapabilities = (data) => {
|
|
821
|
+
if (!json.isJSONObject(data)) {
|
|
822
|
+
throw new TypeError(
|
|
823
|
+
`Unmarshalling the type 'ServerTypeCapabilities' failed as data isn't a dictionary.`
|
|
824
|
+
);
|
|
825
|
+
}
|
|
826
|
+
return {
|
|
827
|
+
blockStorage: data.block_storage,
|
|
828
|
+
bootTypes: data.boot_types
|
|
829
|
+
};
|
|
830
|
+
};
|
|
831
|
+
const unmarshalServerTypeNetwork = (data) => {
|
|
832
|
+
if (!json.isJSONObject(data)) {
|
|
833
|
+
throw new TypeError(
|
|
834
|
+
`Unmarshalling the type 'ServerTypeNetwork' failed as data isn't a dictionary.`
|
|
835
|
+
);
|
|
836
|
+
}
|
|
837
|
+
return {
|
|
838
|
+
interfaces: marshalling.unmarshalArrayOfObject(
|
|
839
|
+
data.interfaces,
|
|
840
|
+
unmarshalServerTypeNetworkInterface
|
|
841
|
+
),
|
|
842
|
+
ipv6Support: data.ipv6_support,
|
|
843
|
+
sumInternalBandwidth: data.sum_internal_bandwidth,
|
|
844
|
+
sumInternetBandwidth: data.sum_internet_bandwidth
|
|
845
|
+
};
|
|
846
|
+
};
|
|
847
|
+
const unmarshalServerTypeVolumeConstraintsByType = (data) => {
|
|
848
|
+
if (!json.isJSONObject(data)) {
|
|
849
|
+
throw new TypeError(
|
|
850
|
+
`Unmarshalling the type 'ServerTypeVolumeConstraintsByType' failed as data isn't a dictionary.`
|
|
851
|
+
);
|
|
852
|
+
}
|
|
853
|
+
return {
|
|
854
|
+
lSsd: data.l_ssd ? unmarshalServerTypeVolumeConstraintSizes(data.l_ssd) : void 0
|
|
855
|
+
};
|
|
856
|
+
};
|
|
857
|
+
const unmarshalServerType = (data) => {
|
|
858
|
+
if (!json.isJSONObject(data)) {
|
|
859
|
+
throw new TypeError(
|
|
860
|
+
`Unmarshalling the type 'ServerType' failed as data isn't a dictionary.`
|
|
861
|
+
);
|
|
862
|
+
}
|
|
863
|
+
return {
|
|
864
|
+
altNames: data.alt_names,
|
|
865
|
+
arch: data.arch,
|
|
866
|
+
baremetal: data.baremetal,
|
|
867
|
+
capabilities: data.capabilities ? unmarshalServerTypeCapabilities(data.capabilities) : void 0,
|
|
868
|
+
gpu: data.gpu,
|
|
869
|
+
hourlyPrice: data.hourly_price,
|
|
870
|
+
monthlyPrice: data.monthly_price,
|
|
871
|
+
ncpus: data.ncpus,
|
|
872
|
+
network: data.network ? unmarshalServerTypeNetwork(data.network) : void 0,
|
|
873
|
+
perVolumeConstraint: data.per_volume_constraint ? unmarshalServerTypeVolumeConstraintsByType(data.per_volume_constraint) : void 0,
|
|
874
|
+
ram: data.ram,
|
|
875
|
+
scratchStorageMaxSize: data.scratch_storage_max_size,
|
|
876
|
+
volumesConstraint: data.volumes_constraint ? unmarshalServerTypeVolumeConstraintSizes(data.volumes_constraint) : void 0
|
|
877
|
+
};
|
|
878
|
+
};
|
|
879
|
+
const unmarshalListServersTypesResponse = (data) => {
|
|
880
|
+
if (!json.isJSONObject(data)) {
|
|
881
|
+
throw new TypeError(
|
|
882
|
+
`Unmarshalling the type 'ListServersTypesResponse' failed as data isn't a dictionary.`
|
|
883
|
+
);
|
|
884
|
+
}
|
|
885
|
+
return {
|
|
886
|
+
servers: marshalling.unmarshalMapOfObject(data.servers, unmarshalServerType),
|
|
887
|
+
totalCount: data.total_count
|
|
888
|
+
};
|
|
889
|
+
};
|
|
890
|
+
const unmarshalListSnapshotsResponse = (data) => {
|
|
891
|
+
if (!json.isJSONObject(data)) {
|
|
892
|
+
throw new TypeError(
|
|
893
|
+
`Unmarshalling the type 'ListSnapshotsResponse' failed as data isn't a dictionary.`
|
|
894
|
+
);
|
|
895
|
+
}
|
|
896
|
+
return {
|
|
897
|
+
snapshots: marshalling.unmarshalArrayOfObject(data.snapshots, unmarshalSnapshot),
|
|
898
|
+
totalCount: data.total_count
|
|
899
|
+
};
|
|
900
|
+
};
|
|
901
|
+
const unmarshalListVolumesResponse = (data) => {
|
|
902
|
+
if (!json.isJSONObject(data)) {
|
|
903
|
+
throw new TypeError(
|
|
904
|
+
`Unmarshalling the type 'ListVolumesResponse' failed as data isn't a dictionary.`
|
|
905
|
+
);
|
|
906
|
+
}
|
|
907
|
+
return {
|
|
908
|
+
totalCount: data.total_count,
|
|
909
|
+
volumes: marshalling.unmarshalArrayOfObject(data.volumes, unmarshalVolume)
|
|
910
|
+
};
|
|
911
|
+
};
|
|
912
|
+
const unmarshalVolumeTypeCapabilities = (data) => {
|
|
913
|
+
if (!json.isJSONObject(data)) {
|
|
914
|
+
throw new TypeError(
|
|
915
|
+
`Unmarshalling the type 'VolumeTypeCapabilities' failed as data isn't a dictionary.`
|
|
916
|
+
);
|
|
917
|
+
}
|
|
918
|
+
return {
|
|
919
|
+
snapshot: data.snapshot
|
|
920
|
+
};
|
|
921
|
+
};
|
|
922
|
+
const unmarshalVolumeTypeConstraints = (data) => {
|
|
923
|
+
if (!json.isJSONObject(data)) {
|
|
924
|
+
throw new TypeError(
|
|
925
|
+
`Unmarshalling the type 'VolumeTypeConstraints' failed as data isn't a dictionary.`
|
|
926
|
+
);
|
|
927
|
+
}
|
|
928
|
+
return {
|
|
929
|
+
max: data.max,
|
|
930
|
+
min: data.min
|
|
931
|
+
};
|
|
932
|
+
};
|
|
933
|
+
const unmarshalVolumeType = (data) => {
|
|
934
|
+
if (!json.isJSONObject(data)) {
|
|
935
|
+
throw new TypeError(
|
|
936
|
+
`Unmarshalling the type 'VolumeType' failed as data isn't a dictionary.`
|
|
937
|
+
);
|
|
938
|
+
}
|
|
939
|
+
return {
|
|
940
|
+
capabilities: data.capabilities ? unmarshalVolumeTypeCapabilities(data.capabilities) : void 0,
|
|
941
|
+
constraints: data.constraints ? unmarshalVolumeTypeConstraints(data.constraints) : void 0,
|
|
942
|
+
displayName: data.display_name
|
|
943
|
+
};
|
|
944
|
+
};
|
|
945
|
+
const unmarshalListVolumesTypesResponse = (data) => {
|
|
946
|
+
if (!json.isJSONObject(data)) {
|
|
947
|
+
throw new TypeError(
|
|
948
|
+
`Unmarshalling the type 'ListVolumesTypesResponse' failed as data isn't a dictionary.`
|
|
949
|
+
);
|
|
950
|
+
}
|
|
951
|
+
return {
|
|
952
|
+
totalCount: data.total_count,
|
|
953
|
+
volumes: marshalling.unmarshalMapOfObject(data.volumes, unmarshalVolumeType)
|
|
954
|
+
};
|
|
955
|
+
};
|
|
956
|
+
const unmarshalMigrationPlan = (data) => {
|
|
957
|
+
if (!json.isJSONObject(data)) {
|
|
958
|
+
throw new TypeError(
|
|
959
|
+
`Unmarshalling the type 'MigrationPlan' failed as data isn't a dictionary.`
|
|
960
|
+
);
|
|
961
|
+
}
|
|
962
|
+
return {
|
|
963
|
+
snapshots: marshalling.unmarshalArrayOfObject(data.snapshots, unmarshalSnapshot),
|
|
964
|
+
validationKey: data.validation_key,
|
|
965
|
+
volume: data.volume ? unmarshalVolume(data.volume) : void 0
|
|
966
|
+
};
|
|
967
|
+
};
|
|
968
|
+
const unmarshalServerActionResponse = (data) => {
|
|
969
|
+
if (!json.isJSONObject(data)) {
|
|
970
|
+
throw new TypeError(
|
|
971
|
+
`Unmarshalling the type 'ServerActionResponse' failed as data isn't a dictionary.`
|
|
972
|
+
);
|
|
973
|
+
}
|
|
974
|
+
return {
|
|
975
|
+
task: data.task ? unmarshalTask(data.task) : void 0
|
|
976
|
+
};
|
|
977
|
+
};
|
|
978
|
+
const unmarshalSetImageResponse = (data) => {
|
|
979
|
+
if (!json.isJSONObject(data)) {
|
|
980
|
+
throw new TypeError(
|
|
981
|
+
`Unmarshalling the type 'SetImageResponse' failed as data isn't a dictionary.`
|
|
982
|
+
);
|
|
983
|
+
}
|
|
984
|
+
return {
|
|
985
|
+
image: data.image ? unmarshalImage(data.image) : void 0
|
|
986
|
+
};
|
|
987
|
+
};
|
|
988
|
+
const unmarshalSetPlacementGroupResponse = (data) => {
|
|
989
|
+
if (!json.isJSONObject(data)) {
|
|
990
|
+
throw new TypeError(
|
|
991
|
+
`Unmarshalling the type 'SetPlacementGroupResponse' failed as data isn't a dictionary.`
|
|
992
|
+
);
|
|
993
|
+
}
|
|
994
|
+
return {
|
|
995
|
+
placementGroup: data.placement_group ? unmarshalPlacementGroup(data.placement_group) : void 0
|
|
996
|
+
};
|
|
997
|
+
};
|
|
998
|
+
const unmarshalSetPlacementGroupServersResponse = (data) => {
|
|
999
|
+
if (!json.isJSONObject(data)) {
|
|
1000
|
+
throw new TypeError(
|
|
1001
|
+
`Unmarshalling the type 'SetPlacementGroupServersResponse' failed as data isn't a dictionary.`
|
|
1002
|
+
);
|
|
1003
|
+
}
|
|
1004
|
+
return {
|
|
1005
|
+
servers: marshalling.unmarshalArrayOfObject(
|
|
1006
|
+
data.servers,
|
|
1007
|
+
unmarshalPlacementGroupServer
|
|
1008
|
+
)
|
|
1009
|
+
};
|
|
1010
|
+
};
|
|
1011
|
+
const unmarshalSetSecurityGroupResponse = (data) => {
|
|
1012
|
+
if (!json.isJSONObject(data)) {
|
|
1013
|
+
throw new TypeError(
|
|
1014
|
+
`Unmarshalling the type 'SetSecurityGroupResponse' failed as data isn't a dictionary.`
|
|
1015
|
+
);
|
|
1016
|
+
}
|
|
1017
|
+
return {
|
|
1018
|
+
securityGroup: data.security_group ? unmarshalSecurityGroup(data.security_group) : void 0
|
|
1019
|
+
};
|
|
1020
|
+
};
|
|
1021
|
+
const unmarshalSetSecurityGroupRuleResponse = (data) => {
|
|
1022
|
+
if (!json.isJSONObject(data)) {
|
|
1023
|
+
throw new TypeError(
|
|
1024
|
+
`Unmarshalling the type 'SetSecurityGroupRuleResponse' failed as data isn't a dictionary.`
|
|
1025
|
+
);
|
|
1026
|
+
}
|
|
1027
|
+
return {
|
|
1028
|
+
rule: data.rule ? unmarshalSecurityGroupRule(data.rule) : void 0
|
|
1029
|
+
};
|
|
1030
|
+
};
|
|
1031
|
+
const unmarshalSetSecurityGroupRulesResponse = (data) => {
|
|
1032
|
+
if (!json.isJSONObject(data)) {
|
|
1033
|
+
throw new TypeError(
|
|
1034
|
+
`Unmarshalling the type 'SetSecurityGroupRulesResponse' failed as data isn't a dictionary.`
|
|
1035
|
+
);
|
|
1036
|
+
}
|
|
1037
|
+
return {
|
|
1038
|
+
rules: marshalling.unmarshalArrayOfObject(data.rules, unmarshalSecurityGroupRule)
|
|
1039
|
+
};
|
|
1040
|
+
};
|
|
1041
|
+
const unmarshalSetServerResponse = (data) => {
|
|
1042
|
+
if (!json.isJSONObject(data)) {
|
|
1043
|
+
throw new TypeError(
|
|
1044
|
+
`Unmarshalling the type 'SetServerResponse' failed as data isn't a dictionary.`
|
|
1045
|
+
);
|
|
1046
|
+
}
|
|
1047
|
+
return {
|
|
1048
|
+
server: data.server ? unmarshalServer(data.server) : void 0
|
|
1049
|
+
};
|
|
1050
|
+
};
|
|
1051
|
+
const unmarshalSetSnapshotResponse = (data) => {
|
|
1052
|
+
if (!json.isJSONObject(data)) {
|
|
1053
|
+
throw new TypeError(
|
|
1054
|
+
`Unmarshalling the type 'SetSnapshotResponse' failed as data isn't a dictionary.`
|
|
1055
|
+
);
|
|
1056
|
+
}
|
|
1057
|
+
return {
|
|
1058
|
+
snapshot: data.snapshot ? unmarshalSnapshot(data.snapshot) : void 0
|
|
1059
|
+
};
|
|
1060
|
+
};
|
|
1061
|
+
const unmarshalUpdateImageResponse = (data) => {
|
|
1062
|
+
if (!json.isJSONObject(data)) {
|
|
1063
|
+
throw new TypeError(
|
|
1064
|
+
`Unmarshalling the type 'UpdateImageResponse' failed as data isn't a dictionary.`
|
|
1065
|
+
);
|
|
1066
|
+
}
|
|
1067
|
+
return {
|
|
1068
|
+
image: data.image ? unmarshalImage(data.image) : void 0
|
|
1069
|
+
};
|
|
1070
|
+
};
|
|
1071
|
+
const unmarshalUpdateIpResponse = (data) => {
|
|
1072
|
+
if (!json.isJSONObject(data)) {
|
|
1073
|
+
throw new TypeError(
|
|
1074
|
+
`Unmarshalling the type 'UpdateIpResponse' failed as data isn't a dictionary.`
|
|
1075
|
+
);
|
|
1076
|
+
}
|
|
1077
|
+
return {
|
|
1078
|
+
ip: data.ip ? unmarshalIp(data.ip) : void 0
|
|
1079
|
+
};
|
|
1080
|
+
};
|
|
1081
|
+
const unmarshalUpdatePlacementGroupResponse = (data) => {
|
|
1082
|
+
if (!json.isJSONObject(data)) {
|
|
1083
|
+
throw new TypeError(
|
|
1084
|
+
`Unmarshalling the type 'UpdatePlacementGroupResponse' failed as data isn't a dictionary.`
|
|
1085
|
+
);
|
|
1086
|
+
}
|
|
1087
|
+
return {
|
|
1088
|
+
placementGroup: data.placement_group ? unmarshalPlacementGroup(data.placement_group) : void 0
|
|
1089
|
+
};
|
|
1090
|
+
};
|
|
1091
|
+
const unmarshalUpdatePlacementGroupServersResponse = (data) => {
|
|
1092
|
+
if (!json.isJSONObject(data)) {
|
|
1093
|
+
throw new TypeError(
|
|
1094
|
+
`Unmarshalling the type 'UpdatePlacementGroupServersResponse' failed as data isn't a dictionary.`
|
|
1095
|
+
);
|
|
1096
|
+
}
|
|
1097
|
+
return {
|
|
1098
|
+
servers: marshalling.unmarshalArrayOfObject(
|
|
1099
|
+
data.servers,
|
|
1100
|
+
unmarshalPlacementGroupServer
|
|
1101
|
+
)
|
|
1102
|
+
};
|
|
1103
|
+
};
|
|
1104
|
+
const unmarshalUpdateSecurityGroupResponse = (data) => {
|
|
1105
|
+
if (!json.isJSONObject(data)) {
|
|
1106
|
+
throw new TypeError(
|
|
1107
|
+
`Unmarshalling the type 'UpdateSecurityGroupResponse' failed as data isn't a dictionary.`
|
|
1108
|
+
);
|
|
1109
|
+
}
|
|
1110
|
+
return {
|
|
1111
|
+
securityGroup: data.security_group ? unmarshalSecurityGroup(data.security_group) : void 0
|
|
1112
|
+
};
|
|
1113
|
+
};
|
|
1114
|
+
const unmarshalUpdateSecurityGroupRuleResponse = (data) => {
|
|
1115
|
+
if (!json.isJSONObject(data)) {
|
|
1116
|
+
throw new TypeError(
|
|
1117
|
+
`Unmarshalling the type 'UpdateSecurityGroupRuleResponse' failed as data isn't a dictionary.`
|
|
1118
|
+
);
|
|
1119
|
+
}
|
|
1120
|
+
return {
|
|
1121
|
+
rule: data.rule ? unmarshalSecurityGroupRule(data.rule) : void 0
|
|
1122
|
+
};
|
|
1123
|
+
};
|
|
1124
|
+
const unmarshalUpdateServerResponse = (data) => {
|
|
1125
|
+
if (!json.isJSONObject(data)) {
|
|
1126
|
+
throw new TypeError(
|
|
1127
|
+
`Unmarshalling the type 'UpdateServerResponse' failed as data isn't a dictionary.`
|
|
1128
|
+
);
|
|
1129
|
+
}
|
|
1130
|
+
return {
|
|
1131
|
+
server: data.server ? unmarshalServer(data.server) : void 0
|
|
1132
|
+
};
|
|
1133
|
+
};
|
|
1134
|
+
const unmarshalUpdateSnapshotResponse = (data) => {
|
|
1135
|
+
if (!json.isJSONObject(data)) {
|
|
1136
|
+
throw new TypeError(
|
|
1137
|
+
`Unmarshalling the type 'UpdateSnapshotResponse' failed as data isn't a dictionary.`
|
|
1138
|
+
);
|
|
1139
|
+
}
|
|
1140
|
+
return {
|
|
1141
|
+
snapshot: data.snapshot ? unmarshalSnapshot(data.snapshot) : void 0
|
|
1142
|
+
};
|
|
1143
|
+
};
|
|
1144
|
+
const unmarshalUpdateVolumeResponse = (data) => {
|
|
1145
|
+
if (!json.isJSONObject(data)) {
|
|
1146
|
+
throw new TypeError(
|
|
1147
|
+
`Unmarshalling the type 'UpdateVolumeResponse' failed as data isn't a dictionary.`
|
|
1148
|
+
);
|
|
1149
|
+
}
|
|
1150
|
+
return {
|
|
1151
|
+
volume: data.volume ? unmarshalVolume(data.volume) : void 0
|
|
1152
|
+
};
|
|
1153
|
+
};
|
|
1154
|
+
const marshalApplyBlockMigrationRequest = (request, defaults) => ({
|
|
1155
|
+
validation_key: request.validationKey,
|
|
1156
|
+
...marshalling.resolveOneOf([
|
|
1157
|
+
{ param: "volume_id", value: request.volumeId },
|
|
1158
|
+
{ param: "snapshot_id", value: request.snapshotId }
|
|
1159
|
+
])
|
|
1160
|
+
});
|
|
1161
|
+
const marshalAttachServerVolumeRequest = (request, defaults) => ({
|
|
1162
|
+
boot: request.boot,
|
|
1163
|
+
volume_id: request.volumeId,
|
|
1164
|
+
volume_type: request.volumeType
|
|
1165
|
+
});
|
|
1166
|
+
const marshalVolumeTemplate = (request, defaults) => ({
|
|
1167
|
+
id: request.id,
|
|
1168
|
+
name: request.name,
|
|
1169
|
+
size: request.size,
|
|
1170
|
+
volume_type: request.volumeType,
|
|
1171
|
+
...marshalling.resolveOneOf([
|
|
1172
|
+
{ param: "project", value: request.project },
|
|
1173
|
+
{ param: "organization", value: request.organization }
|
|
1174
|
+
])
|
|
1175
|
+
});
|
|
1176
|
+
const marshalCreateImageRequest = (request, defaults) => ({
|
|
1177
|
+
arch: request.arch,
|
|
1178
|
+
default_bootscript: request.defaultBootscript,
|
|
1179
|
+
extra_volumes: request.extraVolumes !== void 0 ? Object.entries(request.extraVolumes).reduce(
|
|
1180
|
+
(acc, [key, value]) => ({
|
|
1181
|
+
...acc,
|
|
1182
|
+
[key]: marshalVolumeTemplate(value)
|
|
1183
|
+
}),
|
|
1184
|
+
{}
|
|
1185
|
+
) : void 0,
|
|
1186
|
+
name: request.name || randomName("img"),
|
|
1187
|
+
public: request.public,
|
|
1188
|
+
root_volume: request.rootVolume,
|
|
1189
|
+
tags: request.tags,
|
|
1190
|
+
...marshalling.resolveOneOf([
|
|
1191
|
+
{
|
|
1192
|
+
default: defaults.defaultProjectId,
|
|
1193
|
+
param: "project",
|
|
1194
|
+
value: request.project
|
|
1195
|
+
},
|
|
1196
|
+
{
|
|
1197
|
+
default: defaults.defaultOrganizationId,
|
|
1198
|
+
param: "organization",
|
|
1199
|
+
value: request.organization
|
|
1200
|
+
}
|
|
1201
|
+
])
|
|
1202
|
+
});
|
|
1203
|
+
const marshalCreateIpRequest = (request, defaults) => ({
|
|
1204
|
+
server: request.server,
|
|
1205
|
+
tags: request.tags,
|
|
1206
|
+
type: request.type,
|
|
1207
|
+
...marshalling.resolveOneOf([
|
|
1208
|
+
{
|
|
1209
|
+
default: defaults.defaultProjectId,
|
|
1210
|
+
param: "project",
|
|
1211
|
+
value: request.project
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
default: defaults.defaultOrganizationId,
|
|
1215
|
+
param: "organization",
|
|
1216
|
+
value: request.organization
|
|
1217
|
+
}
|
|
1218
|
+
])
|
|
1219
|
+
});
|
|
1220
|
+
const marshalCreatePlacementGroupRequest = (request, defaults) => ({
|
|
1221
|
+
name: request.name || randomName("pg"),
|
|
1222
|
+
policy_mode: request.policyMode,
|
|
1223
|
+
policy_type: request.policyType,
|
|
1224
|
+
tags: request.tags,
|
|
1225
|
+
...marshalling.resolveOneOf([
|
|
1226
|
+
{
|
|
1227
|
+
default: defaults.defaultProjectId,
|
|
1228
|
+
param: "project",
|
|
1229
|
+
value: request.project
|
|
1230
|
+
},
|
|
1231
|
+
{
|
|
1232
|
+
default: defaults.defaultOrganizationId,
|
|
1233
|
+
param: "organization",
|
|
1234
|
+
value: request.organization
|
|
1235
|
+
}
|
|
1236
|
+
])
|
|
1237
|
+
});
|
|
1238
|
+
const marshalCreatePrivateNICRequest = (request, defaults) => ({
|
|
1239
|
+
ip_ids: request.ipIds,
|
|
1240
|
+
private_network_id: request.privateNetworkId,
|
|
1241
|
+
tags: request.tags
|
|
1242
|
+
});
|
|
1243
|
+
const marshalCreateSecurityGroupRequest = (request, defaults) => ({
|
|
1244
|
+
description: request.description,
|
|
1245
|
+
enable_default_security: request.enableDefaultSecurity,
|
|
1246
|
+
inbound_default_policy: request.inboundDefaultPolicy,
|
|
1247
|
+
name: request.name || randomName("sg"),
|
|
1248
|
+
outbound_default_policy: request.outboundDefaultPolicy,
|
|
1249
|
+
stateful: request.stateful,
|
|
1250
|
+
tags: request.tags,
|
|
1251
|
+
...marshalling.resolveOneOf([
|
|
1252
|
+
{
|
|
1253
|
+
default: defaults.defaultProjectId,
|
|
1254
|
+
param: "project",
|
|
1255
|
+
value: request.project
|
|
1256
|
+
},
|
|
1257
|
+
{
|
|
1258
|
+
default: defaults.defaultOrganizationId,
|
|
1259
|
+
param: "organization",
|
|
1260
|
+
value: request.organization
|
|
1261
|
+
}
|
|
1262
|
+
]),
|
|
1263
|
+
...marshalling.resolveOneOf([
|
|
1264
|
+
{ param: "organization_default", value: request.organizationDefault },
|
|
1265
|
+
{ param: "project_default", value: request.projectDefault }
|
|
1266
|
+
])
|
|
1267
|
+
});
|
|
1268
|
+
const marshalCreateSecurityGroupRuleRequest = (request, defaults) => ({
|
|
1269
|
+
action: request.action,
|
|
1270
|
+
dest_port_from: request.destPortFrom,
|
|
1271
|
+
dest_port_to: request.destPortTo,
|
|
1272
|
+
direction: request.direction,
|
|
1273
|
+
editable: request.editable,
|
|
1274
|
+
ip_range: request.ipRange,
|
|
1275
|
+
position: request.position,
|
|
1276
|
+
protocol: request.protocol
|
|
1277
|
+
});
|
|
1278
|
+
const marshalVolumeServerTemplate = (request, defaults) => ({
|
|
1279
|
+
base_snapshot: request.baseSnapshot,
|
|
1280
|
+
boot: request.boot,
|
|
1281
|
+
id: request.id,
|
|
1282
|
+
name: request.name,
|
|
1283
|
+
organization: request.organization,
|
|
1284
|
+
project: request.project,
|
|
1285
|
+
size: request.size,
|
|
1286
|
+
volume_type: request.volumeType
|
|
1287
|
+
});
|
|
1288
|
+
const marshalCreateServerRequest = (request, defaults) => ({
|
|
1289
|
+
boot_type: request.bootType,
|
|
1290
|
+
bootscript: request.bootscript,
|
|
1291
|
+
commercial_type: request.commercialType,
|
|
1292
|
+
dynamic_ip_required: request.dynamicIpRequired,
|
|
1293
|
+
enable_ipv6: request.enableIpv6,
|
|
1294
|
+
image: request.image,
|
|
1295
|
+
name: request.name || randomName("srv"),
|
|
1296
|
+
placement_group: request.placementGroup,
|
|
1297
|
+
public_ip: request.publicIp,
|
|
1298
|
+
public_ips: request.publicIps,
|
|
1299
|
+
routed_ip_enabled: request.routedIpEnabled,
|
|
1300
|
+
security_group: request.securityGroup,
|
|
1301
|
+
tags: request.tags,
|
|
1302
|
+
volumes: request.volumes !== void 0 ? Object.entries(request.volumes).reduce(
|
|
1303
|
+
(acc, [key, value]) => ({
|
|
1304
|
+
...acc,
|
|
1305
|
+
[key]: marshalVolumeServerTemplate(value)
|
|
1306
|
+
}),
|
|
1307
|
+
{}
|
|
1308
|
+
) : void 0,
|
|
1309
|
+
...marshalling.resolveOneOf([
|
|
1310
|
+
{
|
|
1311
|
+
default: defaults.defaultProjectId,
|
|
1312
|
+
param: "project",
|
|
1313
|
+
value: request.project
|
|
1314
|
+
},
|
|
1315
|
+
{
|
|
1316
|
+
default: defaults.defaultOrganizationId,
|
|
1317
|
+
param: "organization",
|
|
1318
|
+
value: request.organization
|
|
1319
|
+
}
|
|
1320
|
+
])
|
|
1321
|
+
});
|
|
1322
|
+
const marshalCreateSnapshotRequest = (request, defaults) => ({
|
|
1323
|
+
bucket: request.bucket,
|
|
1324
|
+
key: request.key,
|
|
1325
|
+
name: request.name || randomName("snp"),
|
|
1326
|
+
size: request.size,
|
|
1327
|
+
tags: request.tags,
|
|
1328
|
+
volume_id: request.volumeId,
|
|
1329
|
+
volume_type: request.volumeType,
|
|
1330
|
+
...marshalling.resolveOneOf([
|
|
1331
|
+
{
|
|
1332
|
+
default: defaults.defaultProjectId,
|
|
1333
|
+
param: "project",
|
|
1334
|
+
value: request.project
|
|
1335
|
+
},
|
|
1336
|
+
{
|
|
1337
|
+
default: defaults.defaultOrganizationId,
|
|
1338
|
+
param: "organization",
|
|
1339
|
+
value: request.organization
|
|
1340
|
+
}
|
|
1341
|
+
])
|
|
1342
|
+
});
|
|
1343
|
+
const marshalCreateVolumeRequest = (request, defaults) => ({
|
|
1344
|
+
name: request.name || randomName("vol"),
|
|
1345
|
+
tags: request.tags,
|
|
1346
|
+
volume_type: request.volumeType,
|
|
1347
|
+
...marshalling.resolveOneOf([
|
|
1348
|
+
{
|
|
1349
|
+
default: defaults.defaultProjectId,
|
|
1350
|
+
param: "project",
|
|
1351
|
+
value: request.project
|
|
1352
|
+
},
|
|
1353
|
+
{
|
|
1354
|
+
default: defaults.defaultOrganizationId,
|
|
1355
|
+
param: "organization",
|
|
1356
|
+
value: request.organization
|
|
1357
|
+
}
|
|
1358
|
+
]),
|
|
1359
|
+
...marshalling.resolveOneOf([
|
|
1360
|
+
{ param: "size", value: request.size },
|
|
1361
|
+
{ param: "base_snapshot", value: request.baseSnapshot }
|
|
1362
|
+
])
|
|
1363
|
+
});
|
|
1364
|
+
const marshalDetachServerVolumeRequest = (request, defaults) => ({
|
|
1365
|
+
volume_id: request.volumeId
|
|
1366
|
+
});
|
|
1367
|
+
const marshalExportSnapshotRequest = (request, defaults) => ({
|
|
1368
|
+
bucket: request.bucket,
|
|
1369
|
+
key: request.key
|
|
1370
|
+
});
|
|
1371
|
+
const marshalPlanBlockMigrationRequest = (request, defaults) => ({
|
|
1372
|
+
...marshalling.resolveOneOf([
|
|
1373
|
+
{ param: "volume_id", value: request.volumeId },
|
|
1374
|
+
{ param: "snapshot_id", value: request.snapshotId }
|
|
1375
|
+
])
|
|
1376
|
+
});
|
|
1377
|
+
const marshalServerActionRequestVolumeBackupTemplate = (request, defaults) => ({
|
|
1378
|
+
volume_type: request.volumeType
|
|
1379
|
+
});
|
|
1380
|
+
const marshalServerActionRequest = (request, defaults) => ({
|
|
1381
|
+
action: request.action,
|
|
1382
|
+
name: request.name,
|
|
1383
|
+
volumes: request.volumes !== void 0 ? Object.entries(request.volumes).reduce(
|
|
1384
|
+
(acc, [key, value]) => ({
|
|
1385
|
+
...acc,
|
|
1386
|
+
[key]: marshalServerActionRequestVolumeBackupTemplate(
|
|
1387
|
+
value
|
|
1388
|
+
)
|
|
1389
|
+
}),
|
|
1390
|
+
{}
|
|
1391
|
+
) : void 0
|
|
1392
|
+
});
|
|
1393
|
+
const marshalServerSummary = (request, defaults) => ({
|
|
1394
|
+
id: request.id,
|
|
1395
|
+
name: request.name
|
|
1396
|
+
});
|
|
1397
|
+
const marshalBootscript = (request, defaults) => ({
|
|
1398
|
+
arch: request.arch,
|
|
1399
|
+
bootcmdargs: request.bootcmdargs,
|
|
1400
|
+
default: request.default,
|
|
1401
|
+
dtb: request.dtb,
|
|
1402
|
+
id: request.id,
|
|
1403
|
+
initrd: request.initrd,
|
|
1404
|
+
kernel: request.kernel,
|
|
1405
|
+
organization: request.organization,
|
|
1406
|
+
project: request.project,
|
|
1407
|
+
public: request.public,
|
|
1408
|
+
title: request.title,
|
|
1409
|
+
zone: request.zone
|
|
1410
|
+
});
|
|
1411
|
+
const marshalVolume = (request, defaults) => ({
|
|
1412
|
+
creation_date: request.creationDate,
|
|
1413
|
+
export_uri: request.exportUri,
|
|
1414
|
+
id: request.id,
|
|
1415
|
+
modification_date: request.modificationDate,
|
|
1416
|
+
name: request.name,
|
|
1417
|
+
organization: request.organization,
|
|
1418
|
+
project: request.project,
|
|
1419
|
+
server: request.server !== void 0 ? marshalServerSummary(request.server) : void 0,
|
|
1420
|
+
size: request.size,
|
|
1421
|
+
state: request.state,
|
|
1422
|
+
tags: request.tags,
|
|
1423
|
+
volume_type: request.volumeType,
|
|
1424
|
+
zone: request.zone
|
|
1425
|
+
});
|
|
1426
|
+
const marshalVolumeSummary = (request, defaults) => ({
|
|
1427
|
+
id: request.id,
|
|
1428
|
+
name: request.name,
|
|
1429
|
+
size: request.size,
|
|
1430
|
+
volume_type: request.volumeType
|
|
1431
|
+
});
|
|
1432
|
+
const marshalSetImageRequest = (request, defaults) => ({
|
|
1433
|
+
arch: request.arch,
|
|
1434
|
+
creation_date: request.creationDate,
|
|
1435
|
+
default_bootscript: request.defaultBootscript !== void 0 ? marshalBootscript(request.defaultBootscript) : void 0,
|
|
1436
|
+
extra_volumes: request.extraVolumes !== void 0 ? Object.entries(request.extraVolumes).reduce(
|
|
1437
|
+
(acc, [key, value]) => ({
|
|
1438
|
+
...acc,
|
|
1439
|
+
[key]: marshalVolume(value)
|
|
1440
|
+
}),
|
|
1441
|
+
{}
|
|
1442
|
+
) : void 0,
|
|
1443
|
+
from_server: request.fromServer,
|
|
1444
|
+
modification_date: request.modificationDate,
|
|
1445
|
+
name: request.name,
|
|
1446
|
+
organization: request.organization ?? defaults.defaultOrganizationId,
|
|
1447
|
+
project: request.project ?? defaults.defaultProjectId,
|
|
1448
|
+
public: request.public,
|
|
1449
|
+
root_volume: request.rootVolume !== void 0 ? marshalVolumeSummary(request.rootVolume) : void 0,
|
|
1450
|
+
state: request.state,
|
|
1451
|
+
tags: request.tags
|
|
1452
|
+
});
|
|
1453
|
+
const marshalSetPlacementGroupRequest = (request, defaults) => ({
|
|
1454
|
+
name: request.name,
|
|
1455
|
+
organization: request.organization ?? defaults.defaultOrganizationId,
|
|
1456
|
+
policy_mode: request.policyMode,
|
|
1457
|
+
policy_type: request.policyType,
|
|
1458
|
+
project: request.project ?? defaults.defaultProjectId,
|
|
1459
|
+
tags: request.tags
|
|
1460
|
+
});
|
|
1461
|
+
const marshalSetPlacementGroupServersRequest = (request, defaults) => ({
|
|
1462
|
+
servers: request.servers
|
|
1463
|
+
});
|
|
1464
|
+
const marshalSetSecurityGroupRequest = (request, defaults) => ({
|
|
1465
|
+
creation_date: request.creationDate,
|
|
1466
|
+
description: request.description,
|
|
1467
|
+
enable_default_security: request.enableDefaultSecurity,
|
|
1468
|
+
inbound_default_policy: request.inboundDefaultPolicy,
|
|
1469
|
+
modification_date: request.modificationDate,
|
|
1470
|
+
name: request.name,
|
|
1471
|
+
organization: request.organization ?? defaults.defaultOrganizationId,
|
|
1472
|
+
organization_default: request.organizationDefault,
|
|
1473
|
+
outbound_default_policy: request.outboundDefaultPolicy,
|
|
1474
|
+
project: request.project ?? defaults.defaultProjectId,
|
|
1475
|
+
project_default: request.projectDefault,
|
|
1476
|
+
servers: request.servers !== void 0 ? request.servers.map((elt) => marshalServerSummary(elt)) : void 0,
|
|
1477
|
+
stateful: request.stateful,
|
|
1478
|
+
tags: request.tags
|
|
1479
|
+
});
|
|
1480
|
+
const marshalSetSecurityGroupRuleRequest = (request, defaults) => ({
|
|
1481
|
+
action: request.action,
|
|
1482
|
+
dest_port_from: request.destPortFrom,
|
|
1483
|
+
dest_port_to: request.destPortTo,
|
|
1484
|
+
direction: request.direction,
|
|
1485
|
+
editable: request.editable,
|
|
1486
|
+
id: request.id,
|
|
1487
|
+
ip_range: request.ipRange,
|
|
1488
|
+
position: request.position,
|
|
1489
|
+
protocol: request.protocol
|
|
1490
|
+
});
|
|
1491
|
+
const marshalSetSecurityGroupRulesRequestRule = (request, defaults) => ({
|
|
1492
|
+
action: request.action,
|
|
1493
|
+
dest_port_from: request.destPortFrom,
|
|
1494
|
+
dest_port_to: request.destPortTo,
|
|
1495
|
+
direction: request.direction,
|
|
1496
|
+
editable: request.editable,
|
|
1497
|
+
id: request.id,
|
|
1498
|
+
ip_range: request.ipRange,
|
|
1499
|
+
position: request.position,
|
|
1500
|
+
protocol: request.protocol,
|
|
1501
|
+
zone: request.zone
|
|
1502
|
+
});
|
|
1503
|
+
const marshalSetSecurityGroupRulesRequest = (request, defaults) => ({
|
|
1504
|
+
rules: request.rules !== void 0 ? request.rules.map(
|
|
1505
|
+
(elt) => marshalSetSecurityGroupRulesRequestRule(elt)
|
|
1506
|
+
) : void 0
|
|
1507
|
+
});
|
|
1508
|
+
const marshalImage = (request, defaults) => ({
|
|
1509
|
+
arch: request.arch,
|
|
1510
|
+
creation_date: request.creationDate,
|
|
1511
|
+
default_bootscript: request.defaultBootscript !== void 0 ? marshalBootscript(request.defaultBootscript) : void 0,
|
|
1512
|
+
extra_volumes: Object.entries(request.extraVolumes).reduce(
|
|
1513
|
+
(acc, [key, value]) => ({ ...acc, [key]: marshalVolume(value) }),
|
|
1514
|
+
{}
|
|
1515
|
+
),
|
|
1516
|
+
from_server: request.fromServer,
|
|
1517
|
+
id: request.id,
|
|
1518
|
+
modification_date: request.modificationDate,
|
|
1519
|
+
name: request.name,
|
|
1520
|
+
organization: request.organization,
|
|
1521
|
+
project: request.project,
|
|
1522
|
+
public: request.public,
|
|
1523
|
+
root_volume: request.rootVolume !== void 0 ? marshalVolumeSummary(request.rootVolume) : void 0,
|
|
1524
|
+
state: request.state,
|
|
1525
|
+
tags: request.tags,
|
|
1526
|
+
zone: request.zone
|
|
1527
|
+
});
|
|
1528
|
+
const marshalPlacementGroup = (request, defaults) => ({
|
|
1529
|
+
id: request.id,
|
|
1530
|
+
name: request.name,
|
|
1531
|
+
organization: request.organization,
|
|
1532
|
+
policy_mode: request.policyMode,
|
|
1533
|
+
policy_respected: request.policyRespected,
|
|
1534
|
+
policy_type: request.policyType,
|
|
1535
|
+
project: request.project,
|
|
1536
|
+
tags: request.tags,
|
|
1537
|
+
zone: request.zone
|
|
1538
|
+
});
|
|
1539
|
+
const marshalPrivateNIC = (request, defaults) => ({
|
|
1540
|
+
id: request.id,
|
|
1541
|
+
mac_address: request.macAddress,
|
|
1542
|
+
private_network_id: request.privateNetworkId,
|
|
1543
|
+
server_id: request.serverId,
|
|
1544
|
+
state: request.state,
|
|
1545
|
+
tags: request.tags
|
|
1546
|
+
});
|
|
1547
|
+
const marshalSecurityGroupSummary = (request, defaults) => ({
|
|
1548
|
+
id: request.id,
|
|
1549
|
+
name: request.name
|
|
1550
|
+
});
|
|
1551
|
+
const marshalServerIp = (request, defaults) => ({
|
|
1552
|
+
address: request.address,
|
|
1553
|
+
dynamic: request.dynamic,
|
|
1554
|
+
family: request.family,
|
|
1555
|
+
gateway: request.gateway,
|
|
1556
|
+
id: request.id,
|
|
1557
|
+
ipam_id: request.ipamId,
|
|
1558
|
+
netmask: request.netmask,
|
|
1559
|
+
provisioning_mode: request.provisioningMode,
|
|
1560
|
+
state: request.state,
|
|
1561
|
+
tags: request.tags
|
|
1562
|
+
});
|
|
1563
|
+
const marshalServerIpv6 = (request, defaults) => ({
|
|
1564
|
+
address: request.address,
|
|
1565
|
+
gateway: request.gateway,
|
|
1566
|
+
netmask: request.netmask
|
|
1567
|
+
});
|
|
1568
|
+
const marshalServerLocation = (request, defaults) => ({
|
|
1569
|
+
cluster_id: request.clusterId,
|
|
1570
|
+
hypervisor_id: request.hypervisorId,
|
|
1571
|
+
node_id: request.nodeId,
|
|
1572
|
+
platform_id: request.platformId,
|
|
1573
|
+
zone_id: request.zoneId
|
|
1574
|
+
});
|
|
1575
|
+
const marshalServerMaintenance = (request, defaults) => ({
|
|
1576
|
+
reason: request.reason,
|
|
1577
|
+
start_date: request.startDate
|
|
1578
|
+
});
|
|
1579
|
+
const marshalSetServerRequest = (request, defaults) => ({
|
|
1580
|
+
allowed_actions: request.allowedActions !== void 0 ? request.allowedActions : void 0,
|
|
1581
|
+
arch: request.arch,
|
|
1582
|
+
boot_type: request.bootType,
|
|
1583
|
+
bootscript: request.bootscript !== void 0 ? marshalBootscript(request.bootscript) : void 0,
|
|
1584
|
+
commercial_type: request.commercialType,
|
|
1585
|
+
creation_date: request.creationDate,
|
|
1586
|
+
dynamic_ip_required: request.dynamicIpRequired,
|
|
1587
|
+
enable_ipv6: request.enableIpv6,
|
|
1588
|
+
hostname: request.hostname,
|
|
1589
|
+
image: request.image !== void 0 ? marshalImage(request.image) : void 0,
|
|
1590
|
+
ipv6: request.ipv6 !== void 0 ? marshalServerIpv6(request.ipv6) : void 0,
|
|
1591
|
+
location: request.location !== void 0 ? marshalServerLocation(request.location) : void 0,
|
|
1592
|
+
maintenances: request.maintenances !== void 0 ? request.maintenances.map((elt) => marshalServerMaintenance(elt)) : void 0,
|
|
1593
|
+
modification_date: request.modificationDate,
|
|
1594
|
+
name: request.name,
|
|
1595
|
+
organization: request.organization ?? defaults.defaultOrganizationId,
|
|
1596
|
+
placement_group: request.placementGroup !== void 0 ? marshalPlacementGroup(request.placementGroup) : void 0,
|
|
1597
|
+
private_ip: request.privateIp,
|
|
1598
|
+
private_nics: request.privateNics !== void 0 ? request.privateNics.map((elt) => marshalPrivateNIC(elt)) : void 0,
|
|
1599
|
+
project: request.project ?? defaults.defaultProjectId,
|
|
1600
|
+
protected: request.protected,
|
|
1601
|
+
public_ip: request.publicIp !== void 0 ? marshalServerIp(request.publicIp) : void 0,
|
|
1602
|
+
public_ips: request.publicIps !== void 0 ? request.publicIps.map((elt) => marshalServerIp(elt)) : void 0,
|
|
1603
|
+
routed_ip_enabled: request.routedIpEnabled,
|
|
1604
|
+
security_group: request.securityGroup !== void 0 ? marshalSecurityGroupSummary(request.securityGroup) : void 0,
|
|
1605
|
+
state: request.state,
|
|
1606
|
+
state_detail: request.stateDetail,
|
|
1607
|
+
tags: request.tags,
|
|
1608
|
+
volumes: request.volumes !== void 0 ? Object.entries(request.volumes).reduce(
|
|
1609
|
+
(acc, [key, value]) => ({
|
|
1610
|
+
...acc,
|
|
1611
|
+
[key]: marshalVolume(value)
|
|
1612
|
+
}),
|
|
1613
|
+
{}
|
|
1614
|
+
) : void 0
|
|
1615
|
+
});
|
|
1616
|
+
const marshalSnapshotBaseVolume = (request, defaults) => ({
|
|
1617
|
+
id: request.id,
|
|
1618
|
+
name: request.name
|
|
1619
|
+
});
|
|
1620
|
+
const marshalSetSnapshotRequest = (request, defaults) => ({
|
|
1621
|
+
base_volume: request.baseVolume !== void 0 ? marshalSnapshotBaseVolume(request.baseVolume) : void 0,
|
|
1622
|
+
creation_date: request.creationDate,
|
|
1623
|
+
id: request.id,
|
|
1624
|
+
modification_date: request.modificationDate,
|
|
1625
|
+
name: request.name,
|
|
1626
|
+
organization: request.organization ?? defaults.defaultOrganizationId,
|
|
1627
|
+
project: request.project ?? defaults.defaultProjectId,
|
|
1628
|
+
size: request.size,
|
|
1629
|
+
state: request.state,
|
|
1630
|
+
tags: request.tags,
|
|
1631
|
+
volume_type: request.volumeType
|
|
1632
|
+
});
|
|
1633
|
+
const marshalVolumeImageUpdateTemplate = (request, defaults) => ({
|
|
1634
|
+
id: request.id
|
|
1635
|
+
});
|
|
1636
|
+
const marshalUpdateImageRequest = (request, defaults) => ({
|
|
1637
|
+
arch: request.arch,
|
|
1638
|
+
extra_volumes: request.extraVolumes !== void 0 ? Object.entries(request.extraVolumes).reduce(
|
|
1639
|
+
(acc, [key, value]) => ({
|
|
1640
|
+
...acc,
|
|
1641
|
+
[key]: marshalVolumeImageUpdateTemplate(value)
|
|
1642
|
+
}),
|
|
1643
|
+
{}
|
|
1644
|
+
) : void 0,
|
|
1645
|
+
name: request.name,
|
|
1646
|
+
public: request.public,
|
|
1647
|
+
tags: request.tags
|
|
1648
|
+
});
|
|
1649
|
+
const marshalUpdateIpRequest = (request, defaults) => ({
|
|
1650
|
+
reverse: request.reverse,
|
|
1651
|
+
server: request.server,
|
|
1652
|
+
tags: request.tags,
|
|
1653
|
+
type: request.type
|
|
1654
|
+
});
|
|
1655
|
+
const marshalUpdatePlacementGroupRequest = (request, defaults) => ({
|
|
1656
|
+
name: request.name,
|
|
1657
|
+
policy_mode: request.policyMode,
|
|
1658
|
+
policy_type: request.policyType,
|
|
1659
|
+
tags: request.tags
|
|
1660
|
+
});
|
|
1661
|
+
const marshalUpdatePlacementGroupServersRequest = (request, defaults) => ({
|
|
1662
|
+
servers: request.servers
|
|
1663
|
+
});
|
|
1664
|
+
const marshalUpdatePrivateNICRequest = (request, defaults) => ({
|
|
1665
|
+
tags: request.tags
|
|
1666
|
+
});
|
|
1667
|
+
const marshalUpdateSecurityGroupRequest = (request, defaults) => ({
|
|
1668
|
+
description: request.description,
|
|
1669
|
+
enable_default_security: request.enableDefaultSecurity,
|
|
1670
|
+
inbound_default_policy: request.inboundDefaultPolicy,
|
|
1671
|
+
name: request.name,
|
|
1672
|
+
organization_default: request.organizationDefault,
|
|
1673
|
+
outbound_default_policy: request.outboundDefaultPolicy,
|
|
1674
|
+
project_default: request.projectDefault,
|
|
1675
|
+
stateful: request.stateful,
|
|
1676
|
+
tags: request.tags
|
|
1677
|
+
});
|
|
1678
|
+
const marshalUpdateSecurityGroupRuleRequest = (request, defaults) => ({
|
|
1679
|
+
action: request.action,
|
|
1680
|
+
dest_port_from: request.destPortFrom,
|
|
1681
|
+
dest_port_to: request.destPortTo,
|
|
1682
|
+
direction: request.direction,
|
|
1683
|
+
ip_range: request.ipRange,
|
|
1684
|
+
position: request.position,
|
|
1685
|
+
protocol: request.protocol
|
|
1686
|
+
});
|
|
1687
|
+
const marshalSecurityGroupTemplate = (request, defaults) => ({
|
|
1688
|
+
id: request.id,
|
|
1689
|
+
name: request.name
|
|
1690
|
+
});
|
|
1691
|
+
const marshalUpdateServerRequest = (request, defaults) => ({
|
|
1692
|
+
boot_type: request.bootType,
|
|
1693
|
+
bootscript: request.bootscript,
|
|
1694
|
+
commercial_type: request.commercialType,
|
|
1695
|
+
dynamic_ip_required: request.dynamicIpRequired,
|
|
1696
|
+
enable_ipv6: request.enableIpv6,
|
|
1697
|
+
name: request.name,
|
|
1698
|
+
placement_group: request.placementGroup,
|
|
1699
|
+
private_nics: request.privateNics,
|
|
1700
|
+
protected: request.protected,
|
|
1701
|
+
public_ips: request.publicIps,
|
|
1702
|
+
routed_ip_enabled: request.routedIpEnabled,
|
|
1703
|
+
security_group: request.securityGroup !== void 0 ? marshalSecurityGroupTemplate(request.securityGroup) : void 0,
|
|
1704
|
+
tags: request.tags,
|
|
1705
|
+
volumes: request.volumes !== void 0 ? Object.entries(request.volumes).reduce(
|
|
1706
|
+
(acc, [key, value]) => ({
|
|
1707
|
+
...acc,
|
|
1708
|
+
[key]: marshalVolumeServerTemplate(value)
|
|
1709
|
+
}),
|
|
1710
|
+
{}
|
|
1711
|
+
) : void 0
|
|
1712
|
+
});
|
|
1713
|
+
const marshalUpdateSnapshotRequest = (request, defaults) => ({
|
|
1714
|
+
name: request.name,
|
|
1715
|
+
tags: request.tags
|
|
1716
|
+
});
|
|
1717
|
+
const marshalUpdateVolumeRequest = (request, defaults) => ({
|
|
1718
|
+
name: request.name,
|
|
1719
|
+
size: request.size,
|
|
1720
|
+
tags: request.tags
|
|
1721
|
+
});
|
|
1722
|
+
exports.marshalApplyBlockMigrationRequest = marshalApplyBlockMigrationRequest;
|
|
1723
|
+
exports.marshalAttachServerVolumeRequest = marshalAttachServerVolumeRequest;
|
|
1724
|
+
exports.marshalCreateImageRequest = marshalCreateImageRequest;
|
|
1725
|
+
exports.marshalCreateIpRequest = marshalCreateIpRequest;
|
|
1726
|
+
exports.marshalCreatePlacementGroupRequest = marshalCreatePlacementGroupRequest;
|
|
1727
|
+
exports.marshalCreatePrivateNICRequest = marshalCreatePrivateNICRequest;
|
|
1728
|
+
exports.marshalCreateSecurityGroupRequest = marshalCreateSecurityGroupRequest;
|
|
1729
|
+
exports.marshalCreateSecurityGroupRuleRequest = marshalCreateSecurityGroupRuleRequest;
|
|
1730
|
+
exports.marshalCreateServerRequest = marshalCreateServerRequest;
|
|
1731
|
+
exports.marshalCreateSnapshotRequest = marshalCreateSnapshotRequest;
|
|
1732
|
+
exports.marshalCreateVolumeRequest = marshalCreateVolumeRequest;
|
|
1733
|
+
exports.marshalDetachServerVolumeRequest = marshalDetachServerVolumeRequest;
|
|
1734
|
+
exports.marshalExportSnapshotRequest = marshalExportSnapshotRequest;
|
|
1735
|
+
exports.marshalPlanBlockMigrationRequest = marshalPlanBlockMigrationRequest;
|
|
1736
|
+
exports.marshalServerActionRequest = marshalServerActionRequest;
|
|
1737
|
+
exports.marshalSetImageRequest = marshalSetImageRequest;
|
|
1738
|
+
exports.marshalSetPlacementGroupRequest = marshalSetPlacementGroupRequest;
|
|
1739
|
+
exports.marshalSetPlacementGroupServersRequest = marshalSetPlacementGroupServersRequest;
|
|
1740
|
+
exports.marshalSetSecurityGroupRequest = marshalSetSecurityGroupRequest;
|
|
1741
|
+
exports.marshalSetSecurityGroupRuleRequest = marshalSetSecurityGroupRuleRequest;
|
|
1742
|
+
exports.marshalSetSecurityGroupRulesRequest = marshalSetSecurityGroupRulesRequest;
|
|
1743
|
+
exports.marshalSetServerRequest = marshalSetServerRequest;
|
|
1744
|
+
exports.marshalSetSnapshotRequest = marshalSetSnapshotRequest;
|
|
1745
|
+
exports.marshalUpdateImageRequest = marshalUpdateImageRequest;
|
|
1746
|
+
exports.marshalUpdateIpRequest = marshalUpdateIpRequest;
|
|
1747
|
+
exports.marshalUpdatePlacementGroupRequest = marshalUpdatePlacementGroupRequest;
|
|
1748
|
+
exports.marshalUpdatePlacementGroupServersRequest = marshalUpdatePlacementGroupServersRequest;
|
|
1749
|
+
exports.marshalUpdatePrivateNICRequest = marshalUpdatePrivateNICRequest;
|
|
1750
|
+
exports.marshalUpdateSecurityGroupRequest = marshalUpdateSecurityGroupRequest;
|
|
1751
|
+
exports.marshalUpdateSecurityGroupRuleRequest = marshalUpdateSecurityGroupRuleRequest;
|
|
1752
|
+
exports.marshalUpdateServerRequest = marshalUpdateServerRequest;
|
|
1753
|
+
exports.marshalUpdateSnapshotRequest = marshalUpdateSnapshotRequest;
|
|
1754
|
+
exports.marshalUpdateVolumeRequest = marshalUpdateVolumeRequest;
|
|
1755
|
+
exports.unmarshalAttachServerVolumeResponse = unmarshalAttachServerVolumeResponse;
|
|
1756
|
+
exports.unmarshalCreateImageResponse = unmarshalCreateImageResponse;
|
|
1757
|
+
exports.unmarshalCreateIpResponse = unmarshalCreateIpResponse;
|
|
1758
|
+
exports.unmarshalCreatePlacementGroupResponse = unmarshalCreatePlacementGroupResponse;
|
|
1759
|
+
exports.unmarshalCreatePrivateNICResponse = unmarshalCreatePrivateNICResponse;
|
|
1760
|
+
exports.unmarshalCreateSecurityGroupResponse = unmarshalCreateSecurityGroupResponse;
|
|
1761
|
+
exports.unmarshalCreateSecurityGroupRuleResponse = unmarshalCreateSecurityGroupRuleResponse;
|
|
1762
|
+
exports.unmarshalCreateServerResponse = unmarshalCreateServerResponse;
|
|
1763
|
+
exports.unmarshalCreateSnapshotResponse = unmarshalCreateSnapshotResponse;
|
|
1764
|
+
exports.unmarshalCreateVolumeResponse = unmarshalCreateVolumeResponse;
|
|
1765
|
+
exports.unmarshalDetachServerVolumeResponse = unmarshalDetachServerVolumeResponse;
|
|
1766
|
+
exports.unmarshalExportSnapshotResponse = unmarshalExportSnapshotResponse;
|
|
1767
|
+
exports.unmarshalGetBootscriptResponse = unmarshalGetBootscriptResponse;
|
|
1768
|
+
exports.unmarshalGetDashboardResponse = unmarshalGetDashboardResponse;
|
|
1769
|
+
exports.unmarshalGetImageResponse = unmarshalGetImageResponse;
|
|
1770
|
+
exports.unmarshalGetIpResponse = unmarshalGetIpResponse;
|
|
1771
|
+
exports.unmarshalGetPlacementGroupResponse = unmarshalGetPlacementGroupResponse;
|
|
1772
|
+
exports.unmarshalGetPlacementGroupServersResponse = unmarshalGetPlacementGroupServersResponse;
|
|
1773
|
+
exports.unmarshalGetPrivateNICResponse = unmarshalGetPrivateNICResponse;
|
|
1774
|
+
exports.unmarshalGetSecurityGroupResponse = unmarshalGetSecurityGroupResponse;
|
|
1775
|
+
exports.unmarshalGetSecurityGroupRuleResponse = unmarshalGetSecurityGroupRuleResponse;
|
|
1776
|
+
exports.unmarshalGetServerResponse = unmarshalGetServerResponse;
|
|
1777
|
+
exports.unmarshalGetServerTypesAvailabilityResponse = unmarshalGetServerTypesAvailabilityResponse;
|
|
1778
|
+
exports.unmarshalGetSnapshotResponse = unmarshalGetSnapshotResponse;
|
|
1779
|
+
exports.unmarshalGetVolumeResponse = unmarshalGetVolumeResponse;
|
|
1780
|
+
exports.unmarshalListBootscriptsResponse = unmarshalListBootscriptsResponse;
|
|
1781
|
+
exports.unmarshalListImagesResponse = unmarshalListImagesResponse;
|
|
1782
|
+
exports.unmarshalListIpsResponse = unmarshalListIpsResponse;
|
|
1783
|
+
exports.unmarshalListPlacementGroupsResponse = unmarshalListPlacementGroupsResponse;
|
|
1784
|
+
exports.unmarshalListPrivateNICsResponse = unmarshalListPrivateNICsResponse;
|
|
1785
|
+
exports.unmarshalListSecurityGroupRulesResponse = unmarshalListSecurityGroupRulesResponse;
|
|
1786
|
+
exports.unmarshalListSecurityGroupsResponse = unmarshalListSecurityGroupsResponse;
|
|
1787
|
+
exports.unmarshalListServerActionsResponse = unmarshalListServerActionsResponse;
|
|
1788
|
+
exports.unmarshalListServerUserDataResponse = unmarshalListServerUserDataResponse;
|
|
1789
|
+
exports.unmarshalListServersResponse = unmarshalListServersResponse;
|
|
1790
|
+
exports.unmarshalListServersTypesResponse = unmarshalListServersTypesResponse;
|
|
1791
|
+
exports.unmarshalListSnapshotsResponse = unmarshalListSnapshotsResponse;
|
|
1792
|
+
exports.unmarshalListVolumesResponse = unmarshalListVolumesResponse;
|
|
1793
|
+
exports.unmarshalListVolumesTypesResponse = unmarshalListVolumesTypesResponse;
|
|
1794
|
+
exports.unmarshalMigrationPlan = unmarshalMigrationPlan;
|
|
1795
|
+
exports.unmarshalPrivateNIC = unmarshalPrivateNIC;
|
|
1796
|
+
exports.unmarshalServerActionResponse = unmarshalServerActionResponse;
|
|
1797
|
+
exports.unmarshalSetImageResponse = unmarshalSetImageResponse;
|
|
1798
|
+
exports.unmarshalSetPlacementGroupResponse = unmarshalSetPlacementGroupResponse;
|
|
1799
|
+
exports.unmarshalSetPlacementGroupServersResponse = unmarshalSetPlacementGroupServersResponse;
|
|
1800
|
+
exports.unmarshalSetSecurityGroupResponse = unmarshalSetSecurityGroupResponse;
|
|
1801
|
+
exports.unmarshalSetSecurityGroupRuleResponse = unmarshalSetSecurityGroupRuleResponse;
|
|
1802
|
+
exports.unmarshalSetSecurityGroupRulesResponse = unmarshalSetSecurityGroupRulesResponse;
|
|
1803
|
+
exports.unmarshalSetServerResponse = unmarshalSetServerResponse;
|
|
1804
|
+
exports.unmarshalSetSnapshotResponse = unmarshalSetSnapshotResponse;
|
|
1805
|
+
exports.unmarshalUpdateImageResponse = unmarshalUpdateImageResponse;
|
|
1806
|
+
exports.unmarshalUpdateIpResponse = unmarshalUpdateIpResponse;
|
|
1807
|
+
exports.unmarshalUpdatePlacementGroupResponse = unmarshalUpdatePlacementGroupResponse;
|
|
1808
|
+
exports.unmarshalUpdatePlacementGroupServersResponse = unmarshalUpdatePlacementGroupServersResponse;
|
|
1809
|
+
exports.unmarshalUpdateSecurityGroupResponse = unmarshalUpdateSecurityGroupResponse;
|
|
1810
|
+
exports.unmarshalUpdateSecurityGroupRuleResponse = unmarshalUpdateSecurityGroupRuleResponse;
|
|
1811
|
+
exports.unmarshalUpdateServerResponse = unmarshalUpdateServerResponse;
|
|
1812
|
+
exports.unmarshalUpdateSnapshotResponse = unmarshalUpdateSnapshotResponse;
|
|
1813
|
+
exports.unmarshalUpdateVolumeResponse = unmarshalUpdateVolumeResponse;
|