From d45e2242b3727085f93ba0f824a19f3bedbe4dfb Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 5 Jan 2022 08:44:03 +0000 Subject: [PATCH] CodeGen from PR 16870 in Azure/azure-rest-api-specs Track2 modify readme.go.md (#16870) --- common/config/rush/pnpm-lock.yaml | 131 +- rush.json | 5 + sdk/databoxedge/arm-databoxedge/CHANGELOG.md | 11 + .../arm-databoxedge/{LICENSE.txt => LICENSE} | 4 +- sdk/databoxedge/arm-databoxedge/README.md | 149 +- sdk/databoxedge/arm-databoxedge/_meta.json | 7 + .../arm-databoxedge/api-extractor.json | 18 + sdk/databoxedge/arm-databoxedge/package.json | 95 +- .../review/arm-databoxedge.api.md | 2969 ++++++++ .../arm-databoxedge/rollup.config.js | 211 +- .../src/dataBoxEdgeManagementClient.ts | 207 +- .../src/dataBoxEdgeManagementClientContext.ts | 68 - sdk/databoxedge/arm-databoxedge/src/index.ts | 12 + .../arm-databoxedge/src/lroImpl.ts | 34 + .../src/models/alertsMappers.ts | 57 - .../src/models/bandwidthSchedulesMappers.ts | 57 - .../src/models/containersMappers.ts | 57 - .../src/models/devicesMappers.ts | 60 - .../arm-databoxedge/src/models/index.ts | 6188 +++++++++-------- .../arm-databoxedge/src/models/jobsMappers.ts | 17 - .../arm-databoxedge/src/models/mappers.ts | 4660 +++++++++---- .../src/models/nodesMappers.ts | 57 - .../src/models/operationsMappers.ts | 18 - .../src/models/operationsStatusMappers.ts | 17 - .../src/models/ordersMappers.ts | 57 - .../arm-databoxedge/src/models/parameters.ts | 260 +- .../src/models/rolesMappers.ts | 57 - .../src/models/sharesMappers.ts | 57 - .../arm-databoxedge/src/models/skusMappers.ts | 18 - .../storageAccountCredentialsMappers.ts | 57 - .../src/models/storageAccountsMappers.ts | 57 - .../src/models/triggersMappers.ts | 57 - .../src/models/usersMappers.ts | 57 - .../arm-databoxedge/src/operations/addons.ts | 506 ++ .../arm-databoxedge/src/operations/alerts.ts | 284 +- .../src/operations/availableSkus.ts | 142 + .../src/operations/bandwidthSchedules.ts | 557 +- .../src/operations/containers.ts | 706 +- .../arm-databoxedge/src/operations/devices.ts | 1482 ++-- .../src/operations/diagnosticSettings.ts | 385 + .../arm-databoxedge/src/operations/index.ts | 14 +- .../arm-databoxedge/src/operations/jobs.ts | 98 +- .../src/operations/monitoringConfig.ts | 497 ++ .../arm-databoxedge/src/operations/nodes.ts | 189 +- .../src/operations/operations.ts | 164 +- .../src/operations/operationsStatus.ts | 101 +- .../arm-databoxedge/src/operations/orders.ts | 580 +- .../arm-databoxedge/src/operations/roles.ts | 553 +- .../arm-databoxedge/src/operations/shares.ts | 679 +- .../arm-databoxedge/src/operations/skus.ts | 78 - .../operations/storageAccountCredentials.ts | 552 +- .../src/operations/storageAccounts.ts | 556 +- .../src/operations/supportPackages.ts | 145 + .../src/operations/triggers.ts | 558 +- .../arm-databoxedge/src/operations/users.ts | 556 +- .../src/operationsInterfaces/addons.ts | 121 + .../src/operationsInterfaces/alerts.ts | 44 + .../src/operationsInterfaces/availableSkus.ts | 22 + .../bandwidthSchedules.ts | 109 + .../src/operationsInterfaces/containers.ts | 152 + .../src/operationsInterfaces/devices.ts | 285 + .../diagnosticSettings.ts | 117 + .../src/operationsInterfaces/index.ts | 28 + .../src/operationsInterfaces/jobs.ts | 26 + .../operationsInterfaces/monitoringConfig.ts | 111 + .../src/operationsInterfaces/nodes.ts | 26 + .../src/operationsInterfaces/operations.ts | 22 + .../operationsInterfaces/operationsStatus.ts | 29 + .../src/operationsInterfaces/orders.ts | 112 + .../src/operationsInterfaces/roles.ts | 109 + .../src/operationsInterfaces/shares.ts | 136 + .../storageAccountCredentials.ts | 109 + .../operationsInterfaces/storageAccounts.ts | 109 + .../operationsInterfaces/supportPackages.ts | 43 + .../src/operationsInterfaces/triggers.ts | 109 + .../src/operationsInterfaces/users.ts | 111 + .../arm-databoxedge/test/sampleTest.ts | 48 + sdk/databoxedge/arm-databoxedge/tsconfig.json | 6 +- sdk/databoxedge/ci.yml | 29 + 79 files changed, 18983 insertions(+), 8198 deletions(-) create mode 100644 sdk/databoxedge/arm-databoxedge/CHANGELOG.md rename sdk/databoxedge/arm-databoxedge/{LICENSE.txt => LICENSE} (96%) create mode 100644 sdk/databoxedge/arm-databoxedge/_meta.json create mode 100644 sdk/databoxedge/arm-databoxedge/api-extractor.json create mode 100644 sdk/databoxedge/arm-databoxedge/review/arm-databoxedge.api.md delete mode 100644 sdk/databoxedge/arm-databoxedge/src/dataBoxEdgeManagementClientContext.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/index.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/lroImpl.ts delete mode 100644 sdk/databoxedge/arm-databoxedge/src/models/alertsMappers.ts delete mode 100644 sdk/databoxedge/arm-databoxedge/src/models/bandwidthSchedulesMappers.ts delete mode 100644 sdk/databoxedge/arm-databoxedge/src/models/containersMappers.ts delete mode 100644 sdk/databoxedge/arm-databoxedge/src/models/devicesMappers.ts delete mode 100644 sdk/databoxedge/arm-databoxedge/src/models/jobsMappers.ts delete mode 100644 sdk/databoxedge/arm-databoxedge/src/models/nodesMappers.ts delete mode 100644 sdk/databoxedge/arm-databoxedge/src/models/operationsMappers.ts delete mode 100644 sdk/databoxedge/arm-databoxedge/src/models/operationsStatusMappers.ts delete mode 100644 sdk/databoxedge/arm-databoxedge/src/models/ordersMappers.ts delete mode 100644 sdk/databoxedge/arm-databoxedge/src/models/rolesMappers.ts delete mode 100644 sdk/databoxedge/arm-databoxedge/src/models/sharesMappers.ts delete mode 100644 sdk/databoxedge/arm-databoxedge/src/models/skusMappers.ts delete mode 100644 sdk/databoxedge/arm-databoxedge/src/models/storageAccountCredentialsMappers.ts delete mode 100644 sdk/databoxedge/arm-databoxedge/src/models/storageAccountsMappers.ts delete mode 100644 sdk/databoxedge/arm-databoxedge/src/models/triggersMappers.ts delete mode 100644 sdk/databoxedge/arm-databoxedge/src/models/usersMappers.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operations/addons.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operations/availableSkus.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operations/diagnosticSettings.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operations/monitoringConfig.ts delete mode 100644 sdk/databoxedge/arm-databoxedge/src/operations/skus.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operations/supportPackages.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/addons.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/alerts.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/availableSkus.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/bandwidthSchedules.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/containers.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/devices.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/diagnosticSettings.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/index.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/jobs.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/monitoringConfig.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/nodes.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/operations.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/operationsStatus.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/orders.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/roles.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/shares.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/storageAccountCredentials.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/storageAccounts.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/supportPackages.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/triggers.ts create mode 100644 sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/users.ts create mode 100644 sdk/databoxedge/arm-databoxedge/test/sampleTest.ts create mode 100644 sdk/databoxedge/ci.yml diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 694e81b4a476..ad32273b86df 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -29,6 +29,7 @@ specifiers: '@rush-temp/arm-containerregistry': file:./projects/arm-containerregistry.tgz '@rush-temp/arm-containerservice': file:./projects/arm-containerservice.tgz '@rush-temp/arm-cosmosdb': file:./projects/arm-cosmosdb.tgz + '@rush-temp/arm-databoxedge': file:./projects/arm-databoxedge.tgz '@rush-temp/arm-databricks': file:./projects/arm-databricks.tgz '@rush-temp/arm-datafactory': file:./projects/arm-datafactory.tgz '@rush-temp/arm-datalake-analytics': file:./projects/arm-datalake-analytics.tgz @@ -210,6 +211,7 @@ dependencies: '@rush-temp/arm-containerregistry': file:projects/arm-containerregistry.tgz '@rush-temp/arm-containerservice': file:projects/arm-containerservice.tgz '@rush-temp/arm-cosmosdb': file:projects/arm-cosmosdb.tgz + '@rush-temp/arm-databoxedge': file:projects/arm-databoxedge.tgz '@rush-temp/arm-databricks': file:projects/arm-databricks.tgz '@rush-temp/arm-datafactory': file:projects/arm-datafactory.tgz '@rush-temp/arm-datalake-analytics': file:projects/arm-datalake-analytics.tgz @@ -6977,7 +6979,7 @@ packages: hasBin: true dev: false - /ts-node/10.4.0_276ff2ad8f60608417677a4691c0f835: + /ts-node/10.4.0_28670484a221c7e896c5d6b821a5cbb7: resolution: {integrity: sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A==} hasBin: true peerDependencies: @@ -7003,11 +7005,11 @@ packages: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.2.4 + typescript: 4.4.4 yn: 3.1.1 dev: false - /ts-node/10.4.0_54d7f9b57c83a5c5120be11b085b9de6: + /ts-node/10.4.0_f9f9f28f986ed7ad377c75abc9f416f4: resolution: {integrity: sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A==} hasBin: true peerDependencies: @@ -7033,7 +7035,7 @@ packages: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.4.4 + typescript: 4.2.4 yn: 3.1.1 dev: false @@ -7629,7 +7631,7 @@ packages: prettier: 2.5.1 rimraf: 3.0.2 rollup: 1.32.1 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -7857,7 +7859,7 @@ packages: rollup: 1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -7908,7 +7910,7 @@ packages: rollup: 1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -7965,7 +7967,7 @@ packages: rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.1_rollup@1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.5 @@ -8395,6 +8397,27 @@ packages: uglify-js: 3.14.5 dev: false + file:projects/arm-databoxedge.tgz: + resolution: {integrity: sha512-ooDmyCApk6IYIB+ItMNMhYu8CSeapd8eri9GflNjgL/mXSrwTUCDlBXTDt5Hiz2zP/+8bqCjgN426EcLZ08cIQ==, tarball: file:projects/arm-databoxedge.tgz} + name: '@rush-temp/arm-databoxedge' + version: 0.0.0 + dependencies: + '@microsoft/api-extractor': 7.19.2 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 + cross-env: 7.0.3 + mkdirp: 1.0.4 + mocha: 7.2.0 + rimraf: 3.0.2 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 + tslib: 2.3.1 + typescript: 4.2.4 + uglify-js: 3.14.5 + dev: false + file:projects/arm-databricks.tgz: resolution: {integrity: sha512-YF8do+oy/XQztCzwKGbJJBIhGm+qDA1Cgk7NPYGNqMPGx5KagAFO85KNfRLAzUm4AMAAy7nZ7guBbr52xWRFrw==, tarball: file:projects/arm-databricks.tgz} name: '@rush-temp/arm-databricks' @@ -9487,7 +9510,7 @@ packages: rollup: 1.32.1 safe-buffer: 5.2.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -9982,7 +10005,7 @@ packages: dev: false file:projects/core-amqp.tgz: - resolution: {integrity: sha512-jmyXvDp5FyZIlqp1zATESQp6qO2NqjKSfY5o9ojPsKN/g9WJ45RL4jfy+cD5u8C2t9jSDTsCoL+jbiLptpkDLA==, tarball: file:projects/core-amqp.tgz} + resolution: {integrity: sha512-nAZlMW/WFVSloK1iVzoSJNx9CHjvMl4/kJrnq1s5Okn96/AQX19SYkqfdvmew1Oy3bxfDC2g3n3e1CFLrlSyEg==, tarball: file:projects/core-amqp.tgz} name: '@rush-temp/core-amqp' version: 0.0.0 dependencies: @@ -10025,7 +10048,7 @@ packages: rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.1_rollup@1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 url: 0.11.0 @@ -10111,7 +10134,7 @@ packages: rimraf: 3.0.2 rollup: 1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -10342,7 +10365,7 @@ packages: shx: 0.3.3 sinon: 9.2.4 tough-cookie: 4.0.0 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 tunnel: 0.0.6 typescript: 4.2.4 @@ -10390,7 +10413,7 @@ packages: prettier: 2.5.1 rimraf: 3.0.2 rollup: 1.32.1 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.5 @@ -10657,7 +10680,7 @@ packages: sinon: 9.2.4 snap-shot-it: 7.9.6 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 universal-user-agent: 6.0.0 @@ -10714,7 +10737,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -10760,7 +10783,7 @@ packages: rollup: 1.32.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 - ts-node: 10.4.0_54d7f9b57c83a5c5120be11b085b9de6 + ts-node: 10.4.0_28670484a221c7e896c5d6b821a5cbb7 tslib: 2.3.1 typescript: 4.4.4 yaml: 1.10.2 @@ -10917,7 +10940,7 @@ packages: rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 rollup-plugin-terser: 5.3.1_rollup@1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -10979,7 +11002,7 @@ packages: rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -11034,7 +11057,7 @@ packages: prettier: 2.5.1 rimraf: 3.0.2 rollup: 1.32.1 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -11087,7 +11110,7 @@ packages: prettier: 2.5.1 rimraf: 3.0.2 rollup: 1.32.1 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -11289,7 +11312,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -11553,7 +11576,7 @@ packages: rimraf: 3.0.2 rollup: 1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11702,7 +11725,7 @@ packages: rimraf: 3.0.2 rollup: 1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11774,7 +11797,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11794,7 +11817,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11814,7 +11837,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11834,7 +11857,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -11873,7 +11896,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11894,7 +11917,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -11917,7 +11940,7 @@ packages: moment: 2.29.1 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -11937,7 +11960,7 @@ packages: eslint: 7.32.0 prettier: 1.19.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11957,7 +11980,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -11978,7 +12001,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12000,7 +12023,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12021,7 +12044,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12041,7 +12064,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -12060,7 +12083,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 transitivePeerDependencies: @@ -12081,7 +12104,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12104,7 +12127,7 @@ packages: node-fetch: 2.6.6 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12125,7 +12148,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12146,7 +12169,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12167,7 +12190,7 @@ packages: eslint: 7.32.0 prettier: 2.5.1 rimraf: 3.0.2 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uuid: 8.3.2 @@ -12539,7 +12562,7 @@ packages: rimraf: 3.0.2 rollup: 1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12608,7 +12631,7 @@ packages: rimraf: 3.0.2 rollup: 1.32.1 sinon: 9.2.4 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 ws: 8.3.0 @@ -12671,7 +12694,7 @@ packages: rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12734,7 +12757,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12797,7 +12820,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12858,7 +12881,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12916,7 +12939,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -12976,7 +12999,7 @@ packages: rollup-plugin-terser: 5.3.1_rollup@1.32.1 rollup-plugin-visualizer: 4.2.2_rollup@1.32.1 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 util: 0.12.4 @@ -13028,7 +13051,7 @@ packages: rollup: 1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.5 @@ -13082,7 +13105,7 @@ packages: rollup: 1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.5 @@ -13135,7 +13158,7 @@ packages: rollup: 1.32.1 sinon: 9.2.4 source-map-support: 0.5.21 - ts-node: 10.4.0_276ff2ad8f60608417677a4691c0f835 + ts-node: 10.4.0_f9f9f28f986ed7ad377c75abc9f416f4 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.5 diff --git a/rush.json b/rush.json index 66a9aa13703f..56c75d017a32 100644 --- a/rush.json +++ b/rush.json @@ -1215,6 +1215,11 @@ "packageName": "@azure/arm-containerinstance", "projectFolder": "sdk/containerinstance/arm-containerinstance", "versionPolicyName": "management" + }, + { + "packageName": "@azure/arm-databoxedge", + "projectFolder": "sdk/databoxedge/arm-databoxedge", + "versionPolicyName": "management" } ] } \ No newline at end of file diff --git a/sdk/databoxedge/arm-databoxedge/CHANGELOG.md b/sdk/databoxedge/arm-databoxedge/CHANGELOG.md new file mode 100644 index 000000000000..9ee576d00ddc --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 2.0.0 (2022-01-05) + +The package of @azure/arm-databoxedge is using our next generation design principles since version 2.0.0, which contains breaking changes. + +To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog). + +To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide). + +To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/databoxedge/arm-databoxedge/LICENSE.txt b/sdk/databoxedge/arm-databoxedge/LICENSE similarity index 96% rename from sdk/databoxedge/arm-databoxedge/LICENSE.txt rename to sdk/databoxedge/arm-databoxedge/LICENSE index ea8fb1516028..5d1d36e0af80 100644 --- a/sdk/databoxedge/arm-databoxedge/LICENSE.txt +++ b/sdk/databoxedge/arm-databoxedge/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020 Microsoft +Copyright (c) 2022 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. \ No newline at end of file diff --git a/sdk/databoxedge/arm-databoxedge/README.md b/sdk/databoxedge/arm-databoxedge/README.md index 53816f7385fa..eafb24b471b4 100644 --- a/sdk/databoxedge/arm-databoxedge/README.md +++ b/sdk/databoxedge/arm-databoxedge/README.md @@ -1,109 +1,98 @@ -## Azure DataBoxEdgeManagementClient SDK for JavaScript +# Azure DataBoxEdgeManagement client library for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for DataBoxEdgeManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure DataBoxEdgeManagement client. + + + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/databoxedge/arm-databoxedge) | +[Package (NPM)](https://www.npmjs.com/package/@azure/arm-databoxedge) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-databoxedge) | +[Samples](https://github.com/Azure-Samples/azure-samples-js-management) + +## Getting started ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites -You must have an [Azure subscription](https://azure.microsoft.com/free/). +- An [Azure subscription][azure_sub]. -### How to install +### Install the `@azure/arm-databoxedge` package -To use this SDK in your project, you will need to install two packages. -- `@azure/arm-databoxedge` that contains the client. -- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. +Install the Azure DataBoxEdgeManagement client library for JavaScript with `npm`: -Install both packages using the below command: ```bash -npm install --save @azure/arm-databoxedge @azure/identity +npm install @azure/arm-databoxedge ``` -> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. -If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. +### Create and authenticate a `DataBoxEdgeManagementClient` + +To create a client object to access the Azure DataBoxEdgeManagement API, you will need the `endpoint` of your Azure DataBoxEdgeManagement resource and a `credential`. The Azure DataBoxEdgeManagement client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure DataBoxEdgeManagement resource in the [Azure Portal][azure_portal]. -### How to use +You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). -- If you are writing a client side browser application, - - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. - - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. -- If you are writing a server side application, - - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) - - Complete the set up steps required by the credential if any. - - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. +To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: -In the below samples, we pass the credential and the Azure subscription id to instantiate the client. -Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. +```bash +npm install @azure/identity +``` -#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. +You will also need to **register a new AAD application and grant access to Azure DataBoxEdgeManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). +Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. -##### Sample code +For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). ```javascript -const { DefaultAzureCredential } = require("@azure/identity"); const { DataBoxEdgeManagementClient } = require("@azure/arm-databoxedge"); -const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; - -// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples -// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. -const creds = new DefaultAzureCredential(); -const client = new DataBoxEdgeManagementClient(creds, subscriptionId); - -client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); -}).catch((err) => { - console.log("An error occurred:"); - console.error(err); -}); +const { DefaultAzureCredential } = require("@azure/identity"); +const subscriptionId = "00000000-0000-0000-0000-000000000000"; +const client = new DataBoxEdgeManagementClient(new DefaultAzureCredential(), subscriptionId); ``` -#### browser - Authentication, client creation, and list operations as an example written in JavaScript. - -In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. - - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. - - Note down the client Id from the previous step and use it in the browser sample below. - -##### Sample code - -- index.html - -```html - - - - @azure/arm-databoxedge sample - - - - - - - + +### JavaScript Bundle +To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). + +## Key concepts + +### DataBoxEdgeManagementClient + +`DataBoxEdgeManagementClient` is the primary interface for developers using the Azure DataBoxEdgeManagement client library. Explore the methods on this client object to understand the different features of the Azure DataBoxEdgeManagement service that you can access. + +## Troubleshooting + +### Logging + +Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: + +```javascript +const { setLogLevel } = require("@azure/logger"); +setLogLevel("info"); ``` +For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). + +## Next steps + +Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. + +## Contributing + +If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. + ## Related projects -- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) +- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fdataboxedge%2Farm-databoxedge%2FREADME.png) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/databoxedge/arm-databoxedge/README.png) +[azure_cli]: https://docs.microsoft.com/cli/azure +[azure_sub]: https://azure.microsoft.com/free/ +[azure_sub]: https://azure.microsoft.com/free/ +[azure_portal]: https://portal.azure.com +[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity +[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential diff --git a/sdk/databoxedge/arm-databoxedge/_meta.json b/sdk/databoxedge/arm-databoxedge/_meta.json new file mode 100644 index 000000000000..e1c7caa89290 --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/_meta.json @@ -0,0 +1,7 @@ +{ + "commit": "754938e4cb9416358b02dcc11f444adf14b3b7b6", + "readme": "specification/databoxedge/resource-manager/readme.md", + "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/databoxedge/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211130.1", + "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", + "use": "@autorest/typescript@6.0.0-alpha.16.20211130.1" +} \ No newline at end of file diff --git a/sdk/databoxedge/arm-databoxedge/api-extractor.json b/sdk/databoxedge/arm-databoxedge/api-extractor.json new file mode 100644 index 000000000000..c5440732b106 --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/api-extractor.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "docModel": { "enabled": true }, + "apiReport": { "enabled": true, "reportFolder": "./review" }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./types/arm-databoxedge.d.ts" + }, + "messages": { + "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "extractorMessageReporting": { + "ae-missing-release-tag": { "logLevel": "none" }, + "ae-unresolved-link": { "logLevel": "none" } + } + } +} diff --git a/sdk/databoxedge/arm-databoxedge/package.json b/sdk/databoxedge/arm-databoxedge/package.json index 737451b0934f..708a2a8b32a4 100644 --- a/sdk/databoxedge/arm-databoxedge/package.json +++ b/sdk/databoxedge/arm-databoxedge/package.json @@ -1,58 +1,91 @@ { "name": "@azure/arm-databoxedge", + "sdk-type": "mgmt", "author": "Microsoft Corporation", - "description": "DataBoxEdgeManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.1.0", + "description": "A generated SDK for DataBoxEdgeManagementClient.", + "version": "2.0.0", + "engines": { "node": ">=12.0.0" }, "dependencies": { - "@azure/ms-rest-azure-js": "^2.1.0", - "@azure/ms-rest-js": "^2.2.0", - "@azure/core-auth": "^1.1.4", - "tslib": "^1.10.0" + "@azure/core-lro": "^2.2.0", + "@azure/abort-controller": "^1.0.0", + "@azure/core-paging": "^1.2.0", + "@azure/core-client": "^1.0.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-rest-pipeline": "^1.1.0", + "tslib": "^2.2.0" }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], + "keywords": ["node", "azure", "typescript", "browser", "isomorphic"], "license": "MIT", - "main": "./dist/arm-databoxedge.js", - "module": "./esm/dataBoxEdgeManagementClient.js", - "types": "./esm/dataBoxEdgeManagementClient.d.ts", + "main": "./dist/index.js", + "module": "./dist-esm/src/index.js", + "types": "./types/arm-databoxedge.d.ts", "devDependencies": { - "typescript": "^3.6.0", - "rollup": "^1.18.0", - "rollup-plugin-node-resolve": "^5.2.0", + "@microsoft/api-extractor": "^7.18.11", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", + "mkdirp": "^1.0.4", + "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.6.0" + "typescript": "~4.2.0", + "uglify-js": "^3.4.9", + "rimraf": "^3.0.0", + "@azure/identity": "^2.0.1", + "@azure-tools/test-recorder": "^1.0.0", + "mocha": "^7.1.1", + "cross-env": "^7.0.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/databoxedge/arm-databoxedge", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" }, - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, + "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", "dist/**/*.js.map", "dist/**/*.d.ts", "dist/**/*.d.ts.map", - "esm/**/*.js", - "esm/**/*.js.map", - "esm/**/*.d.ts", - "esm/**/*.d.ts.map", + "dist-esm/**/*.js", + "dist-esm/**/*.js.map", + "dist-esm/**/*.d.ts", + "dist-esm/**/*.d.ts.map", "src/**/*.ts", "README.md", + "LICENSE", "rollup.config.js", - "tsconfig.json" + "tsconfig.json", + "review/*", + "CHANGELOG.md", + "types/*" ], "scripts": { - "build": "tsc && rollup -c rollup.config.js && npm run minify", - "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-databoxedge.js.map'\" -o ./dist/arm-databoxedge.min.js ./dist/arm-databoxedge.js", - "prepack": "npm install && npm run build" + "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "api-extractor run --local", + "lint": "echo skipped", + "audit": "echo skipped", + "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "build:node": "echo skipped", + "build:browser": "echo skipped", + "build:test": "echo skipped", + "build:samples": "echo skipped.", + "check-format": "echo skipped", + "execute:samples": "echo skipped", + "format": "echo skipped", + "test": "npm run integration-test", + "test:node": "echo skipped", + "test:browser": "echo skipped", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", + "integration-test:browser": "echo skipped", + "docs": "echo skipped" }, "sideEffects": false, "autoPublish": true diff --git a/sdk/databoxedge/arm-databoxedge/review/arm-databoxedge.api.md b/sdk/databoxedge/arm-databoxedge/review/arm-databoxedge.api.md new file mode 100644 index 000000000000..b15014618d64 --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/review/arm-databoxedge.api.md @@ -0,0 +1,2969 @@ +## API Report File for "@azure/arm-databoxedge" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import * as coreAuth from '@azure/core-auth'; +import * as coreClient from '@azure/core-client'; +import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { PollerLike } from '@azure/core-lro'; +import { PollOperationState } from '@azure/core-lro'; + +// @public +export type AccessLevel = string; + +// @public +export type AccountType = string; + +// @public +export type Addon = ARMBaseModel & { + kind: AddonType; + readonly systemData?: SystemData; +}; + +// @public +export interface AddonList { + readonly nextLink?: string; + readonly value?: AddonUnion[]; +} + +// @public +export interface Addons { + beginCreateOrUpdate(deviceName: string, roleName: string, addonName: string, resourceGroupName: string, addon: AddonUnion, options?: AddonsCreateOrUpdateOptionalParams): Promise, AddonsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(deviceName: string, roleName: string, addonName: string, resourceGroupName: string, addon: AddonUnion, options?: AddonsCreateOrUpdateOptionalParams): Promise; + beginDelete(deviceName: string, roleName: string, addonName: string, resourceGroupName: string, options?: AddonsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(deviceName: string, roleName: string, addonName: string, resourceGroupName: string, options?: AddonsDeleteOptionalParams): Promise; + get(deviceName: string, roleName: string, addonName: string, resourceGroupName: string, options?: AddonsGetOptionalParams): Promise; + listByRole(deviceName: string, roleName: string, resourceGroupName: string, options?: AddonsListByRoleOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface AddonsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type AddonsCreateOrUpdateResponse = AddonUnion; + +// @public +export interface AddonsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface AddonsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AddonsGetResponse = AddonUnion; + +// @public +export interface AddonsListByRoleNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AddonsListByRoleNextResponse = AddonList; + +// @public +export interface AddonsListByRoleOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AddonsListByRoleResponse = AddonList; + +// @public +export type AddonState = string; + +// @public +export type AddonType = string; + +// @public (undocumented) +export type AddonUnion = Addon | ArcAddon | IoTAddon; + +// @public +export interface Address { + addressLine1?: string; + addressLine2?: string; + addressLine3?: string; + city?: string; + country: string; + postalCode?: string; + state?: string; +} + +// @public +export type Alert = ARMBaseModel & { + readonly systemData?: SystemData; + readonly title?: string; + readonly alertType?: string; + readonly appearedAtDateTime?: Date; + readonly recommendation?: string; + readonly severity?: AlertSeverity; + readonly errorDetails?: AlertErrorDetails; + readonly detailedInformation?: { + [propertyName: string]: string; + }; +}; + +// @public +export interface AlertErrorDetails { + readonly errorCode?: string; + readonly errorMessage?: string; + readonly occurrences?: number; +} + +// @public +export interface AlertList { + readonly nextLink?: string; + readonly value?: Alert[]; +} + +// @public +export interface Alerts { + get(deviceName: string, name: string, resourceGroupName: string, options?: AlertsGetOptionalParams): Promise; + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: AlertsListByDataBoxEdgeDeviceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export type AlertSeverity = string; + +// @public +export interface AlertsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AlertsGetResponse = Alert; + +// @public +export interface AlertsListByDataBoxEdgeDeviceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AlertsListByDataBoxEdgeDeviceNextResponse = AlertList; + +// @public +export interface AlertsListByDataBoxEdgeDeviceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AlertsListByDataBoxEdgeDeviceResponse = AlertList; + +// @public +export type ArcAddon = Addon & { + subscriptionId: string; + resourceGroupName: string; + resourceName: string; + resourceLocation: string; + readonly version?: string; + readonly hostPlatform?: PlatformType; + readonly hostPlatformType?: HostPlatformType; + readonly provisioningState?: AddonState; +}; + +// @public +export interface ARMBaseModel { + readonly id?: string; + readonly name?: string; + readonly type?: string; +} + +// @public +export interface AsymmetricEncryptedSecret { + encryptionAlgorithm: EncryptionAlgorithm; + encryptionCertThumbprint?: string; + value: string; +} + +// @public +export interface Authentication { + symmetricKey?: SymmetricKey; +} + +// @public +export type AuthenticationType = string; + +// @public +export interface AvailableSkus { + list(options?: AvailableSkusListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface AvailableSkusListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AvailableSkusListNextResponse = DataBoxEdgeSkuList; + +// @public +export interface AvailableSkusListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AvailableSkusListResponse = DataBoxEdgeSkuList; + +// @public +export type AzureContainerDataFormat = string; + +// @public +export interface AzureContainerInfo { + containerName: string; + dataFormat: AzureContainerDataFormat; + storageAccountCredentialId: string; +} + +// @public +export type BandwidthSchedule = ARMBaseModel & { + readonly systemData?: SystemData; + start: string; + stop: string; + rateInMbps: number; + days: DayOfWeek[]; +}; + +// @public +export interface BandwidthSchedules { + beginCreateOrUpdate(deviceName: string, name: string, resourceGroupName: string, parameters: BandwidthSchedule, options?: BandwidthSchedulesCreateOrUpdateOptionalParams): Promise, BandwidthSchedulesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(deviceName: string, name: string, resourceGroupName: string, parameters: BandwidthSchedule, options?: BandwidthSchedulesCreateOrUpdateOptionalParams): Promise; + beginDelete(deviceName: string, name: string, resourceGroupName: string, options?: BandwidthSchedulesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(deviceName: string, name: string, resourceGroupName: string, options?: BandwidthSchedulesDeleteOptionalParams): Promise; + get(deviceName: string, name: string, resourceGroupName: string, options?: BandwidthSchedulesGetOptionalParams): Promise; + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: BandwidthSchedulesListByDataBoxEdgeDeviceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface BandwidthSchedulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type BandwidthSchedulesCreateOrUpdateResponse = BandwidthSchedule; + +// @public +export interface BandwidthSchedulesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface BandwidthSchedulesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BandwidthSchedulesGetResponse = BandwidthSchedule; + +// @public +export interface BandwidthSchedulesList { + readonly nextLink?: string; + readonly value?: BandwidthSchedule[]; +} + +// @public +export interface BandwidthSchedulesListByDataBoxEdgeDeviceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BandwidthSchedulesListByDataBoxEdgeDeviceNextResponse = BandwidthSchedulesList; + +// @public +export interface BandwidthSchedulesListByDataBoxEdgeDeviceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BandwidthSchedulesListByDataBoxEdgeDeviceResponse = BandwidthSchedulesList; + +// @public +export interface ClientAccessRight { + accessPermission: ClientPermissionType; + client: string; +} + +// @public +export type ClientPermissionType = string; + +// @public +export type CloudEdgeManagementRole = Role & { + readonly localManagementStatus?: RoleStatus; + readonly edgeProfile?: EdgeProfile; + roleStatus?: RoleStatus; +}; + +// @public +export interface CloudError { + error?: CloudErrorBody; +} + +// @public +export interface CloudErrorBody { + code?: string; + details?: CloudErrorBody[]; + message?: string; +} + +// @public +export interface CniConfig { + readonly podSubnet?: string; + readonly serviceSubnet?: string; + readonly type?: string; + readonly version?: string; +} + +// @public +export interface ComputeResource { + memoryInGB: number; + processorCount: number; +} + +// @public +export interface ContactDetails { + companyName: string; + contactPerson: string; + emailList: string[]; + phone: string; +} + +// @public +export type Container = ARMBaseModel & { + readonly systemData?: SystemData; + readonly containerStatus?: ContainerStatus; + dataFormat: AzureContainerDataFormat; + readonly refreshDetails?: RefreshDetails; + readonly createdDateTime?: Date; +}; + +// @public +export interface ContainerList { + readonly nextLink?: string; + readonly value?: Container[]; +} + +// @public +export interface Containers { + beginCreateOrUpdate(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, container: Container, options?: ContainersCreateOrUpdateOptionalParams): Promise, ContainersCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, container: Container, options?: ContainersCreateOrUpdateOptionalParams): Promise; + beginDelete(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, options?: ContainersDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, options?: ContainersDeleteOptionalParams): Promise; + beginRefresh(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, options?: ContainersRefreshOptionalParams): Promise, void>>; + beginRefreshAndWait(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, options?: ContainersRefreshOptionalParams): Promise; + get(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, options?: ContainersGetOptionalParams): Promise; + listByStorageAccount(deviceName: string, storageAccountName: string, resourceGroupName: string, options?: ContainersListByStorageAccountOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ContainersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ContainersCreateOrUpdateResponse = Container; + +// @public +export interface ContainersDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ContainersGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainersGetResponse = Container; + +// @public +export interface ContainersListByStorageAccountNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainersListByStorageAccountNextResponse = ContainerList; + +// @public +export interface ContainersListByStorageAccountOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainersListByStorageAccountResponse = ContainerList; + +// @public +export interface ContainersRefreshOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ContainerStatus = string; + +// @public +export type CreatedByType = string; + +// @public +export type DataBoxEdgeDevice = ARMBaseModel & { + location: string; + tags?: { + [propertyName: string]: string; + }; + sku?: Sku; + etag?: string; + identity?: ResourceIdentity; + kind?: DataBoxEdgeDeviceKind; + readonly systemData?: SystemData; + readonly systemDataPropertiesSystemData?: SystemData; + dataBoxEdgeDeviceStatus?: DataBoxEdgeDeviceStatus; + readonly serialNumber?: string; + readonly description?: string; + readonly modelDescription?: string; + readonly deviceType?: DeviceType; + readonly friendlyName?: string; + readonly culture?: string; + readonly deviceModel?: string; + readonly deviceSoftwareVersion?: string; + readonly deviceLocalCapacity?: number; + readonly timeZone?: string; + readonly deviceHcsVersion?: string; + readonly configuredRoleTypes?: RoleTypes[]; + readonly nodeCount?: number; + readonly resourceMoveDetails?: ResourceMoveDetails; + readonly edgeProfile?: EdgeProfile; + dataResidency?: DataResidency; +}; + +// @public +export type DataBoxEdgeDeviceExtendedInfo = ARMBaseModel & { + encryptionKeyThumbprint?: string; + encryptionKey?: string; + readonly resourceKey?: string; + clientSecretStoreId?: string; + clientSecretStoreUrl?: string; + channelIntegrityKeyName?: string; + channelIntegrityKeyVersion?: string; + keyVaultSyncStatus?: KeyVaultSyncStatus; + readonly deviceSecrets?: { + [propertyName: string]: Secret; + }; +}; + +// @public +export interface DataBoxEdgeDeviceExtendedInfoPatch { + channelIntegrityKeyName?: string; + channelIntegrityKeyVersion?: string; + clientSecretStoreId?: string; + clientSecretStoreUrl?: string; + syncStatus?: KeyVaultSyncStatus; +} + +// @public +export type DataBoxEdgeDeviceKind = string; + +// @public +export interface DataBoxEdgeDeviceList { + readonly nextLink?: string; + readonly value?: DataBoxEdgeDevice[]; +} + +// @public +export interface DataBoxEdgeDevicePatch { + edgeProfile?: EdgeProfilePatch; + identity?: ResourceIdentity; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export type DataBoxEdgeDeviceStatus = string; + +// @public (undocumented) +export class DataBoxEdgeManagementClient extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: DataBoxEdgeManagementClientOptionalParams); + // (undocumented) + addons: Addons; + // (undocumented) + alerts: Alerts; + // (undocumented) + apiVersion: string; + // (undocumented) + availableSkus: AvailableSkus; + // (undocumented) + bandwidthSchedules: BandwidthSchedules; + // (undocumented) + containers: Containers; + // (undocumented) + devices: Devices; + // (undocumented) + diagnosticSettings: DiagnosticSettings; + // (undocumented) + jobs: Jobs; + // (undocumented) + monitoringConfig: MonitoringConfig; + // (undocumented) + nodes: Nodes; + // (undocumented) + operations: Operations; + // (undocumented) + operationsStatus: OperationsStatus; + // (undocumented) + orders: Orders; + // (undocumented) + roles: Roles; + // (undocumented) + shares: Shares; + // (undocumented) + storageAccountCredentials: StorageAccountCredentials; + // (undocumented) + storageAccounts: StorageAccounts; + // (undocumented) + subscriptionId: string; + // (undocumented) + supportPackages: SupportPackages; + // (undocumented) + triggers: Triggers; + // (undocumented) + users: Users; +} + +// @public +export interface DataBoxEdgeManagementClientOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; +} + +// @public +export interface DataBoxEdgeMoveRequest { + resources: string[]; + targetResourceGroup: string; +} + +// @public +export interface DataBoxEdgeSku { + readonly apiVersions?: string[]; + readonly availability?: SkuAvailability; + readonly capabilities?: SkuCapability[]; + readonly costs?: SkuCost[]; + readonly family?: string; + readonly kind?: string; + readonly locationInfo?: SkuLocationInfo[]; + readonly locations?: string[]; + readonly name?: SkuName; + readonly resourceType?: string; + readonly shipmentTypes?: ShipmentType[]; + readonly signupOption?: SkuSignupOption; + readonly size?: string; + readonly tier?: SkuTier; + readonly version?: SkuVersion; +} + +// @public +export interface DataBoxEdgeSkuList { + readonly nextLink?: string; + readonly value?: DataBoxEdgeSku[]; +} + +// @public +export type DataPolicy = string; + +// @public +export interface DataResidency { + type?: DataResidencyType; +} + +// @public +export type DataResidencyType = string; + +// @public +export type DayOfWeek = string; + +// @public +export interface DCAccessCode { + authCode?: string; +} + +// @public +export interface Devices { + beginCreateOrUpdateSecuritySettings(deviceName: string, resourceGroupName: string, securitySettings: SecuritySettings, options?: DevicesCreateOrUpdateSecuritySettingsOptionalParams): Promise, void>>; + beginCreateOrUpdateSecuritySettingsAndWait(deviceName: string, resourceGroupName: string, securitySettings: SecuritySettings, options?: DevicesCreateOrUpdateSecuritySettingsOptionalParams): Promise; + beginDelete(deviceName: string, resourceGroupName: string, options?: DevicesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(deviceName: string, resourceGroupName: string, options?: DevicesDeleteOptionalParams): Promise; + beginDownloadUpdates(deviceName: string, resourceGroupName: string, options?: DevicesDownloadUpdatesOptionalParams): Promise, void>>; + beginDownloadUpdatesAndWait(deviceName: string, resourceGroupName: string, options?: DevicesDownloadUpdatesOptionalParams): Promise; + beginInstallUpdates(deviceName: string, resourceGroupName: string, options?: DevicesInstallUpdatesOptionalParams): Promise, void>>; + beginInstallUpdatesAndWait(deviceName: string, resourceGroupName: string, options?: DevicesInstallUpdatesOptionalParams): Promise; + beginScanForUpdates(deviceName: string, resourceGroupName: string, options?: DevicesScanForUpdatesOptionalParams): Promise, void>>; + beginScanForUpdatesAndWait(deviceName: string, resourceGroupName: string, options?: DevicesScanForUpdatesOptionalParams): Promise; + createOrUpdate(deviceName: string, resourceGroupName: string, dataBoxEdgeDevice: DataBoxEdgeDevice, options?: DevicesCreateOrUpdateOptionalParams): Promise; + generateCertificate(deviceName: string, resourceGroupName: string, options?: DevicesGenerateCertificateOptionalParams): Promise; + get(deviceName: string, resourceGroupName: string, options?: DevicesGetOptionalParams): Promise; + getExtendedInformation(deviceName: string, resourceGroupName: string, options?: DevicesGetExtendedInformationOptionalParams): Promise; + getNetworkSettings(deviceName: string, resourceGroupName: string, options?: DevicesGetNetworkSettingsOptionalParams): Promise; + getUpdateSummary(deviceName: string, resourceGroupName: string, options?: DevicesGetUpdateSummaryOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: DevicesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: DevicesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + update(deviceName: string, resourceGroupName: string, parameters: DataBoxEdgeDevicePatch, options?: DevicesUpdateOptionalParams): Promise; + updateExtendedInformation(deviceName: string, resourceGroupName: string, parameters: DataBoxEdgeDeviceExtendedInfoPatch, options?: DevicesUpdateExtendedInformationOptionalParams): Promise; + uploadCertificate(deviceName: string, resourceGroupName: string, parameters: UploadCertificateRequest, options?: DevicesUploadCertificateOptionalParams): Promise; +} + +// @public +export interface DevicesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DevicesCreateOrUpdateResponse = DataBoxEdgeDevice; + +// @public +export interface DevicesCreateOrUpdateSecuritySettingsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface DevicesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface DevicesDownloadUpdatesOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface DevicesGenerateCertificateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DevicesGenerateCertificateResponse = GenerateCertResponse; + +// @public +export interface DevicesGetExtendedInformationOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DevicesGetExtendedInformationResponse = DataBoxEdgeDeviceExtendedInfo; + +// @public +export interface DevicesGetNetworkSettingsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DevicesGetNetworkSettingsResponse = NetworkSettings; + +// @public +export interface DevicesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DevicesGetResponse = DataBoxEdgeDevice; + +// @public +export interface DevicesGetUpdateSummaryOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DevicesGetUpdateSummaryResponse = UpdateSummary; + +// @public +export interface DevicesInstallUpdatesOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface DevicesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type DevicesListByResourceGroupNextResponse = DataBoxEdgeDeviceList; + +// @public +export interface DevicesListByResourceGroupOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type DevicesListByResourceGroupResponse = DataBoxEdgeDeviceList; + +// @public +export interface DevicesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type DevicesListBySubscriptionNextResponse = DataBoxEdgeDeviceList; + +// @public +export interface DevicesListBySubscriptionOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type DevicesListBySubscriptionResponse = DataBoxEdgeDeviceList; + +// @public +export interface DevicesScanForUpdatesOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface DevicesUpdateExtendedInformationOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DevicesUpdateExtendedInformationResponse = DataBoxEdgeDeviceExtendedInfo; + +// @public +export interface DevicesUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DevicesUpdateResponse = DataBoxEdgeDevice; + +// @public +export interface DevicesUploadCertificateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DevicesUploadCertificateResponse = UploadCertificateResponse; + +// @public +export type DeviceType = string; + +// @public +export type DiagnosticProactiveLogCollectionSettings = ARMBaseModel & { + readonly systemData?: SystemData; + userConsent: ProactiveDiagnosticsConsent; +}; + +// @public +export type DiagnosticRemoteSupportSettings = ARMBaseModel & { + readonly systemData?: SystemData; + remoteSupportSettingsList?: RemoteSupportSettings[]; +}; + +// @public +export interface DiagnosticSettings { + beginUpdateDiagnosticProactiveLogCollectionSettings(deviceName: string, resourceGroupName: string, proactiveLogCollectionSettings: DiagnosticProactiveLogCollectionSettings, options?: DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsOptionalParams): Promise, DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse>>; + beginUpdateDiagnosticProactiveLogCollectionSettingsAndWait(deviceName: string, resourceGroupName: string, proactiveLogCollectionSettings: DiagnosticProactiveLogCollectionSettings, options?: DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsOptionalParams): Promise; + beginUpdateDiagnosticRemoteSupportSettings(deviceName: string, resourceGroupName: string, diagnosticRemoteSupportSettings: DiagnosticRemoteSupportSettings, options?: DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsOptionalParams): Promise, DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse>>; + beginUpdateDiagnosticRemoteSupportSettingsAndWait(deviceName: string, resourceGroupName: string, diagnosticRemoteSupportSettings: DiagnosticRemoteSupportSettings, options?: DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsOptionalParams): Promise; + getDiagnosticProactiveLogCollectionSettings(deviceName: string, resourceGroupName: string, options?: DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsOptionalParams): Promise; + getDiagnosticRemoteSupportSettings(deviceName: string, resourceGroupName: string, options?: DiagnosticSettingsGetDiagnosticRemoteSupportSettingsOptionalParams): Promise; +} + +// @public +export interface DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsResponse = DiagnosticProactiveLogCollectionSettings; + +// @public +export interface DiagnosticSettingsGetDiagnosticRemoteSupportSettingsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DiagnosticSettingsGetDiagnosticRemoteSupportSettingsResponse = DiagnosticRemoteSupportSettings; + +// @public +export interface DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse = DiagnosticProactiveLogCollectionSettings; + +// @public +export interface DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse = DiagnosticRemoteSupportSettings; + +// @public +export type DownloadPhase = string; + +// @public +export interface EdgeProfile { + subscription?: EdgeProfileSubscription; +} + +// @public +export interface EdgeProfilePatch { + subscription?: EdgeProfileSubscriptionPatch; +} + +// @public +export interface EdgeProfileSubscription { + id?: string; + // (undocumented) + locationPlacementId?: string; + // (undocumented) + quotaId?: string; + // (undocumented) + registeredFeatures?: SubscriptionRegisteredFeatures[]; + // (undocumented) + registrationDate?: string; + registrationId?: string; + // (undocumented) + serializedDetails?: string; + // (undocumented) + state?: SubscriptionState; + // (undocumented) + subscriptionId?: string; + // (undocumented) + tenantId?: string; +} + +// @public +export interface EdgeProfileSubscriptionPatch { + id?: string; +} + +// @public +export type EncryptionAlgorithm = string; + +// @public +export interface EtcdInfo { + readonly type?: string; + readonly version?: string; +} + +// @public +export type FileEventTrigger = Trigger & { + sourceInfo: FileSourceInfo; + sinkInfo: RoleSinkInfo; + customContextTag?: string; +}; + +// @public +export interface FileSourceInfo { + shareId: string; +} + +// @public +export interface GenerateCertResponse { + expiryTimeInUTC?: string; + privateKey?: string; + publicKey?: string; +} + +// @public +export type HostPlatformType = string; + +// @public +export interface ImageRepositoryCredential { + imageRepositoryUrl: string; + password?: AsymmetricEncryptedSecret; + userName: string; +} + +// @public +export type InstallationImpact = string; + +// @public +export type InstallRebootBehavior = string; + +// @public +export type IoTAddon = Addon & { + ioTDeviceDetails: IoTDeviceInfo; + ioTEdgeDeviceDetails: IoTDeviceInfo; + readonly version?: string; + readonly hostPlatform?: PlatformType; + readonly hostPlatformType?: HostPlatformType; + readonly provisioningState?: AddonState; +}; + +// @public +export interface IoTDeviceInfo { + authentication?: Authentication; + deviceId: string; + ioTHostHub: string; + ioTHostHubId?: string; +} + +// @public +export interface IoTEdgeAgentInfo { + imageName: string; + imageRepository?: ImageRepositoryCredential; + tag: string; +} + +// @public +export type IoTRole = Role & { + hostPlatform?: PlatformType; + ioTDeviceDetails?: IoTDeviceInfo; + ioTEdgeDeviceDetails?: IoTDeviceInfo; + shareMappings?: MountPointMap[]; + ioTEdgeAgentInfo?: IoTEdgeAgentInfo; + readonly hostPlatformType?: HostPlatformType; + computeResource?: ComputeResource; + roleStatus?: RoleStatus; +}; + +// @public +export interface Ipv4Config { + readonly gateway?: string; + readonly ipAddress?: string; + readonly subnet?: string; +} + +// @public +export interface Ipv6Config { + readonly gateway?: string; + readonly ipAddress?: string; + readonly prefixLength?: number; +} + +// @public +export interface Job { + readonly currentStage?: UpdateOperationStage; + readonly downloadProgress?: UpdateDownloadProgress; + readonly endTime?: Date; + readonly error?: JobErrorDetails; + readonly errorManifestFile?: string; + folder?: string; + readonly id?: string; + readonly installProgress?: UpdateInstallProgress; + readonly jobType?: JobType; + readonly name?: string; + readonly percentComplete?: number; + readonly refreshedEntityId?: string; + readonly startTime?: Date; + readonly status?: JobStatus; + readonly totalRefreshErrors?: number; + readonly type?: string; +} + +// @public +export interface JobErrorDetails { + readonly code?: string; + readonly errorDetails?: JobErrorItem[]; + readonly message?: string; +} + +// @public +export interface JobErrorItem { + readonly code?: string; + readonly message?: string; + readonly recommendations?: string[]; +} + +// @public +export interface Jobs { + get(deviceName: string, name: string, resourceGroupName: string, options?: JobsGetOptionalParams): Promise; +} + +// @public +export interface JobsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type JobsGetResponse = Job; + +// @public +export type JobStatus = string; + +// @public +export type JobType = string; + +// @public +export type KeyVaultSyncStatus = string; + +// @public +export enum KnownAccessLevel { + // (undocumented) + FullAccess = "FullAccess", + // (undocumented) + None = "None", + // (undocumented) + ReadOnly = "ReadOnly", + // (undocumented) + ReadWrite = "ReadWrite" +} + +// @public +export enum KnownAccountType { + // (undocumented) + BlobStorage = "BlobStorage", + // (undocumented) + GeneralPurposeStorage = "GeneralPurposeStorage" +} + +// @public +export enum KnownAddonState { + // (undocumented) + Created = "Created", + // (undocumented) + Creating = "Creating", + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Failed = "Failed", + // (undocumented) + Invalid = "Invalid", + // (undocumented) + Reconfiguring = "Reconfiguring", + // (undocumented) + Updating = "Updating" +} + +// @public +export enum KnownAddonType { + // (undocumented) + ArcForKubernetes = "ArcForKubernetes", + // (undocumented) + IotEdge = "IotEdge" +} + +// @public +export enum KnownAlertSeverity { + // (undocumented) + Critical = "Critical", + // (undocumented) + Informational = "Informational", + // (undocumented) + Warning = "Warning" +} + +// @public +export enum KnownAuthenticationType { + // (undocumented) + AzureActiveDirectory = "AzureActiveDirectory", + // (undocumented) + Invalid = "Invalid" +} + +// @public +export enum KnownAzureContainerDataFormat { + // (undocumented) + AzureFile = "AzureFile", + // (undocumented) + BlockBlob = "BlockBlob", + // (undocumented) + PageBlob = "PageBlob" +} + +// @public +export enum KnownClientPermissionType { + // (undocumented) + NoAccess = "NoAccess", + // (undocumented) + ReadOnly = "ReadOnly", + // (undocumented) + ReadWrite = "ReadWrite" +} + +// @public +export enum KnownContainerStatus { + // (undocumented) + NeedsAttention = "NeedsAttention", + // (undocumented) + Offline = "Offline", + // (undocumented) + OK = "OK", + // (undocumented) + Unknown = "Unknown", + // (undocumented) + Updating = "Updating" +} + +// @public +export enum KnownCreatedByType { + // (undocumented) + Application = "Application", + // (undocumented) + Key = "Key", + // (undocumented) + ManagedIdentity = "ManagedIdentity", + // (undocumented) + User = "User" +} + +// @public +export enum KnownDataBoxEdgeDeviceKind { + // (undocumented) + AzureDataBoxGateway = "AzureDataBoxGateway", + // (undocumented) + AzureModularDataCentre = "AzureModularDataCentre", + // (undocumented) + AzureStackEdge = "AzureStackEdge", + // (undocumented) + AzureStackHub = "AzureStackHub" +} + +// @public +export enum KnownDataBoxEdgeDeviceStatus { + // (undocumented) + Disconnected = "Disconnected", + // (undocumented) + Maintenance = "Maintenance", + // (undocumented) + NeedsAttention = "NeedsAttention", + // (undocumented) + Offline = "Offline", + // (undocumented) + Online = "Online", + // (undocumented) + PartiallyDisconnected = "PartiallyDisconnected", + // (undocumented) + ReadyToSetup = "ReadyToSetup" +} + +// @public +export enum KnownDataPolicy { + // (undocumented) + Cloud = "Cloud", + // (undocumented) + Local = "Local" +} + +// @public +export enum KnownDataResidencyType { + // (undocumented) + GeoZoneReplication = "GeoZoneReplication", + // (undocumented) + ZoneReplication = "ZoneReplication" +} + +// @public +export enum KnownDayOfWeek { + // (undocumented) + Friday = "Friday", + // (undocumented) + Monday = "Monday", + // (undocumented) + Saturday = "Saturday", + // (undocumented) + Sunday = "Sunday", + // (undocumented) + Thursday = "Thursday", + // (undocumented) + Tuesday = "Tuesday", + // (undocumented) + Wednesday = "Wednesday" +} + +// @public +export enum KnownDeviceType { + // (undocumented) + DataBoxEdgeDevice = "DataBoxEdgeDevice" +} + +// @public +export enum KnownDownloadPhase { + // (undocumented) + Downloading = "Downloading", + // (undocumented) + Initializing = "Initializing", + // (undocumented) + Unknown = "Unknown", + // (undocumented) + Verifying = "Verifying" +} + +// @public +export enum KnownEncryptionAlgorithm { + // (undocumented) + AES256 = "AES256", + // (undocumented) + None = "None", + // (undocumented) + RsaesPkcs1V15 = "RSAES_PKCS1_v_1_5" +} + +// @public +export enum KnownHostPlatformType { + // (undocumented) + KubernetesCluster = "KubernetesCluster", + // (undocumented) + LinuxVM = "LinuxVM" +} + +// @public +export enum KnownInstallationImpact { + // (undocumented) + DeviceRebooted = "DeviceRebooted", + // (undocumented) + KubernetesWorkloadsDown = "KubernetesWorkloadsDown", + // (undocumented) + None = "None" +} + +// @public +export enum KnownInstallRebootBehavior { + // (undocumented) + NeverReboots = "NeverReboots", + // (undocumented) + RequestReboot = "RequestReboot", + // (undocumented) + RequiresReboot = "RequiresReboot" +} + +// @public +export enum KnownJobStatus { + // (undocumented) + Canceled = "Canceled", + // (undocumented) + Failed = "Failed", + // (undocumented) + Invalid = "Invalid", + // (undocumented) + Paused = "Paused", + // (undocumented) + Running = "Running", + // (undocumented) + Scheduled = "Scheduled", + // (undocumented) + Succeeded = "Succeeded" +} + +// @public +export enum KnownJobType { + // (undocumented) + Backup = "Backup", + // (undocumented) + DownloadUpdates = "DownloadUpdates", + // (undocumented) + InstallUpdates = "InstallUpdates", + // (undocumented) + Invalid = "Invalid", + // (undocumented) + RefreshContainer = "RefreshContainer", + // (undocumented) + RefreshShare = "RefreshShare", + // (undocumented) + Restore = "Restore", + // (undocumented) + ScanForUpdates = "ScanForUpdates", + // (undocumented) + TriggerSupportPackage = "TriggerSupportPackage" +} + +// @public +export enum KnownKeyVaultSyncStatus { + // (undocumented) + KeyVaultNotConfigured = "KeyVaultNotConfigured", + // (undocumented) + KeyVaultNotSynced = "KeyVaultNotSynced", + // (undocumented) + KeyVaultSynced = "KeyVaultSynced", + // (undocumented) + KeyVaultSyncFailed = "KeyVaultSyncFailed", + // (undocumented) + KeyVaultSyncing = "KeyVaultSyncing", + // (undocumented) + KeyVaultSyncPending = "KeyVaultSyncPending" +} + +// @public +export enum KnownKubernetesNodeType { + // (undocumented) + Invalid = "Invalid", + // (undocumented) + Master = "Master", + // (undocumented) + Worker = "Worker" +} + +// @public +export enum KnownKubernetesState { + // (undocumented) + Created = "Created", + // (undocumented) + Creating = "Creating", + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Failed = "Failed", + // (undocumented) + Invalid = "Invalid", + // (undocumented) + Reconfiguring = "Reconfiguring", + // (undocumented) + Updating = "Updating" +} + +// @public +export enum KnownMetricAggregationType { + // (undocumented) + Average = "Average", + // (undocumented) + Count = "Count", + // (undocumented) + Maximum = "Maximum", + // (undocumented) + Minimum = "Minimum", + // (undocumented) + None = "None", + // (undocumented) + NotSpecified = "NotSpecified", + // (undocumented) + Total = "Total" +} + +// @public +export enum KnownMetricCategory { + // (undocumented) + Capacity = "Capacity", + // (undocumented) + Transaction = "Transaction" +} + +// @public +export enum KnownMetricUnit { + // (undocumented) + Bytes = "Bytes", + // (undocumented) + BytesPerSecond = "BytesPerSecond", + // (undocumented) + Count = "Count", + // (undocumented) + CountPerSecond = "CountPerSecond", + // (undocumented) + Milliseconds = "Milliseconds", + // (undocumented) + NotSpecified = "NotSpecified", + // (undocumented) + Percent = "Percent", + // (undocumented) + Seconds = "Seconds" +} + +// @public +export enum KnownMonitoringStatus { + // (undocumented) + Disabled = "Disabled", + // (undocumented) + Enabled = "Enabled" +} + +// @public +export enum KnownMountType { + // (undocumented) + HostPath = "HostPath", + // (undocumented) + Volume = "Volume" +} + +// @public +export enum KnownMsiIdentityType { + // (undocumented) + None = "None", + // (undocumented) + SystemAssigned = "SystemAssigned", + // (undocumented) + UserAssigned = "UserAssigned" +} + +// @public +export enum KnownNetworkAdapterDhcpStatus { + // (undocumented) + Disabled = "Disabled", + // (undocumented) + Enabled = "Enabled" +} + +// @public +export enum KnownNetworkAdapterRdmaStatus { + // (undocumented) + Capable = "Capable", + // (undocumented) + Incapable = "Incapable" +} + +// @public +export enum KnownNetworkAdapterStatus { + // (undocumented) + Active = "Active", + // (undocumented) + Inactive = "Inactive" +} + +// @public +export enum KnownNetworkGroup { + // (undocumented) + None = "None", + // (undocumented) + NonRdma = "NonRDMA", + // (undocumented) + Rdma = "RDMA" +} + +// @public +export enum KnownNodeStatus { + // (undocumented) + Down = "Down", + // (undocumented) + Rebooting = "Rebooting", + // (undocumented) + ShuttingDown = "ShuttingDown", + // (undocumented) + Unknown = "Unknown", + // (undocumented) + Up = "Up" +} + +// @public +export enum KnownOrderState { + // (undocumented) + Arriving = "Arriving", + // (undocumented) + AwaitingDrop = "AwaitingDrop", + // (undocumented) + AwaitingFulfillment = "AwaitingFulfillment", + // (undocumented) + AwaitingPickup = "AwaitingPickup", + // (undocumented) + AwaitingPreparation = "AwaitingPreparation", + // (undocumented) + AwaitingReturnShipment = "AwaitingReturnShipment", + // (undocumented) + AwaitingShipment = "AwaitingShipment", + // (undocumented) + CollectedAtMicrosoft = "CollectedAtMicrosoft", + // (undocumented) + Declined = "Declined", + // (undocumented) + Delivered = "Delivered", + // (undocumented) + LostDevice = "LostDevice", + // (undocumented) + PickupCompleted = "PickupCompleted", + // (undocumented) + ReplacementRequested = "ReplacementRequested", + // (undocumented) + ReturnInitiated = "ReturnInitiated", + // (undocumented) + Shipped = "Shipped", + // (undocumented) + ShippedBack = "ShippedBack", + // (undocumented) + Untracked = "Untracked" +} + +// @public +export enum KnownPlatformType { + // (undocumented) + Linux = "Linux", + // (undocumented) + Windows = "Windows" +} + +// @public +export enum KnownPosixComplianceStatus { + // (undocumented) + Disabled = "Disabled", + // (undocumented) + Enabled = "Enabled", + // (undocumented) + Invalid = "Invalid" +} + +// @public +export enum KnownProactiveDiagnosticsConsent { + // (undocumented) + Disabled = "Disabled", + // (undocumented) + Enabled = "Enabled" +} + +// @public +export enum KnownRemoteApplicationType { + // (undocumented) + AllApplications = "AllApplications", + // (undocumented) + LocalUI = "LocalUI", + // (undocumented) + Powershell = "Powershell", + // (undocumented) + WAC = "WAC" +} + +// @public +export enum KnownResourceMoveStatus { + // (undocumented) + None = "None", + // (undocumented) + ResourceMoveFailed = "ResourceMoveFailed", + // (undocumented) + ResourceMoveInProgress = "ResourceMoveInProgress" +} + +// @public +export enum KnownRoleStatus { + // (undocumented) + Disabled = "Disabled", + // (undocumented) + Enabled = "Enabled" +} + +// @public +export enum KnownRoleTypes { + // (undocumented) + ASA = "ASA", + // (undocumented) + CloudEdgeManagement = "CloudEdgeManagement", + // (undocumented) + Cognitive = "Cognitive", + // (undocumented) + Functions = "Functions", + // (undocumented) + IOT = "IOT", + // (undocumented) + Kubernetes = "Kubernetes", + // (undocumented) + MEC = "MEC" +} + +// @public +export enum KnownShareAccessProtocol { + // (undocumented) + NFS = "NFS", + // (undocumented) + SMB = "SMB" +} + +// @public +export enum KnownShareAccessType { + // (undocumented) + Change = "Change", + // (undocumented) + Custom = "Custom", + // (undocumented) + Read = "Read" +} + +// @public +export enum KnownShareStatus { + // (undocumented) + NeedsAttention = "NeedsAttention", + // (undocumented) + Offline = "Offline", + // (undocumented) + OK = "OK", + // (undocumented) + Unknown = "Unknown", + // (undocumented) + Updating = "Updating" +} + +// @public +export enum KnownShipmentType { + // (undocumented) + NotApplicable = "NotApplicable", + // (undocumented) + SelfPickup = "SelfPickup", + // (undocumented) + ShippedToCustomer = "ShippedToCustomer" +} + +// @public +export enum KnownSkuAvailability { + // (undocumented) + Available = "Available", + // (undocumented) + Unavailable = "Unavailable" +} + +// @public +export enum KnownSkuName { + // (undocumented) + Edge = "Edge", + // (undocumented) + EdgeMRMini = "EdgeMR_Mini", + // (undocumented) + EdgePBase = "EdgeP_Base", + // (undocumented) + EdgePHigh = "EdgeP_High", + // (undocumented) + EdgePRBase = "EdgePR_Base", + // (undocumented) + EdgePRBaseUPS = "EdgePR_Base_UPS", + // (undocumented) + EP21281T4Mx1W = "EP2_128_1T4_Mx1_W", + // (undocumented) + EP22562T4W = "EP2_256_2T4_W", + // (undocumented) + EP2641VPUW = "EP2_64_1VPU_W", + // (undocumented) + Gateway = "Gateway", + // (undocumented) + GPU = "GPU", + // (undocumented) + Management = "Management", + // (undocumented) + RCALarge = "RCA_Large", + // (undocumented) + RCASmall = "RCA_Small", + // (undocumented) + RDC = "RDC", + // (undocumented) + TCALarge = "TCA_Large", + // (undocumented) + TCASmall = "TCA_Small", + // (undocumented) + TDC = "TDC", + // (undocumented) + TEA1Node = "TEA_1Node", + // (undocumented) + TEA1NodeHeater = "TEA_1Node_Heater", + // (undocumented) + TEA1NodeUPS = "TEA_1Node_UPS", + // (undocumented) + TEA1NodeUPSHeater = "TEA_1Node_UPS_Heater", + // (undocumented) + TEA4NodeHeater = "TEA_4Node_Heater", + // (undocumented) + TEA4NodeUPSHeater = "TEA_4Node_UPS_Heater", + // (undocumented) + TMA = "TMA" +} + +// @public +export enum KnownSkuSignupOption { + // (undocumented) + Available = "Available", + // (undocumented) + None = "None" +} + +// @public +export enum KnownSkuTier { + // (undocumented) + Standard = "Standard" +} + +// @public +export enum KnownSkuVersion { + // (undocumented) + Preview = "Preview", + // (undocumented) + Stable = "Stable" +} + +// @public +export enum KnownSSLStatus { + // (undocumented) + Disabled = "Disabled", + // (undocumented) + Enabled = "Enabled" +} + +// @public +export enum KnownStorageAccountStatus { + // (undocumented) + NeedsAttention = "NeedsAttention", + // (undocumented) + Offline = "Offline", + // (undocumented) + OK = "OK", + // (undocumented) + Unknown = "Unknown", + // (undocumented) + Updating = "Updating" +} + +// @public +export enum KnownSubscriptionState { + // (undocumented) + Deleted = "Deleted", + // (undocumented) + Registered = "Registered", + // (undocumented) + Suspended = "Suspended", + // (undocumented) + Unregistered = "Unregistered", + // (undocumented) + Warned = "Warned" +} + +// @public +export enum KnownTimeGrain { + // (undocumented) + PT12H = "PT12H", + // (undocumented) + PT15M = "PT15M", + // (undocumented) + PT1D = "PT1D", + // (undocumented) + PT1H = "PT1H", + // (undocumented) + PT1M = "PT1M", + // (undocumented) + PT30M = "PT30M", + // (undocumented) + PT5M = "PT5M", + // (undocumented) + PT6H = "PT6H" +} + +// @public +export enum KnownTriggerEventType { + // (undocumented) + FileEvent = "FileEvent", + // (undocumented) + PeriodicTimerEvent = "PeriodicTimerEvent" +} + +// @public +export enum KnownUpdateOperation { + // (undocumented) + Download = "Download", + // (undocumented) + Install = "Install", + // (undocumented) + None = "None", + // (undocumented) + Scan = "Scan" +} + +// @public +export enum KnownUpdateOperationStage { + // (undocumented) + DownloadComplete = "DownloadComplete", + // (undocumented) + DownloadFailed = "DownloadFailed", + // (undocumented) + DownloadStarted = "DownloadStarted", + // (undocumented) + Failure = "Failure", + // (undocumented) + Initial = "Initial", + // (undocumented) + InstallComplete = "InstallComplete", + // (undocumented) + InstallFailed = "InstallFailed", + // (undocumented) + InstallStarted = "InstallStarted", + // (undocumented) + RebootInitiated = "RebootInitiated", + // (undocumented) + RescanComplete = "RescanComplete", + // (undocumented) + RescanFailed = "RescanFailed", + // (undocumented) + RescanStarted = "RescanStarted", + // (undocumented) + ScanComplete = "ScanComplete", + // (undocumented) + ScanFailed = "ScanFailed", + // (undocumented) + ScanStarted = "ScanStarted", + // (undocumented) + Success = "Success", + // (undocumented) + Unknown = "Unknown" +} + +// @public +export enum KnownUpdateStatus { + // (undocumented) + DownloadCompleted = "DownloadCompleted", + // (undocumented) + DownloadPending = "DownloadPending", + // (undocumented) + DownloadStarted = "DownloadStarted", + // (undocumented) + InstallCompleted = "InstallCompleted", + // (undocumented) + InstallStarted = "InstallStarted" +} + +// @public +export enum KnownUpdateType { + // (undocumented) + Firmware = "Firmware", + // (undocumented) + Kubernetes = "Kubernetes", + // (undocumented) + Software = "Software" +} + +// @public +export enum KnownUserType { + // (undocumented) + ARM = "ARM", + // (undocumented) + LocalManagement = "LocalManagement", + // (undocumented) + Share = "Share" +} + +// @public +export interface KubernetesClusterInfo { + readonly etcdInfo?: EtcdInfo; + readonly nodes?: NodeInfo[]; + version: string; +} + +// @public +export interface KubernetesIPConfiguration { + ipAddress?: string; + readonly port?: string; +} + +// @public +export type KubernetesNodeType = string; + +// @public +export type KubernetesRole = Role & { + hostPlatform?: PlatformType; + readonly provisioningState?: KubernetesState; + readonly hostPlatformType?: HostPlatformType; + kubernetesClusterInfo?: KubernetesClusterInfo; + kubernetesRoleResources?: KubernetesRoleResources; + roleStatus?: RoleStatus; +}; + +// @public +export interface KubernetesRoleCompute { + readonly memoryInBytes?: number; + readonly processorCount?: number; + vmProfile: string; +} + +// @public +export interface KubernetesRoleNetwork { + readonly cniConfig?: CniConfig; + readonly loadBalancerConfig?: LoadBalancerConfig; +} + +// @public +export interface KubernetesRoleResources { + compute: KubernetesRoleCompute; + readonly network?: KubernetesRoleNetwork; + storage?: KubernetesRoleStorage; +} + +// @public +export interface KubernetesRoleStorage { + endpoints?: MountPointMap[]; + readonly storageClasses?: KubernetesRoleStorageClassInfo[]; +} + +// @public +export interface KubernetesRoleStorageClassInfo { + readonly name?: string; + readonly posixCompliant?: PosixComplianceStatus; + readonly type?: string; +} + +// @public +export type KubernetesState = string; + +// @public +export interface LoadBalancerConfig { + readonly type?: string; + readonly version?: string; +} + +// @public +export type MECRole = Role & { + connectionString?: AsymmetricEncryptedSecret; + controllerEndpoint?: string; + resourceUniqueId?: string; + roleStatus?: RoleStatus; +}; + +// @public +export type MetricAggregationType = string; + +// @public +export type MetricCategory = string; + +// @public +export interface MetricConfiguration { + counterSets: MetricCounterSet[]; + mdmAccount?: string; + metricNameSpace?: string; + resourceId: string; +} + +// @public +export interface MetricCounter { + additionalDimensions?: MetricDimension[]; + dimensionFilter?: MetricDimension[]; + instance?: string; + name: string; +} + +// @public +export interface MetricCounterSet { + counters: MetricCounter[]; +} + +// @public +export interface MetricDimension { + sourceName: string; + sourceType: string; +} + +// @public +export interface MetricDimensionV1 { + displayName?: string; + name?: string; + toBeExportedForShoebox?: boolean; +} + +// @public +export interface MetricSpecificationV1 { + aggregationType?: MetricAggregationType; + category?: MetricCategory; + dimensions?: MetricDimensionV1[]; + displayDescription?: string; + displayName?: string; + fillGapWithZero?: boolean; + name?: string; + resourceIdDimensionNameOverride?: string; + supportedAggregationTypes?: MetricAggregationType[]; + supportedTimeGrainTypes?: TimeGrain[]; + unit?: MetricUnit; +} + +// @public +export type MetricUnit = string; + +// @public +export interface MonitoringConfig { + beginCreateOrUpdate(deviceName: string, roleName: string, resourceGroupName: string, monitoringMetricConfiguration: MonitoringMetricConfiguration, options?: MonitoringConfigCreateOrUpdateOptionalParams): Promise, MonitoringConfigCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(deviceName: string, roleName: string, resourceGroupName: string, monitoringMetricConfiguration: MonitoringMetricConfiguration, options?: MonitoringConfigCreateOrUpdateOptionalParams): Promise; + beginDelete(deviceName: string, roleName: string, resourceGroupName: string, options?: MonitoringConfigDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(deviceName: string, roleName: string, resourceGroupName: string, options?: MonitoringConfigDeleteOptionalParams): Promise; + get(deviceName: string, roleName: string, resourceGroupName: string, options?: MonitoringConfigGetOptionalParams): Promise; + list(deviceName: string, roleName: string, resourceGroupName: string, options?: MonitoringConfigListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface MonitoringConfigCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MonitoringConfigCreateOrUpdateResponse = MonitoringMetricConfiguration; + +// @public +export interface MonitoringConfigDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface MonitoringConfigGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MonitoringConfigGetResponse = MonitoringMetricConfiguration; + +// @public +export interface MonitoringConfigListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MonitoringConfigListNextResponse = MonitoringMetricConfigurationList; + +// @public +export interface MonitoringConfigListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MonitoringConfigListResponse = MonitoringMetricConfigurationList; + +// @public +export type MonitoringMetricConfiguration = ARMBaseModel & { + readonly systemData?: SystemData; + metricConfigurations: MetricConfiguration[]; +}; + +// @public +export interface MonitoringMetricConfigurationList { + readonly nextLink?: string; + readonly value?: MonitoringMetricConfiguration[]; +} + +// @public +export type MonitoringStatus = string; + +// @public +export interface MountPointMap { + readonly mountPoint?: string; + readonly mountType?: MountType; + readonly roleId?: string; + readonly roleType?: RoleTypes; + shareId: string; +} + +// @public +export type MountType = string; + +// @public +export type MsiIdentityType = string; + +// @public +export interface NetworkAdapter { + readonly adapterId?: string; + readonly adapterPosition?: NetworkAdapterPosition; + dhcpStatus?: NetworkAdapterDhcpStatus; + readonly dnsServers?: string[]; + readonly index?: number; + readonly ipv4Configuration?: Ipv4Config; + readonly ipv6Configuration?: Ipv6Config; + readonly ipv6LinkLocalAddress?: string; + readonly label?: string; + readonly linkSpeed?: number; + readonly macAddress?: string; + readonly networkAdapterName?: string; + readonly nodeId?: string; + rdmaStatus?: NetworkAdapterRdmaStatus; + readonly status?: NetworkAdapterStatus; +} + +// @public +export type NetworkAdapterDhcpStatus = string; + +// @public +export interface NetworkAdapterPosition { + readonly networkGroup?: NetworkGroup; + readonly port?: number; +} + +// @public +export type NetworkAdapterRdmaStatus = string; + +// @public +export type NetworkAdapterStatus = string; + +// @public +export type NetworkGroup = string; + +// @public +export type NetworkSettings = ARMBaseModel & { + readonly systemData?: SystemData; + readonly networkAdapters?: NetworkAdapter[]; +}; + +// @public +type Node_2 = ARMBaseModel & { + readonly nodeStatus?: NodeStatus; + readonly nodeChassisSerialNumber?: string; + readonly nodeSerialNumber?: string; + readonly nodeDisplayName?: string; + readonly nodeFriendlySoftwareVersion?: string; + readonly nodeHcsVersion?: string; + readonly nodeInstanceId?: string; +}; +export { Node_2 as Node } + +// @public +export interface NodeInfo { + ipConfiguration?: KubernetesIPConfiguration[]; + readonly name?: string; + readonly type?: KubernetesNodeType; +} + +// @public +interface NodeList_2 { + readonly nextLink?: string; + readonly value?: Node_2[]; +} +export { NodeList_2 as NodeList } + +// @public +export interface Nodes { + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: NodesListByDataBoxEdgeDeviceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface NodesListByDataBoxEdgeDeviceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NodesListByDataBoxEdgeDeviceNextResponse = NodeList_2; + +// @public +export interface NodesListByDataBoxEdgeDeviceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NodesListByDataBoxEdgeDeviceResponse = NodeList_2; + +// @public +export type NodeStatus = string; + +// @public +export interface Operation { + display?: OperationDisplay; + isDataAction?: boolean; + name?: string; + origin?: string; + serviceSpecification?: ServiceSpecification; +} + +// @public +export interface OperationDisplay { + description?: string; + operation?: string; + provider?: string; + resource?: string; +} + +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface OperationsList { + nextLink?: string; + value: Operation[]; +} + +// @public +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListNextResponse = OperationsList; + +// @public +export interface OperationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListResponse = OperationsList; + +// @public +export interface OperationsStatus { + get(deviceName: string, name: string, resourceGroupName: string, options?: OperationsStatusGetOptionalParams): Promise; +} + +// @public +export interface OperationsStatusGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsStatusGetResponse = Job; + +// @public +export type Order = ARMBaseModel & { + readonly systemData?: SystemData; + contactInformation?: ContactDetails; + shippingAddress?: Address; + readonly currentStatus?: OrderStatus; + readonly orderHistory?: OrderStatus[]; + readonly serialNumber?: string; + readonly deliveryTrackingInfo?: TrackingInfo[]; + readonly returnTrackingInfo?: TrackingInfo[]; + shipmentType?: ShipmentType; +}; + +// @public +export interface OrderList { + readonly nextLink?: string; + readonly value?: Order[]; +} + +// @public +export interface Orders { + beginCreateOrUpdate(deviceName: string, resourceGroupName: string, order: Order, options?: OrdersCreateOrUpdateOptionalParams): Promise, OrdersCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(deviceName: string, resourceGroupName: string, order: Order, options?: OrdersCreateOrUpdateOptionalParams): Promise; + beginDelete(deviceName: string, resourceGroupName: string, options?: OrdersDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(deviceName: string, resourceGroupName: string, options?: OrdersDeleteOptionalParams): Promise; + get(deviceName: string, resourceGroupName: string, options?: OrdersGetOptionalParams): Promise; + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: OrdersListByDataBoxEdgeDeviceOptionalParams): PagedAsyncIterableIterator; + listDCAccessCode(deviceName: string, resourceGroupName: string, options?: OrdersListDCAccessCodeOptionalParams): Promise; +} + +// @public +export interface OrdersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type OrdersCreateOrUpdateResponse = Order; + +// @public +export interface OrdersDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface OrdersGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OrdersGetResponse = Order; + +// @public +export interface OrdersListByDataBoxEdgeDeviceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OrdersListByDataBoxEdgeDeviceNextResponse = OrderList; + +// @public +export interface OrdersListByDataBoxEdgeDeviceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OrdersListByDataBoxEdgeDeviceResponse = OrderList; + +// @public +export interface OrdersListDCAccessCodeOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OrdersListDCAccessCodeResponse = DCAccessCode; + +// @public +export type OrderState = string; + +// @public +export interface OrderStatus { + readonly additionalOrderDetails?: { + [propertyName: string]: string; + }; + comments?: string; + status: OrderState; + readonly trackingInformation?: TrackingInfo; + readonly updateDateTime?: Date; +} + +// @public +export type PeriodicTimerEventTrigger = Trigger & { + sourceInfo: PeriodicTimerSourceInfo; + sinkInfo: RoleSinkInfo; + customContextTag?: string; +}; + +// @public +export interface PeriodicTimerSourceInfo { + schedule: string; + startTime: Date; + topic?: string; +} + +// @public +export type PlatformType = string; + +// @public +export type PosixComplianceStatus = string; + +// @public +export type ProactiveDiagnosticsConsent = string; + +// @public +export interface RefreshDetails { + errorManifestFile?: string; + inProgressRefreshJobId?: string; + lastCompletedRefreshJobTimeInUTC?: Date; + lastJob?: string; +} + +// @public +export type RemoteApplicationType = string; + +// @public +export interface RemoteSupportSettings { + accessLevel?: AccessLevel; + expirationTimeStampInUTC?: Date; + remoteApplicationType?: RemoteApplicationType; +} + +// @public +export interface ResourceIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type?: MsiIdentityType; +} + +// @public +export interface ResourceMoveDetails { + operationInProgress?: ResourceMoveStatus; + operationInProgressLockTimeoutInUTC?: Date; +} + +// @public +export type ResourceMoveStatus = string; + +// @public +export interface ResourceTypeSku { + readonly resourceType?: string; + readonly skus?: SkuInformation[]; +} + +// @public +export type Role = ARMBaseModel & { + kind: RoleTypes; + readonly systemData?: SystemData; +}; + +// @public +export interface RoleList { + readonly nextLink?: string; + readonly value?: RoleUnion[]; +} + +// @public +export interface Roles { + beginCreateOrUpdate(deviceName: string, name: string, resourceGroupName: string, role: RoleUnion, options?: RolesCreateOrUpdateOptionalParams): Promise, RolesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(deviceName: string, name: string, resourceGroupName: string, role: RoleUnion, options?: RolesCreateOrUpdateOptionalParams): Promise; + beginDelete(deviceName: string, name: string, resourceGroupName: string, options?: RolesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(deviceName: string, name: string, resourceGroupName: string, options?: RolesDeleteOptionalParams): Promise; + get(deviceName: string, name: string, resourceGroupName: string, options?: RolesGetOptionalParams): Promise; + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: RolesListByDataBoxEdgeDeviceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface RolesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type RolesCreateOrUpdateResponse = RoleUnion; + +// @public +export interface RolesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface RolesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RolesGetResponse = RoleUnion; + +// @public +export interface RoleSinkInfo { + roleId: string; +} + +// @public +export interface RolesListByDataBoxEdgeDeviceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RolesListByDataBoxEdgeDeviceNextResponse = RoleList; + +// @public +export interface RolesListByDataBoxEdgeDeviceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RolesListByDataBoxEdgeDeviceResponse = RoleList; + +// @public +export type RoleStatus = string; + +// @public +export type RoleTypes = string; + +// @public (undocumented) +export type RoleUnion = Role | CloudEdgeManagementRole | IoTRole | KubernetesRole | MECRole; + +// @public +export interface Secret { + encryptedSecret?: AsymmetricEncryptedSecret; + keyVaultId?: string; +} + +// @public +export type SecuritySettings = ARMBaseModel & { + deviceAdminPassword: AsymmetricEncryptedSecret; +}; + +// @public +export interface ServiceSpecification { + metricSpecifications?: MetricSpecificationV1[]; +} + +// @public +export type Share = ARMBaseModel & { + readonly systemData?: SystemData; + description?: string; + shareStatus: ShareStatus; + monitoringStatus: MonitoringStatus; + azureContainerInfo?: AzureContainerInfo; + accessProtocol: ShareAccessProtocol; + userAccessRights?: UserAccessRight[]; + clientAccessRights?: ClientAccessRight[]; + refreshDetails?: RefreshDetails; + readonly shareMappings?: MountPointMap[]; + dataPolicy?: DataPolicy; +}; + +// @public +export type ShareAccessProtocol = string; + +// @public +export interface ShareAccessRight { + accessType: ShareAccessType; + shareId: string; +} + +// @public +export type ShareAccessType = string; + +// @public +export interface ShareList { + readonly nextLink?: string; + readonly value?: Share[]; +} + +// @public +export interface Shares { + beginCreateOrUpdate(deviceName: string, name: string, resourceGroupName: string, share: Share, options?: SharesCreateOrUpdateOptionalParams): Promise, SharesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(deviceName: string, name: string, resourceGroupName: string, share: Share, options?: SharesCreateOrUpdateOptionalParams): Promise; + beginDelete(deviceName: string, name: string, resourceGroupName: string, options?: SharesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(deviceName: string, name: string, resourceGroupName: string, options?: SharesDeleteOptionalParams): Promise; + beginRefresh(deviceName: string, name: string, resourceGroupName: string, options?: SharesRefreshOptionalParams): Promise, void>>; + beginRefreshAndWait(deviceName: string, name: string, resourceGroupName: string, options?: SharesRefreshOptionalParams): Promise; + get(deviceName: string, name: string, resourceGroupName: string, options?: SharesGetOptionalParams): Promise; + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: SharesListByDataBoxEdgeDeviceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SharesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SharesCreateOrUpdateResponse = Share; + +// @public +export interface SharesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface SharesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SharesGetResponse = Share; + +// @public +export interface SharesListByDataBoxEdgeDeviceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SharesListByDataBoxEdgeDeviceNextResponse = ShareList; + +// @public +export interface SharesListByDataBoxEdgeDeviceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SharesListByDataBoxEdgeDeviceResponse = ShareList; + +// @public +export interface SharesRefreshOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ShareStatus = string; + +// @public +export type ShipmentType = string; + +// @public +export interface Sku { + name?: SkuName; + tier?: SkuTier; +} + +// @public +export type SkuAvailability = string; + +// @public +export interface SkuCapability { + readonly name?: string; + readonly value?: string; +} + +// @public +export interface SkuCost { + readonly extendedUnit?: string; + readonly meterId?: string; + readonly quantity?: number; +} + +// @public +export interface SkuInformation { + readonly costs?: SkuCost[]; + readonly family?: string; + readonly kind?: string; + readonly locationInfo?: SkuLocationInfo[]; + readonly locations?: string[]; + readonly name?: string; + readonly requiredFeatures?: string[]; + readonly requiredQuotaIds?: string[]; + readonly tier?: string; +} + +// @public +export interface SkuInformationList { + readonly nextLink?: string; + readonly value?: ResourceTypeSku[]; +} + +// @public +export interface SkuLocationInfo { + readonly location?: string; + readonly sites?: string[]; + readonly zones?: string[]; +} + +// @public +export type SkuName = string; + +// @public +export type SkuSignupOption = string; + +// @public +export type SkuTier = string; + +// @public +export type SkuVersion = string; + +// @public +export type SSLStatus = string; + +// @public +export type StorageAccount = ARMBaseModel & { + readonly systemData?: SystemData; + description?: string; + storageAccountStatus?: StorageAccountStatus; + dataPolicy: DataPolicy; + storageAccountCredentialId?: string; + readonly blobEndpoint?: string; + readonly containerCount?: number; +}; + +// @public +export type StorageAccountCredential = ARMBaseModel & { + readonly systemData?: SystemData; + alias: string; + userName?: string; + accountKey?: AsymmetricEncryptedSecret; + connectionString?: string; + sslStatus: SSLStatus; + blobDomainName?: string; + accountType: AccountType; + storageAccountId?: string; +}; + +// @public +export interface StorageAccountCredentialList { + readonly nextLink?: string; + readonly value?: StorageAccountCredential[]; +} + +// @public +export interface StorageAccountCredentials { + beginCreateOrUpdate(deviceName: string, name: string, resourceGroupName: string, storageAccountCredential: StorageAccountCredential, options?: StorageAccountCredentialsCreateOrUpdateOptionalParams): Promise, StorageAccountCredentialsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(deviceName: string, name: string, resourceGroupName: string, storageAccountCredential: StorageAccountCredential, options?: StorageAccountCredentialsCreateOrUpdateOptionalParams): Promise; + beginDelete(deviceName: string, name: string, resourceGroupName: string, options?: StorageAccountCredentialsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(deviceName: string, name: string, resourceGroupName: string, options?: StorageAccountCredentialsDeleteOptionalParams): Promise; + get(deviceName: string, name: string, resourceGroupName: string, options?: StorageAccountCredentialsGetOptionalParams): Promise; + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: StorageAccountCredentialsListByDataBoxEdgeDeviceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface StorageAccountCredentialsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type StorageAccountCredentialsCreateOrUpdateResponse = StorageAccountCredential; + +// @public +export interface StorageAccountCredentialsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface StorageAccountCredentialsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type StorageAccountCredentialsGetResponse = StorageAccountCredential; + +// @public +export interface StorageAccountCredentialsListByDataBoxEdgeDeviceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type StorageAccountCredentialsListByDataBoxEdgeDeviceNextResponse = StorageAccountCredentialList; + +// @public +export interface StorageAccountCredentialsListByDataBoxEdgeDeviceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type StorageAccountCredentialsListByDataBoxEdgeDeviceResponse = StorageAccountCredentialList; + +// @public +export interface StorageAccountList { + readonly nextLink?: string; + readonly value?: StorageAccount[]; +} + +// @public +export interface StorageAccounts { + beginCreateOrUpdate(deviceName: string, storageAccountName: string, resourceGroupName: string, storageAccount: StorageAccount, options?: StorageAccountsCreateOrUpdateOptionalParams): Promise, StorageAccountsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(deviceName: string, storageAccountName: string, resourceGroupName: string, storageAccount: StorageAccount, options?: StorageAccountsCreateOrUpdateOptionalParams): Promise; + beginDelete(deviceName: string, storageAccountName: string, resourceGroupName: string, options?: StorageAccountsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(deviceName: string, storageAccountName: string, resourceGroupName: string, options?: StorageAccountsDeleteOptionalParams): Promise; + get(deviceName: string, storageAccountName: string, resourceGroupName: string, options?: StorageAccountsGetOptionalParams): Promise; + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: StorageAccountsListByDataBoxEdgeDeviceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface StorageAccountsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type StorageAccountsCreateOrUpdateResponse = StorageAccount; + +// @public +export interface StorageAccountsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface StorageAccountsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type StorageAccountsGetResponse = StorageAccount; + +// @public +export interface StorageAccountsListByDataBoxEdgeDeviceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type StorageAccountsListByDataBoxEdgeDeviceNextResponse = StorageAccountList; + +// @public +export interface StorageAccountsListByDataBoxEdgeDeviceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type StorageAccountsListByDataBoxEdgeDeviceResponse = StorageAccountList; + +// @public +export type StorageAccountStatus = string; + +// @public (undocumented) +export interface SubscriptionRegisteredFeatures { + // (undocumented) + name?: string; + // (undocumented) + state?: string; +} + +// @public +export type SubscriptionState = string; + +// @public +export interface SupportPackages { + beginTriggerSupportPackage(deviceName: string, resourceGroupName: string, triggerSupportPackageRequest: TriggerSupportPackageRequest, options?: SupportPackagesTriggerSupportPackageOptionalParams): Promise, void>>; + beginTriggerSupportPackageAndWait(deviceName: string, resourceGroupName: string, triggerSupportPackageRequest: TriggerSupportPackageRequest, options?: SupportPackagesTriggerSupportPackageOptionalParams): Promise; +} + +// @public +export interface SupportPackagesTriggerSupportPackageOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface SymmetricKey { + connectionString?: AsymmetricEncryptedSecret; +} + +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + +// @public +export type TimeGrain = string; + +// @public +export interface TrackingInfo { + carrierName?: string; + serialNumber?: string; + trackingId?: string; + trackingUrl?: string; +} + +// @public +export type Trigger = ARMBaseModel & { + readonly systemData?: SystemData; + kind: TriggerEventType; +}; + +// @public +export type TriggerEventType = string; + +// @public +export interface TriggerList { + readonly nextLink?: string; + readonly value?: TriggerUnion[]; +} + +// @public +export interface Triggers { + beginCreateOrUpdate(deviceName: string, name: string, resourceGroupName: string, trigger: TriggerUnion, options?: TriggersCreateOrUpdateOptionalParams): Promise, TriggersCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(deviceName: string, name: string, resourceGroupName: string, trigger: TriggerUnion, options?: TriggersCreateOrUpdateOptionalParams): Promise; + beginDelete(deviceName: string, name: string, resourceGroupName: string, options?: TriggersDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(deviceName: string, name: string, resourceGroupName: string, options?: TriggersDeleteOptionalParams): Promise; + get(deviceName: string, name: string, resourceGroupName: string, options?: TriggersGetOptionalParams): Promise; + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: TriggersListByDataBoxEdgeDeviceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface TriggersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type TriggersCreateOrUpdateResponse = TriggerUnion; + +// @public +export interface TriggersDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface TriggersGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TriggersGetResponse = TriggerUnion; + +// @public +export interface TriggersListByDataBoxEdgeDeviceNextOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type TriggersListByDataBoxEdgeDeviceNextResponse = TriggerList; + +// @public +export interface TriggersListByDataBoxEdgeDeviceOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type TriggersListByDataBoxEdgeDeviceResponse = TriggerList; + +// @public +export type TriggerSupportPackageRequest = ARMBaseModel & { + minimumTimeStamp?: Date; + maximumTimeStamp?: Date; + include?: string; +}; + +// @public (undocumented) +export type TriggerUnion = Trigger | FileEventTrigger | PeriodicTimerEventTrigger; + +// @public +export interface UpdateDetails { + estimatedInstallTimeInMins?: number; + friendlyVersionNumber?: string; + installationImpact?: InstallationImpact; + rebootBehavior?: InstallRebootBehavior; + status?: UpdateStatus; + targetVersion?: string; + updateSize?: number; + updateTitle?: string; + updateType?: UpdateType; +} + +// @public +export interface UpdateDownloadProgress { + readonly downloadPhase?: DownloadPhase; + readonly numberOfUpdatesDownloaded?: number; + readonly numberOfUpdatesToDownload?: number; + readonly percentComplete?: number; + readonly totalBytesDownloaded?: number; + readonly totalBytesToDownload?: number; +} + +// @public +export interface UpdateInstallProgress { + readonly numberOfUpdatesInstalled?: number; + readonly numberOfUpdatesToInstall?: number; + readonly percentComplete?: number; +} + +// @public +export type UpdateOperation = string; + +// @public +export type UpdateOperationStage = string; + +// @public +export type UpdateStatus = string; + +// @public +export type UpdateSummary = ARMBaseModel & { + readonly systemData?: SystemData; + deviceVersionNumber?: string; + friendlyDeviceVersionName?: string; + deviceLastScannedDateTime?: Date; + lastCompletedScanJobDateTime?: Date; + lastSuccessfulScanJobTime?: Date; + readonly lastCompletedDownloadJobDateTime?: Date; + readonly lastCompletedDownloadJobId?: string; + readonly lastDownloadJobStatus?: JobStatus; + lastSuccessfulInstallJobDateTime?: Date; + readonly lastCompletedInstallJobDateTime?: Date; + readonly lastCompletedInstallJobId?: string; + readonly lastInstallJobStatus?: JobStatus; + readonly totalNumberOfUpdatesAvailable?: number; + readonly totalNumberOfUpdatesPendingDownload?: number; + readonly totalNumberOfUpdatesPendingInstall?: number; + readonly rebootBehavior?: InstallRebootBehavior; + readonly ongoingUpdateOperation?: UpdateOperation; + readonly inProgressDownloadJobId?: string; + readonly inProgressInstallJobId?: string; + readonly inProgressDownloadJobStartedDateTime?: Date; + readonly inProgressInstallJobStartedDateTime?: Date; + readonly updateTitles?: string[]; + readonly updates?: UpdateDetails[]; + readonly totalUpdateSizeInBytes?: number; + readonly totalTimeInMinutes?: number; +}; + +// @public +export type UpdateType = string; + +// @public +export interface UploadCertificateRequest { + authenticationType?: AuthenticationType; + certificate: string; +} + +// @public +export interface UploadCertificateResponse { + readonly aadAudience?: string; + readonly aadAuthority?: string; + readonly aadTenantId?: string; + authType?: AuthenticationType; + readonly azureManagementEndpointAudience?: string; + readonly resourceId?: string; + readonly servicePrincipalClientId?: string; + readonly servicePrincipalObjectId?: string; +} + +// @public +export type User = ARMBaseModel & { + readonly systemData?: SystemData; + encryptedPassword?: AsymmetricEncryptedSecret; + readonly shareAccessRights?: ShareAccessRight[]; + userType: UserType; +}; + +// @public +export interface UserAccessRight { + accessType: ShareAccessType; + userId: string; +} + +// @public +export interface UserList { + readonly nextLink?: string; + readonly value?: User[]; +} + +// @public +export interface Users { + beginCreateOrUpdate(deviceName: string, name: string, resourceGroupName: string, user: User, options?: UsersCreateOrUpdateOptionalParams): Promise, UsersCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(deviceName: string, name: string, resourceGroupName: string, user: User, options?: UsersCreateOrUpdateOptionalParams): Promise; + beginDelete(deviceName: string, name: string, resourceGroupName: string, options?: UsersDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(deviceName: string, name: string, resourceGroupName: string, options?: UsersDeleteOptionalParams): Promise; + get(deviceName: string, name: string, resourceGroupName: string, options?: UsersGetOptionalParams): Promise; + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: UsersListByDataBoxEdgeDeviceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface UsersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type UsersCreateOrUpdateResponse = User; + +// @public +export interface UsersDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface UsersGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type UsersGetResponse = User; + +// @public +export interface UsersListByDataBoxEdgeDeviceNextOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type UsersListByDataBoxEdgeDeviceNextResponse = UserList; + +// @public +export interface UsersListByDataBoxEdgeDeviceOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type UsersListByDataBoxEdgeDeviceResponse = UserList; + +// @public +export type UserType = string; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/databoxedge/arm-databoxedge/rollup.config.js b/sdk/databoxedge/arm-databoxedge/rollup.config.js index 2076ead7e852..9be1955eb7f1 100644 --- a/sdk/databoxedge/arm-databoxedge/rollup.config.js +++ b/sdk/databoxedge/arm-databoxedge/rollup.config.js @@ -1,37 +1,188 @@ -import rollup from "rollup"; -import nodeResolve from "rollup-plugin-node-resolve"; +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import nodeResolve from "@rollup/plugin-node-resolve"; +import cjs from "@rollup/plugin-commonjs"; import sourcemaps from "rollup-plugin-sourcemaps"; +import multiEntry from "@rollup/plugin-multi-entry"; +import json from "@rollup/plugin-json"; + +import nodeBuiltins from "builtin-modules"; + +/** + * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api. + * + * NOTE: this manual configuration is only needed because OpenTelemetry uses an + * __exportStar downleveled helper function to declare its exports which confuses + * rollup's automatic discovery mechanism. + * + * @returns an object reference that can be `...`'d into your cjs() configuration. + */ +export function openTelemetryCommonJs() { + const namedExports = {}; + + for (const key of [ + "@opentelemetry/api", + "@azure/core-tracing/node_modules/@opentelemetry/api" + ]) { + namedExports[key] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "SpanStatusCode", + "getSpanContext", + "setSpanContext" + ]; + } + + const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"]; + + for (const version of releasedOpenTelemetryVersions) { + namedExports[ + // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path. + `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js` + ] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "StatusCode", + "CanonicalCode", + "getSpanContext", + "setSpanContext" + ]; + } + + return namedExports; +} + +// #region Warning Handler /** - * @type {rollup.RollupFileOptions} + * A function that can determine whether a rollupwarning should be ignored. If + * the function returns `true`, then the warning will not be displayed. */ -const config = { - input: "./esm/dataBoxEdgeManagementClient.js", - external: [ - "@azure/ms-rest-js", - "@azure/ms-rest-azure-js" - ], - output: { - file: "./dist/arm-databoxedge.js", - format: "umd", - name: "Azure.ArmDataboxedge", - sourcemap: true, - globals: { - "@azure/ms-rest-js": "msRest", - "@azure/ms-rest-azure-js": "msRestAzure" + +function ignoreNiseSinonEvalWarnings(warning) { + return ( + warning.code === "EVAL" && + warning.id && + (warning.id.includes("node_modules/nise") || + warning.id.includes("node_modules/sinon")) === true + ); +} + +function ignoreChaiCircularDependencyWarnings(warning) { + return ( + warning.code === "CIRCULAR_DEPENDENCY" && + warning.importer && warning.importer.includes("node_modules/chai") === true + ); +} + +const warningInhibitors = [ + ignoreChaiCircularDependencyWarnings, + ignoreNiseSinonEvalWarnings +]; + +/** + * Construct a warning handler for the shared rollup configuration + * that ignores certain warnings that are not relevant to testing. + */ +function makeOnWarnForTesting() { + return (warning, warn) => { + // If every inhibitor returns false (i.e. no inhibitors), then show the warning + if (warningInhibitors.every((inhib) => !inhib(warning))) { + warn(warning); + } + }; +} + +// #endregion + +function makeBrowserTestConfig() { + const config = { + input: { + include: ["dist-esm/test/**/*.spec.js"], + exclude: ["dist-esm/test/**/node/**"] }, - banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */` - }, - plugins: [ - nodeResolve({ mainFields: ['module', 'main'] }), - sourcemaps() - ] + output: { + file: `dist-test/index.browser.js`, + format: "umd", + sourcemap: true + }, + preserveSymlinks: false, + plugins: [ + multiEntry({ exports: false }), + nodeResolve({ + mainFields: ["module", "browser"] + }), + cjs({ + namedExports: { + // Chai's strange internal architecture makes it impossible to statically + // analyze its exports. + chai: [ + "version", + "use", + "util", + "config", + "expect", + "should", + "assert" + ], + ...openTelemetryCommonJs() + } + }), + json(), + sourcemaps() + //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) + ], + onwarn: makeOnWarnForTesting(), + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, + // rollup started respecting the "sideEffects" field in package.json. Since + // our package.json sets "sideEffects=false", this also applies to test + // code, which causes all tests to be removed by tree-shaking. + treeshake: false + }; + + return config; +} + +const defaultConfigurationOptions = { + disableBrowserBundle: false }; -export default config; +export function makeConfig(pkg, options) { + options = { + ...defaultConfigurationOptions, + ...(options || {}) + }; + + const baseConfig = { + // Use the package's module field if it has one + input: pkg["module"] || "dist-esm/src/index.js", + external: [ + ...nodeBuiltins, + ...Object.keys(pkg.dependencies), + ...Object.keys(pkg.devDependencies) + ], + output: { file: "dist/index.js", format: "cjs", sourcemap: true }, + preserveSymlinks: false, + plugins: [sourcemaps(), nodeResolve(), cjs()] + }; + + const config = [baseConfig]; + + if (!options.disableBrowserBundle) { + config.push(makeBrowserTestConfig()); + } + + return config; +} + +export default makeConfig(require("./package.json")); diff --git a/sdk/databoxedge/arm-databoxedge/src/dataBoxEdgeManagementClient.ts b/sdk/databoxedge/arm-databoxedge/src/dataBoxEdgeManagementClient.ts index 5c59037970dc..b83e608137d0 100644 --- a/sdk/databoxedge/arm-databoxedge/src/dataBoxEdgeManagementClient.ts +++ b/sdk/databoxedge/arm-databoxedge/src/dataBoxEdgeManagementClient.ts @@ -1,78 +1,155 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; -import * as Models from "./models"; -import * as Mappers from "./models/mappers"; -import * as operations from "./operations"; -import { DataBoxEdgeManagementClientContext } from "./dataBoxEdgeManagementClientContext"; +import * as coreClient from "@azure/core-client"; +import * as coreAuth from "@azure/core-auth"; +import { + OperationsImpl, + AvailableSkusImpl, + DevicesImpl, + AlertsImpl, + BandwidthSchedulesImpl, + DiagnosticSettingsImpl, + JobsImpl, + NodesImpl, + OperationsStatusImpl, + OrdersImpl, + RolesImpl, + AddonsImpl, + MonitoringConfigImpl, + SharesImpl, + StorageAccountCredentialsImpl, + StorageAccountsImpl, + ContainersImpl, + TriggersImpl, + SupportPackagesImpl, + UsersImpl +} from "./operations"; +import { + Operations, + AvailableSkus, + Devices, + Alerts, + BandwidthSchedules, + DiagnosticSettings, + Jobs, + Nodes, + OperationsStatus, + Orders, + Roles, + Addons, + MonitoringConfig, + Shares, + StorageAccountCredentials, + StorageAccounts, + Containers, + Triggers, + SupportPackages, + Users +} from "./operationsInterfaces"; +import { DataBoxEdgeManagementClientOptionalParams } from "./models"; - -class DataBoxEdgeManagementClient extends DataBoxEdgeManagementClientContext { - // Operation groups - operations: operations.Operations; - devices: operations.Devices; - alerts: operations.Alerts; - bandwidthSchedules: operations.BandwidthSchedules; - jobs: operations.Jobs; - nodes: operations.Nodes; - operationsStatus: operations.OperationsStatus; - orders: operations.Orders; - roles: operations.Roles; - shares: operations.Shares; - storageAccountCredentials: operations.StorageAccountCredentials; - storageAccounts: operations.StorageAccounts; - containers: operations.Containers; - triggers: operations.Triggers; - users: operations.Users; - skus: operations.Skus; +export class DataBoxEdgeManagementClient extends coreClient.ServiceClient { + $host: string; + apiVersion: string; + subscriptionId: string; /** * Initializes a new instance of the DataBoxEdgeManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. Credentials - * implementing the TokenCredential interface from the @azure/identity package are recommended. For - * more information about these credentials, see - * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the - * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and - * @azure/ms-rest-browserauth are also supported. + * @param credentials Subscription credentials which uniquely identify client subscription. * @param subscriptionId The subscription ID. - * @param [options] The parameter options + * @param options The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.DataBoxEdgeManagementClientOptions) { - super(credentials, subscriptionId, options); - this.operations = new operations.Operations(this); - this.devices = new operations.Devices(this); - this.alerts = new operations.Alerts(this); - this.bandwidthSchedules = new operations.BandwidthSchedules(this); - this.jobs = new operations.Jobs(this); - this.nodes = new operations.Nodes(this); - this.operationsStatus = new operations.OperationsStatus(this); - this.orders = new operations.Orders(this); - this.roles = new operations.Roles(this); - this.shares = new operations.Shares(this); - this.storageAccountCredentials = new operations.StorageAccountCredentials(this); - this.storageAccounts = new operations.StorageAccounts(this); - this.containers = new operations.Containers(this); - this.triggers = new operations.Triggers(this); - this.users = new operations.Users(this); - this.skus = new operations.Skus(this); - } -} + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: DataBoxEdgeManagementClientOptionalParams + ) { + if (credentials === undefined) { + throw new Error("'credentials' cannot be null"); + } + if (subscriptionId === undefined) { + throw new Error("'subscriptionId' cannot be null"); + } + + // Initializing default values for options + if (!options) { + options = {}; + } + const defaults: DataBoxEdgeManagementClientOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; -// Operation Specifications + const packageDetails = `azsdk-js-arm-databoxedge/2.0.0`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; -export { - DataBoxEdgeManagementClient, - DataBoxEdgeManagementClientContext, - Models as DataBoxEdgeManagementModels, - Mappers as DataBoxEdgeManagementMappers -}; -export * from "./operations"; + if (!options.credentialScopes) { + options.credentialScopes = ["https://management.azure.com/.default"]; + } + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + baseUri: options.endpoint || "https://management.azure.com" + }; + super(optionsWithDefaults); + // Parameter assignments + this.subscriptionId = subscriptionId; + + // Assigning values to Constant parameters + this.$host = options.$host || "https://management.azure.com"; + this.apiVersion = options.apiVersion || "2021-06-01"; + this.operations = new OperationsImpl(this); + this.availableSkus = new AvailableSkusImpl(this); + this.devices = new DevicesImpl(this); + this.alerts = new AlertsImpl(this); + this.bandwidthSchedules = new BandwidthSchedulesImpl(this); + this.diagnosticSettings = new DiagnosticSettingsImpl(this); + this.jobs = new JobsImpl(this); + this.nodes = new NodesImpl(this); + this.operationsStatus = new OperationsStatusImpl(this); + this.orders = new OrdersImpl(this); + this.roles = new RolesImpl(this); + this.addons = new AddonsImpl(this); + this.monitoringConfig = new MonitoringConfigImpl(this); + this.shares = new SharesImpl(this); + this.storageAccountCredentials = new StorageAccountCredentialsImpl(this); + this.storageAccounts = new StorageAccountsImpl(this); + this.containers = new ContainersImpl(this); + this.triggers = new TriggersImpl(this); + this.supportPackages = new SupportPackagesImpl(this); + this.users = new UsersImpl(this); + } + + operations: Operations; + availableSkus: AvailableSkus; + devices: Devices; + alerts: Alerts; + bandwidthSchedules: BandwidthSchedules; + diagnosticSettings: DiagnosticSettings; + jobs: Jobs; + nodes: Nodes; + operationsStatus: OperationsStatus; + orders: Orders; + roles: Roles; + addons: Addons; + monitoringConfig: MonitoringConfig; + shares: Shares; + storageAccountCredentials: StorageAccountCredentials; + storageAccounts: StorageAccounts; + containers: Containers; + triggers: Triggers; + supportPackages: SupportPackages; + users: Users; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/dataBoxEdgeManagementClientContext.ts b/sdk/databoxedge/arm-databoxedge/src/dataBoxEdgeManagementClientContext.ts deleted file mode 100644 index de420a60aa07..000000000000 --- a/sdk/databoxedge/arm-databoxedge/src/dataBoxEdgeManagementClientContext.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as Models from "./models"; -import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; - -const packageName = "@azure/arm-databoxedge"; -const packageVersion = "1.1.0"; - -export class DataBoxEdgeManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials | TokenCredential; - apiVersion?: string; - subscriptionId: string; - - /** - * Initializes a new instance of the DataBoxEdgeManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. Credentials - * implementing the TokenCredential interface from the @azure/identity package are recommended. For - * more information about these credentials, see - * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the - * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and - * @azure/ms-rest-browserauth are also supported. - * @param subscriptionId The subscription ID. - * @param [options] The parameter options - */ - constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.DataBoxEdgeManagementClientOptions) { - if (credentials == undefined) { - throw new Error('\'credentials\' cannot be null.'); - } - if (subscriptionId == undefined) { - throw new Error('\'subscriptionId\' cannot be null.'); - } - - if (!options) { - options = {}; - } - if(!options.userAgent) { - const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); - options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; - } - - super(credentials, options); - - this.apiVersion = '2019-08-01'; - this.acceptLanguage = 'en-US'; - this.longRunningOperationRetryTimeout = 30; - this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; - this.requestContentType = "application/json; charset=utf-8"; - this.credentials = credentials; - this.subscriptionId = subscriptionId; - - if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { - this.acceptLanguage = options.acceptLanguage; - } - if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { - this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; - } - } -} diff --git a/sdk/databoxedge/arm-databoxedge/src/index.ts b/sdk/databoxedge/arm-databoxedge/src/index.ts new file mode 100644 index 000000000000..a395908b52ad --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/index.ts @@ -0,0 +1,12 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +/// +export * from "./models"; +export { DataBoxEdgeManagementClient } from "./dataBoxEdgeManagementClient"; +export * from "./operationsInterfaces"; diff --git a/sdk/databoxedge/arm-databoxedge/src/lroImpl.ts b/sdk/databoxedge/arm-databoxedge/src/lroImpl.ts new file mode 100644 index 000000000000..518d5f053b4e --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/lroImpl.ts @@ -0,0 +1,34 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { LongRunningOperation, LroResponse } from "@azure/core-lro"; + +export class LroImpl implements LongRunningOperation { + constructor( + private sendOperationFn: (args: any, spec: any) => Promise>, + private args: Record, + private spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record, + public requestPath: string = spec.path!, + public requestMethod: string = spec.httpMethod + ) {} + public async sendInitialRequest(): Promise> { + return this.sendOperationFn(this.args, this.spec); + } + public async sendPollRequest(path: string): Promise> { + const { requestBody, ...restSpec } = this.spec; + return this.sendOperationFn(this.args, { + ...restSpec, + path, + httpMethod: "GET" + }); + } +} diff --git a/sdk/databoxedge/arm-databoxedge/src/models/alertsMappers.ts b/sdk/databoxedge/arm-databoxedge/src/models/alertsMappers.ts deleted file mode 100644 index fd3bcdf1b586..000000000000 --- a/sdk/databoxedge/arm-databoxedge/src/models/alertsMappers.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - discriminators, - Address, - Alert, - AlertErrorDetails, - AlertList, - ARMBaseModel, - AsymmetricEncryptedSecret, - Authentication, - AzureContainerInfo, - BandwidthSchedule, - BaseResource, - ClientAccessRight, - CloudError, - ContactDetails, - Container, - DataBoxEdgeDevice, - DataBoxEdgeDeviceExtendedInfo, - FileEventTrigger, - FileSourceInfo, - IoTDeviceInfo, - IoTRole, - Ipv4Config, - Ipv6Config, - MountPointMap, - NetworkAdapter, - NetworkAdapterPosition, - NetworkSettings, - Node, - Order, - OrderStatus, - PeriodicTimerEventTrigger, - PeriodicTimerSourceInfo, - RefreshDetails, - Role, - RoleSinkInfo, - SecuritySettings, - Share, - ShareAccessRight, - Sku, - StorageAccount, - StorageAccountCredential, - SymmetricKey, - TrackingInfo, - Trigger, - UpdateSummary, - User, - UserAccessRight -} from "../models/mappers"; diff --git a/sdk/databoxedge/arm-databoxedge/src/models/bandwidthSchedulesMappers.ts b/sdk/databoxedge/arm-databoxedge/src/models/bandwidthSchedulesMappers.ts deleted file mode 100644 index f915bde43738..000000000000 --- a/sdk/databoxedge/arm-databoxedge/src/models/bandwidthSchedulesMappers.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - discriminators, - Address, - Alert, - AlertErrorDetails, - ARMBaseModel, - AsymmetricEncryptedSecret, - Authentication, - AzureContainerInfo, - BandwidthSchedule, - BandwidthSchedulesList, - BaseResource, - ClientAccessRight, - CloudError, - ContactDetails, - Container, - DataBoxEdgeDevice, - DataBoxEdgeDeviceExtendedInfo, - FileEventTrigger, - FileSourceInfo, - IoTDeviceInfo, - IoTRole, - Ipv4Config, - Ipv6Config, - MountPointMap, - NetworkAdapter, - NetworkAdapterPosition, - NetworkSettings, - Node, - Order, - OrderStatus, - PeriodicTimerEventTrigger, - PeriodicTimerSourceInfo, - RefreshDetails, - Role, - RoleSinkInfo, - SecuritySettings, - Share, - ShareAccessRight, - Sku, - StorageAccount, - StorageAccountCredential, - SymmetricKey, - TrackingInfo, - Trigger, - UpdateSummary, - User, - UserAccessRight -} from "../models/mappers"; diff --git a/sdk/databoxedge/arm-databoxedge/src/models/containersMappers.ts b/sdk/databoxedge/arm-databoxedge/src/models/containersMappers.ts deleted file mode 100644 index 8540a4f43389..000000000000 --- a/sdk/databoxedge/arm-databoxedge/src/models/containersMappers.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - discriminators, - Address, - Alert, - AlertErrorDetails, - ARMBaseModel, - AsymmetricEncryptedSecret, - Authentication, - AzureContainerInfo, - BandwidthSchedule, - BaseResource, - ClientAccessRight, - CloudError, - ContactDetails, - Container, - ContainerList, - DataBoxEdgeDevice, - DataBoxEdgeDeviceExtendedInfo, - FileEventTrigger, - FileSourceInfo, - IoTDeviceInfo, - IoTRole, - Ipv4Config, - Ipv6Config, - MountPointMap, - NetworkAdapter, - NetworkAdapterPosition, - NetworkSettings, - Node, - Order, - OrderStatus, - PeriodicTimerEventTrigger, - PeriodicTimerSourceInfo, - RefreshDetails, - Role, - RoleSinkInfo, - SecuritySettings, - Share, - ShareAccessRight, - Sku, - StorageAccount, - StorageAccountCredential, - SymmetricKey, - TrackingInfo, - Trigger, - UpdateSummary, - User, - UserAccessRight -} from "../models/mappers"; diff --git a/sdk/databoxedge/arm-databoxedge/src/models/devicesMappers.ts b/sdk/databoxedge/arm-databoxedge/src/models/devicesMappers.ts deleted file mode 100644 index e4686b1116a5..000000000000 --- a/sdk/databoxedge/arm-databoxedge/src/models/devicesMappers.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - discriminators, - Address, - Alert, - AlertErrorDetails, - ARMBaseModel, - AsymmetricEncryptedSecret, - Authentication, - AzureContainerInfo, - BandwidthSchedule, - BaseResource, - ClientAccessRight, - CloudError, - ContactDetails, - Container, - DataBoxEdgeDevice, - DataBoxEdgeDeviceExtendedInfo, - DataBoxEdgeDeviceList, - DataBoxEdgeDevicePatch, - FileEventTrigger, - FileSourceInfo, - IoTDeviceInfo, - IoTRole, - Ipv4Config, - Ipv6Config, - MountPointMap, - NetworkAdapter, - NetworkAdapterPosition, - NetworkSettings, - Node, - Order, - OrderStatus, - PeriodicTimerEventTrigger, - PeriodicTimerSourceInfo, - RefreshDetails, - Role, - RoleSinkInfo, - SecuritySettings, - Share, - ShareAccessRight, - Sku, - StorageAccount, - StorageAccountCredential, - SymmetricKey, - TrackingInfo, - Trigger, - UpdateSummary, - UploadCertificateRequest, - UploadCertificateResponse, - User, - UserAccessRight -} from "../models/mappers"; diff --git a/sdk/databoxedge/arm-databoxedge/src/models/index.ts b/sdk/databoxedge/arm-databoxedge/src/models/index.ts index 32d02574968f..4ade0383c344 100644 --- a/sdk/databoxedge/arm-databoxedge/src/models/index.ts +++ b/sdk/databoxedge/arm-databoxedge/src/models/index.ts @@ -1,3666 +1,4408 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; -import * as msRest from "@azure/ms-rest-js"; +import * as coreClient from "@azure/core-client"; + +export type RoleUnion = + | Role + | CloudEdgeManagementRole + | IoTRole + | KubernetesRole + | MECRole; +export type AddonUnion = Addon | ArcAddon | IoTAddon; +export type TriggerUnion = + | Trigger + | FileEventTrigger + | PeriodicTimerEventTrigger; + +/** The list of operations used for the discovery of available provider operations. */ +export interface OperationsList { + /** The value. */ + value: Operation[]; + /** Link to the next set of results. */ + nextLink?: string; +} -export { BaseResource, CloudError }; +/** Operations. */ +export interface Operation { + /** Name of the operation. */ + name?: string; + /** Is data action. */ + isDataAction?: boolean; + /** Properties displayed for the operation. */ + display?: OperationDisplay; + /** Origin of the operation. */ + origin?: string; + /** Service specification. */ + serviceSpecification?: ServiceSpecification; +} -/** - * The shipping address of the customer. - */ -export interface Address { +/** Operation display properties. */ +export interface OperationDisplay { + /** Provider name. */ + provider?: string; + /** The type of resource in which the operation is performed. */ + resource?: string; + /** Operation to be performed on the resource. */ + operation?: string; + /** Description of the operation to be performed. */ + description?: string; +} + +/** Service specification. */ +export interface ServiceSpecification { + /** Metric specification as defined by shoebox. */ + metricSpecifications?: MetricSpecificationV1[]; +} + +/** Metric specification version 1. */ +export interface MetricSpecificationV1 { + /** Name of the metric. */ + name?: string; + /** Display name of the metric. */ + displayName?: string; + /** Description of the metric to be displayed. */ + displayDescription?: string; + /** Metric units. */ + unit?: MetricUnit; + /** Metric aggregation type. */ + aggregationType?: MetricAggregationType; + /** Metric dimensions, other than default dimension which is resource. */ + dimensions?: MetricDimensionV1[]; + /** Set true to fill the gaps with zero. */ + fillGapWithZero?: boolean; + /** Metric category. */ + category?: MetricCategory; + /** Resource name override. */ + resourceIdDimensionNameOverride?: string; + /** Support granularity of metrics. */ + supportedTimeGrainTypes?: TimeGrain[]; + /** Support metric aggregation type. */ + supportedAggregationTypes?: MetricAggregationType[]; +} + +/** Metric Dimension v1. */ +export interface MetricDimensionV1 { + /** Name of the metrics dimension. */ + name?: string; + /** Display name of the metrics dimension. */ + displayName?: string; + /** To be exported to shoe box. */ + toBeExportedForShoebox?: boolean; +} + +/** An error response from the service. */ +export interface CloudError { + /** The error details. */ + error?: CloudErrorBody; +} + +/** An error response from the service. */ +export interface CloudErrorBody { + /** An identifier for the error. Codes are invariant and are intended to be consumed programmatically. */ + code?: string; + /** A message describing the error, intended to be suitable for display in a user interface. */ + message?: string; + /** A list of additional details about the error. */ + details?: CloudErrorBody[]; +} + +/** List of SKU Information objects. */ +export interface DataBoxEdgeSkuList { /** - * The address line1. + * List of ResourceType Sku + * NOTE: This property will not be serialized. It can only be populated by the server. */ - addressLine1: string; + readonly value?: DataBoxEdgeSku[]; /** - * The address line2. + * Links to the next set of results + * NOTE: This property will not be serialized. It can only be populated by the server. */ - addressLine2?: string; + readonly nextLink?: string; +} + +/** The Sku information. */ +export interface DataBoxEdgeSku { /** - * The address line3. + * The type of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - addressLine3?: string; + readonly resourceType?: string; /** - * The postal code. + * The Sku name. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - postalCode: string; + readonly name?: SkuName; /** - * The city name. + * The Sku kind. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - city: string; + readonly kind?: string; /** - * The state name. + * The Sku tier. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - state: string; + readonly tier?: SkuTier; /** - * The country name. + * The Sku kind. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - country: string; -} - -/** - * Error details for the alert. - */ -export interface AlertErrorDetails { + readonly size?: string; /** - * Error code. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The Sku family. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorCode?: string; + readonly family?: string; /** - * Error Message. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Availability of the Sku for the region. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorMessage?: string; + readonly locations?: string[]; /** - * Number of occurrences. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The API versions in which Sku is available. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly occurrences?: number; -} - -/** - * Represents the base class for all object models. - */ -export interface ARMBaseModel extends BaseResource { + readonly apiVersions?: string[]; /** - * The path ID that uniquely identifies the object. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Availability of the Sku for the location/zone/site. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly locationInfo?: SkuLocationInfo[]; /** - * The object name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The pricing info of the Sku. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly costs?: SkuCost[]; /** - * The hierarchical type of the object. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Sku can be signed up by customer or not. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; -} - -/** - * Alert on the data box edge/gateway device. - */ -export interface Alert extends ARMBaseModel { + readonly signupOption?: SkuSignupOption; /** - * Alert title. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Availability of the Sku as preview/stable. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly title?: string; + readonly version?: SkuVersion; /** - * Alert type. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Links to the next set of results + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly alertType?: string; + readonly availability?: SkuAvailability; /** - * UTC time when the alert appeared. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * List of Shipment Types supported by this SKU + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly appearedAtDateTime?: Date; + readonly shipmentTypes?: ShipmentType[]; /** - * Alert recommendation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The capability info of the SKU. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly recommendation?: string; + readonly capabilities?: SkuCapability[]; +} + +/** The location info. */ +export interface SkuLocationInfo { /** - * Severity of the alert. Possible values include: 'Informational', 'Warning', 'Critical' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The location. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly severity?: AlertSeverity; + readonly location?: string; /** - * Error details of the alert. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The zones. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorDetails?: AlertErrorDetails; + readonly zones?: string[]; /** - * Alert details. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The sites. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly detailedInformation?: { [propertyName: string]: string }; + readonly sites?: string[]; } -/** - * Represent the secrets intended for encryption with asymmetric key pair. - */ -export interface AsymmetricEncryptedSecret { +/** The metadata for retrieving price info. */ +export interface SkuCost { /** - * The value of the secret. + * Used for querying price from commerce. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - value: string; + readonly meterId?: string; /** - * Thumbprint certificate used to encrypt \"Value\". If the value is unencrypted, it will be - * null. + * The cost quantity. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - encryptionCertThumbprint?: string; + readonly quantity?: number; /** - * The algorithm used to encrypt "Value". Possible values include: 'None', 'AES256', - * 'RSAES_PKCS1_v_1_5' + * The extended unit. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - encryptionAlgorithm: EncryptionAlgorithm; + readonly extendedUnit?: string; } -/** - * Symmetric key for authentication. - */ -export interface SymmetricKey { +/** The metadata to describe the capability. */ +export interface SkuCapability { /** - * Connection string based on the symmetric key. + * An invariant to describe the feature. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - connectionString?: AsymmetricEncryptedSecret; -} - -/** - * Authentication mechanism for IoT devices. - */ -export interface Authentication { + readonly name?: string; /** - * Symmetric key for authentication. + * An invariant if the feature is measured by quantity. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - symmetricKey?: SymmetricKey; + readonly value?: string; } -/** - * Azure container mapping of the endpoint. - */ -export interface AzureContainerInfo { - /** - * ID of the storage account credential used to access storage. - */ - storageAccountCredentialId: string; +/** The collection of Data Box Edge/Gateway devices. */ +export interface DataBoxEdgeDeviceList { /** - * Container name (Based on the data format specified, this represents the name of Azure - * Files/Page blob/Block blob). + * The list of Data Box Edge/Gateway devices. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - containerName: string; + readonly value?: DataBoxEdgeDevice[]; /** - * Storage format used for the file represented by the share. Possible values include: - * 'BlockBlob', 'PageBlob', 'AzureFile' + * Link to the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - dataFormat: AzureContainerDataFormat; + readonly nextLink?: string; } -/** - * The bandwidth schedule details. - */ -export interface BandwidthSchedule extends ARMBaseModel { +/** The SKU type. */ +export interface Sku { + /** SKU name. */ + name?: SkuName; + /** The SKU tier. This is based on the SKU name. */ + tier?: SkuTier; +} + +/** Msi identity details of the resource */ +export interface ResourceIdentity { + /** Identity type */ + type?: MsiIdentityType; /** - * The start time of the schedule in UTC. + * Service Principal Id backing the Msi + * NOTE: This property will not be serialized. It can only be populated by the server. */ - start: string; + readonly principalId?: string; /** - * The stop time of the schedule in UTC. + * Home Tenant Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - stop: string; + readonly tenantId?: string; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The type of identity that last modified the resource. */ + lastModifiedAt?: Date; +} + +/** Fields for tracking resource move */ +export interface ResourceMoveDetails { + /** Denotes whether move operation is in progress */ + operationInProgress?: ResourceMoveStatus; + /** Denotes the timeout of the operation to finish */ + operationInProgressLockTimeoutInUTC?: Date; +} + +/** Details about Edge Profile for the resource */ +export interface EdgeProfile { + /** Edge Profile Subscription */ + subscription?: EdgeProfileSubscription; +} + +/** Subscription details for the Edge Profile */ +export interface EdgeProfileSubscription { + /** Edge Subscription Registration ID */ + registrationId?: string; + /** ARM ID of the subscription */ + id?: string; + state?: SubscriptionState; + registrationDate?: string; + subscriptionId?: string; + tenantId?: string; + locationPlacementId?: string; + quotaId?: string; + serializedDetails?: string; + registeredFeatures?: SubscriptionRegisteredFeatures[]; +} + +export interface SubscriptionRegisteredFeatures { + name?: string; + state?: string; +} + +/** Wraps data-residency related information for edge-resource and this should be used with ARM layer. */ +export interface DataResidency { + /** DataResidencyType enum */ + type?: DataResidencyType; +} + +/** Represents the base class for all object models. */ +export interface ARMBaseModel { /** - * The bandwidth rate in Mbps. + * The path ID that uniquely identifies the object. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - rateInMbps: number; + readonly id?: string; /** - * The days of the week when this schedule is applicable. + * The object name. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - days: DayOfWeek[]; + readonly name?: string; + /** + * The hierarchical type of the object. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; } -/** - * The mapping between a particular client IP and the type of access client has on the NFS share. - */ -export interface ClientAccessRight { +/** The Data Box Edge/Gateway device patch. */ +export interface DataBoxEdgeDevicePatch { + /** The tags attached to the Data Box Edge/Gateway resource. */ + tags?: { [propertyName: string]: string }; + /** Msi identity of the resource */ + identity?: ResourceIdentity; + /** Edge Profile property of the Data Box Edge/Gateway device */ + edgeProfile?: EdgeProfilePatch; +} + +/** The Data Box Edge/Gateway Edge Profile patch. */ +export interface EdgeProfilePatch { + /** The Data Box Edge/Gateway Edge Profile Subscription patch */ + subscription?: EdgeProfileSubscriptionPatch; +} + +/** The Data Box Edge/Gateway Edge Profile Subscription patch. */ +export interface EdgeProfileSubscriptionPatch { + /** The path ID that uniquely identifies the subscription of the edge profile. */ + id?: string; +} + +/** Collection of alerts. */ +export interface AlertList { /** - * IP of the client. + * The value. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - client: string; + readonly value?: Alert[]; /** - * Type of access to be allowed for the client. Possible values include: 'NoAccess', 'ReadOnly', - * 'ReadWrite' + * Link to the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - accessPermission: ClientPermissionType; + readonly nextLink?: string; } -/** - * Contains all the contact details of the customer. - */ -export interface ContactDetails { - /** - * The contact person name. - */ - contactPerson: string; +/** Error details for the alert. */ +export interface AlertErrorDetails { /** - * The name of the company. + * Error code. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - companyName: string; + readonly errorCode?: string; /** - * The phone number. + * Error Message. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - phone: string; + readonly errorMessage?: string; /** - * The email list. + * Number of occurrences. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - emailList: string[]; + readonly occurrences?: number; } -/** - * Fields for tracking refresh job on the share or container. - */ -export interface RefreshDetails { +/** The collection of bandwidth schedules. */ +export interface BandwidthSchedulesList { /** - * If a refresh job is currently in progress on this share or container, this field indicates the - * ARM resource ID of that job. The field is empty if no job is in progress. + * The list of bandwidth schedules. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - inProgressRefreshJobId?: string; + readonly value?: BandwidthSchedule[]; /** - * Indicates the completed time for the last refresh job on this particular share or container, - * if any.This could be a failed job or a successful job. + * Link to the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - lastCompletedRefreshJobTimeInUTC?: Date; + readonly nextLink?: string; +} + +/** RemoteApplicationType for which remote support settings is being modified */ +export interface RemoteSupportSettings { + /** Remote application type */ + remoteApplicationType?: RemoteApplicationType; + /** Access level allowed for this remote application type */ + accessLevel?: AccessLevel; + /** Expiration time stamp */ + expirationTimeStampInUTC?: Date; +} + +/** Used in activation key generation flow. */ +export interface GenerateCertResponse { /** - * Indicates the relative path of the error xml for the last refresh job on this particular share - * or container, if any. This could be a failed job or a successful job. + * Gets or sets base64 encoded certificate raw data, + * this is the public part needed to be uploaded to cert vault */ - errorManifestFile?: string; + publicKey?: string; /** - * Indicates the id of the last refresh job on this particular share or container,if any. This - * could be a failed job or a successful job. + * Gets or sets base64 encoded private part of the certificate, + * needed to form the activation key */ - lastJob?: string; + privateKey?: string; + /** Gets or sets expiry time in UTC */ + expiryTimeInUTC?: string; } -/** - * Represents a container on the Data Box Edge/Gateway device. - */ -export interface Container extends ARMBaseModel { +/** Holds device secret either as a KeyVault reference or as an encrypted value. */ +export interface Secret { + /** Encrypted (using device public key) secret value. */ + encryptedSecret?: AsymmetricEncryptedSecret; + /** Id of the Key-Vault where secret is stored (ex: secrets/AuthClientSecret/82ef4346187a4033a10d629cde07d740). */ + keyVaultId?: string; +} + +/** Represent the secrets intended for encryption with asymmetric key pair. */ +export interface AsymmetricEncryptedSecret { + /** The value of the secret. */ + value: string; + /** Thumbprint certificate used to encrypt \"Value\". If the value is unencrypted, it will be null. */ + encryptionCertThumbprint?: string; + /** The algorithm used to encrypt "Value". */ + encryptionAlgorithm: EncryptionAlgorithm; +} + +/** A device job. */ +export interface Job { /** - * Current status of the container. Possible values include: 'OK', 'Offline', 'Unknown', - * 'Updating', 'NeedsAttention' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The path ID that uniquely identifies the object. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly containerStatus?: ContainerStatus; + readonly id?: string; /** - * DataFormat for Container. Possible values include: 'BlockBlob', 'PageBlob', 'AzureFile' + * The name of the object. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - dataFormat: AzureContainerDataFormat; + readonly name?: string; /** - * Details of the refresh job on this container. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The hierarchical type of the object. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly refreshDetails?: RefreshDetails; + readonly type?: string; /** - * The UTC time when container got created. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The current status of the job. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly createdDateTime?: Date; -} - -/** - * The SKU type. - */ -export interface Sku { + readonly status?: JobStatus; /** - * SKU name. Possible values include: 'Gateway', 'Edge', 'TEA_1Node', 'TEA_1Node_UPS', - * 'TEA_1Node_Heater', 'TEA_1Node_UPS_Heater', 'TEA_4Node_Heater', 'TEA_4Node_UPS_Heater', 'TMA' + * The UTC date and time at which the job started. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - name?: SkuName; + readonly startTime?: Date; /** - * The SKU tier. This is based on the SKU name. Possible values include: 'Standard' + * The UTC date and time at which the job completed. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - tier?: SkuTier; -} - -/** - * The Data Box Edge/Gateway device. - */ -export interface DataBoxEdgeDevice extends ARMBaseModel { - /** - * The location of the device. This is a supported and registered Azure geographical region (for - * example, West US, East US, or Southeast Asia). The geographical region of a device cannot be - * changed once it is created, but if an identical geographical region is specified on update, - * the request will succeed. - */ - location: string; - /** - * The list of tags that describe the device. These tags can be used to view and group this - * device (across resource groups). - */ - tags?: { [propertyName: string]: string }; - /** - * The SKU type. - */ - sku?: Sku; - /** - * The etag for the devices. - */ - etag?: string; - /** - * The status of the Data Box Edge/Gateway device. Possible values include: 'ReadyToSetup', - * 'Online', 'Offline', 'NeedsAttention', 'Disconnected', 'PartiallyDisconnected', 'Maintenance' - */ - dataBoxEdgeDeviceStatus?: DataBoxEdgeDeviceStatus; - /** - * The Serial Number of Data Box Edge/Gateway device. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly serialNumber?: string; - /** - * The Description of the Data Box Edge/Gateway device. - */ - description?: string; - /** - * The description of the Data Box Edge/Gateway device model. - */ - modelDescription?: string; - /** - * The type of the Data Box Edge/Gateway device. Possible values include: 'DataBoxEdgeDevice' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deviceType?: DeviceType; - /** - * The Data Box Edge/Gateway device name. - */ - friendlyName?: string; - /** - * The Data Box Edge/Gateway device culture. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly culture?: string; - /** - * The Data Box Edge/Gateway device model. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deviceModel?: string; + readonly endTime?: Date; /** - * The Data Box Edge/Gateway device software version. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The percentage of the job that is complete. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly deviceSoftwareVersion?: string; + readonly percentComplete?: number; /** - * The Data Box Edge/Gateway device local capacity in MB. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly deviceLocalCapacity?: number; + readonly error?: JobErrorDetails; /** - * The Data Box Edge/Gateway device timezone. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The type of the job. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly timeZone?: string; + readonly jobType?: JobType; /** - * The device software version number of the device (eg: 1.2.18105.6). - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Current stage of the update operation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly deviceHcsVersion?: string; + readonly currentStage?: UpdateOperationStage; /** - * Type of compute roles configured. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The download progress. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly configuredRoleTypes?: RoleTypes[]; + readonly downloadProgress?: UpdateDownloadProgress; /** - * The number of nodes in the cluster. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The install progress. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nodeCount?: number; -} - -/** - * The extended Info of the Data Box Edge/Gateway device. - */ -export interface DataBoxEdgeDeviceExtendedInfo extends ARMBaseModel { + readonly installProgress?: UpdateInstallProgress; /** - * The digital signature of encrypted certificate. + * Total number of errors encountered during the refresh process. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - encryptionKeyThumbprint?: string; + readonly totalRefreshErrors?: number; /** - * The public part of the encryption certificate. Client uses this to encrypt any secret. + * Local share/remote container relative path to the error manifest file of the refresh. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - encryptionKey?: string; + readonly errorManifestFile?: string; /** - * The Resource ID of the Resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * ARM ID of the entity that was refreshed. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly resourceKey?: string; + readonly refreshedEntityId?: string; + /** If only subfolders need to be refreshed, then the subfolder path inside the share or container. (The path is empty if there are no subfolders.) */ + folder?: string; } -/** - * The Data Box Edge/Gateway device patch. - */ -export interface DataBoxEdgeDevicePatch { +/** The job error information containing the list of job errors. */ +export interface JobErrorDetails { /** - * The tags attached to the Data Box Edge/Gateway resource. + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - tags?: { [propertyName: string]: string }; -} - -/** - * File source details. - */ -export interface FileSourceInfo { + readonly errorDetails?: JobErrorItem[]; /** - * File share ID. + * The code intended for programmatic access. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - shareId: string; -} - -/** - * Compute role against which events will be raised. - */ -export interface RoleSinkInfo { + readonly code?: string; /** - * Compute role ID. + * The message that describes the error in detail. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - roleId: string; + readonly message?: string; } -/** - * Contains the possible cases for Trigger. - */ -export type TriggerUnion = Trigger | FileEventTrigger | PeriodicTimerEventTrigger; - -/** - * Trigger details. - */ -export interface Trigger { - /** - * Polymorphic Discriminator - */ - kind: "Trigger"; +/** The job error items. */ +export interface JobErrorItem { /** - * The path ID that uniquely identifies the object. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The recommended actions. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly recommendations?: string[]; /** - * The object name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The code intended for programmatic access. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly code?: string; /** - * The hierarchical type of the object. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The message that describes the error in detail. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly message?: string; } -/** - * Trigger details. - */ -export interface FileEventTrigger { - /** - * Polymorphic Discriminator - */ - kind: "FileEvent"; +/** Details about the download progress of update. */ +export interface UpdateDownloadProgress { /** - * The path ID that uniquely identifies the object. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The download phase. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly downloadPhase?: DownloadPhase; /** - * The object name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Percentage of completion. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly percentComplete?: number; /** - * The hierarchical type of the object. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Total bytes to download. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly totalBytesToDownload?: number; /** - * File event source details. + * Total bytes downloaded. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - sourceInfo: FileSourceInfo; + readonly totalBytesDownloaded?: number; /** - * Role sink info. + * Number of updates to download. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - sinkInfo: RoleSinkInfo; + readonly numberOfUpdatesToDownload?: number; /** - * A custom context tag typically used to correlate the trigger against its usage. For example, - * if a periodic timer trigger is intended for certain specific IoT modules in the device, the - * tag can be the name or the image URL of the module. + * Number of updates downloaded. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - customContextTag?: string; + readonly numberOfUpdatesDownloaded?: number; } -/** - * Metadata of IoT device/IoT Edge device to be configured. - */ -export interface IoTDeviceInfo { - /** - * ID of the IoT device/edge device. - */ - deviceId: string; +/** Progress details during installation of updates. */ +export interface UpdateInstallProgress { /** - * Host name for the IoT hub associated to the device. + * Percentage completed. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - ioTHostHub: string; + readonly percentComplete?: number; /** - * Id for the IoT hub associated to the device. + * Number of updates to install. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - ioTHostHubId?: string; + readonly numberOfUpdatesToInstall?: number; /** - * IoT device authentication info. + * Number of updates installed. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - authentication?: Authentication; + readonly numberOfUpdatesInstalled?: number; } -/** - * The share mount point. - */ -export interface MountPointMap { - /** - * ID of the share mounted to the role VM. - */ - shareId: string; - /** - * ID of the role to which share is mounted. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly roleId?: string; +/** Represents the networkAdapter on a device. */ +export interface NetworkAdapter { /** - * Mount point for the share. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Instance ID of network adapter. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly mountPoint?: string; + readonly adapterId?: string; /** - * Role type. Possible values include: 'IOT', 'ASA', 'Functions', 'Cognitive' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Hardware position of network adapter. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly roleType?: RoleTypes; -} - -/** - * Contains the possible cases for Role. - */ -export type RoleUnion = Role | IoTRole; - -/** - * Compute role. - */ -export interface Role { + readonly adapterPosition?: NetworkAdapterPosition; /** - * Polymorphic Discriminator + * Logical index of the adapter. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - kind: "Role"; + readonly index?: number; /** - * The path ID that uniquely identifies the object. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Node ID of the network adapter. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly nodeId?: string; /** - * The object name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Network adapter name. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly networkAdapterName?: string; /** - * The hierarchical type of the object. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Hardware label for the adapter. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; -} - -/** - * Compute role. - */ -export interface IoTRole { + readonly label?: string; /** - * Polymorphic Discriminator + * MAC address. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - kind: "IOT"; + readonly macAddress?: string; /** - * The path ID that uniquely identifies the object. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Link speed. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly linkSpeed?: number; /** - * The object name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Value indicating whether this adapter is valid. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly status?: NetworkAdapterStatus; + /** Value indicating whether this adapter is RDMA capable. */ + rdmaStatus?: NetworkAdapterRdmaStatus; + /** Value indicating whether this adapter has DHCP enabled. */ + dhcpStatus?: NetworkAdapterDhcpStatus; /** - * The hierarchical type of the object. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The IPv4 configuration of the network adapter. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly ipv4Configuration?: Ipv4Config; /** - * Host OS supported by the IoT role. Possible values include: 'Windows', 'Linux' + * The IPv6 configuration of the network adapter. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - hostPlatform: PlatformType; + readonly ipv6Configuration?: Ipv6Config; /** - * IoT device metadata to which data box edge device needs to be connected. + * The IPv6 local address. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - ioTDeviceDetails: IoTDeviceInfo; + readonly ipv6LinkLocalAddress?: string; /** - * IoT edge device to which the IoT role needs to be configured. + * The list of DNS Servers of the device. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - ioTEdgeDeviceDetails: IoTDeviceInfo; + readonly dnsServers?: string[]; +} + +/** The network adapter position. */ +export interface NetworkAdapterPosition { /** - * Mount points of shares in role(s). + * The network group. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - shareMappings?: MountPointMap[]; + readonly networkGroup?: NetworkGroup; /** - * Role status. Possible values include: 'Enabled', 'Disabled' + * The port. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - roleStatus: RoleStatus; + readonly port?: number; } -/** - * Details related to the IPv4 address configuration. - */ +/** Details related to the IPv4 address configuration. */ export interface Ipv4Config { /** * The IPv4 address of the network adapter. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly ipAddress?: string; /** * The IPv4 subnet of the network adapter. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly subnet?: string; /** * The IPv4 gateway of the network adapter. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly gateway?: string; } -/** - * Details related to the IPv6 address configuration. - */ +/** Details related to the IPv6 address configuration. */ export interface Ipv6Config { /** * The IPv6 address of the network adapter. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly ipAddress?: string; /** * The IPv6 prefix of the network adapter. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly prefixLength?: number; /** * The IPv6 gateway of the network adapter. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly gateway?: string; } -/** - * The job error items. - */ -export interface JobErrorItem { - /** - * The recommended actions. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly recommendations?: string[]; +/** Collection of Nodes. */ +export interface NodeList { /** - * The code intended for programmatic access. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The list of Nodes. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly code?: string; + readonly value?: Node[]; /** - * The message that describes the error in detail. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Link to the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly message?: string; + readonly nextLink?: string; } -/** - * The job error information containing the list of job errors. - */ -export interface JobErrorDetails { - /** - * The error details. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly errorDetails?: JobErrorItem[]; +/** List of order entities. */ +export interface OrderList { /** - * The code intended for programmatic access. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The list of orders. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly code?: string; + readonly value?: Order[]; /** - * The message that describes the error in detail. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Link to the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly message?: string; + readonly nextLink?: string; } -/** - * Details about the download progress of update. - */ -export interface UpdateDownloadProgress { - /** - * The download phase. Possible values include: 'Unknown', 'Initializing', 'Downloading', - * 'Verifying' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly downloadPhase?: DownloadPhase; - /** - * Percentage of completion. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly percentComplete?: number; - /** - * Total bytes to download. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly totalBytesToDownload?: number; +/** Contains all the contact details of the customer. */ +export interface ContactDetails { + /** The contact person name. */ + contactPerson: string; + /** The name of the company. */ + companyName: string; + /** The phone number. */ + phone: string; + /** The email list. */ + emailList: string[]; +} + +/** The shipping address of the customer. */ +export interface Address { + /** The address line1. */ + addressLine1?: string; + /** The address line2. */ + addressLine2?: string; + /** The address line3. */ + addressLine3?: string; + /** The postal code. */ + postalCode?: string; + /** The city name. */ + city?: string; + /** The state name. */ + state?: string; + /** The country name. */ + country: string; +} + +/** Represents a single status change. */ +export interface OrderStatus { + /** Status of the order as per the allowed status types. */ + status: OrderState; /** - * Total bytes downloaded. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Time of status update. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly totalBytesDownloaded?: number; + readonly updateDateTime?: Date; + /** Comments related to this status change. */ + comments?: string; /** - * Number of updates to download. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Tracking information related to the state in the ordering flow + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly numberOfUpdatesToDownload?: number; + readonly trackingInformation?: TrackingInfo; /** - * Number of updates downloaded. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Dictionary to hold generic information which is not stored + * by the already existing properties + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly numberOfUpdatesDownloaded?: number; + readonly additionalOrderDetails?: { [propertyName: string]: string }; } -/** - * Progress details during installation of updates. - */ -export interface UpdateInstallProgress { - /** - * Percentage completed. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly percentComplete?: number; +/** Tracking courier information. */ +export interface TrackingInfo { + /** Serial number of the device being tracked. */ + serialNumber?: string; + /** Name of the carrier used in the delivery. */ + carrierName?: string; + /** Tracking ID of the shipment. */ + trackingId?: string; + /** Tracking URL of the shipment. */ + trackingUrl?: string; +} + +/** DC Access code in the case of Self Managed Shipping. */ +export interface DCAccessCode { + /** DCAccess Code for the Self Managed shipment. */ + authCode?: string; +} + +/** Collection of all the roles on the Data Box Edge device. */ +export interface RoleList { /** - * Number of updates to install. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The Value. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly numberOfUpdatesToInstall?: number; + readonly value?: RoleUnion[]; /** - * Number of updates installed. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Link to the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly numberOfUpdatesInstalled?: number; + readonly nextLink?: string; } -/** - * A device job. - */ -export interface Job { +/** Collection of all the Role addon on the Azure Stack Edge device. */ +export interface AddonList { /** - * The path ID that uniquely identifies the object. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The Value. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly value?: AddonUnion[]; /** - * The name of the object. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Link to the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly nextLink?: string; +} + +/** Collection of metric configurations. */ +export interface MonitoringMetricConfigurationList { /** - * The hierarchical type of the object. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The list of metric configurations. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly value?: MonitoringMetricConfiguration[]; /** - * The current status of the job. Possible values include: 'Invalid', 'Running', 'Succeeded', - * 'Failed', 'Canceled', 'Paused', 'Scheduled' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Link to the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: JobStatus; + readonly nextLink?: string; +} + +/** Metric configuration. */ +export interface MetricConfiguration { + /** The Resource ID on which the metrics should be pushed. */ + resourceId: string; + /** The MDM account to which the counters should be pushed. */ + mdmAccount?: string; + /** The MDM namespace to which the counters should be pushed. This is required if MDMAccount is specified */ + metricNameSpace?: string; + /** Host name for the IoT hub associated to the device. */ + counterSets: MetricCounterSet[]; +} + +/** The metric counter set */ +export interface MetricCounterSet { + /** The counters that should be collected in this set. */ + counters: MetricCounter[]; +} + +/** The metric counter */ +export interface MetricCounter { + /** The counter name. */ + name: string; + /** The instance from which counter should be collected. */ + instance?: string; + /** The dimension filter. */ + dimensionFilter?: MetricDimension[]; + /** The additional dimensions to be added to metric. */ + additionalDimensions?: MetricDimension[]; +} + +/** The metric dimension */ +export interface MetricDimension { + /** The dimension type. */ + sourceType: string; + /** The dimension value. */ + sourceName: string; +} + +/** Collection of all the shares on the Data Box Edge/Gateway device. */ +export interface ShareList { /** - * The UTC date and time at which the job started. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The list of shares. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly startTime?: Date; + readonly value?: Share[]; /** - * The UTC date and time at which the job completed. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Link to the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly endTime?: Date; + readonly nextLink?: string; +} + +/** Azure container mapping of the endpoint. */ +export interface AzureContainerInfo { + /** ID of the storage account credential used to access storage. */ + storageAccountCredentialId: string; + /** Container name (Based on the data format specified, this represents the name of Azure Files/Page blob/Block blob). */ + containerName: string; + /** Storage format used for the file represented by the share. */ + dataFormat: AzureContainerDataFormat; +} + +/** The mapping between a particular user and the access type on the SMB share. */ +export interface UserAccessRight { + /** User ID (already existing in the device). */ + userId: string; + /** Type of access to be allowed for the user. */ + accessType: ShareAccessType; +} + +/** The mapping between a particular client IP and the type of access client has on the NFS share. */ +export interface ClientAccessRight { + /** IP of the client. */ + client: string; + /** Type of access to be allowed for the client. */ + accessPermission: ClientPermissionType; +} + +/** Fields for tracking refresh job on the share or container. */ +export interface RefreshDetails { + /** If a refresh job is currently in progress on this share or container, this field indicates the ARM resource ID of that job. The field is empty if no job is in progress. */ + inProgressRefreshJobId?: string; + /** Indicates the completed time for the last refresh job on this particular share or container, if any.This could be a failed job or a successful job. */ + lastCompletedRefreshJobTimeInUTC?: Date; + /** Indicates the relative path of the error xml for the last refresh job on this particular share or container, if any. This could be a failed job or a successful job. */ + errorManifestFile?: string; + /** Indicates the id of the last refresh job on this particular share or container,if any. This could be a failed job or a successful job. */ + lastJob?: string; +} + +/** The share mount point. */ +export interface MountPointMap { + /** ID of the share mounted to the role VM. */ + shareId: string; /** - * The percentage of the job that is complete. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * ID of the role to which share is mounted. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly percentComplete?: number; + readonly roleId?: string; /** - * The error details. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Mount point for the share. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly error?: JobErrorDetails; + readonly mountPoint?: string; /** - * The type of the job. Possible values include: 'Invalid', 'ScanForUpdates', 'DownloadUpdates', - * 'InstallUpdates', 'RefreshShare', 'RefreshContainer' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Mounting type. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly jobType?: JobType; + readonly mountType?: MountType; /** - * Current stage of the update operation. Possible values include: 'Unknown', 'Initial', - * 'ScanStarted', 'ScanComplete', 'ScanFailed', 'DownloadStarted', 'DownloadComplete', - * 'DownloadFailed', 'InstallStarted', 'InstallComplete', 'InstallFailed', 'RebootInitiated', - * 'Success', 'Failure', 'RescanStarted', 'RescanComplete', 'RescanFailed' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Role type. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly currentStage?: UpdateOperationStage; + readonly roleType?: RoleTypes; +} + +/** The collection of storage account credentials. */ +export interface StorageAccountCredentialList { /** - * The download progress. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The value. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly downloadProgress?: UpdateDownloadProgress; + readonly value?: StorageAccountCredential[]; /** - * The install progress. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Link to the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly installProgress?: UpdateInstallProgress; + readonly nextLink?: string; +} + +/** Collection of all the Storage Accounts on the Data Box Edge/Gateway device. */ +export interface StorageAccountList { /** - * Total number of errors encountered during the refresh process. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The list of storageAccounts. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly totalRefreshErrors?: number; + readonly value?: StorageAccount[]; /** - * Local share/remote container relative path to the error manifest file of the refresh. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Link to the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorManifestFile?: string; + readonly nextLink?: string; +} + +/** Collection of all the containers on the Data Box Edge/Gateway device. */ +export interface ContainerList { /** - * ARM ID of the entity that was refreshed. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The list of containers. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly refreshedEntityId?: string; + readonly value?: Container[]; /** - * If only subfolders need to be refreshed, then the subfolder path inside the share or - * container. (The path is empty if there are no subfolders.) + * Link to the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - folder?: string; + readonly nextLink?: string; } -/** - * Metric Dimension v1. - */ -export interface MetricDimensionV1 { - /** - * Name of the metrics dimension. - */ - name?: string; +/** Collection of all trigger on the data box edge device. */ +export interface TriggerList { /** - * Display name of the metrics dimension. + * The list of triggers. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - displayName?: string; + readonly value?: TriggerUnion[]; /** - * To be exported to shoe box. + * Link to the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - toBeExportedForShoebox?: boolean; + readonly nextLink?: string; } -/** - * Metric specification version 1. - */ -export interface MetricSpecificationV1 { +/** The Data Box Edge/Gateway device extended info patch. */ +export interface DataBoxEdgeDeviceExtendedInfoPatch { + /** The Key Vault ARM Id for client secrets */ + clientSecretStoreId?: string; + /** The url to access the Client Key Vault */ + clientSecretStoreUrl?: string; + /** The name for Channel Integrity Key stored in the Client Key Vault */ + channelIntegrityKeyName?: string; + /** The version of Channel Integrity Key stored in the Client Key Vault */ + channelIntegrityKeyVersion?: string; + /** For changing or to initiate the resync to key-vault set the status to KeyVaultSyncPending, rest of the status will not be applicable. */ + syncStatus?: KeyVaultSyncStatus; +} + +/** Update Specific attributes */ +export interface UpdateDetails { + /** Title of the Update */ + updateTitle?: string; + /** Size of the update(In Bytes) */ + updateSize?: number; + /** Type of the Update */ + updateType?: UpdateType; + /** Target Version number */ + targetVersion?: string; + /** Friendly Version Number */ + friendlyVersionNumber?: string; + /** Estimated Install Time for the update */ + estimatedInstallTimeInMins?: number; + /** Indicates if updates are available and at least one of the updates needs a reboot. */ + rebootBehavior?: InstallRebootBehavior; + /** Impact of Installing an updateType */ + installationImpact?: InstallationImpact; + /** Status of the update. */ + status?: UpdateStatus; +} + +/** The upload certificate request. */ +export interface UploadCertificateRequest { + /** The authentication type. */ + authenticationType?: AuthenticationType; + /** The base64 encoded certificate raw data. */ + certificate: string; +} + +/** The upload registration certificate response. */ +export interface UploadCertificateResponse { + /** Specifies authentication type. */ + authType?: AuthenticationType; /** - * Name of the metric. + * The resource ID of the Data Box Edge/Gateway device. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - name?: string; + readonly resourceId?: string; /** - * Display name of the metric. + * Azure Active Directory tenant authority. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - displayName?: string; + readonly aadAuthority?: string; /** - * Description of the metric to be displayed. + * Azure Active Directory tenant ID. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - displayDescription?: string; + readonly aadTenantId?: string; /** - * Metric units. Possible values include: 'NotSpecified', 'Percent', 'Count', 'Seconds', - * 'Milliseconds', 'Bytes', 'BytesPerSecond', 'CountPerSecond' + * Azure Active Directory service principal client ID. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - unit?: MetricUnit; + readonly servicePrincipalClientId?: string; /** - * Metric aggregation type. Possible values include: 'NotSpecified', 'None', 'Average', - * 'Minimum', 'Maximum', 'Total', 'Count' + * Azure Active Directory service principal object ID. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - aggregationType?: MetricAggregationType; + readonly servicePrincipalObjectId?: string; /** - * Metric dimensions, other than default dimension which is resource. + * The azure management endpoint audience. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - dimensions?: MetricDimensionV1[]; + readonly azureManagementEndpointAudience?: string; /** - * Set true to fill the gaps with zero. + * Identifier of the target resource that is the recipient of the requested token. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - fillGapWithZero?: boolean; + readonly aadAudience?: string; +} + +/** Collection of users. */ +export interface UserList { /** - * Metric category. Possible values include: 'Capacity', 'Transaction' + * The list of users. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - category?: MetricCategory; + readonly value?: User[]; /** - * Resource name override. + * Link to the next set of results. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - resourceIdDimensionNameOverride?: string; + readonly nextLink?: string; +} + +/** Specifies the mapping between this particular user and the type of access he has on shares on this device. */ +export interface ShareAccessRight { + /** The share ID. */ + shareId: string; + /** Type of access to be allowed on the share for this user. */ + accessType: ShareAccessType; +} + +/** Authentication mechanism for IoT devices. */ +export interface Authentication { + /** Symmetric key for authentication. */ + symmetricKey?: SymmetricKey; +} + +/** Symmetric key for authentication. */ +export interface SymmetricKey { + /** Connection string based on the symmetric key. */ + connectionString?: AsymmetricEncryptedSecret; +} + +/** Cni configuration */ +export interface CniConfig { /** - * Support granularity of metrics. + * Cni type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - supportedTimeGrainTypes?: TimeGrain[]; + readonly type?: string; /** - * Support metric aggregation type. + * Cni version + * NOTE: This property will not be serialized. It can only be populated by the server. */ - supportedAggregationTypes?: MetricAggregationType[]; -} - -/** - * The network adapter position. - */ -export interface NetworkAdapterPosition { + readonly version?: string; /** - * The network group. Possible values include: 'None', 'NonRDMA', 'RDMA' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Pod Subnet + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly networkGroup?: NetworkGroup; + readonly podSubnet?: string; /** - * The port. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Service subnet + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly port?: number; + readonly serviceSubnet?: string; } -/** - * Represents the networkAdapter on a device. - */ -export interface NetworkAdapter { +/** Compute infrastructure Resource */ +export interface ComputeResource { + /** Processor count */ + processorCount: number; + /** Memory in GB */ + memoryInGB: number; +} + +/** Resource Move details */ +export interface DataBoxEdgeMoveRequest { + /** Target resource group ARMId */ + targetResourceGroup: string; + /** List of resources to be moved */ + resources: string[]; +} + +/** Etcd configuration */ +export interface EtcdInfo { /** - * Instance ID of network adapter. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Etcd type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly adapterId?: string; + readonly type?: string; /** - * Hardware position of network adapter. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Etcd version + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly adapterPosition?: NetworkAdapterPosition; + readonly version?: string; +} + +/** File source details. */ +export interface FileSourceInfo { + /** File share ID. */ + shareId: string; +} + +/** Compute role against which events will be raised. */ +export interface RoleSinkInfo { + /** Compute role ID. */ + roleId: string; +} + +/** Image repository credential. */ +export interface ImageRepositoryCredential { + /** Image repository url (e.g.: mcr.microsoft.com). */ + imageRepositoryUrl: string; + /** Repository user name. */ + userName: string; + /** Repository user password. */ + password?: AsymmetricEncryptedSecret; +} + +/** Metadata of IoT device/IoT Edge device to be configured. */ +export interface IoTDeviceInfo { + /** ID of the IoT device/edge device. */ + deviceId: string; + /** Host name for the IoT hub associated to the device. */ + ioTHostHub: string; + /** Id for the IoT hub associated to the device. */ + ioTHostHubId?: string; + /** Encrypted IoT device/IoT edge device connection string. */ + authentication?: Authentication; +} + +/** IoT edge agent details is optional, this will be used for download system Agent module while bootstrapping IoT Role if specified. */ +export interface IoTEdgeAgentInfo { + /** Name of the IoT edge agent image. */ + imageName: string; + /** Image Tag. */ + tag: string; + /** Image repository details. */ + imageRepository?: ImageRepositoryCredential; +} + +/** Kubernetes cluster configuration */ +export interface KubernetesClusterInfo { /** - * Logical index of the adapter. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Etcd configuration + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly index?: number; + readonly etcdInfo?: EtcdInfo; /** - * Node ID of the network adapter. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Kubernetes cluster nodes + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nodeId?: string; + readonly nodes?: NodeInfo[]; + /** Kubernetes cluster version */ + version: string; +} + +/** Kubernetes node info */ +export interface NodeInfo { /** - * Network adapter name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Node name. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly networkAdapterName?: string; + readonly name?: string; /** - * Hardware label for the adapter. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Node type - Master/Worker + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly label?: string; + readonly type?: KubernetesNodeType; + /** IP Configuration of the Kubernetes node. */ + ipConfiguration?: KubernetesIPConfiguration[]; +} + +/** Kubernetes node IP configuration */ +export interface KubernetesIPConfiguration { /** - * MAC address. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Port of the Kubernetes node. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly macAddress?: string; + readonly port?: string; + /** IP address of the Kubernetes node. */ + ipAddress?: string; +} + +/** Kubernetes role resources */ +export interface KubernetesRoleResources { + /** Kubernetes role storage resource */ + storage?: KubernetesRoleStorage; + /** Kubernetes role compute resource */ + compute: KubernetesRoleCompute; /** - * Link speed. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Kubernetes role network resource + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly linkSpeed?: number; + readonly network?: KubernetesRoleNetwork; +} + +/** Kubernetes role storage resource */ +export interface KubernetesRoleStorage { /** - * Value indicating whether this adapter is valid. Possible values include: 'Inactive', 'Active' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Kubernetes storage class info. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: NetworkAdapterStatus; + readonly storageClasses?: KubernetesRoleStorageClassInfo[]; + /** Mount points of shares in role(s). */ + endpoints?: MountPointMap[]; +} + +/** Kubernetes storage class info. */ +export interface KubernetesRoleStorageClassInfo { /** - * Value indicating whether this adapter is RDMA capable. Possible values include: 'Incapable', - * 'Capable' + * Storage class name. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - rdmaStatus?: NetworkAdapterRDMAStatus; + readonly name?: string; /** - * Value indicating whether this adapter has DHCP enabled. Possible values include: 'Disabled', - * 'Enabled' + * Storage class type. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - dhcpStatus?: NetworkAdapterDHCPStatus; + readonly type?: string; /** - * The IPv4 configuration of the network adapter. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * If provisioned storage is posix compliant. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly ipv4Configuration?: Ipv4Config; + readonly posixCompliant?: PosixComplianceStatus; +} + +/** Kubernetes role compute resource */ +export interface KubernetesRoleCompute { + /** VM profile */ + vmProfile: string; /** - * The IPv6 configuration of the network adapter. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Memory in bytes + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly ipv6Configuration?: Ipv6Config; + readonly memoryInBytes?: number; /** - * The IPv6 local address. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Processor count + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly ipv6LinkLocalAddress?: string; + readonly processorCount?: number; +} + +/** Kubernetes role network resource */ +export interface KubernetesRoleNetwork { /** - * The list of DNS Servers of the device. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Cni configuration + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly dnsServers?: string[]; + readonly cniConfig?: CniConfig; + /** + * Load balancer configuration + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly loadBalancerConfig?: LoadBalancerConfig; } -/** - * The network settings of a device. - */ -export interface NetworkSettings extends ARMBaseModel { +/** Load balancer configuration */ +export interface LoadBalancerConfig { /** - * The network adapter list on the device. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Load balancer type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly networkAdapters?: NetworkAdapter[]; + readonly type?: string; + /** + * Load balancer version + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly version?: string; } -/** - * Represents a single node in a Data box Edge/Gateway device - * Gateway devices, standalone Edge devices and a single node cluster Edge device will all have 1 - * node - * Multi-node Edge devices will have more than 1 nodes - */ -export interface Node extends ARMBaseModel { +/** Periodic timer event source. */ +export interface PeriodicTimerSourceInfo { + /** The time of the day that results in a valid trigger. Schedule is computed with reference to the time specified upto seconds. If timezone is not specified the time will considered to be in device timezone. The value will always be returned as UTC time. */ + startTime: Date; + /** Periodic frequency at which timer event needs to be raised. Supports daily, hourly, minutes, and seconds. */ + schedule: string; + /** Topic where periodic events are published to IoT device. */ + topic?: string; +} + +/** Resource type Sku object */ +export interface ResourceTypeSku { /** - * The current status of the individual node. Possible values include: 'Unknown', 'Up', 'Down', - * 'Rebooting', 'ShuttingDown' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The resource type. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nodeStatus?: NodeStatus; + readonly resourceType?: string; /** - * Serial number of the Chassis - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The skus. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nodeChassisSerialNumber?: string; + readonly skus?: SkuInformation[]; +} + +/** Sku information */ +export interface SkuInformation { /** - * Serial number of the individual node - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The sku name. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nodeSerialNumber?: string; + readonly name?: string; /** - * Display Name of the individual node - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The sku tier. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nodeDisplayName?: string; + readonly tier?: string; /** - * Friendly software version name that is currently installed on the node - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The sku kind. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nodeFriendlySoftwareVersion?: string; + readonly kind?: string; /** - * HCS version that is currently installed on the node - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The Sku family. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nodeHcsVersion?: string; + readonly family?: string; /** - * Guid instance id of the node - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The pricing info of the Sku. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nodeInstanceId?: string; -} - -/** - * Operation display properties. - */ -export interface OperationDisplay { + readonly costs?: SkuCost[]; /** - * Provider name. + * The locations where Sku is available. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - provider?: string; + readonly locations?: string[]; /** - * The type of resource in which the operation is performed. + * The locations where Sku is available with zones and sites info + * NOTE: This property will not be serialized. It can only be populated by the server. */ - resource?: string; + readonly locationInfo?: SkuLocationInfo[]; /** - * Operation to be performed on the resource. + * The required quotaIds for the sku to be available. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - operation?: string; + readonly requiredQuotaIds?: string[]; /** - * Description of the operation to be performed. + * The required features for the sku to be available. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - description?: string; + readonly requiredFeatures?: string[]; } -/** - * Service specification. - */ -export interface ServiceSpecification { +/** List of SKU Information objects */ +export interface SkuInformationList { /** - * Metric specification as defined by shoebox. + * List of ResourceTypeSku objects + * NOTE: This property will not be serialized. It can only be populated by the server. */ - metricSpecifications?: MetricSpecificationV1[]; -} - -/** - * Operations. - */ -export interface Operation { + readonly value?: ResourceTypeSku[]; /** - * Name of the operation. + * Links to the next set of results + * NOTE: This property will not be serialized. It can only be populated by the server. */ - name?: string; + readonly nextLink?: string; +} + +/** The Data Box Edge/Gateway device. */ +export type DataBoxEdgeDevice = ARMBaseModel & { + /** The location of the device. This is a supported and registered Azure geographical region (for example, West US, East US, or Southeast Asia). The geographical region of a device cannot be changed once it is created, but if an identical geographical region is specified on update, the request will succeed. */ + location: string; + /** The list of tags that describe the device. These tags can be used to view and group this device (across resource groups). */ + tags?: { [propertyName: string]: string }; + /** The SKU type. */ + sku?: Sku; + /** The etag for the devices. */ + etag?: string; + /** Msi identity of the resource */ + identity?: ResourceIdentity; + /** The kind of the device. */ + kind?: DataBoxEdgeDeviceKind; /** - * Properties displayed for the operation. + * DataBoxEdge Resource + * NOTE: This property will not be serialized. It can only be populated by the server. */ - display?: OperationDisplay; + readonly systemData?: SystemData; /** - * Origin of the operation. + * DataBoxEdge Device Properties + * NOTE: This property will not be serialized. It can only be populated by the server. */ - origin?: string; + readonly systemDataPropertiesSystemData?: SystemData; + /** The status of the Data Box Edge/Gateway device. */ + dataBoxEdgeDeviceStatus?: DataBoxEdgeDeviceStatus; /** - * Service specification. + * The Serial Number of Data Box Edge/Gateway device. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - serviceSpecification?: ServiceSpecification; -} - -/** - * Represents a single status change. - */ -export interface OrderStatus { + readonly serialNumber?: string; /** - * Status of the order as per the allowed status types. Possible values include: 'Untracked', - * 'AwaitingFulfilment', 'AwaitingPreparation', 'AwaitingShipment', 'Shipped', 'Arriving', - * 'Delivered', 'ReplacementRequested', 'LostDevice', 'Declined', 'ReturnInitiated', - * 'AwaitingReturnShipment', 'ShippedBack', 'CollectedAtMicrosoft' + * The Description of the Data Box Edge/Gateway device. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - status: OrderState; + readonly description?: string; /** - * Time of status update. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The description of the Data Box Edge/Gateway device model. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly updateDateTime?: Date; + readonly modelDescription?: string; /** - * Comments related to this status change. + * The type of the Data Box Edge/Gateway device. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - comments?: string; + readonly deviceType?: DeviceType; /** - * Dictionary to hold generic information which is not stored - * by the already existing properties - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The Data Box Edge/Gateway device name. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly additionalOrderDetails?: { [propertyName: string]: string }; -} - -/** - * Tracking courier information. - */ -export interface TrackingInfo { + readonly friendlyName?: string; /** - * Serial number of the device being tracked. + * The Data Box Edge/Gateway device culture. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - serialNumber?: string; + readonly culture?: string; /** - * Name of the carrier used in the delivery. + * The Data Box Edge/Gateway device model. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - carrierName?: string; + readonly deviceModel?: string; /** - * Tracking ID of the shipment. + * The Data Box Edge/Gateway device software version. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - trackingId?: string; + readonly deviceSoftwareVersion?: string; /** - * Tracking URL of the shipment. + * The Data Box Edge/Gateway device local capacity in MB. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - trackingUrl?: string; -} - -/** - * The order details. - */ -export interface Order extends ARMBaseModel { + readonly deviceLocalCapacity?: number; /** - * The contact details. + * The Data Box Edge/Gateway device timezone. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - contactInformation: ContactDetails; + readonly timeZone?: string; /** - * The shipping address. + * The device software version number of the device (eg: 1.2.18105.6). + * NOTE: This property will not be serialized. It can only be populated by the server. */ - shippingAddress: Address; + readonly deviceHcsVersion?: string; /** - * Current status of the order. + * Type of compute roles configured. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - currentStatus?: OrderStatus; + readonly configuredRoleTypes?: RoleTypes[]; /** - * List of status changes in the order. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The number of nodes in the cluster. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly orderHistory?: OrderStatus[]; + readonly nodeCount?: number; /** - * Serial number of the device. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The details of the move operation on this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly serialNumber?: string; + readonly resourceMoveDetails?: ResourceMoveDetails; /** - * Tracking information for the package delivered to the customer whether it has an original or a - * replacement device. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The details of Edge Profile for this resource + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly deliveryTrackingInfo?: TrackingInfo[]; + readonly edgeProfile?: EdgeProfile; + /** The details of data-residency related properties for this resource */ + dataResidency?: DataResidency; +}; + +/** Alert on the data box edge/gateway device. */ +export type Alert = ARMBaseModel & { /** - * Tracking information for the package returned from the customer whether it has an original or - * a replacement device. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Alert generated in the resource + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly returnTrackingInfo?: TrackingInfo[]; -} - -/** - * Periodic timer event source. - */ -export interface PeriodicTimerSourceInfo { + readonly systemData?: SystemData; /** - * The time of the day that results in a valid trigger. Schedule is computed with reference to - * the time specified upto seconds. If timezone is not specified the time will considered to be - * in device timezone. The value will always be returned as UTC time. + * Alert title. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - startTime: Date; + readonly title?: string; /** - * Periodic frequency at which timer event needs to be raised. Supports daily, hourly, minutes, - * and seconds. + * Alert type. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - schedule: string; + readonly alertType?: string; /** - * Topic where periodic events are published to IoT device. + * UTC time when the alert appeared. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - topic?: string; -} - -/** - * Trigger details. - */ -export interface PeriodicTimerEventTrigger { + readonly appearedAtDateTime?: Date; /** - * Polymorphic Discriminator + * Alert recommendation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - kind: "PeriodicTimerEvent"; + readonly recommendation?: string; /** - * The path ID that uniquely identifies the object. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Severity of the alert. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly severity?: AlertSeverity; /** - * The object name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Error details of the alert. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly errorDetails?: AlertErrorDetails; /** - * The hierarchical type of the object. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Alert details. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly detailedInformation?: { [propertyName: string]: string }; +}; + +/** The bandwidth schedule details. */ +export type BandwidthSchedule = ARMBaseModel & { /** - * Periodic timer details. + * Bandwidth object related to ASE resource + * NOTE: This property will not be serialized. It can only be populated by the server. */ - sourceInfo: PeriodicTimerSourceInfo; + readonly systemData?: SystemData; + /** The start time of the schedule in UTC. */ + start: string; + /** The stop time of the schedule in UTC. */ + stop: string; + /** The bandwidth rate in Mbps. */ + rateInMbps: number; + /** The days of the week when this schedule is applicable. */ + days: DayOfWeek[]; +}; + +/** The diagnostic proactive log collection settings of a device. */ +export type DiagnosticProactiveLogCollectionSettings = ARMBaseModel & { /** - * Role Sink information. + * DiagnosticProactiveLogCollectionSettings + * NOTE: This property will not be serialized. It can only be populated by the server. */ - sinkInfo: RoleSinkInfo; + readonly systemData?: SystemData; + /** Proactive diagnostic collection consent flag */ + userConsent: ProactiveDiagnosticsConsent; +}; + +/** The remote support settings of a device. */ +export type DiagnosticRemoteSupportSettings = ARMBaseModel & { /** - * A custom context tag typically used to correlate the trigger against its usage. For example, - * if a periodic timer trigger is intended for certain specific IoT modules in the device, the - * tag can be the name or the image URL of the module. + * DiagnosticRemoteSupportSettings + * NOTE: This property will not be serialized. It can only be populated by the server. */ - customContextTag?: string; -} + readonly systemData?: SystemData; + /** Remote support settings list according to the RemoteApplicationType */ + remoteSupportSettingsList?: RemoteSupportSettings[]; +}; -/** - * The location info. - */ -export interface SkuLocationInfo { +/** The extended Info of the Data Box Edge/Gateway device. */ +export type DataBoxEdgeDeviceExtendedInfo = ARMBaseModel & { + /** The digital signature of encrypted certificate. */ + encryptionKeyThumbprint?: string; + /** The public part of the encryption certificate. Client uses this to encrypt any secret. */ + encryptionKey?: string; /** - * The location. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The Resource ID of the Resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly location?: string; + readonly resourceKey?: string; + /** The Key Vault ARM Id for client secrets */ + clientSecretStoreId?: string; + /** The url to access the Client Key Vault */ + clientSecretStoreUrl?: string; + /** The name of Channel Integrity Key stored in the Client Key Vault */ + channelIntegrityKeyName?: string; + /** The version of Channel Integrity Key stored in the Client Key Vault */ + channelIntegrityKeyVersion?: string; + /** Key vault sync status */ + keyVaultSyncStatus?: KeyVaultSyncStatus; + /** + * Device secrets, will be returned only with ODataFilter $expand=deviceSecrets + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly deviceSecrets?: { [propertyName: string]: Secret }; +}; + +/** The network settings of a device. */ +export type NetworkSettings = ARMBaseModel & { /** - * The zones. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NetworkSettings on ASE device + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly zones?: string[]; + readonly systemData?: SystemData; /** - * The sites. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The network adapter list on the device. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly sites?: string[]; -} + readonly networkAdapters?: NetworkAdapter[]; +}; /** - * The metadata for retrieving price info. + * Represents a single node in a Data box Edge/Gateway device + * Gateway devices, standalone Edge devices and a single node cluster Edge device will all have 1 node + * Multi-node Edge devices will have more than 1 nodes */ -export interface SkuCost { - /** - * Used for querying price from commerce. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly meterId?: string; - /** - * The cost quantity. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly quantity?: number; +export type Node = ARMBaseModel & { /** - * Restriction of the SKU for the location/zone - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The current status of the individual node + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly extendedUnit?: string; -} - -/** - * The restriction info with locations and zones. - */ -export interface SkuRestrictionInfo { + readonly nodeStatus?: NodeStatus; /** - * The locations. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Serial number of the Chassis + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly locations?: string[]; + readonly nodeChassisSerialNumber?: string; /** - * The zones. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Serial number of the individual node + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly zones?: string[]; -} - -/** - * The restrictions because of which SKU cannot be used. - */ -export interface SkuRestriction { + readonly nodeSerialNumber?: string; /** - * The type of the restriction. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Display Name of the individual node + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly nodeDisplayName?: string; /** - * The locations where sku is restricted. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Friendly software version name that is currently installed on the node + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly values?: string[]; + readonly nodeFriendlySoftwareVersion?: string; /** - * The SKU restriction reason. Possible values include: 'NotAvailableForSubscription', 'QuotaId' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * HCS version that is currently installed on the node + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly reasonCode?: SkuRestrictionReasonCode; + readonly nodeHcsVersion?: string; /** - * Restriction of the SKU for the location/zone - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Guid instance id of the node + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly restrictionInfo?: SkuRestrictionInfo; -} + readonly nodeInstanceId?: string; +}; -/** - * SkuInformation object - */ -export interface ResourceTypeSku { - /** - * The type of the resource - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly resourceType?: string; - /** - * The Sku name. Possible values include: 'Gateway', 'Edge', 'TEA_1Node', 'TEA_1Node_UPS', - * 'TEA_1Node_Heater', 'TEA_1Node_UPS_Heater', 'TEA_4Node_Heater', 'TEA_4Node_UPS_Heater', 'TMA' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: SkuName; - /** - * The Sku kind - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly kind?: string; - /** - * The Sku tier. Possible values include: 'Standard' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tier?: SkuTier; +/** The order details. */ +export type Order = ARMBaseModel & { /** - * The Sku family - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Order configured on ASE resource + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly family?: string; + readonly systemData?: SystemData; + /** The contact details. */ + contactInformation?: ContactDetails; + /** The shipping address. */ + shippingAddress?: Address; /** - * Availability of the SKU for the region - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Current status of the order. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly locations?: string[]; + readonly currentStatus?: OrderStatus; /** - * The API versions in which SKU is available - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * List of status changes in the order. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly apiVersions?: string[]; + readonly orderHistory?: OrderStatus[]; /** - * Availability of the SKU for the location/zone - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Serial number of the device. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly locationInfo?: SkuLocationInfo[]; + readonly serialNumber?: string; /** - * The pricing info of the Sku. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Tracking information for the package delivered to the customer whether it has an original or a replacement device. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly costs?: SkuCost[]; + readonly deliveryTrackingInfo?: TrackingInfo[]; /** - * Restrictions of the SKU availability. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Tracking information for the package returned from the customer whether it has an original or a replacement device. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly restrictions?: SkuRestriction[]; -} + readonly returnTrackingInfo?: TrackingInfo[]; + /** ShipmentType of the order */ + shipmentType?: ShipmentType; +}; -/** - * The security settings of a device. - */ -export interface SecuritySettings extends ARMBaseModel { +/** Compute role. */ +export type Role = ARMBaseModel & { + /** Role type. */ + kind: RoleTypes; /** - * Device administrator password as an encrypted string (encrypted using RSA PKCS #1) is used to - * sign into the local web UI of the device. The Actual password should have at least 8 - * characters that are a combination of uppercase, lowercase, numeric, and special characters. + * Role configured on ASE resource + * NOTE: This property will not be serialized. It can only be populated by the server. */ - deviceAdminPassword: AsymmetricEncryptedSecret; -} + readonly systemData?: SystemData; +}; -/** - * The mapping between a particular user and the access type on the SMB share. - */ -export interface UserAccessRight { +/** Role Addon */ +export type Addon = ARMBaseModel & { + /** Addon type. */ + kind: AddonType; /** - * User ID (already existing in the device). + * Addon type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - userId: string; + readonly systemData?: SystemData; +}; + +/** The metric setting details for the role */ +export type MonitoringMetricConfiguration = ARMBaseModel & { /** - * Type of access to be allowed for the user. Possible values include: 'Change', 'Read', 'Custom' + * MonitoringConfiguration on ASE device + * NOTE: This property will not be serialized. It can only be populated by the server. */ - accessType: ShareAccessType; -} + readonly systemData?: SystemData; + /** The metrics configuration details */ + metricConfigurations: MetricConfiguration[]; +}; -/** - * Represents a share on the Data Box Edge/Gateway device. - */ -export interface Share extends ARMBaseModel { +/** The security settings of a device. */ +export type SecuritySettings = ARMBaseModel & { + /** Device administrator password as an encrypted string (encrypted using RSA PKCS #1) is used to sign into the local web UI of the device. The Actual password should have at least 8 characters that are a combination of uppercase, lowercase, numeric, and special characters. */ + deviceAdminPassword: AsymmetricEncryptedSecret; +}; + +/** Represents a share on the Data Box Edge/Gateway device. */ +export type Share = ARMBaseModel & { /** - * Description for the share. + * Share on ASE device + * NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly systemData?: SystemData; + /** Description for the share. */ description?: string; - /** - * Current status of the share. Possible values include: 'Offline', 'Unknown', 'OK', 'Updating', - * 'NeedsAttention' - */ + /** Current status of the share. */ shareStatus: ShareStatus; - /** - * Current monitoring status of the share. Possible values include: 'Enabled', 'Disabled' - */ + /** Current monitoring status of the share. */ monitoringStatus: MonitoringStatus; - /** - * Azure container mapping for the share. - */ + /** Azure container mapping for the share. */ azureContainerInfo?: AzureContainerInfo; - /** - * Access protocol to be used by the share. Possible values include: 'SMB', 'NFS' - */ + /** Access protocol to be used by the share. */ accessProtocol: ShareAccessProtocol; - /** - * Mapping of users and corresponding access rights on the share (required for SMB protocol). - */ + /** Mapping of users and corresponding access rights on the share (required for SMB protocol). */ userAccessRights?: UserAccessRight[]; - /** - * List of IP addresses and corresponding access rights on the share(required for NFS protocol). - */ + /** List of IP addresses and corresponding access rights on the share(required for NFS protocol). */ clientAccessRights?: ClientAccessRight[]; - /** - * Details of the refresh job on this share. - */ + /** Details of the refresh job on this share. */ refreshDetails?: RefreshDetails; /** * Share mount point to the role. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly shareMappings?: MountPointMap[]; - /** - * Data policy of the share. Possible values include: 'Cloud', 'Local' - */ + /** Data policy of the share. */ dataPolicy?: DataPolicy; -} +}; -/** - * Specifies the mapping between this particular user and the type of access he has on shares on - * this device. - */ -export interface ShareAccessRight { - /** - * The share ID. - */ - shareId: string; +/** The storage account credential. */ +export type StorageAccountCredential = ARMBaseModel & { /** - * Type of access to be allowed on the share for this user. Possible values include: 'Change', - * 'Read', 'Custom' + * StorageAccountCredential object + * NOTE: This property will not be serialized. It can only be populated by the server. */ - accessType: ShareAccessType; -} + readonly systemData?: SystemData; + /** Alias for the storage account. */ + alias: string; + /** Username for the storage account. */ + userName?: string; + /** Encrypted storage key. */ + accountKey?: AsymmetricEncryptedSecret; + /** Connection string for the storage account. Use this string if username and account key are not specified. */ + connectionString?: string; + /** Signifies whether SSL needs to be enabled or not. */ + sslStatus: SSLStatus; + /** Blob end point for private clouds. */ + blobDomainName?: string; + /** Type of storage accessed on the storage account. */ + accountType: AccountType; + /** Id of the storage account. */ + storageAccountId?: string; +}; -/** - * Represents a Storage Account on the Data Box Edge/Gateway device. - */ -export interface StorageAccount extends ARMBaseModel { +/** Represents a Storage Account on the Data Box Edge/Gateway device. */ +export type StorageAccount = ARMBaseModel & { /** - * Description for the storage Account. + * StorageAccount object on ASE device + * NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly systemData?: SystemData; + /** Description for the storage Account. */ description?: string; - /** - * Current status of the storage account. Possible values include: 'OK', 'Offline', 'Unknown', - * 'Updating', 'NeedsAttention' - */ + /** Current status of the storage account */ storageAccountStatus?: StorageAccountStatus; - /** - * Data policy of the storage Account. Possible values include: 'Cloud', 'Local' - */ - dataPolicy?: DataPolicy; - /** - * Storage Account Credential Id - */ + /** Data policy of the storage Account. */ + dataPolicy: DataPolicy; + /** Storage Account Credential Id */ storageAccountCredentialId?: string; /** * BlobEndpoint of Storage Account - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly blobEndpoint?: string; /** * The Container Count. Present only for Storage Accounts with DataPolicy set to Cloud. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly containerCount?: number; -} +}; -/** - * The storage account credential. - */ -export interface StorageAccountCredential extends ARMBaseModel { - /** - * Alias for the storage account. - */ - alias: string; - /** - * Username for the storage account. - */ - userName?: string; +/** Represents a container on the Data Box Edge/Gateway device. */ +export type Container = ARMBaseModel & { /** - * Encrypted storage key. + * Container in DataBoxEdge Resource + * NOTE: This property will not be serialized. It can only be populated by the server. */ - accountKey?: AsymmetricEncryptedSecret; + readonly systemData?: SystemData; /** - * Connection string for the storage account. Use this string if username and account key are not - * specified. + * Current status of the container. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - connectionString?: string; + readonly containerStatus?: ContainerStatus; + /** DataFormat for Container */ + dataFormat: AzureContainerDataFormat; /** - * Signifies whether SSL needs to be enabled or not. Possible values include: 'Enabled', - * 'Disabled' + * Details of the refresh job on this container. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - sslStatus: SSLStatus; + readonly refreshDetails?: RefreshDetails; /** - * Blob end point for private clouds. + * The UTC time when container got created. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - blobDomainName?: string; + readonly createdDateTime?: Date; +}; + +/** Trigger details. */ +export type Trigger = ARMBaseModel & { /** - * Type of storage accessed on the storage account. Possible values include: - * 'GeneralPurposeStorage', 'BlobStorage' + * Trigger in DataBoxEdge Resource + * NOTE: This property will not be serialized. It can only be populated by the server. */ - accountType: AccountType; + readonly systemData?: SystemData; + /** Trigger Kind. */ + kind: TriggerEventType; +}; + +/** The request object for trigger support package. */ +export type TriggerSupportPackageRequest = ARMBaseModel & { + /** Start of the timespan of the log collection */ + minimumTimeStamp?: Date; + /** MaximumTimeStamp until where logs need to be collected */ + maximumTimeStamp?: Date; /** - * Id of the storage account. + * Type of files, which need to be included in the logs + * This will contain the type of logs (Default/DefaultWithDumps/None/All/DefaultWithArchived) + * or a comma separated list of log types that are required */ - storageAccountId?: string; -} + include?: string; +}; -/** - * Details about ongoing updates and availability of updates on the device. - */ -export interface UpdateSummary extends ARMBaseModel { +/** Details about ongoing updates and availability of updates on the device. */ +export type UpdateSummary = ARMBaseModel & { /** - * The current version of the device in format: 1.2.17312.13.", + * UpdateSummary Result + * NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly systemData?: SystemData; + /** The current version of the device in format: 1.2.17312.13.", */ deviceVersionNumber?: string; - /** - * The current version of the device in text format. - */ + /** The current version of the device in text format. */ friendlyDeviceVersionName?: string; - /** - * The last time when a scan was done on the device. - */ + /** The last time when a scan was done on the device. */ deviceLastScannedDateTime?: Date; - /** - * The time when the last scan job was completed (success/cancelled/failed) on the appliance. - */ + /** The time when the last scan job was completed (success/cancelled/failed) on the appliance. */ lastCompletedScanJobDateTime?: Date; + /** Time when the last scan job is successfully completed. */ + lastSuccessfulScanJobTime?: Date; /** * The time when the last Download job was completed (success/cancelled/failed) on the appliance. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly lastCompletedDownloadJobDateTime?: Date; + /** + * JobId of the last ran download job.(Can be success/cancelled/failed) + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastCompletedDownloadJobId?: string; + /** + * JobStatus of the last ran download job. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastDownloadJobStatus?: JobStatus; + /** The time when the Last Install job was completed successfully on the appliance */ + lastSuccessfulInstallJobDateTime?: Date; /** * The time when the last Install job was completed (success/cancelled/failed) on the appliance. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly lastCompletedInstallJobDateTime?: Date; + /** + * JobId of the last ran install job.(Can be success/cancelled/failed) + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastCompletedInstallJobId?: string; + /** + * JobStatus of the last ran install job. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastInstallJobStatus?: JobStatus; /** * The number of updates available for the current device version as per the last device scan. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly totalNumberOfUpdatesAvailable?: number; /** * The total number of items pending download. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly totalNumberOfUpdatesPendingDownload?: number; /** * The total number of items pending install. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly totalNumberOfUpdatesPendingInstall?: number; /** - * Indicates if updates are available and at least one of the updates needs a reboot. Possible - * values include: 'NeverReboots', 'RequiresReboot', 'RequestReboot' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Indicates if updates are available and at least one of the updates needs a reboot. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly rebootBehavior?: InstallRebootBehavior; /** - * The current update operation. Possible values include: 'None', 'Scan', 'Download', 'Install' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The current update operation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly ongoingUpdateOperation?: UpdateOperation; /** * The job ID of the download job in progress. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly inProgressDownloadJobId?: string; /** * The job ID of the install job in progress. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly inProgressInstallJobId?: string; /** * The time when the currently running download (if any) started. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly inProgressDownloadJobStartedDateTime?: Date; /** * The time when the currently running install (if any) started. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly inProgressInstallJobStartedDateTime?: Date; /** * The list of updates available for install. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly updateTitles?: string[]; + /** + * The list of updates available for install. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly updates?: UpdateDetails[]; /** * The total size of updates available for download in bytes. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly totalUpdateSizeInBytes?: number; -} + /** + * The total time in Minutes + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalTimeInMinutes?: number; +}; -/** - * The upload certificate request. - */ -export interface UploadCertificateRequest { +/** Represents a user who has access to one or more shares on the Data Box Edge/Gateway device. */ +export type User = ARMBaseModel & { /** - * The authentication type. Possible values include: 'Invalid', 'AzureActiveDirectory' + * User in DataBoxEdge Resource + * NOTE: This property will not be serialized. It can only be populated by the server. */ - authenticationType?: AuthenticationType; + readonly systemData?: SystemData; + /** The password details. */ + encryptedPassword?: AsymmetricEncryptedSecret; /** - * The base64 encoded certificate raw data. + * List of shares that the user has rights on. This field should not be specified during user creation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - certificate: string; -} + readonly shareAccessRights?: ShareAccessRight[]; + /** Type of the user. */ + userType: UserType; +}; -/** - * The upload registration certificate response. - */ -export interface UploadCertificateResponse { +/** CloudEdgeManagementRole role. */ +export type CloudEdgeManagementRole = Role & { /** - * Specifies authentication type. Possible values include: 'Invalid', 'AzureActiveDirectory' + * Local Edge Management Status + * NOTE: This property will not be serialized. It can only be populated by the server. */ - authType?: AuthenticationType; + readonly localManagementStatus?: RoleStatus; /** - * The resource ID of the Data Box Edge/Gateway device. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Edge Profile of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly resourceId?: string; + readonly edgeProfile?: EdgeProfile; + /** Role status. */ + roleStatus?: RoleStatus; +}; + +/** Compute role. */ +export type IoTRole = Role & { + /** Host OS supported by the IoT role. */ + hostPlatform?: PlatformType; + /** IoT device metadata to which data box edge device needs to be connected. */ + ioTDeviceDetails?: IoTDeviceInfo; + /** IoT edge device to which the IoT role needs to be configured. */ + ioTEdgeDeviceDetails?: IoTDeviceInfo; + /** Mount points of shares in role(s). */ + shareMappings?: MountPointMap[]; + /** Iot edge agent details to download the agent and bootstrap iot runtime. */ + ioTEdgeAgentInfo?: IoTEdgeAgentInfo; /** - * Azure Active Directory tenant authority. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Platform where the Iot runtime is hosted. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly aadAuthority?: string; + readonly hostPlatformType?: HostPlatformType; + /** Resource allocation */ + computeResource?: ComputeResource; + /** Role status. */ + roleStatus?: RoleStatus; +}; + +/** Kubernetes role. */ +export type KubernetesRole = Role & { + /** Host OS supported by the Kubernetes role. */ + hostPlatform?: PlatformType; /** - * Azure Active Directory tenant ID. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * State of Kubernetes deployment + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly aadTenantId?: string; + readonly provisioningState?: KubernetesState; /** - * Azure Active Directory service principal client ID. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Platform where the runtime is hosted. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly servicePrincipalClientId?: string; + readonly hostPlatformType?: HostPlatformType; + /** Kubernetes cluster configuration */ + kubernetesClusterInfo?: KubernetesClusterInfo; + /** Kubernetes role resources */ + kubernetesRoleResources?: KubernetesRoleResources; + /** Role status. */ + roleStatus?: RoleStatus; +}; + +/** MEC role. */ +export type MECRole = Role & { + /** Activation key of the MEC. */ + connectionString?: AsymmetricEncryptedSecret; + /** Controller Endpoint. */ + controllerEndpoint?: string; + /** Unique Id of the Resource. */ + resourceUniqueId?: string; + /** Role status. */ + roleStatus?: RoleStatus; +}; + +/** Arc Addon. */ +export type ArcAddon = Addon & { + /** Arc resource subscription Id */ + subscriptionId: string; + /** Arc resource group name */ + resourceGroupName: string; + /** Arc resource Name */ + resourceName: string; + /** Arc resource location */ + resourceLocation: string; /** - * Azure Active Directory service principal object ID. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Arc resource version + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly servicePrincipalObjectId?: string; + readonly version?: string; /** - * The azure management endpoint audience. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Host OS supported by the Arc addon. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly azureManagementEndpointAudience?: string; + readonly hostPlatform?: PlatformType; /** - * Identifier of the target resource that is the recipient of the requested token. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Platform where the runtime is hosted. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly aadAudience?: string; -} + readonly hostPlatformType?: HostPlatformType; + /** + * Addon Provisioning State + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: AddonState; +}; -/** - * Represents a user who has access to one or more shares on the Data Box Edge/Gateway device. - */ -export interface User extends ARMBaseModel { +/** IoT Addon. */ +export type IoTAddon = Addon & { + /** IoT device metadata to which appliance needs to be connected. */ + ioTDeviceDetails: IoTDeviceInfo; + /** IoT edge device to which the IoT Addon needs to be configured. */ + ioTEdgeDeviceDetails: IoTDeviceInfo; /** - * The password details. + * Version of IoT running on the appliance. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - encryptedPassword?: AsymmetricEncryptedSecret; + readonly version?: string; /** - * List of shares that the user has rights on. This field should not be specified during user - * creation. + * Host OS supported by the IoT addon. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - shareAccessRights?: ShareAccessRight[]; + readonly hostPlatform?: PlatformType; /** - * Type of the user. Possible values include: 'Share', 'LocalManagement', 'ARM' + * Platform where the runtime is hosted. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - userType: UserType; + readonly hostPlatformType?: HostPlatformType; + /** + * Addon Provisioning State + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: AddonState; +}; + +/** Trigger details. */ +export type FileEventTrigger = Trigger & { + /** File event source details. */ + sourceInfo: FileSourceInfo; + /** Role sink info. */ + sinkInfo: RoleSinkInfo; + /** A custom context tag typically used to correlate the trigger against its usage. For example, if a periodic timer trigger is intended for certain specific IoT modules in the device, the tag can be the name or the image URL of the module. */ + customContextTag?: string; +}; + +/** Trigger details. */ +export type PeriodicTimerEventTrigger = Trigger & { + /** Periodic timer details. */ + sourceInfo: PeriodicTimerSourceInfo; + /** Role Sink information. */ + sinkInfo: RoleSinkInfo; + /** A custom context tag typically used to correlate the trigger against its usage. For example, if a periodic timer trigger is intended for certain specific IoT modules in the device, the tag can be the name or the image URL of the module. */ + customContextTag?: string; +}; + +/** Known values of {@link MetricUnit} that the service accepts. */ +export enum KnownMetricUnit { + NotSpecified = "NotSpecified", + Percent = "Percent", + Count = "Count", + Seconds = "Seconds", + Milliseconds = "Milliseconds", + Bytes = "Bytes", + BytesPerSecond = "BytesPerSecond", + CountPerSecond = "CountPerSecond" } /** - * Optional Parameters. - */ -export interface DevicesListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { - /** - * Specify $expand=details to populate additional fields related to the resource or Specify - * $skipToken= to populate the next page in the list. - */ - expand?: string; + * Defines values for MetricUnit. \ + * {@link KnownMetricUnit} can be used interchangeably with MetricUnit, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotSpecified** \ + * **Percent** \ + * **Count** \ + * **Seconds** \ + * **Milliseconds** \ + * **Bytes** \ + * **BytesPerSecond** \ + * **CountPerSecond** + */ +export type MetricUnit = string; + +/** Known values of {@link MetricAggregationType} that the service accepts. */ +export enum KnownMetricAggregationType { + NotSpecified = "NotSpecified", + None = "None", + Average = "Average", + Minimum = "Minimum", + Maximum = "Maximum", + Total = "Total", + Count = "Count" } /** - * Optional Parameters. - */ -export interface DevicesListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { - /** - * Specify $expand=details to populate additional fields related to the resource or Specify - * $skipToken= to populate the next page in the list. - */ - expand?: string; + * Defines values for MetricAggregationType. \ + * {@link KnownMetricAggregationType} can be used interchangeably with MetricAggregationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotSpecified** \ + * **None** \ + * **Average** \ + * **Minimum** \ + * **Maximum** \ + * **Total** \ + * **Count** + */ +export type MetricAggregationType = string; + +/** Known values of {@link MetricCategory} that the service accepts. */ +export enum KnownMetricCategory { + Capacity = "Capacity", + Transaction = "Transaction" } /** - * Optional Parameters. - */ -export interface TriggersListByDataBoxEdgeDeviceOptionalParams extends msRest.RequestOptionsBase { - /** - * Specify $filter='CustomContextTag eq ' to filter on custom context tag property - */ - filter?: string; + * Defines values for MetricCategory. \ + * {@link KnownMetricCategory} can be used interchangeably with MetricCategory, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Capacity** \ + * **Transaction** + */ +export type MetricCategory = string; + +/** Known values of {@link TimeGrain} that the service accepts. */ +export enum KnownTimeGrain { + PT1M = "PT1M", + PT5M = "PT5M", + PT15M = "PT15M", + PT30M = "PT30M", + PT1H = "PT1H", + PT6H = "PT6H", + PT12H = "PT12H", + PT1D = "PT1D" } /** - * Optional Parameters. - */ -export interface UsersListByDataBoxEdgeDeviceOptionalParams extends msRest.RequestOptionsBase { - /** - * Specify $filter='UserType eq ' to filter on user type property - */ - filter?: string; + * Defines values for TimeGrain. \ + * {@link KnownTimeGrain} can be used interchangeably with TimeGrain, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **PT1M** \ + * **PT5M** \ + * **PT15M** \ + * **PT30M** \ + * **PT1H** \ + * **PT6H** \ + * **PT12H** \ + * **PT1D** + */ +export type TimeGrain = string; + +/** Known values of {@link SkuName} that the service accepts. */ +export enum KnownSkuName { + Gateway = "Gateway", + Edge = "Edge", + TEA1Node = "TEA_1Node", + TEA1NodeUPS = "TEA_1Node_UPS", + TEA1NodeHeater = "TEA_1Node_Heater", + TEA1NodeUPSHeater = "TEA_1Node_UPS_Heater", + TEA4NodeHeater = "TEA_4Node_Heater", + TEA4NodeUPSHeater = "TEA_4Node_UPS_Heater", + TMA = "TMA", + TDC = "TDC", + TCASmall = "TCA_Small", + GPU = "GPU", + TCALarge = "TCA_Large", + EdgePBase = "EdgeP_Base", + EdgePHigh = "EdgeP_High", + EdgePRBase = "EdgePR_Base", + EdgePRBaseUPS = "EdgePR_Base_UPS", + EP2641VPUW = "EP2_64_1VPU_W", + EP21281T4Mx1W = "EP2_128_1T4_Mx1_W", + EP22562T4W = "EP2_256_2T4_W", + EdgeMRMini = "EdgeMR_Mini", + RCASmall = "RCA_Small", + RCALarge = "RCA_Large", + RDC = "RDC", + Management = "Management" } /** - * Optional Parameters. - */ -export interface SkusListOptionalParams extends msRest.RequestOptionsBase { - /** - * Specify $filter='location eq ' to filter on location. - */ - filter?: string; + * Defines values for SkuName. \ + * {@link KnownSkuName} can be used interchangeably with SkuName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Gateway** \ + * **Edge** \ + * **TEA_1Node** \ + * **TEA_1Node_UPS** \ + * **TEA_1Node_Heater** \ + * **TEA_1Node_UPS_Heater** \ + * **TEA_4Node_Heater** \ + * **TEA_4Node_UPS_Heater** \ + * **TMA** \ + * **TDC** \ + * **TCA_Small** \ + * **GPU** \ + * **TCA_Large** \ + * **EdgeP_Base** \ + * **EdgeP_High** \ + * **EdgePR_Base** \ + * **EdgePR_Base_UPS** \ + * **EP2_64_1VPU_W** \ + * **EP2_128_1T4_Mx1_W** \ + * **EP2_256_2T4_W** \ + * **EdgeMR_Mini** \ + * **RCA_Small** \ + * **RCA_Large** \ + * **RDC** \ + * **Management** + */ +export type SkuName = string; + +/** Known values of {@link SkuTier} that the service accepts. */ +export enum KnownSkuTier { + Standard = "Standard" } /** - * An interface representing DataBoxEdgeManagementClientOptions. + * Defines values for SkuTier. \ + * {@link KnownSkuTier} can be used interchangeably with SkuTier, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Standard** */ -export interface DataBoxEdgeManagementClientOptions extends AzureServiceClientOptions { - baseUri?: string; +export type SkuTier = string; + +/** Known values of {@link SkuSignupOption} that the service accepts. */ +export enum KnownSkuSignupOption { + None = "None", + Available = "Available" } /** - * @interface - * The list of operations used for the discovery of available provider operations. - * @extends Array + * Defines values for SkuSignupOption. \ + * {@link KnownSkuSignupOption} can be used interchangeably with SkuSignupOption, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **Available** */ -export interface OperationsList extends Array { - /** - * Link to the next set of results. - */ - nextLink?: string; +export type SkuSignupOption = string; + +/** Known values of {@link SkuVersion} that the service accepts. */ +export enum KnownSkuVersion { + Stable = "Stable", + Preview = "Preview" } /** - * @interface - * The collection of Data Box Edge/Gateway devices. - * @extends Array + * Defines values for SkuVersion. \ + * {@link KnownSkuVersion} can be used interchangeably with SkuVersion, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Stable** \ + * **Preview** */ -export interface DataBoxEdgeDeviceList extends Array { - /** - * Link to the next set of results. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; +export type SkuVersion = string; + +/** Known values of {@link SkuAvailability} that the service accepts. */ +export enum KnownSkuAvailability { + Available = "Available", + Unavailable = "Unavailable" } /** - * @interface - * Collection of alerts. - * @extends Array + * Defines values for SkuAvailability. \ + * {@link KnownSkuAvailability} can be used interchangeably with SkuAvailability, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Available** \ + * **Unavailable** */ -export interface AlertList extends Array { - /** - * Link to the next set of results. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; +export type SkuAvailability = string; + +/** Known values of {@link ShipmentType} that the service accepts. */ +export enum KnownShipmentType { + NotApplicable = "NotApplicable", + ShippedToCustomer = "ShippedToCustomer", + SelfPickup = "SelfPickup" } /** - * @interface - * The collection of bandwidth schedules. - * @extends Array + * Defines values for ShipmentType. \ + * {@link KnownShipmentType} can be used interchangeably with ShipmentType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotApplicable** \ + * **ShippedToCustomer** \ + * **SelfPickup** */ -export interface BandwidthSchedulesList extends Array { - /** - * Link to the next set of results. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; +export type ShipmentType = string; + +/** Known values of {@link MsiIdentityType} that the service accepts. */ +export enum KnownMsiIdentityType { + None = "None", + SystemAssigned = "SystemAssigned", + UserAssigned = "UserAssigned" } /** - * @interface - * Collection of Nodes. - * @extends Array + * Defines values for MsiIdentityType. \ + * {@link KnownMsiIdentityType} can be used interchangeably with MsiIdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **SystemAssigned** \ + * **UserAssigned** */ -export interface NodeList extends Array { +export type MsiIdentityType = string; + +/** Known values of {@link DataBoxEdgeDeviceKind} that the service accepts. */ +export enum KnownDataBoxEdgeDeviceKind { + AzureDataBoxGateway = "AzureDataBoxGateway", + AzureStackEdge = "AzureStackEdge", + AzureStackHub = "AzureStackHub", + AzureModularDataCentre = "AzureModularDataCentre" } /** - * @interface - * List of order entities. - * @extends Array + * Defines values for DataBoxEdgeDeviceKind. \ + * {@link KnownDataBoxEdgeDeviceKind} can be used interchangeably with DataBoxEdgeDeviceKind, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AzureDataBoxGateway** \ + * **AzureStackEdge** \ + * **AzureStackHub** \ + * **AzureModularDataCentre** */ -export interface OrderList extends Array { - /** - * Link to the next set of results. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; +export type DataBoxEdgeDeviceKind = string; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + User = "User", + Application = "Application", + ManagedIdentity = "ManagedIdentity", + Key = "Key" } /** - * @interface - * Collection of all the roles on the Data Box Edge device. - * @extends Array - */ -export interface RoleList extends Array { - /** - * Link to the next set of results. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + +/** Known values of {@link DataBoxEdgeDeviceStatus} that the service accepts. */ +export enum KnownDataBoxEdgeDeviceStatus { + ReadyToSetup = "ReadyToSetup", + Online = "Online", + Offline = "Offline", + NeedsAttention = "NeedsAttention", + Disconnected = "Disconnected", + PartiallyDisconnected = "PartiallyDisconnected", + Maintenance = "Maintenance" } /** - * @interface - * Collection of all the shares on the Data Box Edge/Gateway device. - * @extends Array + * Defines values for DataBoxEdgeDeviceStatus. \ + * {@link KnownDataBoxEdgeDeviceStatus} can be used interchangeably with DataBoxEdgeDeviceStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ReadyToSetup** \ + * **Online** \ + * **Offline** \ + * **NeedsAttention** \ + * **Disconnected** \ + * **PartiallyDisconnected** \ + * **Maintenance** */ -export interface ShareList extends Array { - /** - * Link to the next set of results. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; +export type DataBoxEdgeDeviceStatus = string; + +/** Known values of {@link DeviceType} that the service accepts. */ +export enum KnownDeviceType { + DataBoxEdgeDevice = "DataBoxEdgeDevice" } /** - * @interface - * The collection of storage account credentials. - * @extends Array + * Defines values for DeviceType. \ + * {@link KnownDeviceType} can be used interchangeably with DeviceType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **DataBoxEdgeDevice** */ -export interface StorageAccountCredentialList extends Array { - /** - * Link to the next set of results. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; +export type DeviceType = string; + +/** Known values of {@link RoleTypes} that the service accepts. */ +export enum KnownRoleTypes { + IOT = "IOT", + ASA = "ASA", + Functions = "Functions", + Cognitive = "Cognitive", + MEC = "MEC", + CloudEdgeManagement = "CloudEdgeManagement", + Kubernetes = "Kubernetes" } /** - * @interface - * Collection of all the Storage Accounts on the Data Box Edge/Gateway device. - * @extends Array - */ -export interface StorageAccountList extends Array { - /** - * Link to the next set of results. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; + * Defines values for RoleTypes. \ + * {@link KnownRoleTypes} can be used interchangeably with RoleTypes, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IOT** \ + * **ASA** \ + * **Functions** \ + * **Cognitive** \ + * **MEC** \ + * **CloudEdgeManagement** \ + * **Kubernetes** + */ +export type RoleTypes = string; + +/** Known values of {@link ResourceMoveStatus} that the service accepts. */ +export enum KnownResourceMoveStatus { + None = "None", + ResourceMoveInProgress = "ResourceMoveInProgress", + ResourceMoveFailed = "ResourceMoveFailed" } /** - * @interface - * Collection of all the containers on the Data Box Edge/Gateway device. - * @extends Array + * Defines values for ResourceMoveStatus. \ + * {@link KnownResourceMoveStatus} can be used interchangeably with ResourceMoveStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **ResourceMoveInProgress** \ + * **ResourceMoveFailed** */ -export interface ContainerList extends Array { - /** - * Link to the next set of results. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; +export type ResourceMoveStatus = string; + +/** Known values of {@link SubscriptionState} that the service accepts. */ +export enum KnownSubscriptionState { + Registered = "Registered", + Warned = "Warned", + Suspended = "Suspended", + Deleted = "Deleted", + Unregistered = "Unregistered" } /** - * @interface - * Collection of all trigger on the data box edge device. - * @extends Array + * Defines values for SubscriptionState. \ + * {@link KnownSubscriptionState} can be used interchangeably with SubscriptionState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Registered** \ + * **Warned** \ + * **Suspended** \ + * **Deleted** \ + * **Unregistered** */ -export interface TriggerList extends Array { - /** - * Link to the next set of results. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; +export type SubscriptionState = string; + +/** Known values of {@link DataResidencyType} that the service accepts. */ +export enum KnownDataResidencyType { + GeoZoneReplication = "GeoZoneReplication", + ZoneReplication = "ZoneReplication" } /** - * @interface - * Collection of users. - * @extends Array + * Defines values for DataResidencyType. \ + * {@link KnownDataResidencyType} can be used interchangeably with DataResidencyType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **GeoZoneReplication** \ + * **ZoneReplication** */ -export interface UserList extends Array { - /** - * Link to the next set of results. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; +export type DataResidencyType = string; + +/** Known values of {@link AlertSeverity} that the service accepts. */ +export enum KnownAlertSeverity { + Informational = "Informational", + Warning = "Warning", + Critical = "Critical" } /** - * @interface - * List of SKU Information objects - * @extends Array - */ -export interface SkuInformationList extends Array { - /** - * Links to the next set of results - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; + * Defines values for AlertSeverity. \ + * {@link KnownAlertSeverity} can be used interchangeably with AlertSeverity, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Informational** \ + * **Warning** \ + * **Critical** + */ +export type AlertSeverity = string; + +/** Known values of {@link DayOfWeek} that the service accepts. */ +export enum KnownDayOfWeek { + Sunday = "Sunday", + Monday = "Monday", + Tuesday = "Tuesday", + Wednesday = "Wednesday", + Thursday = "Thursday", + Friday = "Friday", + Saturday = "Saturday" } /** - * Defines values for AlertSeverity. - * Possible values include: 'Informational', 'Warning', 'Critical' - * @readonly - * @enum {string} - */ -export type AlertSeverity = 'Informational' | 'Warning' | 'Critical'; + * Defines values for DayOfWeek. \ + * {@link KnownDayOfWeek} can be used interchangeably with DayOfWeek, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Sunday** \ + * **Monday** \ + * **Tuesday** \ + * **Wednesday** \ + * **Thursday** \ + * **Friday** \ + * **Saturday** + */ +export type DayOfWeek = string; + +/** Known values of {@link ProactiveDiagnosticsConsent} that the service accepts. */ +export enum KnownProactiveDiagnosticsConsent { + Enabled = "Enabled", + Disabled = "Disabled" +} /** - * Defines values for EncryptionAlgorithm. - * Possible values include: 'None', 'AES256', 'RSAES_PKCS1_v_1_5' - * @readonly - * @enum {string} + * Defines values for ProactiveDiagnosticsConsent. \ + * {@link KnownProactiveDiagnosticsConsent} can be used interchangeably with ProactiveDiagnosticsConsent, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** */ -export type EncryptionAlgorithm = 'None' | 'AES256' | 'RSAES_PKCS1_v_1_5'; +export type ProactiveDiagnosticsConsent = string; -/** - * Defines values for AzureContainerDataFormat. - * Possible values include: 'BlockBlob', 'PageBlob', 'AzureFile' - * @readonly - * @enum {string} - */ -export type AzureContainerDataFormat = 'BlockBlob' | 'PageBlob' | 'AzureFile'; +/** Known values of {@link RemoteApplicationType} that the service accepts. */ +export enum KnownRemoteApplicationType { + Powershell = "Powershell", + WAC = "WAC", + LocalUI = "LocalUI", + AllApplications = "AllApplications" +} /** - * Defines values for DayOfWeek. - * Possible values include: 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', - * 'Saturday' - * @readonly - * @enum {string} + * Defines values for RemoteApplicationType. \ + * {@link KnownRemoteApplicationType} can be used interchangeably with RemoteApplicationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Powershell** \ + * **WAC** \ + * **LocalUI** \ + * **AllApplications** */ -export type DayOfWeek = 'Sunday' | 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday'; +export type RemoteApplicationType = string; -/** - * Defines values for ClientPermissionType. - * Possible values include: 'NoAccess', 'ReadOnly', 'ReadWrite' - * @readonly - * @enum {string} - */ -export type ClientPermissionType = 'NoAccess' | 'ReadOnly' | 'ReadWrite'; +/** Known values of {@link AccessLevel} that the service accepts. */ +export enum KnownAccessLevel { + None = "None", + ReadOnly = "ReadOnly", + ReadWrite = "ReadWrite", + FullAccess = "FullAccess" +} /** - * Defines values for ContainerStatus. - * Possible values include: 'OK', 'Offline', 'Unknown', 'Updating', 'NeedsAttention' - * @readonly - * @enum {string} - */ -export type ContainerStatus = 'OK' | 'Offline' | 'Unknown' | 'Updating' | 'NeedsAttention'; + * Defines values for AccessLevel. \ + * {@link KnownAccessLevel} can be used interchangeably with AccessLevel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **ReadOnly** \ + * **ReadWrite** \ + * **FullAccess** + */ +export type AccessLevel = string; + +/** Known values of {@link KeyVaultSyncStatus} that the service accepts. */ +export enum KnownKeyVaultSyncStatus { + KeyVaultSynced = "KeyVaultSynced", + KeyVaultSyncFailed = "KeyVaultSyncFailed", + KeyVaultNotConfigured = "KeyVaultNotConfigured", + KeyVaultSyncPending = "KeyVaultSyncPending", + KeyVaultSyncing = "KeyVaultSyncing", + KeyVaultNotSynced = "KeyVaultNotSynced" +} /** - * Defines values for SkuName. - * Possible values include: 'Gateway', 'Edge', 'TEA_1Node', 'TEA_1Node_UPS', 'TEA_1Node_Heater', - * 'TEA_1Node_UPS_Heater', 'TEA_4Node_Heater', 'TEA_4Node_UPS_Heater', 'TMA' - * @readonly - * @enum {string} - */ -export type SkuName = 'Gateway' | 'Edge' | 'TEA_1Node' | 'TEA_1Node_UPS' | 'TEA_1Node_Heater' | 'TEA_1Node_UPS_Heater' | 'TEA_4Node_Heater' | 'TEA_4Node_UPS_Heater' | 'TMA'; + * Defines values for KeyVaultSyncStatus. \ + * {@link KnownKeyVaultSyncStatus} can be used interchangeably with KeyVaultSyncStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **KeyVaultSynced** \ + * **KeyVaultSyncFailed** \ + * **KeyVaultNotConfigured** \ + * **KeyVaultSyncPending** \ + * **KeyVaultSyncing** \ + * **KeyVaultNotSynced** + */ +export type KeyVaultSyncStatus = string; + +/** Known values of {@link EncryptionAlgorithm} that the service accepts. */ +export enum KnownEncryptionAlgorithm { + None = "None", + AES256 = "AES256", + RsaesPkcs1V15 = "RSAES_PKCS1_v_1_5" +} /** - * Defines values for SkuTier. - * Possible values include: 'Standard' - * @readonly - * @enum {string} - */ -export type SkuTier = 'Standard'; + * Defines values for EncryptionAlgorithm. \ + * {@link KnownEncryptionAlgorithm} can be used interchangeably with EncryptionAlgorithm, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **AES256** \ + * **RSAES_PKCS1_v_1_5** + */ +export type EncryptionAlgorithm = string; + +/** Known values of {@link JobStatus} that the service accepts. */ +export enum KnownJobStatus { + Invalid = "Invalid", + Running = "Running", + Succeeded = "Succeeded", + Failed = "Failed", + Canceled = "Canceled", + Paused = "Paused", + Scheduled = "Scheduled" +} /** - * Defines values for DataBoxEdgeDeviceStatus. - * Possible values include: 'ReadyToSetup', 'Online', 'Offline', 'NeedsAttention', 'Disconnected', - * 'PartiallyDisconnected', 'Maintenance' - * @readonly - * @enum {string} - */ -export type DataBoxEdgeDeviceStatus = 'ReadyToSetup' | 'Online' | 'Offline' | 'NeedsAttention' | 'Disconnected' | 'PartiallyDisconnected' | 'Maintenance'; + * Defines values for JobStatus. \ + * {@link KnownJobStatus} can be used interchangeably with JobStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **Running** \ + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Paused** \ + * **Scheduled** + */ +export type JobStatus = string; + +/** Known values of {@link JobType} that the service accepts. */ +export enum KnownJobType { + Invalid = "Invalid", + ScanForUpdates = "ScanForUpdates", + DownloadUpdates = "DownloadUpdates", + InstallUpdates = "InstallUpdates", + RefreshShare = "RefreshShare", + RefreshContainer = "RefreshContainer", + Backup = "Backup", + Restore = "Restore", + TriggerSupportPackage = "TriggerSupportPackage" +} /** - * Defines values for DeviceType. - * Possible values include: 'DataBoxEdgeDevice' - * @readonly - * @enum {string} - */ -export type DeviceType = 'DataBoxEdgeDevice'; + * Defines values for JobType. \ + * {@link KnownJobType} can be used interchangeably with JobType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **ScanForUpdates** \ + * **DownloadUpdates** \ + * **InstallUpdates** \ + * **RefreshShare** \ + * **RefreshContainer** \ + * **Backup** \ + * **Restore** \ + * **TriggerSupportPackage** + */ +export type JobType = string; + +/** Known values of {@link UpdateOperationStage} that the service accepts. */ +export enum KnownUpdateOperationStage { + Unknown = "Unknown", + Initial = "Initial", + ScanStarted = "ScanStarted", + ScanComplete = "ScanComplete", + ScanFailed = "ScanFailed", + DownloadStarted = "DownloadStarted", + DownloadComplete = "DownloadComplete", + DownloadFailed = "DownloadFailed", + InstallStarted = "InstallStarted", + InstallComplete = "InstallComplete", + InstallFailed = "InstallFailed", + RebootInitiated = "RebootInitiated", + Success = "Success", + Failure = "Failure", + RescanStarted = "RescanStarted", + RescanComplete = "RescanComplete", + RescanFailed = "RescanFailed" +} /** - * Defines values for RoleTypes. - * Possible values include: 'IOT', 'ASA', 'Functions', 'Cognitive' - * @readonly - * @enum {string} - */ -export type RoleTypes = 'IOT' | 'ASA' | 'Functions' | 'Cognitive'; + * Defines values for UpdateOperationStage. \ + * {@link KnownUpdateOperationStage} can be used interchangeably with UpdateOperationStage, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **Initial** \ + * **ScanStarted** \ + * **ScanComplete** \ + * **ScanFailed** \ + * **DownloadStarted** \ + * **DownloadComplete** \ + * **DownloadFailed** \ + * **InstallStarted** \ + * **InstallComplete** \ + * **InstallFailed** \ + * **RebootInitiated** \ + * **Success** \ + * **Failure** \ + * **RescanStarted** \ + * **RescanComplete** \ + * **RescanFailed** + */ +export type UpdateOperationStage = string; + +/** Known values of {@link DownloadPhase} that the service accepts. */ +export enum KnownDownloadPhase { + Unknown = "Unknown", + Initializing = "Initializing", + Downloading = "Downloading", + Verifying = "Verifying" +} /** - * Defines values for PlatformType. - * Possible values include: 'Windows', 'Linux' - * @readonly - * @enum {string} + * Defines values for DownloadPhase. \ + * {@link KnownDownloadPhase} can be used interchangeably with DownloadPhase, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **Initializing** \ + * **Downloading** \ + * **Verifying** */ -export type PlatformType = 'Windows' | 'Linux'; +export type DownloadPhase = string; -/** - * Defines values for RoleStatus. - * Possible values include: 'Enabled', 'Disabled' - * @readonly - * @enum {string} - */ -export type RoleStatus = 'Enabled' | 'Disabled'; +/** Known values of {@link NetworkGroup} that the service accepts. */ +export enum KnownNetworkGroup { + None = "None", + NonRdma = "NonRDMA", + Rdma = "RDMA" +} /** - * Defines values for JobStatus. - * Possible values include: 'Invalid', 'Running', 'Succeeded', 'Failed', 'Canceled', 'Paused', - * 'Scheduled' - * @readonly - * @enum {string} + * Defines values for NetworkGroup. \ + * {@link KnownNetworkGroup} can be used interchangeably with NetworkGroup, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **NonRDMA** \ + * **RDMA** */ -export type JobStatus = 'Invalid' | 'Running' | 'Succeeded' | 'Failed' | 'Canceled' | 'Paused' | 'Scheduled'; +export type NetworkGroup = string; -/** - * Defines values for JobType. - * Possible values include: 'Invalid', 'ScanForUpdates', 'DownloadUpdates', 'InstallUpdates', - * 'RefreshShare', 'RefreshContainer' - * @readonly - * @enum {string} - */ -export type JobType = 'Invalid' | 'ScanForUpdates' | 'DownloadUpdates' | 'InstallUpdates' | 'RefreshShare' | 'RefreshContainer'; +/** Known values of {@link NetworkAdapterStatus} that the service accepts. */ +export enum KnownNetworkAdapterStatus { + Inactive = "Inactive", + Active = "Active" +} /** - * Defines values for UpdateOperationStage. - * Possible values include: 'Unknown', 'Initial', 'ScanStarted', 'ScanComplete', 'ScanFailed', - * 'DownloadStarted', 'DownloadComplete', 'DownloadFailed', 'InstallStarted', 'InstallComplete', - * 'InstallFailed', 'RebootInitiated', 'Success', 'Failure', 'RescanStarted', 'RescanComplete', - * 'RescanFailed' - * @readonly - * @enum {string} + * Defines values for NetworkAdapterStatus. \ + * {@link KnownNetworkAdapterStatus} can be used interchangeably with NetworkAdapterStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Inactive** \ + * **Active** */ -export type UpdateOperationStage = 'Unknown' | 'Initial' | 'ScanStarted' | 'ScanComplete' | 'ScanFailed' | 'DownloadStarted' | 'DownloadComplete' | 'DownloadFailed' | 'InstallStarted' | 'InstallComplete' | 'InstallFailed' | 'RebootInitiated' | 'Success' | 'Failure' | 'RescanStarted' | 'RescanComplete' | 'RescanFailed'; +export type NetworkAdapterStatus = string; -/** - * Defines values for DownloadPhase. - * Possible values include: 'Unknown', 'Initializing', 'Downloading', 'Verifying' - * @readonly - * @enum {string} - */ -export type DownloadPhase = 'Unknown' | 'Initializing' | 'Downloading' | 'Verifying'; +/** Known values of {@link NetworkAdapterRdmaStatus} that the service accepts. */ +export enum KnownNetworkAdapterRdmaStatus { + Incapable = "Incapable", + Capable = "Capable" +} /** - * Defines values for MetricUnit. - * Possible values include: 'NotSpecified', 'Percent', 'Count', 'Seconds', 'Milliseconds', 'Bytes', - * 'BytesPerSecond', 'CountPerSecond' - * @readonly - * @enum {string} + * Defines values for NetworkAdapterRdmaStatus. \ + * {@link KnownNetworkAdapterRdmaStatus} can be used interchangeably with NetworkAdapterRdmaStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Incapable** \ + * **Capable** */ -export type MetricUnit = 'NotSpecified' | 'Percent' | 'Count' | 'Seconds' | 'Milliseconds' | 'Bytes' | 'BytesPerSecond' | 'CountPerSecond'; +export type NetworkAdapterRdmaStatus = string; -/** - * Defines values for MetricAggregationType. - * Possible values include: 'NotSpecified', 'None', 'Average', 'Minimum', 'Maximum', 'Total', - * 'Count' - * @readonly - * @enum {string} - */ -export type MetricAggregationType = 'NotSpecified' | 'None' | 'Average' | 'Minimum' | 'Maximum' | 'Total' | 'Count'; +/** Known values of {@link NetworkAdapterDhcpStatus} that the service accepts. */ +export enum KnownNetworkAdapterDhcpStatus { + Disabled = "Disabled", + Enabled = "Enabled" +} /** - * Defines values for MetricCategory. - * Possible values include: 'Capacity', 'Transaction' - * @readonly - * @enum {string} + * Defines values for NetworkAdapterDhcpStatus. \ + * {@link KnownNetworkAdapterDhcpStatus} can be used interchangeably with NetworkAdapterDhcpStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Disabled** \ + * **Enabled** */ -export type MetricCategory = 'Capacity' | 'Transaction'; +export type NetworkAdapterDhcpStatus = string; -/** - * Defines values for TimeGrain. - * Possible values include: 'PT1M', 'PT5M', 'PT15M', 'PT30M', 'PT1H', 'PT6H', 'PT12H', 'PT1D' - * @readonly - * @enum {string} - */ -export type TimeGrain = 'PT1M' | 'PT5M' | 'PT15M' | 'PT30M' | 'PT1H' | 'PT6H' | 'PT12H' | 'PT1D'; +/** Known values of {@link NodeStatus} that the service accepts. */ +export enum KnownNodeStatus { + Unknown = "Unknown", + Up = "Up", + Down = "Down", + Rebooting = "Rebooting", + ShuttingDown = "ShuttingDown" +} /** - * Defines values for NetworkGroup. - * Possible values include: 'None', 'NonRDMA', 'RDMA' - * @readonly - * @enum {string} - */ -export type NetworkGroup = 'None' | 'NonRDMA' | 'RDMA'; + * Defines values for NodeStatus. \ + * {@link KnownNodeStatus} can be used interchangeably with NodeStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown** \ + * **Up** \ + * **Down** \ + * **Rebooting** \ + * **ShuttingDown** + */ +export type NodeStatus = string; + +/** Known values of {@link OrderState} that the service accepts. */ +export enum KnownOrderState { + Untracked = "Untracked", + AwaitingFulfillment = "AwaitingFulfillment", + AwaitingPreparation = "AwaitingPreparation", + AwaitingShipment = "AwaitingShipment", + Shipped = "Shipped", + Arriving = "Arriving", + Delivered = "Delivered", + ReplacementRequested = "ReplacementRequested", + LostDevice = "LostDevice", + Declined = "Declined", + ReturnInitiated = "ReturnInitiated", + AwaitingReturnShipment = "AwaitingReturnShipment", + ShippedBack = "ShippedBack", + CollectedAtMicrosoft = "CollectedAtMicrosoft", + AwaitingPickup = "AwaitingPickup", + PickupCompleted = "PickupCompleted", + AwaitingDrop = "AwaitingDrop" +} /** - * Defines values for NetworkAdapterStatus. - * Possible values include: 'Inactive', 'Active' - * @readonly - * @enum {string} - */ -export type NetworkAdapterStatus = 'Inactive' | 'Active'; + * Defines values for OrderState. \ + * {@link KnownOrderState} can be used interchangeably with OrderState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Untracked** \ + * **AwaitingFulfillment** \ + * **AwaitingPreparation** \ + * **AwaitingShipment** \ + * **Shipped** \ + * **Arriving** \ + * **Delivered** \ + * **ReplacementRequested** \ + * **LostDevice** \ + * **Declined** \ + * **ReturnInitiated** \ + * **AwaitingReturnShipment** \ + * **ShippedBack** \ + * **CollectedAtMicrosoft** \ + * **AwaitingPickup** \ + * **PickupCompleted** \ + * **AwaitingDrop** + */ +export type OrderState = string; + +/** Known values of {@link AddonType} that the service accepts. */ +export enum KnownAddonType { + IotEdge = "IotEdge", + ArcForKubernetes = "ArcForKubernetes" +} /** - * Defines values for NetworkAdapterRDMAStatus. - * Possible values include: 'Incapable', 'Capable' - * @readonly - * @enum {string} + * Defines values for AddonType. \ + * {@link KnownAddonType} can be used interchangeably with AddonType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **IotEdge** \ + * **ArcForKubernetes** */ -export type NetworkAdapterRDMAStatus = 'Incapable' | 'Capable'; +export type AddonType = string; -/** - * Defines values for NetworkAdapterDHCPStatus. - * Possible values include: 'Disabled', 'Enabled' - * @readonly - * @enum {string} - */ -export type NetworkAdapterDHCPStatus = 'Disabled' | 'Enabled'; +/** Known values of {@link ShareStatus} that the service accepts. */ +export enum KnownShareStatus { + Offline = "Offline", + Unknown = "Unknown", + OK = "OK", + Updating = "Updating", + NeedsAttention = "NeedsAttention" +} /** - * Defines values for NodeStatus. - * Possible values include: 'Unknown', 'Up', 'Down', 'Rebooting', 'ShuttingDown' - * @readonly - * @enum {string} + * Defines values for ShareStatus. \ + * {@link KnownShareStatus} can be used interchangeably with ShareStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Offline** \ + * **Unknown** \ + * **OK** \ + * **Updating** \ + * **NeedsAttention** */ -export type NodeStatus = 'Unknown' | 'Up' | 'Down' | 'Rebooting' | 'ShuttingDown'; +export type ShareStatus = string; -/** - * Defines values for OrderState. - * Possible values include: 'Untracked', 'AwaitingFulfilment', 'AwaitingPreparation', - * 'AwaitingShipment', 'Shipped', 'Arriving', 'Delivered', 'ReplacementRequested', 'LostDevice', - * 'Declined', 'ReturnInitiated', 'AwaitingReturnShipment', 'ShippedBack', 'CollectedAtMicrosoft' - * @readonly - * @enum {string} - */ -export type OrderState = 'Untracked' | 'AwaitingFulfilment' | 'AwaitingPreparation' | 'AwaitingShipment' | 'Shipped' | 'Arriving' | 'Delivered' | 'ReplacementRequested' | 'LostDevice' | 'Declined' | 'ReturnInitiated' | 'AwaitingReturnShipment' | 'ShippedBack' | 'CollectedAtMicrosoft'; +/** Known values of {@link MonitoringStatus} that the service accepts. */ +export enum KnownMonitoringStatus { + Enabled = "Enabled", + Disabled = "Disabled" +} /** - * Defines values for AuthenticationType. - * Possible values include: 'Invalid', 'AzureActiveDirectory' - * @readonly - * @enum {string} + * Defines values for MonitoringStatus. \ + * {@link KnownMonitoringStatus} can be used interchangeably with MonitoringStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** */ -export type AuthenticationType = 'Invalid' | 'AzureActiveDirectory'; +export type MonitoringStatus = string; -/** - * Defines values for SkuRestrictionReasonCode. - * Possible values include: 'NotAvailableForSubscription', 'QuotaId' - * @readonly - * @enum {string} - */ -export type SkuRestrictionReasonCode = 'NotAvailableForSubscription' | 'QuotaId'; +/** Known values of {@link AzureContainerDataFormat} that the service accepts. */ +export enum KnownAzureContainerDataFormat { + BlockBlob = "BlockBlob", + PageBlob = "PageBlob", + AzureFile = "AzureFile" +} /** - * Defines values for ShareStatus. - * Possible values include: 'Offline', 'Unknown', 'OK', 'Updating', 'NeedsAttention' - * @readonly - * @enum {string} + * Defines values for AzureContainerDataFormat. \ + * {@link KnownAzureContainerDataFormat} can be used interchangeably with AzureContainerDataFormat, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **BlockBlob** \ + * **PageBlob** \ + * **AzureFile** */ -export type ShareStatus = 'Offline' | 'Unknown' | 'OK' | 'Updating' | 'NeedsAttention'; +export type AzureContainerDataFormat = string; -/** - * Defines values for MonitoringStatus. - * Possible values include: 'Enabled', 'Disabled' - * @readonly - * @enum {string} - */ -export type MonitoringStatus = 'Enabled' | 'Disabled'; +/** Known values of {@link ShareAccessProtocol} that the service accepts. */ +export enum KnownShareAccessProtocol { + SMB = "SMB", + NFS = "NFS" +} /** - * Defines values for ShareAccessProtocol. - * Possible values include: 'SMB', 'NFS' - * @readonly - * @enum {string} + * Defines values for ShareAccessProtocol. \ + * {@link KnownShareAccessProtocol} can be used interchangeably with ShareAccessProtocol, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SMB** \ + * **NFS** */ -export type ShareAccessProtocol = 'SMB' | 'NFS'; +export type ShareAccessProtocol = string; -/** - * Defines values for ShareAccessType. - * Possible values include: 'Change', 'Read', 'Custom' - * @readonly - * @enum {string} - */ -export type ShareAccessType = 'Change' | 'Read' | 'Custom'; +/** Known values of {@link ShareAccessType} that the service accepts. */ +export enum KnownShareAccessType { + Change = "Change", + Read = "Read", + Custom = "Custom" +} /** - * Defines values for DataPolicy. - * Possible values include: 'Cloud', 'Local' - * @readonly - * @enum {string} + * Defines values for ShareAccessType. \ + * {@link KnownShareAccessType} can be used interchangeably with ShareAccessType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Change** \ + * **Read** \ + * **Custom** */ -export type DataPolicy = 'Cloud' | 'Local'; +export type ShareAccessType = string; -/** - * Defines values for StorageAccountStatus. - * Possible values include: 'OK', 'Offline', 'Unknown', 'Updating', 'NeedsAttention' - * @readonly - * @enum {string} - */ -export type StorageAccountStatus = 'OK' | 'Offline' | 'Unknown' | 'Updating' | 'NeedsAttention'; +/** Known values of {@link ClientPermissionType} that the service accepts. */ +export enum KnownClientPermissionType { + NoAccess = "NoAccess", + ReadOnly = "ReadOnly", + ReadWrite = "ReadWrite" +} /** - * Defines values for SSLStatus. - * Possible values include: 'Enabled', 'Disabled' - * @readonly - * @enum {string} + * Defines values for ClientPermissionType. \ + * {@link KnownClientPermissionType} can be used interchangeably with ClientPermissionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NoAccess** \ + * **ReadOnly** \ + * **ReadWrite** */ -export type SSLStatus = 'Enabled' | 'Disabled'; +export type ClientPermissionType = string; -/** - * Defines values for AccountType. - * Possible values include: 'GeneralPurposeStorage', 'BlobStorage' - * @readonly - * @enum {string} - */ -export type AccountType = 'GeneralPurposeStorage' | 'BlobStorage'; +/** Known values of {@link MountType} that the service accepts. */ +export enum KnownMountType { + Volume = "Volume", + HostPath = "HostPath" +} /** - * Defines values for InstallRebootBehavior. - * Possible values include: 'NeverReboots', 'RequiresReboot', 'RequestReboot' - * @readonly - * @enum {string} + * Defines values for MountType. \ + * {@link KnownMountType} can be used interchangeably with MountType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Volume** \ + * **HostPath** */ -export type InstallRebootBehavior = 'NeverReboots' | 'RequiresReboot' | 'RequestReboot'; +export type MountType = string; -/** - * Defines values for UpdateOperation. - * Possible values include: 'None', 'Scan', 'Download', 'Install' - * @readonly - * @enum {string} - */ -export type UpdateOperation = 'None' | 'Scan' | 'Download' | 'Install'; +/** Known values of {@link DataPolicy} that the service accepts. */ +export enum KnownDataPolicy { + Cloud = "Cloud", + Local = "Local" +} /** - * Defines values for UserType. - * Possible values include: 'Share', 'LocalManagement', 'ARM' - * @readonly - * @enum {string} + * Defines values for DataPolicy. \ + * {@link KnownDataPolicy} can be used interchangeably with DataPolicy, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Cloud** \ + * **Local** */ -export type UserType = 'Share' | 'LocalManagement' | 'ARM'; +export type DataPolicy = string; + +/** Known values of {@link SSLStatus} that the service accepts. */ +export enum KnownSSLStatus { + Enabled = "Enabled", + Disabled = "Disabled" +} /** - * Contains response data for the list operation. + * Defines values for SSLStatus. \ + * {@link KnownSSLStatus} can be used interchangeably with SSLStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** */ -export type OperationsListResponse = OperationsList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type SSLStatus = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationsList; - }; -}; +/** Known values of {@link AccountType} that the service accepts. */ +export enum KnownAccountType { + GeneralPurposeStorage = "GeneralPurposeStorage", + BlobStorage = "BlobStorage" +} /** - * Contains response data for the listNext operation. + * Defines values for AccountType. \ + * {@link KnownAccountType} can be used interchangeably with AccountType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **GeneralPurposeStorage** \ + * **BlobStorage** */ -export type OperationsListNextResponse = OperationsList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type AccountType = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationsList; - }; -}; +/** Known values of {@link StorageAccountStatus} that the service accepts. */ +export enum KnownStorageAccountStatus { + OK = "OK", + Offline = "Offline", + Unknown = "Unknown", + Updating = "Updating", + NeedsAttention = "NeedsAttention" +} /** - * Contains response data for the listBySubscription operation. - */ -export type DevicesListBySubscriptionResponse = DataBoxEdgeDeviceList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DataBoxEdgeDeviceList; - }; -}; + * Defines values for StorageAccountStatus. \ + * {@link KnownStorageAccountStatus} can be used interchangeably with StorageAccountStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **OK** \ + * **Offline** \ + * **Unknown** \ + * **Updating** \ + * **NeedsAttention** + */ +export type StorageAccountStatus = string; + +/** Known values of {@link ContainerStatus} that the service accepts. */ +export enum KnownContainerStatus { + OK = "OK", + Offline = "Offline", + Unknown = "Unknown", + Updating = "Updating", + NeedsAttention = "NeedsAttention" +} /** - * Contains response data for the listByResourceGroup operation. + * Defines values for ContainerStatus. \ + * {@link KnownContainerStatus} can be used interchangeably with ContainerStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **OK** \ + * **Offline** \ + * **Unknown** \ + * **Updating** \ + * **NeedsAttention** */ -export type DevicesListByResourceGroupResponse = DataBoxEdgeDeviceList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type ContainerStatus = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DataBoxEdgeDeviceList; - }; -}; +/** Known values of {@link TriggerEventType} that the service accepts. */ +export enum KnownTriggerEventType { + FileEvent = "FileEvent", + PeriodicTimerEvent = "PeriodicTimerEvent" +} /** - * Contains response data for the get operation. + * Defines values for TriggerEventType. \ + * {@link KnownTriggerEventType} can be used interchangeably with TriggerEventType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **FileEvent** \ + * **PeriodicTimerEvent** */ -export type DevicesGetResponse = DataBoxEdgeDevice & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type TriggerEventType = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DataBoxEdgeDevice; - }; -}; +/** Known values of {@link InstallRebootBehavior} that the service accepts. */ +export enum KnownInstallRebootBehavior { + NeverReboots = "NeverReboots", + RequiresReboot = "RequiresReboot", + RequestReboot = "RequestReboot" +} /** - * Contains response data for the createOrUpdate operation. + * Defines values for InstallRebootBehavior. \ + * {@link KnownInstallRebootBehavior} can be used interchangeably with InstallRebootBehavior, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NeverReboots** \ + * **RequiresReboot** \ + * **RequestReboot** */ -export type DevicesCreateOrUpdateResponse = DataBoxEdgeDevice & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type InstallRebootBehavior = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DataBoxEdgeDevice; - }; -}; +/** Known values of {@link UpdateOperation} that the service accepts. */ +export enum KnownUpdateOperation { + None = "None", + Scan = "Scan", + Download = "Download", + Install = "Install" +} /** - * Contains response data for the update operation. + * Defines values for UpdateOperation. \ + * {@link KnownUpdateOperation} can be used interchangeably with UpdateOperation, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **Scan** \ + * **Download** \ + * **Install** */ -export type DevicesUpdateResponse = DataBoxEdgeDevice & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type UpdateOperation = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DataBoxEdgeDevice; - }; -}; +/** Known values of {@link UpdateType} that the service accepts. */ +export enum KnownUpdateType { + Software = "Software", + Kubernetes = "Kubernetes", + Firmware = "Firmware" +} /** - * Contains response data for the getExtendedInformation operation. + * Defines values for UpdateType. \ + * {@link KnownUpdateType} can be used interchangeably with UpdateType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Software** \ + * **Kubernetes** \ + * **Firmware** */ -export type DevicesGetExtendedInformationResponse = DataBoxEdgeDeviceExtendedInfo & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type UpdateType = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DataBoxEdgeDeviceExtendedInfo; - }; -}; +/** Known values of {@link InstallationImpact} that the service accepts. */ +export enum KnownInstallationImpact { + None = "None", + DeviceRebooted = "DeviceRebooted", + KubernetesWorkloadsDown = "KubernetesWorkloadsDown" +} /** - * Contains response data for the getNetworkSettings operation. + * Defines values for InstallationImpact. \ + * {@link KnownInstallationImpact} can be used interchangeably with InstallationImpact, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **DeviceRebooted** \ + * **KubernetesWorkloadsDown** */ -export type DevicesGetNetworkSettingsResponse = NetworkSettings & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type InstallationImpact = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: NetworkSettings; - }; -}; +/** Known values of {@link UpdateStatus} that the service accepts. */ +export enum KnownUpdateStatus { + DownloadPending = "DownloadPending", + DownloadStarted = "DownloadStarted", + DownloadCompleted = "DownloadCompleted", + InstallStarted = "InstallStarted", + InstallCompleted = "InstallCompleted" +} /** - * Contains response data for the getUpdateSummary operation. + * Defines values for UpdateStatus. \ + * {@link KnownUpdateStatus} can be used interchangeably with UpdateStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **DownloadPending** \ + * **DownloadStarted** \ + * **DownloadCompleted** \ + * **InstallStarted** \ + * **InstallCompleted** */ -export type DevicesGetUpdateSummaryResponse = UpdateSummary & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type UpdateStatus = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UpdateSummary; - }; -}; +/** Known values of {@link AuthenticationType} that the service accepts. */ +export enum KnownAuthenticationType { + Invalid = "Invalid", + AzureActiveDirectory = "AzureActiveDirectory" +} /** - * Contains response data for the uploadCertificate operation. + * Defines values for AuthenticationType. \ + * {@link KnownAuthenticationType} can be used interchangeably with AuthenticationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **AzureActiveDirectory** */ -export type DevicesUploadCertificateResponse = UploadCertificateResponse & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type AuthenticationType = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UploadCertificateResponse; - }; -}; +/** Known values of {@link UserType} that the service accepts. */ +export enum KnownUserType { + Share = "Share", + LocalManagement = "LocalManagement", + ARM = "ARM" +} /** - * Contains response data for the beginCreateOrUpdate operation. + * Defines values for UserType. \ + * {@link KnownUserType} can be used interchangeably with UserType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Share** \ + * **LocalManagement** \ + * **ARM** */ -export type DevicesBeginCreateOrUpdateResponse = DataBoxEdgeDevice & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type UserType = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DataBoxEdgeDevice; - }; -}; +/** Known values of {@link PlatformType} that the service accepts. */ +export enum KnownPlatformType { + Windows = "Windows", + Linux = "Linux" +} /** - * Contains response data for the listBySubscriptionNext operation. + * Defines values for PlatformType. \ + * {@link KnownPlatformType} can be used interchangeably with PlatformType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Windows** \ + * **Linux** */ -export type DevicesListBySubscriptionNextResponse = DataBoxEdgeDeviceList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type PlatformType = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DataBoxEdgeDeviceList; - }; -}; +/** Known values of {@link HostPlatformType} that the service accepts. */ +export enum KnownHostPlatformType { + KubernetesCluster = "KubernetesCluster", + LinuxVM = "LinuxVM" +} /** - * Contains response data for the listByResourceGroupNext operation. - */ -export type DevicesListByResourceGroupNextResponse = DataBoxEdgeDeviceList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + * Defines values for HostPlatformType. \ + * {@link KnownHostPlatformType} can be used interchangeably with HostPlatformType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **KubernetesCluster** \ + * **LinuxVM** + */ +export type HostPlatformType = string; + +/** Known values of {@link AddonState} that the service accepts. */ +export enum KnownAddonState { + Invalid = "Invalid", + Creating = "Creating", + Created = "Created", + Updating = "Updating", + Reconfiguring = "Reconfiguring", + Failed = "Failed", + Deleting = "Deleting" +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: DataBoxEdgeDeviceList; - }; -}; +/** + * Defines values for AddonState. \ + * {@link KnownAddonState} can be used interchangeably with AddonState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **Creating** \ + * **Created** \ + * **Updating** \ + * **Reconfiguring** \ + * **Failed** \ + * **Deleting** + */ +export type AddonState = string; + +/** Known values of {@link RoleStatus} that the service accepts. */ +export enum KnownRoleStatus { + Enabled = "Enabled", + Disabled = "Disabled" +} /** - * Contains response data for the listByDataBoxEdgeDevice operation. + * Defines values for RoleStatus. \ + * {@link KnownRoleStatus} can be used interchangeably with RoleStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** */ -export type AlertsListByDataBoxEdgeDeviceResponse = AlertList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type RoleStatus = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AlertList; - }; -}; +/** Known values of {@link KubernetesNodeType} that the service accepts. */ +export enum KnownKubernetesNodeType { + Invalid = "Invalid", + Master = "Master", + Worker = "Worker" +} /** - * Contains response data for the get operation. - */ -export type AlertsGetResponse = Alert & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + * Defines values for KubernetesNodeType. \ + * {@link KnownKubernetesNodeType} can be used interchangeably with KubernetesNodeType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **Master** \ + * **Worker** + */ +export type KubernetesNodeType = string; + +/** Known values of {@link KubernetesState} that the service accepts. */ +export enum KnownKubernetesState { + Invalid = "Invalid", + Creating = "Creating", + Created = "Created", + Updating = "Updating", + Reconfiguring = "Reconfiguring", + Failed = "Failed", + Deleting = "Deleting" +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Alert; - }; -}; +/** + * Defines values for KubernetesState. \ + * {@link KnownKubernetesState} can be used interchangeably with KubernetesState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **Creating** \ + * **Created** \ + * **Updating** \ + * **Reconfiguring** \ + * **Failed** \ + * **Deleting** + */ +export type KubernetesState = string; + +/** Known values of {@link PosixComplianceStatus} that the service accepts. */ +export enum KnownPosixComplianceStatus { + Invalid = "Invalid", + Enabled = "Enabled", + Disabled = "Disabled" +} /** - * Contains response data for the listByDataBoxEdgeDeviceNext operation. + * Defines values for PosixComplianceStatus. \ + * {@link KnownPosixComplianceStatus} can be used interchangeably with PosixComplianceStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **Enabled** \ + * **Disabled** */ -export type AlertsListByDataBoxEdgeDeviceNextResponse = AlertList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type PosixComplianceStatus = string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AlertList; - }; -}; +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listByDataBoxEdgeDevice operation. - */ -export type BandwidthSchedulesListByDataBoxEdgeDeviceResponse = BandwidthSchedulesList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type OperationsListResponse = OperationsList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: BandwidthSchedulesList; - }; -}; +/** Optional parameters. */ +export interface OperationsListNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the get operation. - */ -export type BandwidthSchedulesGetResponse = BandwidthSchedule & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = OperationsList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: BandwidthSchedule; - }; -}; +/** Optional parameters. */ +export interface AvailableSkusListOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the createOrUpdate operation. - */ -export type BandwidthSchedulesCreateOrUpdateResponse = BandwidthSchedule & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the list operation. */ +export type AvailableSkusListResponse = DataBoxEdgeSkuList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: BandwidthSchedule; - }; -}; +/** Optional parameters. */ +export interface AvailableSkusListNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type BandwidthSchedulesBeginCreateOrUpdateResponse = BandwidthSchedule & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listNext operation. */ +export type AvailableSkusListNextResponse = DataBoxEdgeSkuList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: BandwidthSchedule; - }; -}; +/** Optional parameters. */ +export interface DevicesListBySubscriptionOptionalParams + extends coreClient.OperationOptions { + /** Specify $expand=details to populate additional fields related to the resource or Specify $skipToken= to populate the next page in the list. */ + expand?: string; +} -/** - * Contains response data for the listByDataBoxEdgeDeviceNext operation. - */ -export type BandwidthSchedulesListByDataBoxEdgeDeviceNextResponse = BandwidthSchedulesList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listBySubscription operation. */ +export type DevicesListBySubscriptionResponse = DataBoxEdgeDeviceList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: BandwidthSchedulesList; - }; -}; +/** Optional parameters. */ +export interface DevicesListByResourceGroupOptionalParams + extends coreClient.OperationOptions { + /** Specify $expand=details to populate additional fields related to the resource or Specify $skipToken= to populate the next page in the list. */ + expand?: string; +} -/** - * Contains response data for the get operation. - */ -export type JobsGetResponse = Job & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listByResourceGroup operation. */ +export type DevicesListByResourceGroupResponse = DataBoxEdgeDeviceList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Job; - }; -}; +/** Optional parameters. */ +export interface DevicesGetOptionalParams extends coreClient.OperationOptions {} -/** - * Contains response data for the listByDataBoxEdgeDevice operation. - */ -export type NodesListByDataBoxEdgeDeviceResponse = NodeList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type DevicesGetResponse = DataBoxEdgeDevice; - /** - * The response body as parsed JSON or XML - */ - parsedBody: NodeList; - }; -}; +/** Optional parameters. */ +export interface DevicesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the get operation. - */ -export type OperationsStatusGetResponse = Job & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the createOrUpdate operation. */ +export type DevicesCreateOrUpdateResponse = DataBoxEdgeDevice; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Job; - }; -}; +/** Optional parameters. */ +export interface DevicesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the listByDataBoxEdgeDevice operation. - */ -export type OrdersListByDataBoxEdgeDeviceResponse = OrderList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DevicesUpdateOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: OrderList; - }; -}; +/** Contains response data for the update operation. */ +export type DevicesUpdateResponse = DataBoxEdgeDevice; -/** - * Contains response data for the get operation. - */ -export type OrdersGetResponse = Order & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DevicesDownloadUpdatesOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Order; - }; -}; +/** Optional parameters. */ +export interface DevicesGenerateCertificateOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the createOrUpdate operation. - */ -export type OrdersCreateOrUpdateResponse = Order & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the generateCertificate operation. */ +export type DevicesGenerateCertificateResponse = GenerateCertResponse; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Order; - }; -}; +/** Optional parameters. */ +export interface DevicesGetExtendedInformationOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type OrdersBeginCreateOrUpdateResponse = Order & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the getExtendedInformation operation. */ +export type DevicesGetExtendedInformationResponse = DataBoxEdgeDeviceExtendedInfo; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Order; - }; -}; +/** Optional parameters. */ +export interface DevicesInstallUpdatesOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the listByDataBoxEdgeDeviceNext operation. - */ -export type OrdersListByDataBoxEdgeDeviceNextResponse = OrderList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DevicesGetNetworkSettingsOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: OrderList; - }; -}; +/** Contains response data for the getNetworkSettings operation. */ +export type DevicesGetNetworkSettingsResponse = NetworkSettings; -/** - * Contains response data for the listByDataBoxEdgeDevice operation. - */ -export type RolesListByDataBoxEdgeDeviceResponse = RoleList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DevicesScanForUpdatesOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: RoleList; - }; -}; +/** Optional parameters. */ +export interface DevicesCreateOrUpdateSecuritySettingsOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the get operation. - */ -export type RolesGetResponse = RoleUnion & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DevicesUpdateExtendedInformationOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: RoleUnion; - }; -}; +/** Contains response data for the updateExtendedInformation operation. */ +export type DevicesUpdateExtendedInformationResponse = DataBoxEdgeDeviceExtendedInfo; -/** - * Contains response data for the createOrUpdate operation. - */ -export type RolesCreateOrUpdateResponse = RoleUnion & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DevicesGetUpdateSummaryOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: RoleUnion; - }; -}; +/** Contains response data for the getUpdateSummary operation. */ +export type DevicesGetUpdateSummaryResponse = UpdateSummary; -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type RolesBeginCreateOrUpdateResponse = RoleUnion & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DevicesUploadCertificateOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: RoleUnion; - }; -}; +/** Contains response data for the uploadCertificate operation. */ +export type DevicesUploadCertificateResponse = UploadCertificateResponse; -/** - * Contains response data for the listByDataBoxEdgeDeviceNext operation. - */ -export type RolesListByDataBoxEdgeDeviceNextResponse = RoleList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DevicesListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions { + /** Specify $expand=details to populate additional fields related to the resource or Specify $skipToken= to populate the next page in the list. */ + expand?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: RoleList; - }; -}; +/** Contains response data for the listBySubscriptionNext operation. */ +export type DevicesListBySubscriptionNextResponse = DataBoxEdgeDeviceList; -/** - * Contains response data for the listByDataBoxEdgeDevice operation. - */ -export type SharesListByDataBoxEdgeDeviceResponse = ShareList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface DevicesListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions { + /** Specify $expand=details to populate additional fields related to the resource or Specify $skipToken= to populate the next page in the list. */ + expand?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ShareList; - }; -}; +/** Contains response data for the listByResourceGroupNext operation. */ +export type DevicesListByResourceGroupNextResponse = DataBoxEdgeDeviceList; -/** - * Contains response data for the get operation. - */ -export type SharesGetResponse = Share & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface AlertsListByDataBoxEdgeDeviceOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Share; - }; -}; +/** Contains response data for the listByDataBoxEdgeDevice operation. */ +export type AlertsListByDataBoxEdgeDeviceResponse = AlertList; -/** - * Contains response data for the createOrUpdate operation. - */ -export type SharesCreateOrUpdateResponse = Share & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface AlertsGetOptionalParams extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Share; - }; -}; +/** Contains response data for the get operation. */ +export type AlertsGetResponse = Alert; -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type SharesBeginCreateOrUpdateResponse = Share & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface AlertsListByDataBoxEdgeDeviceNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: Share; - }; -}; +/** Contains response data for the listByDataBoxEdgeDeviceNext operation. */ +export type AlertsListByDataBoxEdgeDeviceNextResponse = AlertList; -/** - * Contains response data for the listByDataBoxEdgeDeviceNext operation. - */ -export type SharesListByDataBoxEdgeDeviceNextResponse = ShareList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface BandwidthSchedulesListByDataBoxEdgeDeviceOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ShareList; - }; -}; +/** Contains response data for the listByDataBoxEdgeDevice operation. */ +export type BandwidthSchedulesListByDataBoxEdgeDeviceResponse = BandwidthSchedulesList; -/** - * Contains response data for the listByDataBoxEdgeDevice operation. - */ -export type StorageAccountCredentialsListByDataBoxEdgeDeviceResponse = StorageAccountCredentialList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface BandwidthSchedulesGetOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: StorageAccountCredentialList; - }; -}; +/** Contains response data for the get operation. */ +export type BandwidthSchedulesGetResponse = BandwidthSchedule; -/** - * Contains response data for the get operation. - */ -export type StorageAccountCredentialsGetResponse = StorageAccountCredential & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface BandwidthSchedulesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: StorageAccountCredential; - }; -}; +/** Contains response data for the createOrUpdate operation. */ +export type BandwidthSchedulesCreateOrUpdateResponse = BandwidthSchedule; -/** - * Contains response data for the createOrUpdate operation. - */ -export type StorageAccountCredentialsCreateOrUpdateResponse = StorageAccountCredential & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface BandwidthSchedulesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: StorageAccountCredential; - }; -}; +/** Optional parameters. */ +export interface BandwidthSchedulesListByDataBoxEdgeDeviceNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type StorageAccountCredentialsBeginCreateOrUpdateResponse = StorageAccountCredential & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listByDataBoxEdgeDeviceNext operation. */ +export type BandwidthSchedulesListByDataBoxEdgeDeviceNextResponse = BandwidthSchedulesList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: StorageAccountCredential; - }; -}; +/** Optional parameters. */ +export interface DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listByDataBoxEdgeDeviceNext operation. - */ -export type StorageAccountCredentialsListByDataBoxEdgeDeviceNextResponse = StorageAccountCredentialList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the getDiagnosticProactiveLogCollectionSettings operation. */ +export type DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsResponse = DiagnosticProactiveLogCollectionSettings; - /** - * The response body as parsed JSON or XML - */ - parsedBody: StorageAccountCredentialList; - }; -}; +/** Optional parameters. */ +export interface DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the listByDataBoxEdgeDevice operation. - */ -export type StorageAccountsListByDataBoxEdgeDeviceResponse = StorageAccountList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the updateDiagnosticProactiveLogCollectionSettings operation. */ +export type DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse = DiagnosticProactiveLogCollectionSettings; - /** - * The response body as parsed JSON or XML - */ - parsedBody: StorageAccountList; - }; -}; +/** Optional parameters. */ +export interface DiagnosticSettingsGetDiagnosticRemoteSupportSettingsOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the get operation. - */ -export type StorageAccountsGetResponse = StorageAccount & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the getDiagnosticRemoteSupportSettings operation. */ +export type DiagnosticSettingsGetDiagnosticRemoteSupportSettingsResponse = DiagnosticRemoteSupportSettings; - /** - * The response body as parsed JSON or XML - */ - parsedBody: StorageAccount; - }; -}; +/** Optional parameters. */ +export interface DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the createOrUpdate operation. - */ -export type StorageAccountsCreateOrUpdateResponse = StorageAccount & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the updateDiagnosticRemoteSupportSettings operation. */ +export type DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse = DiagnosticRemoteSupportSettings; - /** - * The response body as parsed JSON or XML - */ - parsedBody: StorageAccount; - }; -}; +/** Optional parameters. */ +export interface JobsGetOptionalParams extends coreClient.OperationOptions {} -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type StorageAccountsBeginCreateOrUpdateResponse = StorageAccount & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type JobsGetResponse = Job; - /** - * The response body as parsed JSON or XML - */ - parsedBody: StorageAccount; - }; -}; +/** Optional parameters. */ +export interface NodesListByDataBoxEdgeDeviceOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listByDataBoxEdgeDeviceNext operation. - */ -export type StorageAccountsListByDataBoxEdgeDeviceNextResponse = StorageAccountList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listByDataBoxEdgeDevice operation. */ +export type NodesListByDataBoxEdgeDeviceResponse = NodeList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: StorageAccountList; - }; -}; +/** Optional parameters. */ +export interface NodesListByDataBoxEdgeDeviceNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listByStorageAccount operation. - */ -export type ContainersListByStorageAccountResponse = ContainerList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listByDataBoxEdgeDeviceNext operation. */ +export type NodesListByDataBoxEdgeDeviceNextResponse = NodeList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ContainerList; - }; -}; +/** Optional parameters. */ +export interface OperationsStatusGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the get operation. - */ -export type ContainersGetResponse = Container & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type OperationsStatusGetResponse = Job; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Container; - }; -}; +/** Optional parameters. */ +export interface OrdersListByDataBoxEdgeDeviceOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the createOrUpdate operation. - */ -export type ContainersCreateOrUpdateResponse = Container & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listByDataBoxEdgeDevice operation. */ +export type OrdersListByDataBoxEdgeDeviceResponse = OrderList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Container; - }; -}; +/** Optional parameters. */ +export interface OrdersGetOptionalParams extends coreClient.OperationOptions {} -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type ContainersBeginCreateOrUpdateResponse = Container & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type OrdersGetResponse = Order; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Container; - }; -}; +/** Optional parameters. */ +export interface OrdersCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the listByStorageAccountNext operation. - */ -export type ContainersListByStorageAccountNextResponse = ContainerList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the createOrUpdate operation. */ +export type OrdersCreateOrUpdateResponse = Order; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ContainerList; - }; -}; +/** Optional parameters. */ +export interface OrdersDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the listByDataBoxEdgeDevice operation. - */ -export type TriggersListByDataBoxEdgeDeviceResponse = TriggerList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface OrdersListDCAccessCodeOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: TriggerList; - }; -}; +/** Contains response data for the listDCAccessCode operation. */ +export type OrdersListDCAccessCodeResponse = DCAccessCode; -/** - * Contains response data for the get operation. - */ -export type TriggersGetResponse = TriggerUnion & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface OrdersListByDataBoxEdgeDeviceNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: TriggerUnion; - }; -}; +/** Contains response data for the listByDataBoxEdgeDeviceNext operation. */ +export type OrdersListByDataBoxEdgeDeviceNextResponse = OrderList; -/** - * Contains response data for the createOrUpdate operation. - */ -export type TriggersCreateOrUpdateResponse = TriggerUnion & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface RolesListByDataBoxEdgeDeviceOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: TriggerUnion; - }; -}; +/** Contains response data for the listByDataBoxEdgeDevice operation. */ +export type RolesListByDataBoxEdgeDeviceResponse = RoleList; -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type TriggersBeginCreateOrUpdateResponse = TriggerUnion & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface RolesGetOptionalParams extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: TriggerUnion; - }; -}; +/** Contains response data for the get operation. */ +export type RolesGetResponse = RoleUnion; -/** - * Contains response data for the listByDataBoxEdgeDeviceNext operation. - */ -export type TriggersListByDataBoxEdgeDeviceNextResponse = TriggerList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface RolesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: TriggerList; - }; -}; +/** Contains response data for the createOrUpdate operation. */ +export type RolesCreateOrUpdateResponse = RoleUnion; -/** - * Contains response data for the listByDataBoxEdgeDevice operation. - */ -export type UsersListByDataBoxEdgeDeviceResponse = UserList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface RolesDeleteOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: UserList; - }; -}; +/** Optional parameters. */ +export interface RolesListByDataBoxEdgeDeviceNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the get operation. - */ -export type UsersGetResponse = User & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listByDataBoxEdgeDeviceNext operation. */ +export type RolesListByDataBoxEdgeDeviceNextResponse = RoleList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: User; - }; -}; +/** Optional parameters. */ +export interface AddonsListByRoleOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the createOrUpdate operation. - */ -export type UsersCreateOrUpdateResponse = User & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listByRole operation. */ +export type AddonsListByRoleResponse = AddonList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: User; - }; -}; +/** Optional parameters. */ +export interface AddonsGetOptionalParams extends coreClient.OperationOptions {} -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type UsersBeginCreateOrUpdateResponse = User & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the get operation. */ +export type AddonsGetResponse = AddonUnion; - /** - * The response body as parsed JSON or XML - */ - parsedBody: User; - }; -}; +/** Optional parameters. */ +export interface AddonsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the listByDataBoxEdgeDeviceNext operation. - */ -export type UsersListByDataBoxEdgeDeviceNextResponse = UserList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the createOrUpdate operation. */ +export type AddonsCreateOrUpdateResponse = AddonUnion; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UserList; - }; -}; +/** Optional parameters. */ +export interface AddonsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** - * Contains response data for the list operation. - */ -export type SkusListResponse = SkuInformationList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface AddonsListByRoleNextOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: SkuInformationList; - }; -}; +/** Contains response data for the listByRoleNext operation. */ +export type AddonsListByRoleNextResponse = AddonList; + +/** Optional parameters. */ +export interface MonitoringConfigListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type MonitoringConfigListResponse = MonitoringMetricConfigurationList; + +/** Optional parameters. */ +export interface MonitoringConfigGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type MonitoringConfigGetResponse = MonitoringMetricConfiguration; + +/** Optional parameters. */ +export interface MonitoringConfigCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type MonitoringConfigCreateOrUpdateResponse = MonitoringMetricConfiguration; + +/** Optional parameters. */ +export interface MonitoringConfigDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface MonitoringConfigListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type MonitoringConfigListNextResponse = MonitoringMetricConfigurationList; + +/** Optional parameters. */ +export interface SharesListByDataBoxEdgeDeviceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDataBoxEdgeDevice operation. */ +export type SharesListByDataBoxEdgeDeviceResponse = ShareList; + +/** Optional parameters. */ +export interface SharesGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SharesGetResponse = Share; + +/** Optional parameters. */ +export interface SharesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type SharesCreateOrUpdateResponse = Share; + +/** Optional parameters. */ +export interface SharesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface SharesRefreshOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface SharesListByDataBoxEdgeDeviceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDataBoxEdgeDeviceNext operation. */ +export type SharesListByDataBoxEdgeDeviceNextResponse = ShareList; + +/** Optional parameters. */ +export interface StorageAccountCredentialsListByDataBoxEdgeDeviceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDataBoxEdgeDevice operation. */ +export type StorageAccountCredentialsListByDataBoxEdgeDeviceResponse = StorageAccountCredentialList; + +/** Optional parameters. */ +export interface StorageAccountCredentialsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type StorageAccountCredentialsGetResponse = StorageAccountCredential; + +/** Optional parameters. */ +export interface StorageAccountCredentialsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type StorageAccountCredentialsCreateOrUpdateResponse = StorageAccountCredential; + +/** Optional parameters. */ +export interface StorageAccountCredentialsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface StorageAccountCredentialsListByDataBoxEdgeDeviceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDataBoxEdgeDeviceNext operation. */ +export type StorageAccountCredentialsListByDataBoxEdgeDeviceNextResponse = StorageAccountCredentialList; + +/** Optional parameters. */ +export interface StorageAccountsListByDataBoxEdgeDeviceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDataBoxEdgeDevice operation. */ +export type StorageAccountsListByDataBoxEdgeDeviceResponse = StorageAccountList; + +/** Optional parameters. */ +export interface StorageAccountsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type StorageAccountsGetResponse = StorageAccount; + +/** Optional parameters. */ +export interface StorageAccountsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type StorageAccountsCreateOrUpdateResponse = StorageAccount; + +/** Optional parameters. */ +export interface StorageAccountsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface StorageAccountsListByDataBoxEdgeDeviceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDataBoxEdgeDeviceNext operation. */ +export type StorageAccountsListByDataBoxEdgeDeviceNextResponse = StorageAccountList; + +/** Optional parameters. */ +export interface ContainersListByStorageAccountOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByStorageAccount operation. */ +export type ContainersListByStorageAccountResponse = ContainerList; + +/** Optional parameters. */ +export interface ContainersGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ContainersGetResponse = Container; + +/** Optional parameters. */ +export interface ContainersCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type ContainersCreateOrUpdateResponse = Container; + +/** Optional parameters. */ +export interface ContainersDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ContainersRefreshOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ContainersListByStorageAccountNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByStorageAccountNext operation. */ +export type ContainersListByStorageAccountNextResponse = ContainerList; + +/** Optional parameters. */ +export interface TriggersListByDataBoxEdgeDeviceOptionalParams + extends coreClient.OperationOptions { + /** Specify $filter='CustomContextTag eq ' to filter on custom context tag property */ + filter?: string; +} + +/** Contains response data for the listByDataBoxEdgeDevice operation. */ +export type TriggersListByDataBoxEdgeDeviceResponse = TriggerList; + +/** Optional parameters. */ +export interface TriggersGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type TriggersGetResponse = TriggerUnion; + +/** Optional parameters. */ +export interface TriggersCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type TriggersCreateOrUpdateResponse = TriggerUnion; + +/** Optional parameters. */ +export interface TriggersDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface TriggersListByDataBoxEdgeDeviceNextOptionalParams + extends coreClient.OperationOptions { + /** Specify $filter='CustomContextTag eq ' to filter on custom context tag property */ + filter?: string; +} + +/** Contains response data for the listByDataBoxEdgeDeviceNext operation. */ +export type TriggersListByDataBoxEdgeDeviceNextResponse = TriggerList; + +/** Optional parameters. */ +export interface SupportPackagesTriggerSupportPackageOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface UsersListByDataBoxEdgeDeviceOptionalParams + extends coreClient.OperationOptions { + /** Specify $filter='Type eq ' to filter on user type property */ + filter?: string; +} + +/** Contains response data for the listByDataBoxEdgeDevice operation. */ +export type UsersListByDataBoxEdgeDeviceResponse = UserList; + +/** Optional parameters. */ +export interface UsersGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type UsersGetResponse = User; + +/** Optional parameters. */ +export interface UsersCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type UsersCreateOrUpdateResponse = User; + +/** Optional parameters. */ +export interface UsersDeleteOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface UsersListByDataBoxEdgeDeviceNextOptionalParams + extends coreClient.OperationOptions { + /** Specify $filter='Type eq ' to filter on user type property */ + filter?: string; +} + +/** Contains response data for the listByDataBoxEdgeDeviceNext operation. */ +export type UsersListByDataBoxEdgeDeviceNextResponse = UserList; + +/** Optional parameters. */ +export interface DataBoxEdgeManagementClientOptionalParams + extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Api Version */ + apiVersion?: string; + /** Overrides client endpoint. */ + endpoint?: string; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/models/jobsMappers.ts b/sdk/databoxedge/arm-databoxedge/src/models/jobsMappers.ts deleted file mode 100644 index 0f195ce2be53..000000000000 --- a/sdk/databoxedge/arm-databoxedge/src/models/jobsMappers.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - discriminators, - CloudError, - Job, - JobErrorDetails, - JobErrorItem, - UpdateDownloadProgress, - UpdateInstallProgress -} from "../models/mappers"; diff --git a/sdk/databoxedge/arm-databoxedge/src/models/mappers.ts b/sdk/databoxedge/arm-databoxedge/src/models/mappers.ts index 3cfe52b682f2..712260119706 100644 --- a/sdk/databoxedge/arm-databoxedge/src/models/mappers.ts +++ b/sdk/databoxedge/arm-databoxedge/src/models/mappers.ts @@ -1,192 +1,217 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; -import * as msRest from "@azure/ms-rest-js"; +import * as coreClient from "@azure/core-client"; -export const CloudError = CloudErrorMapper; -export const BaseResource = BaseResourceMapper; - -export const Address: msRest.CompositeMapper = { - serializedName: "Address", +export const OperationsList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Address", + className: "OperationsList", modelProperties: { - addressLine1: { + value: { + serializedName: "value", required: true, - serializedName: "addressLine1", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } } }, - addressLine2: { - serializedName: "addressLine2", + nextLink: { + serializedName: "nextLink", type: { name: "String" } - }, - addressLine3: { - serializedName: "addressLine3", + } + } + } +}; + +export const Operation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", type: { name: "String" } }, - postalCode: { - required: true, - serializedName: "postalCode", + isDataAction: { + serializedName: "isDataAction", type: { - name: "String" + name: "Boolean" } }, - city: { - required: true, - serializedName: "city", + display: { + serializedName: "display", type: { - name: "String" + name: "Composite", + className: "OperationDisplay" } }, - state: { - required: true, - serializedName: "state", + origin: { + serializedName: "origin", type: { name: "String" } }, - country: { - required: true, - serializedName: "country", + serviceSpecification: { + serializedName: "properties.serviceSpecification", type: { - name: "String" + name: "Composite", + className: "ServiceSpecification" } } } } }; -export const AlertErrorDetails: msRest.CompositeMapper = { - serializedName: "AlertErrorDetails", +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AlertErrorDetails", + className: "OperationDisplay", modelProperties: { - errorCode: { - readOnly: true, - serializedName: "errorCode", + provider: { + serializedName: "provider", type: { name: "String" } }, - errorMessage: { - readOnly: true, - serializedName: "errorMessage", + resource: { + serializedName: "resource", type: { name: "String" } }, - occurrences: { - readOnly: true, - serializedName: "occurrences", + operation: { + serializedName: "operation", type: { - name: "Number" + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" } } } } }; -export const ARMBaseModel: msRest.CompositeMapper = { - serializedName: "ARMBaseModel", +export const ServiceSpecification: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ARMBaseModel", + className: "ServiceSpecification", modelProperties: { - id: { - readOnly: true, - serializedName: "id", + metricSpecifications: { + serializedName: "metricSpecifications", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricSpecificationV1" + } + } } - }, + } + } + } +}; + +export const MetricSpecificationV1: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MetricSpecificationV1", + modelProperties: { name: { - readOnly: true, serializedName: "name", type: { name: "String" } }, - type: { - readOnly: true, - serializedName: "type", + displayName: { + serializedName: "displayName", type: { name: "String" } - } - } - } -}; - -export const Alert: msRest.CompositeMapper = { - serializedName: "Alert", - type: { - name: "Composite", - className: "Alert", - modelProperties: { - ...ARMBaseModel.type.modelProperties, - title: { - readOnly: true, - serializedName: "properties.title", + }, + displayDescription: { + serializedName: "displayDescription", type: { name: "String" } }, - alertType: { - readOnly: true, - serializedName: "properties.alertType", + unit: { + serializedName: "unit", type: { name: "String" } }, - appearedAtDateTime: { - readOnly: true, - serializedName: "properties.appearedAtDateTime", + aggregationType: { + serializedName: "aggregationType", type: { - name: "DateTime" + name: "String" } }, - recommendation: { - readOnly: true, - serializedName: "properties.recommendation", + dimensions: { + serializedName: "dimensions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricDimensionV1" + } + } + } + }, + fillGapWithZero: { + serializedName: "fillGapWithZero", + type: { + name: "Boolean" + } + }, + category: { + serializedName: "category", type: { name: "String" } }, - severity: { - readOnly: true, - serializedName: "properties.severity", + resourceIdDimensionNameOverride: { + serializedName: "resourceIdDimensionNameOverride", type: { name: "String" } }, - errorDetails: { - readOnly: true, - serializedName: "properties.errorDetails", + supportedTimeGrainTypes: { + serializedName: "supportedTimeGrainTypes", type: { - name: "Composite", - className: "AlertErrorDetails" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - detailedInformation: { - readOnly: true, - serializedName: "properties.detailedInformation", + supportedAggregationTypes: { + serializedName: "supportedAggregationTypes", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { name: "String" } @@ -197,132 +222,161 @@ export const Alert: msRest.CompositeMapper = { } }; -export const AsymmetricEncryptedSecret: msRest.CompositeMapper = { - serializedName: "AsymmetricEncryptedSecret", +export const MetricDimensionV1: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AsymmetricEncryptedSecret", + className: "MetricDimensionV1", modelProperties: { - value: { - required: true, - serializedName: "value", + name: { + serializedName: "name", type: { name: "String" } }, - encryptionCertThumbprint: { - serializedName: "encryptionCertThumbprint", + displayName: { + serializedName: "displayName", type: { name: "String" } }, - encryptionAlgorithm: { - required: true, - serializedName: "encryptionAlgorithm", - type: { - name: "String" - } - } - } - } -}; - -export const SymmetricKey: msRest.CompositeMapper = { - serializedName: "SymmetricKey", - type: { - name: "Composite", - className: "SymmetricKey", - modelProperties: { - connectionString: { - serializedName: "connectionString", + toBeExportedForShoebox: { + serializedName: "toBeExportedForShoebox", type: { - name: "Composite", - className: "AsymmetricEncryptedSecret" + name: "Boolean" } } } } }; -export const Authentication: msRest.CompositeMapper = { - serializedName: "Authentication", +export const CloudError: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Authentication", + className: "CloudError", modelProperties: { - symmetricKey: { - serializedName: "symmetricKey", + error: { + serializedName: "error", type: { name: "Composite", - className: "SymmetricKey" + className: "CloudErrorBody" } } } } }; -export const AzureContainerInfo: msRest.CompositeMapper = { - serializedName: "AzureContainerInfo", +export const CloudErrorBody: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureContainerInfo", + className: "CloudErrorBody", modelProperties: { - storageAccountCredentialId: { - required: true, - serializedName: "storageAccountCredentialId", + code: { + serializedName: "code", type: { name: "String" } }, - containerName: { - required: true, - serializedName: "containerName", + message: { + serializedName: "message", type: { name: "String" } }, - dataFormat: { - required: true, - serializedName: "dataFormat", + details: { + serializedName: "details", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CloudErrorBody" + } + } } } } } }; -export const BandwidthSchedule: msRest.CompositeMapper = { - serializedName: "BandwidthSchedule", +export const DataBoxEdgeSkuList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BandwidthSchedule", + className: "DataBoxEdgeSkuList", modelProperties: { - ...ARMBaseModel.type.modelProperties, - start: { - required: true, - serializedName: "properties.start", + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataBoxEdgeSku" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const DataBoxEdgeSku: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataBoxEdgeSku", + modelProperties: { + resourceType: { + serializedName: "resourceType", + readOnly: true, type: { name: "String" } }, - stop: { - required: true, - serializedName: "properties.stop", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - rateInMbps: { - required: true, - serializedName: "properties.rateInMbps", + kind: { + serializedName: "kind", + readOnly: true, type: { - name: "Number" + name: "String" } }, - days: { - required: true, - serializedName: "properties.days", + tier: { + serializedName: "tier", + readOnly: true, + type: { + name: "String" + } + }, + size: { + serializedName: "size", + readOnly: true, + type: { + name: "String" + } + }, + family: { + serializedName: "family", + readOnly: true, + type: { + name: "String" + } + }, + locations: { + serializedName: "locations", + readOnly: true, type: { name: "Sequence", element: { @@ -331,65 +385,122 @@ export const BandwidthSchedule: msRest.CompositeMapper = { } } } - } - } - } -}; - -export const ClientAccessRight: msRest.CompositeMapper = { - serializedName: "ClientAccessRight", - type: { - name: "Composite", - className: "ClientAccessRight", - modelProperties: { - client: { - required: true, - serializedName: "client", + }, + apiVersions: { + serializedName: "apiVersions", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + locationInfo: { + serializedName: "locationInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuLocationInfo" + } + } + } + }, + costs: { + serializedName: "costs", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuCost" + } + } + } + }, + signupOption: { + serializedName: "signupOption", + readOnly: true, type: { name: "String" } }, - accessPermission: { - required: true, - serializedName: "accessPermission", + version: { + serializedName: "version", + readOnly: true, + type: { + name: "String" + } + }, + availability: { + serializedName: "availability", + readOnly: true, type: { name: "String" } + }, + shipmentTypes: { + serializedName: "shipmentTypes", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + capabilities: { + serializedName: "capabilities", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuCapability" + } + } + } } } } }; -export const ContactDetails: msRest.CompositeMapper = { - serializedName: "ContactDetails", +export const SkuLocationInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContactDetails", + className: "SkuLocationInfo", modelProperties: { - contactPerson: { - required: true, - serializedName: "contactPerson", - type: { - name: "String" - } - }, - companyName: { - required: true, - serializedName: "companyName", + location: { + serializedName: "location", + readOnly: true, type: { name: "String" } }, - phone: { - required: true, - serializedName: "phone", + zones: { + serializedName: "zones", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - emailList: { - required: true, - serializedName: "emailList", + sites: { + serializedName: "sites", + readOnly: true, type: { name: "Sequence", element: { @@ -403,32 +514,28 @@ export const ContactDetails: msRest.CompositeMapper = { } }; -export const RefreshDetails: msRest.CompositeMapper = { - serializedName: "RefreshDetails", +export const SkuCost: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RefreshDetails", + className: "SkuCost", modelProperties: { - inProgressRefreshJobId: { - serializedName: "inProgressRefreshJobId", + meterId: { + serializedName: "meterId", + readOnly: true, type: { name: "String" } }, - lastCompletedRefreshJobTimeInUTC: { - serializedName: "lastCompletedRefreshJobTimeInUTC", - type: { - name: "DateTime" - } - }, - errorManifestFile: { - serializedName: "errorManifestFile", + quantity: { + serializedName: "quantity", + readOnly: true, type: { - name: "String" + name: "Number" } }, - lastJob: { - serializedName: "lastJob", + extendedUnit: { + serializedName: "extendedUnit", + readOnly: true, type: { name: "String" } @@ -437,48 +544,59 @@ export const RefreshDetails: msRest.CompositeMapper = { } }; -export const Container: msRest.CompositeMapper = { - serializedName: "Container", +export const SkuCapability: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Container", + className: "SkuCapability", modelProperties: { - ...ARMBaseModel.type.modelProperties, - containerStatus: { + name: { + serializedName: "name", readOnly: true, - serializedName: "properties.containerStatus", type: { name: "String" } }, - dataFormat: { - required: true, - serializedName: "properties.dataFormat", + value: { + serializedName: "value", + readOnly: true, type: { name: "String" } - }, - refreshDetails: { + } + } + } +}; + +export const DataBoxEdgeDeviceList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataBoxEdgeDeviceList", + modelProperties: { + value: { + serializedName: "value", readOnly: true, - serializedName: "properties.refreshDetails", type: { - name: "Composite", - className: "RefreshDetails" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataBoxEdgeDevice" + } + } } }, - createdDateTime: { + nextLink: { + serializedName: "nextLink", readOnly: true, - serializedName: "properties.createdDateTime", type: { - name: "DateTime" + name: "String" } } } } }; -export const Sku: msRest.CompositeMapper = { - serializedName: "Sku", +export const Sku: coreClient.CompositeMapper = { type: { name: "Composite", className: "Sku", @@ -499,169 +617,250 @@ export const Sku: msRest.CompositeMapper = { } }; -export const DataBoxEdgeDevice: msRest.CompositeMapper = { - serializedName: "DataBoxEdgeDevice", +export const ResourceIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DataBoxEdgeDevice", + className: "ResourceIdentity", modelProperties: { - ...ARMBaseModel.type.modelProperties, - location: { - required: true, - serializedName: "location", - type: { + type: { + serializedName: "type", + type: { name: "String" } }, - tags: { - serializedName: "tags", + principalId: { + serializedName: "principalId", + readOnly: true, type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "String" } }, - sku: { - serializedName: "sku", + tenantId: { + serializedName: "tenantId", + readOnly: true, type: { - name: "Composite", - className: "Sku" + name: "String" + } + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" } }, - etag: { - serializedName: "etag", + createdByType: { + serializedName: "createdByType", type: { name: "String" } }, - dataBoxEdgeDeviceStatus: { - serializedName: "properties.dataBoxEdgeDeviceStatus", + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", type: { name: "String" } }, - serialNumber: { - readOnly: true, - serializedName: "properties.serialNumber", + lastModifiedByType: { + serializedName: "lastModifiedByType", type: { name: "String" } }, - description: { - serializedName: "properties.description", + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + +export const ResourceMoveDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceMoveDetails", + modelProperties: { + operationInProgress: { + serializedName: "operationInProgress", type: { name: "String" } }, - modelDescription: { - serializedName: "properties.modelDescription", + operationInProgressLockTimeoutInUTC: { + serializedName: "operationInProgressLockTimeoutInUTC", + type: { + name: "DateTime" + } + } + } + } +}; + +export const EdgeProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EdgeProfile", + modelProperties: { + subscription: { + serializedName: "subscription", + type: { + name: "Composite", + className: "EdgeProfileSubscription" + } + } + } + } +}; + +export const EdgeProfileSubscription: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EdgeProfileSubscription", + modelProperties: { + registrationId: { + serializedName: "registrationId", type: { name: "String" } }, - deviceType: { - readOnly: true, - serializedName: "properties.deviceType", + id: { + serializedName: "id", type: { name: "String" } }, - friendlyName: { - serializedName: "properties.friendlyName", + state: { + serializedName: "state", type: { name: "String" } }, - culture: { - readOnly: true, - serializedName: "properties.culture", + registrationDate: { + serializedName: "registrationDate", type: { name: "String" } }, - deviceModel: { - readOnly: true, - serializedName: "properties.deviceModel", + subscriptionId: { + serializedName: "subscriptionId", type: { name: "String" } }, - deviceSoftwareVersion: { - readOnly: true, - serializedName: "properties.deviceSoftwareVersion", + tenantId: { + serializedName: "properties.tenantId", type: { name: "String" } }, - deviceLocalCapacity: { - readOnly: true, - serializedName: "properties.deviceLocalCapacity", + locationPlacementId: { + serializedName: "properties.locationPlacementId", type: { - name: "Number" + name: "String" } }, - timeZone: { - readOnly: true, - serializedName: "properties.timeZone", + quotaId: { + serializedName: "properties.quotaId", type: { name: "String" } }, - deviceHcsVersion: { - readOnly: true, - serializedName: "properties.deviceHcsVersion", + serializedDetails: { + serializedName: "properties.serializedDetails", type: { name: "String" } }, - configuredRoleTypes: { - readOnly: true, - serializedName: "properties.configuredRoleTypes", + registeredFeatures: { + serializedName: "properties.registeredFeatures", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "SubscriptionRegisteredFeatures" } } } + } + } + } +}; + +export const SubscriptionRegisteredFeatures: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SubscriptionRegisteredFeatures", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } }, - nodeCount: { - readOnly: true, - serializedName: "properties.nodeCount", + state: { + serializedName: "state", type: { - name: "Number" + name: "String" } } } } }; -export const DataBoxEdgeDeviceExtendedInfo: msRest.CompositeMapper = { - serializedName: "DataBoxEdgeDeviceExtendedInfo", +export const DataResidency: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DataBoxEdgeDeviceExtendedInfo", + className: "DataResidency", modelProperties: { - ...ARMBaseModel.type.modelProperties, - encryptionKeyThumbprint: { - serializedName: "properties.encryptionKeyThumbprint", + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const ARMBaseModel: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ARMBaseModel", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, type: { name: "String" } }, - encryptionKey: { - serializedName: "properties.encryptionKey", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - resourceKey: { + type: { + serializedName: "type", readOnly: true, - serializedName: "properties.resourceKey", type: { name: "String" } @@ -670,8 +869,7 @@ export const DataBoxEdgeDeviceExtendedInfo: msRest.CompositeMapper = { } }; -export const DataBoxEdgeDevicePatch: msRest.CompositeMapper = { - serializedName: "DataBoxEdgeDevicePatch", +export const DataBoxEdgeDevicePatch: coreClient.CompositeMapper = { type: { name: "Composite", className: "DataBoxEdgeDevicePatch", @@ -680,43 +878,50 @@ export const DataBoxEdgeDevicePatch: msRest.CompositeMapper = { serializedName: "tags", type: { name: "Dictionary", - value: { - type: { - name: "String" - } - } + value: { type: { name: "String" } } + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceIdentity" + } + }, + edgeProfile: { + serializedName: "properties.edgeProfile", + type: { + name: "Composite", + className: "EdgeProfilePatch" } } } } }; -export const FileSourceInfo: msRest.CompositeMapper = { - serializedName: "FileSourceInfo", +export const EdgeProfilePatch: coreClient.CompositeMapper = { type: { name: "Composite", - className: "FileSourceInfo", + className: "EdgeProfilePatch", modelProperties: { - shareId: { - required: true, - serializedName: "shareId", + subscription: { + serializedName: "subscription", type: { - name: "String" + name: "Composite", + className: "EdgeProfileSubscriptionPatch" } } } } }; -export const RoleSinkInfo: msRest.CompositeMapper = { - serializedName: "RoleSinkInfo", +export const EdgeProfileSubscriptionPatch: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RoleSinkInfo", + className: "EdgeProfileSubscriptionPatch", modelProperties: { - roleId: { - required: true, - serializedName: "roleId", + id: { + serializedName: "id", type: { name: "String" } @@ -725,21 +930,27 @@ export const RoleSinkInfo: msRest.CompositeMapper = { } }; -export const Trigger: msRest.CompositeMapper = { - serializedName: "Trigger", +export const AlertList: coreClient.CompositeMapper = { type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind" - }, - uberParent: "Trigger", - className: "Trigger", + className: "AlertList", modelProperties: { - ...ARMBaseModel.type.modelProperties, - kind: { - required: true, - serializedName: "kind", + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Alert" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -748,108 +959,111 @@ export const Trigger: msRest.CompositeMapper = { } }; -export const FileEventTrigger: msRest.CompositeMapper = { - serializedName: "FileEvent", +export const AlertErrorDetails: coreClient.CompositeMapper = { type: { name: "Composite", - polymorphicDiscriminator: Trigger.type.polymorphicDiscriminator, - uberParent: "Trigger", - className: "FileEventTrigger", + className: "AlertErrorDetails", modelProperties: { - ...Trigger.type.modelProperties, - sourceInfo: { - required: true, - serializedName: "properties.sourceInfo", + errorCode: { + serializedName: "errorCode", + readOnly: true, type: { - name: "Composite", - className: "FileSourceInfo" + name: "String" } }, - sinkInfo: { - required: true, - serializedName: "properties.sinkInfo", + errorMessage: { + serializedName: "errorMessage", + readOnly: true, type: { - name: "Composite", - className: "RoleSinkInfo" + name: "String" } }, - customContextTag: { - serializedName: "properties.customContextTag", + occurrences: { + serializedName: "occurrences", + readOnly: true, type: { - name: "String" + name: "Number" } } } } }; -export const IoTDeviceInfo: msRest.CompositeMapper = { - serializedName: "IoTDeviceInfo", +export const BandwidthSchedulesList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "IoTDeviceInfo", + className: "BandwidthSchedulesList", modelProperties: { - deviceId: { - required: true, - serializedName: "deviceId", - type: { - name: "String" - } - }, - ioTHostHub: { - required: true, - serializedName: "ioTHostHub", + value: { + serializedName: "value", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BandwidthSchedule" + } + } } }, - ioTHostHubId: { - serializedName: "ioTHostHubId", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } - }, - authentication: { - serializedName: "authentication", - type: { - name: "Composite", - className: "Authentication" - } } } } }; -export const MountPointMap: msRest.CompositeMapper = { - serializedName: "MountPointMap", +export const RemoteSupportSettings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MountPointMap", + className: "RemoteSupportSettings", modelProperties: { - shareId: { - required: true, - serializedName: "shareId", + remoteApplicationType: { + serializedName: "remoteApplicationType", type: { name: "String" } }, - roleId: { - readOnly: true, - serializedName: "roleId", + accessLevel: { + serializedName: "accessLevel", type: { name: "String" } }, - mountPoint: { - readOnly: true, - serializedName: "mountPoint", + expirationTimeStampInUTC: { + serializedName: "expirationTimeStampInUTC", + type: { + name: "DateTime" + } + } + } + } +}; + +export const GenerateCertResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GenerateCertResponse", + modelProperties: { + publicKey: { + serializedName: "publicKey", type: { name: "String" } }, - roleType: { - readOnly: true, - serializedName: "roleType", + privateKey: { + serializedName: "privateKey", + type: { + name: "String" + } + }, + expiryTimeInUTC: { + serializedName: "expiryTimeInUTC", type: { name: "String" } @@ -858,21 +1072,20 @@ export const MountPointMap: msRest.CompositeMapper = { } }; -export const Role: msRest.CompositeMapper = { - serializedName: "Role", +export const Secret: coreClient.CompositeMapper = { type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind" - }, - uberParent: "Role", - className: "Role", + className: "Secret", modelProperties: { - ...ARMBaseModel.type.modelProperties, - kind: { - required: true, - serializedName: "kind", + encryptedSecret: { + serializedName: "encryptedSecret", + type: { + name: "Composite", + className: "AsymmetricEncryptedSecret" + } + }, + keyVaultId: { + serializedName: "keyVaultId", type: { name: "String" } @@ -881,53 +1094,27 @@ export const Role: msRest.CompositeMapper = { } }; -export const IoTRole: msRest.CompositeMapper = { - serializedName: "IOT", +export const AsymmetricEncryptedSecret: coreClient.CompositeMapper = { type: { name: "Composite", - polymorphicDiscriminator: Role.type.polymorphicDiscriminator, - uberParent: "Role", - className: "IoTRole", + className: "AsymmetricEncryptedSecret", modelProperties: { - ...Role.type.modelProperties, - hostPlatform: { + value: { + serializedName: "value", required: true, - serializedName: "properties.hostPlatform", type: { name: "String" } }, - ioTDeviceDetails: { - required: true, - serializedName: "properties.ioTDeviceDetails", - type: { - name: "Composite", - className: "IoTDeviceInfo" - } - }, - ioTEdgeDeviceDetails: { - required: true, - serializedName: "properties.ioTEdgeDeviceDetails", - type: { - name: "Composite", - className: "IoTDeviceInfo" - } - }, - shareMappings: { - serializedName: "properties.shareMappings", + encryptionCertThumbprint: { + serializedName: "encryptionCertThumbprint", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MountPointMap" - } - } + name: "String" } }, - roleStatus: { + encryptionAlgorithm: { + serializedName: "encryptionAlgorithm", required: true, - serializedName: "properties.roleStatus", type: { name: "String" } @@ -936,60 +1123,118 @@ export const IoTRole: msRest.CompositeMapper = { } }; -export const Ipv4Config: msRest.CompositeMapper = { - serializedName: "Ipv4Config", +export const Job: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Ipv4Config", + className: "Job", modelProperties: { - ipAddress: { + id: { + serializedName: "id", readOnly: true, - serializedName: "ipAddress", type: { name: "String" } }, - subnet: { + name: { + serializedName: "name", readOnly: true, - serializedName: "subnet", type: { name: "String" } }, - gateway: { + type: { + serializedName: "type", readOnly: true, - serializedName: "gateway", type: { name: "String" } - } - } - } -}; - -export const Ipv6Config: msRest.CompositeMapper = { - serializedName: "Ipv6Config", - type: { - name: "Composite", - className: "Ipv6Config", - modelProperties: { - ipAddress: { + }, + status: { + serializedName: "status", readOnly: true, - serializedName: "ipAddress", type: { name: "String" } }, - prefixLength: { + startTime: { + serializedName: "startTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + endTime: { + serializedName: "endTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + percentComplete: { + serializedName: "percentComplete", readOnly: true, - serializedName: "prefixLength", type: { name: "Number" } }, - gateway: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "JobErrorDetails" + } + }, + jobType: { + serializedName: "properties.jobType", readOnly: true, - serializedName: "gateway", + type: { + name: "String" + } + }, + currentStage: { + serializedName: "properties.currentStage", + readOnly: true, + type: { + name: "String" + } + }, + downloadProgress: { + serializedName: "properties.downloadProgress", + type: { + name: "Composite", + className: "UpdateDownloadProgress" + } + }, + installProgress: { + serializedName: "properties.installProgress", + type: { + name: "Composite", + className: "UpdateInstallProgress" + } + }, + totalRefreshErrors: { + serializedName: "properties.totalRefreshErrors", + readOnly: true, + type: { + name: "Number" + } + }, + errorManifestFile: { + serializedName: "properties.errorManifestFile", + readOnly: true, + type: { + name: "String" + } + }, + refreshedEntityId: { + serializedName: "properties.refreshedEntityId", + readOnly: true, + type: { + name: "String" + } + }, + folder: { + serializedName: "properties.folder", type: { name: "String" } @@ -998,34 +1243,34 @@ export const Ipv6Config: msRest.CompositeMapper = { } }; -export const JobErrorItem: msRest.CompositeMapper = { - serializedName: "JobErrorItem", +export const JobErrorDetails: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobErrorItem", + className: "JobErrorDetails", modelProperties: { - recommendations: { + errorDetails: { + serializedName: "errorDetails", readOnly: true, - serializedName: "recommendations", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "JobErrorItem" } } } }, code: { - readOnly: true, serializedName: "code", + readOnly: true, type: { name: "String" } }, message: { - readOnly: true, serializedName: "message", + readOnly: true, type: { name: "String" } @@ -1034,35 +1279,33 @@ export const JobErrorItem: msRest.CompositeMapper = { } }; -export const JobErrorDetails: msRest.CompositeMapper = { - serializedName: "JobErrorDetails", +export const JobErrorItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobErrorDetails", + className: "JobErrorItem", modelProperties: { - errorDetails: { + recommendations: { + serializedName: "recommendations", readOnly: true, - serializedName: "errorDetails", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "JobErrorItem" + name: "String" } } } }, code: { - readOnly: true, serializedName: "code", + readOnly: true, type: { name: "String" } }, message: { - readOnly: true, serializedName: "message", + readOnly: true, type: { name: "String" } @@ -1071,50 +1314,49 @@ export const JobErrorDetails: msRest.CompositeMapper = { } }; -export const UpdateDownloadProgress: msRest.CompositeMapper = { - serializedName: "UpdateDownloadProgress", +export const UpdateDownloadProgress: coreClient.CompositeMapper = { type: { name: "Composite", className: "UpdateDownloadProgress", modelProperties: { downloadPhase: { - readOnly: true, serializedName: "downloadPhase", + readOnly: true, type: { name: "String" } }, percentComplete: { - readOnly: true, serializedName: "percentComplete", + readOnly: true, type: { name: "Number" } }, totalBytesToDownload: { - readOnly: true, serializedName: "totalBytesToDownload", + readOnly: true, type: { name: "Number" } }, totalBytesDownloaded: { - readOnly: true, serializedName: "totalBytesDownloaded", + readOnly: true, type: { name: "Number" } }, numberOfUpdatesToDownload: { - readOnly: true, serializedName: "numberOfUpdatesToDownload", + readOnly: true, type: { name: "Number" } }, numberOfUpdatesDownloaded: { - readOnly: true, serializedName: "numberOfUpdatesDownloaded", + readOnly: true, type: { name: "Number" } @@ -1123,29 +1365,28 @@ export const UpdateDownloadProgress: msRest.CompositeMapper = { } }; -export const UpdateInstallProgress: msRest.CompositeMapper = { - serializedName: "UpdateInstallProgress", +export const UpdateInstallProgress: coreClient.CompositeMapper = { type: { name: "Composite", className: "UpdateInstallProgress", modelProperties: { percentComplete: { - readOnly: true, serializedName: "percentComplete", + readOnly: true, type: { name: "Number" } }, numberOfUpdatesToInstall: { - readOnly: true, serializedName: "numberOfUpdatesToInstall", + readOnly: true, type: { name: "Number" } }, numberOfUpdatesInstalled: { - readOnly: true, serializedName: "numberOfUpdatesInstalled", + readOnly: true, type: { name: "Number" } @@ -1154,237 +1395,293 @@ export const UpdateInstallProgress: msRest.CompositeMapper = { } }; -export const Job: msRest.CompositeMapper = { - serializedName: "Job", +export const NetworkAdapter: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Job", + className: "NetworkAdapter", modelProperties: { - id: { - readOnly: true, - serializedName: "id", + adapterId: { + serializedName: "adapterId", + readOnly: true, type: { name: "String" } }, - name: { + adapterPosition: { + serializedName: "adapterPosition", + type: { + name: "Composite", + className: "NetworkAdapterPosition" + } + }, + index: { + serializedName: "index", readOnly: true, - serializedName: "name", type: { - name: "String" + name: "Number" } }, - type: { + nodeId: { + serializedName: "nodeId", readOnly: true, - serializedName: "type", type: { name: "String" } }, - status: { + networkAdapterName: { + serializedName: "networkAdapterName", readOnly: true, - serializedName: "status", type: { name: "String" } }, - startTime: { + label: { + serializedName: "label", readOnly: true, - serializedName: "startTime", type: { - name: "DateTime" + name: "String" } }, - endTime: { + macAddress: { + serializedName: "macAddress", readOnly: true, - serializedName: "endTime", type: { - name: "DateTime" + name: "String" } }, - percentComplete: { + linkSpeed: { + serializedName: "linkSpeed", readOnly: true, - serializedName: "percentComplete", type: { name: "Number" } }, - error: { + status: { + serializedName: "status", readOnly: true, - serializedName: "error", type: { - name: "Composite", - className: "JobErrorDetails" + name: "String" } }, - jobType: { - readOnly: true, - serializedName: "properties.jobType", + rdmaStatus: { + serializedName: "rdmaStatus", type: { name: "String" } }, - currentStage: { - readOnly: true, - serializedName: "properties.currentStage", + dhcpStatus: { + serializedName: "dhcpStatus", type: { name: "String" } }, - downloadProgress: { - readOnly: true, - serializedName: "properties.downloadProgress", + ipv4Configuration: { + serializedName: "ipv4Configuration", type: { name: "Composite", - className: "UpdateDownloadProgress" + className: "Ipv4Config" } }, - installProgress: { - readOnly: true, - serializedName: "properties.installProgress", + ipv6Configuration: { + serializedName: "ipv6Configuration", type: { name: "Composite", - className: "UpdateInstallProgress" + className: "Ipv6Config" } }, - totalRefreshErrors: { + ipv6LinkLocalAddress: { + serializedName: "ipv6LinkLocalAddress", readOnly: true, - serializedName: "properties.totalRefreshErrors", type: { - name: "Number" + name: "String" } }, - errorManifestFile: { + dnsServers: { + serializedName: "dnsServers", readOnly: true, - serializedName: "properties.errorManifestFile", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } - }, - refreshedEntityId: { + } + } + } +}; + +export const NetworkAdapterPosition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkAdapterPosition", + modelProperties: { + networkGroup: { + serializedName: "networkGroup", readOnly: true, - serializedName: "properties.refreshedEntityId", type: { name: "String" } }, - folder: { - serializedName: "properties.folder", + port: { + serializedName: "port", + readOnly: true, type: { - name: "String" + name: "Number" } } } } }; -export const MetricDimensionV1: msRest.CompositeMapper = { - serializedName: "MetricDimension_V1", +export const Ipv4Config: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MetricDimensionV1", + className: "Ipv4Config", modelProperties: { - name: { - serializedName: "name", + ipAddress: { + serializedName: "ipAddress", + readOnly: true, type: { name: "String" } }, - displayName: { - serializedName: "displayName", + subnet: { + serializedName: "subnet", + readOnly: true, type: { name: "String" } }, - toBeExportedForShoebox: { - serializedName: "toBeExportedForShoebox", + gateway: { + serializedName: "gateway", + readOnly: true, type: { - name: "Boolean" + name: "String" } } } } }; -export const MetricSpecificationV1: msRest.CompositeMapper = { - serializedName: "MetricSpecification_V1", +export const Ipv6Config: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MetricSpecificationV1", + className: "Ipv6Config", modelProperties: { - name: { - serializedName: "name", + ipAddress: { + serializedName: "ipAddress", + readOnly: true, type: { name: "String" } }, - displayName: { - serializedName: "displayName", + prefixLength: { + serializedName: "prefixLength", + readOnly: true, type: { - name: "String" + name: "Number" } }, - displayDescription: { - serializedName: "displayDescription", + gateway: { + serializedName: "gateway", + readOnly: true, type: { name: "String" } - }, - unit: { - serializedName: "unit", + } + } + } +}; + +export const NodeList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NodeList", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Node" + } + } } }, - aggregationType: { - serializedName: "aggregationType", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } - }, - dimensions: { - serializedName: "dimensions", + } + } + } +}; + +export const OrderList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OrderList", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "MetricDimensionV1" + className: "Order" } } } }, - fillGapWithZero: { - serializedName: "fillGapWithZero", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Boolean" + name: "String" } - }, - category: { - serializedName: "category", + } + } + } +}; + +export const ContactDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContactDetails", + modelProperties: { + contactPerson: { + serializedName: "contactPerson", + required: true, type: { name: "String" } }, - resourceIdDimensionNameOverride: { - serializedName: "resourceIdDimensionNameOverride", + companyName: { + serializedName: "companyName", + required: true, type: { name: "String" } }, - supportedTimeGrainTypes: { - serializedName: "supportedTimeGrainTypes", + phone: { + serializedName: "phone", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - supportedAggregationTypes: { - serializedName: "supportedAggregationTypes", + emailList: { + serializedName: "emailList", + required: true, type: { name: "Sequence", element: { @@ -1398,227 +1695,229 @@ export const MetricSpecificationV1: msRest.CompositeMapper = { } }; -export const NetworkAdapterPosition: msRest.CompositeMapper = { - serializedName: "NetworkAdapterPosition", +export const Address: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NetworkAdapterPosition", + className: "Address", modelProperties: { - networkGroup: { - readOnly: true, - serializedName: "networkGroup", + addressLine1: { + serializedName: "addressLine1", type: { name: "String" } }, - port: { - readOnly: true, - serializedName: "port", + addressLine2: { + serializedName: "addressLine2", type: { - name: "Number" - } - } - } - } -}; - -export const NetworkAdapter: msRest.CompositeMapper = { - serializedName: "NetworkAdapter", - type: { - name: "Composite", - className: "NetworkAdapter", - modelProperties: { - adapterId: { - readOnly: true, - serializedName: "adapterId", - type: { - name: "String" + name: "String" } }, - adapterPosition: { - readOnly: true, - serializedName: "adapterPosition", + addressLine3: { + serializedName: "addressLine3", type: { - name: "Composite", - className: "NetworkAdapterPosition" + name: "String" } }, - index: { - readOnly: true, - serializedName: "index", + postalCode: { + serializedName: "postalCode", type: { - name: "Number" + name: "String" } }, - nodeId: { - readOnly: true, - serializedName: "nodeId", + city: { + serializedName: "city", type: { name: "String" } }, - networkAdapterName: { - readOnly: true, - serializedName: "networkAdapterName", + state: { + serializedName: "state", type: { name: "String" } }, - label: { - readOnly: true, - serializedName: "label", + country: { + serializedName: "country", + required: true, type: { name: "String" } - }, - macAddress: { - readOnly: true, - serializedName: "macAddress", + } + } + } +}; + +export const OrderStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OrderStatus", + modelProperties: { + status: { + serializedName: "status", + required: true, type: { name: "String" } }, - linkSpeed: { + updateDateTime: { + serializedName: "updateDateTime", readOnly: true, - serializedName: "linkSpeed", type: { - name: "Number" + name: "DateTime" } }, - status: { - readOnly: true, - serializedName: "status", + comments: { + serializedName: "comments", type: { name: "String" } }, - rdmaStatus: { - serializedName: "rdmaStatus", + trackingInformation: { + serializedName: "trackingInformation", type: { - name: "String" + name: "Composite", + className: "TrackingInfo" } }, - dhcpStatus: { - serializedName: "dhcpStatus", + additionalOrderDetails: { + serializedName: "additionalOrderDetails", + readOnly: true, type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } - }, - ipv4Configuration: { - readOnly: true, - serializedName: "ipv4Configuration", + } + } + } +}; + +export const TrackingInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackingInfo", + modelProperties: { + serialNumber: { + serializedName: "serialNumber", type: { - name: "Composite", - className: "Ipv4Config" + name: "String" } }, - ipv6Configuration: { - readOnly: true, - serializedName: "ipv6Configuration", + carrierName: { + serializedName: "carrierName", type: { - name: "Composite", - className: "Ipv6Config" + name: "String" } }, - ipv6LinkLocalAddress: { - readOnly: true, - serializedName: "ipv6LinkLocalAddress", + trackingId: { + serializedName: "trackingId", type: { name: "String" } }, - dnsServers: { - readOnly: true, - serializedName: "dnsServers", + trackingUrl: { + serializedName: "trackingUrl", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } } } } }; -export const NetworkSettings: msRest.CompositeMapper = { - serializedName: "NetworkSettings", +export const DCAccessCode: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NetworkSettings", + className: "DCAccessCode", modelProperties: { - ...ARMBaseModel.type.modelProperties, - networkAdapters: { - readOnly: true, - serializedName: "properties.networkAdapters", + authCode: { + serializedName: "properties.authCode", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkAdapter" - } - } + name: "String" } } } } }; -export const Node: msRest.CompositeMapper = { - serializedName: "Node", +export const RoleList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Node", + className: "RoleList", modelProperties: { - ...ARMBaseModel.type.modelProperties, - nodeStatus: { - readOnly: true, - serializedName: "properties.nodeStatus", - type: { - name: "String" - } - }, - nodeChassisSerialNumber: { + value: { + serializedName: "value", readOnly: true, - serializedName: "properties.nodeChassisSerialNumber", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Role" + } + } } }, - nodeSerialNumber: { + nextLink: { + serializedName: "nextLink", readOnly: true, - serializedName: "properties.nodeSerialNumber", type: { name: "String" } - }, - nodeDisplayName: { + } + } + } +}; + +export const AddonList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AddonList", + modelProperties: { + value: { + serializedName: "value", readOnly: true, - serializedName: "properties.nodeDisplayName", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Addon" + } + } } }, - nodeFriendlySoftwareVersion: { + nextLink: { + serializedName: "nextLink", readOnly: true, - serializedName: "properties.nodeFriendlySoftwareVersion", type: { name: "String" } - }, - nodeHcsVersion: { + } + } + } +}; + +export const MonitoringMetricConfigurationList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MonitoringMetricConfigurationList", + modelProperties: { + value: { + serializedName: "value", readOnly: true, - serializedName: "properties.nodeHcsVersion", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MonitoringMetricConfiguration" + } + } } }, - nodeInstanceId: { + nextLink: { + serializedName: "nextLink", readOnly: true, - serializedName: "properties.nodeInstanceId", type: { name: "String" } @@ -1627,54 +1926,61 @@ export const Node: msRest.CompositeMapper = { } }; -export const OperationDisplay: msRest.CompositeMapper = { - serializedName: "OperationDisplay", +export const MetricConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDisplay", + className: "MetricConfiguration", modelProperties: { - provider: { - serializedName: "provider", + resourceId: { + serializedName: "resourceId", + required: true, type: { name: "String" } }, - resource: { - serializedName: "resource", + mdmAccount: { + serializedName: "mdmAccount", type: { name: "String" } }, - operation: { - serializedName: "operation", + metricNameSpace: { + serializedName: "metricNameSpace", type: { name: "String" } }, - description: { - serializedName: "description", + counterSets: { + serializedName: "counterSets", + required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricCounterSet" + } + } } } } } }; -export const ServiceSpecification: msRest.CompositeMapper = { - serializedName: "ServiceSpecification", +export const MetricCounterSet: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServiceSpecification", + className: "MetricCounterSet", modelProperties: { - metricSpecifications: { - serializedName: "metricSpecifications", + counters: { + serializedName: "counters", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "MetricSpecificationV1" + className: "MetricCounter" } } } @@ -1683,110 +1989,149 @@ export const ServiceSpecification: msRest.CompositeMapper = { } }; -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", +export const MetricCounter: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Operation", + className: "MetricCounter", modelProperties: { name: { serializedName: "name", + required: true, type: { name: "String" } }, - display: { - serializedName: "display", + instance: { + serializedName: "instance", type: { - name: "Composite", - className: "OperationDisplay" + name: "String" } }, - origin: { - serializedName: "origin", + dimensionFilter: { + serializedName: "dimensionFilter", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricDimension" + } + } } }, - serviceSpecification: { - serializedName: "properties.serviceSpecification", + additionalDimensions: { + serializedName: "additionalDimensions", type: { - name: "Composite", - className: "ServiceSpecification" - } - } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricDimension" + } + } + } + } } } }; -export const OrderStatus: msRest.CompositeMapper = { - serializedName: "OrderStatus", +export const MetricDimension: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OrderStatus", + className: "MetricDimension", modelProperties: { - status: { + sourceType: { + serializedName: "sourceType", required: true, - serializedName: "status", type: { name: "String" } }, - updateDateTime: { - readOnly: true, - serializedName: "updateDateTime", - type: { - name: "DateTime" - } - }, - comments: { - serializedName: "comments", + sourceName: { + serializedName: "sourceName", + required: true, type: { name: "String" } - }, - additionalOrderDetails: { + } + } + } +}; + +export const ShareList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ShareList", + modelProperties: { + value: { + serializedName: "value", readOnly: true, - serializedName: "additionalOrderDetails", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { - name: "String" + name: "Composite", + className: "Share" } } } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } } } } }; -export const TrackingInfo: msRest.CompositeMapper = { - serializedName: "TrackingInfo", +export const AzureContainerInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrackingInfo", + className: "AzureContainerInfo", modelProperties: { - serialNumber: { - serializedName: "serialNumber", + storageAccountCredentialId: { + serializedName: "storageAccountCredentialId", + required: true, type: { name: "String" } }, - carrierName: { - serializedName: "carrierName", + containerName: { + serializedName: "containerName", + required: true, type: { name: "String" } }, - trackingId: { - serializedName: "trackingId", + dataFormat: { + serializedName: "dataFormat", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const UserAccessRight: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserAccessRight", + modelProperties: { + userId: { + serializedName: "userId", + required: true, type: { name: "String" } }, - trackingUrl: { - serializedName: "trackingUrl", + accessType: { + serializedName: "accessType", + required: true, type: { name: "String" } @@ -1795,143 +2140,1502 @@ export const TrackingInfo: msRest.CompositeMapper = { } }; -export const Order: msRest.CompositeMapper = { - serializedName: "Order", +export const ClientAccessRight: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Order", + className: "ClientAccessRight", modelProperties: { - ...ARMBaseModel.type.modelProperties, - contactInformation: { + client: { + serializedName: "client", required: true, - serializedName: "properties.contactInformation", type: { - name: "Composite", - className: "ContactDetails" + name: "String" } }, - shippingAddress: { + accessPermission: { + serializedName: "accessPermission", required: true, - serializedName: "properties.shippingAddress", type: { - name: "Composite", - className: "Address" + name: "String" + } + } + } + } +}; + +export const RefreshDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RefreshDetails", + modelProperties: { + inProgressRefreshJobId: { + serializedName: "inProgressRefreshJobId", + type: { + name: "String" } }, - currentStatus: { - serializedName: "properties.currentStatus", + lastCompletedRefreshJobTimeInUTC: { + serializedName: "lastCompletedRefreshJobTimeInUTC", type: { - name: "Composite", - className: "OrderStatus" + name: "DateTime" } }, - orderHistory: { + errorManifestFile: { + serializedName: "errorManifestFile", + type: { + name: "String" + } + }, + lastJob: { + serializedName: "lastJob", + type: { + name: "String" + } + } + } + } +}; + +export const MountPointMap: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MountPointMap", + modelProperties: { + shareId: { + serializedName: "shareId", + required: true, + type: { + name: "String" + } + }, + roleId: { + serializedName: "roleId", + readOnly: true, + type: { + name: "String" + } + }, + mountPoint: { + serializedName: "mountPoint", + readOnly: true, + type: { + name: "String" + } + }, + mountType: { + serializedName: "mountType", + readOnly: true, + type: { + name: "String" + } + }, + roleType: { + serializedName: "roleType", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const StorageAccountCredentialList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageAccountCredentialList", + modelProperties: { + value: { + serializedName: "value", readOnly: true, - serializedName: "properties.orderHistory", type: { name: "Sequence", element: { type: { name: "Composite", - className: "OrderStatus" + className: "StorageAccountCredential" } } } }, - serialNumber: { + nextLink: { + serializedName: "nextLink", readOnly: true, - serializedName: "properties.serialNumber", type: { name: "String" } - }, - deliveryTrackingInfo: { + } + } + } +}; + +export const StorageAccountList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageAccountList", + modelProperties: { + value: { + serializedName: "value", readOnly: true, - serializedName: "properties.deliveryTrackingInfo", type: { name: "Sequence", element: { type: { name: "Composite", - className: "TrackingInfo" + className: "StorageAccount" } } } }, - returnTrackingInfo: { + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ContainerList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerList", + modelProperties: { + value: { + serializedName: "value", readOnly: true, - serializedName: "properties.returnTrackingInfo", type: { name: "Sequence", element: { type: { name: "Composite", - className: "TrackingInfo" + className: "Container" } } } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const TriggerList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TriggerList", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Trigger" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const DataBoxEdgeDeviceExtendedInfoPatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataBoxEdgeDeviceExtendedInfoPatch", + modelProperties: { + clientSecretStoreId: { + serializedName: "clientSecretStoreId", + type: { + name: "String" + } + }, + clientSecretStoreUrl: { + serializedName: "clientSecretStoreUrl", + type: { + name: "String" + } + }, + channelIntegrityKeyName: { + serializedName: "channelIntegrityKeyName", + type: { + name: "String" + } + }, + channelIntegrityKeyVersion: { + serializedName: "channelIntegrityKeyVersion", + type: { + name: "String" + } + }, + syncStatus: { + serializedName: "syncStatus", + type: { + name: "String" + } + } + } + } +}; + +export const UpdateDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdateDetails", + modelProperties: { + updateTitle: { + serializedName: "updateTitle", + type: { + name: "String" + } + }, + updateSize: { + serializedName: "updateSize", + type: { + name: "Number" + } + }, + updateType: { + serializedName: "updateType", + type: { + name: "String" + } + }, + targetVersion: { + serializedName: "targetVersion", + type: { + name: "String" + } + }, + friendlyVersionNumber: { + serializedName: "friendlyVersionNumber", + type: { + name: "String" + } + }, + estimatedInstallTimeInMins: { + serializedName: "estimatedInstallTimeInMins", + type: { + name: "Number" + } + }, + rebootBehavior: { + serializedName: "rebootBehavior", + type: { + name: "String" + } + }, + installationImpact: { + serializedName: "installationImpact", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const UploadCertificateRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UploadCertificateRequest", + modelProperties: { + authenticationType: { + serializedName: "properties.authenticationType", + type: { + name: "String" + } + }, + certificate: { + serializedName: "properties.certificate", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const UploadCertificateResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UploadCertificateResponse", + modelProperties: { + authType: { + serializedName: "authType", + type: { + name: "String" + } + }, + resourceId: { + serializedName: "resourceId", + readOnly: true, + type: { + name: "String" + } + }, + aadAuthority: { + serializedName: "aadAuthority", + readOnly: true, + type: { + name: "String" + } + }, + aadTenantId: { + serializedName: "aadTenantId", + readOnly: true, + type: { + name: "String" + } + }, + servicePrincipalClientId: { + serializedName: "servicePrincipalClientId", + readOnly: true, + type: { + name: "String" + } + }, + servicePrincipalObjectId: { + serializedName: "servicePrincipalObjectId", + readOnly: true, + type: { + name: "String" + } + }, + azureManagementEndpointAudience: { + serializedName: "azureManagementEndpointAudience", + readOnly: true, + type: { + name: "String" + } + }, + aadAudience: { + serializedName: "aadAudience", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const UserList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserList", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "User" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ShareAccessRight: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ShareAccessRight", + modelProperties: { + shareId: { + serializedName: "shareId", + required: true, + type: { + name: "String" + } + }, + accessType: { + serializedName: "accessType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const Authentication: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Authentication", + modelProperties: { + symmetricKey: { + serializedName: "symmetricKey", + type: { + name: "Composite", + className: "SymmetricKey" + } + } + } + } +}; + +export const SymmetricKey: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SymmetricKey", + modelProperties: { + connectionString: { + serializedName: "connectionString", + type: { + name: "Composite", + className: "AsymmetricEncryptedSecret" + } + } + } + } +}; + +export const CniConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CniConfig", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + version: { + serializedName: "version", + readOnly: true, + type: { + name: "String" + } + }, + podSubnet: { + serializedName: "podSubnet", + readOnly: true, + type: { + name: "String" + } + }, + serviceSubnet: { + serializedName: "serviceSubnet", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ComputeResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ComputeResource", + modelProperties: { + processorCount: { + serializedName: "processorCount", + required: true, + type: { + name: "Number" + } + }, + memoryInGB: { + serializedName: "memoryInGB", + required: true, + type: { + name: "Number" + } + } + } + } +}; + +export const DataBoxEdgeMoveRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataBoxEdgeMoveRequest", + modelProperties: { + targetResourceGroup: { + serializedName: "targetResourceGroup", + required: true, + type: { + name: "String" + } + }, + resources: { + serializedName: "resources", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const EtcdInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EtcdInfo", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + version: { + serializedName: "version", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const FileSourceInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FileSourceInfo", + modelProperties: { + shareId: { + serializedName: "shareId", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const RoleSinkInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RoleSinkInfo", + modelProperties: { + roleId: { + serializedName: "roleId", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ImageRepositoryCredential: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ImageRepositoryCredential", + modelProperties: { + imageRepositoryUrl: { + serializedName: "imageRepositoryUrl", + required: true, + type: { + name: "String" + } + }, + userName: { + serializedName: "userName", + required: true, + type: { + name: "String" + } + }, + password: { + serializedName: "password", + type: { + name: "Composite", + className: "AsymmetricEncryptedSecret" + } + } + } + } +}; + +export const IoTDeviceInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IoTDeviceInfo", + modelProperties: { + deviceId: { + serializedName: "deviceId", + required: true, + type: { + name: "String" + } + }, + ioTHostHub: { + serializedName: "ioTHostHub", + required: true, + type: { + name: "String" + } + }, + ioTHostHubId: { + serializedName: "ioTHostHubId", + type: { + name: "String" + } + }, + authentication: { + serializedName: "authentication", + type: { + name: "Composite", + className: "Authentication" + } + } + } + } +}; + +export const IoTEdgeAgentInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IoTEdgeAgentInfo", + modelProperties: { + imageName: { + serializedName: "imageName", + required: true, + type: { + name: "String" + } + }, + tag: { + serializedName: "tag", + required: true, + type: { + name: "String" + } + }, + imageRepository: { + serializedName: "imageRepository", + type: { + name: "Composite", + className: "ImageRepositoryCredential" + } + } + } + } +}; + +export const KubernetesClusterInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KubernetesClusterInfo", + modelProperties: { + etcdInfo: { + serializedName: "etcdInfo", + type: { + name: "Composite", + className: "EtcdInfo" + } + }, + nodes: { + serializedName: "nodes", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NodeInfo" + } + } + } + }, + version: { + serializedName: "version", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const NodeInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NodeInfo", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + ipConfiguration: { + serializedName: "ipConfiguration", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "KubernetesIPConfiguration" + } + } + } + } + } + } +}; + +export const KubernetesIPConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KubernetesIPConfiguration", + modelProperties: { + port: { + serializedName: "port", + readOnly: true, + type: { + name: "String" + } + }, + ipAddress: { + serializedName: "ipAddress", + type: { + name: "String" + } + } + } + } +}; + +export const KubernetesRoleResources: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KubernetesRoleResources", + modelProperties: { + storage: { + serializedName: "storage", + type: { + name: "Composite", + className: "KubernetesRoleStorage" + } + }, + compute: { + serializedName: "compute", + type: { + name: "Composite", + className: "KubernetesRoleCompute" + } + }, + network: { + serializedName: "network", + type: { + name: "Composite", + className: "KubernetesRoleNetwork" + } + } + } + } +}; + +export const KubernetesRoleStorage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KubernetesRoleStorage", + modelProperties: { + storageClasses: { + serializedName: "storageClasses", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "KubernetesRoleStorageClassInfo" + } + } + } + }, + endpoints: { + serializedName: "endpoints", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MountPointMap" + } + } + } + } + } + } +}; + +export const KubernetesRoleStorageClassInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KubernetesRoleStorageClassInfo", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + posixCompliant: { + serializedName: "posixCompliant", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const KubernetesRoleCompute: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KubernetesRoleCompute", + modelProperties: { + vmProfile: { + serializedName: "vmProfile", + required: true, + type: { + name: "String" + } + }, + memoryInBytes: { + serializedName: "memoryInBytes", + readOnly: true, + type: { + name: "Number" + } + }, + processorCount: { + serializedName: "processorCount", + readOnly: true, + type: { + name: "Number" + } + } + } + } +}; + +export const KubernetesRoleNetwork: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KubernetesRoleNetwork", + modelProperties: { + cniConfig: { + serializedName: "cniConfig", + type: { + name: "Composite", + className: "CniConfig" + } + }, + loadBalancerConfig: { + serializedName: "loadBalancerConfig", + type: { + name: "Composite", + className: "LoadBalancerConfig" + } + } + } + } +}; + +export const LoadBalancerConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LoadBalancerConfig", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + version: { + serializedName: "version", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PeriodicTimerSourceInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PeriodicTimerSourceInfo", + modelProperties: { + startTime: { + serializedName: "startTime", + required: true, + type: { + name: "DateTime" + } + }, + schedule: { + serializedName: "schedule", + required: true, + type: { + name: "String" + } + }, + topic: { + serializedName: "topic", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceTypeSku: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceTypeSku", + modelProperties: { + resourceType: { + serializedName: "resourceType", + readOnly: true, + type: { + name: "String" + } + }, + skus: { + serializedName: "skus", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuInformation" + } + } + } + } + } + } +}; + +export const SkuInformation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SkuInformation", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + tier: { + serializedName: "tier", + readOnly: true, + type: { + name: "String" + } + }, + kind: { + serializedName: "kind", + readOnly: true, + type: { + name: "String" + } + }, + family: { + serializedName: "family", + readOnly: true, + type: { + name: "String" + } + }, + costs: { + serializedName: "costs", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuCost" + } + } + } + }, + locations: { + serializedName: "locations", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + locationInfo: { + serializedName: "locationInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuLocationInfo" + } + } + } + }, + requiredQuotaIds: { + serializedName: "requiredQuotaIds", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredFeatures: { + serializedName: "requiredFeatures", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const SkuInformationList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SkuInformationList", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceTypeSku" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const DataBoxEdgeDevice: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataBoxEdgeDevice", + modelProperties: { + ...ARMBaseModel.type.modelProperties, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceIdentity" + } + }, + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + systemDataPropertiesSystemData: { + serializedName: "properties.systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + dataBoxEdgeDeviceStatus: { + serializedName: "properties.dataBoxEdgeDeviceStatus", + type: { + name: "String" + } + }, + serialNumber: { + serializedName: "properties.serialNumber", + readOnly: true, + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + readOnly: true, + type: { + name: "String" + } + }, + modelDescription: { + serializedName: "properties.modelDescription", + readOnly: true, + type: { + name: "String" + } + }, + deviceType: { + serializedName: "properties.deviceType", + readOnly: true, + type: { + name: "String" + } + }, + friendlyName: { + serializedName: "properties.friendlyName", + readOnly: true, + type: { + name: "String" + } + }, + culture: { + serializedName: "properties.culture", + readOnly: true, + type: { + name: "String" + } + }, + deviceModel: { + serializedName: "properties.deviceModel", + readOnly: true, + type: { + name: "String" + } + }, + deviceSoftwareVersion: { + serializedName: "properties.deviceSoftwareVersion", + readOnly: true, + type: { + name: "String" + } + }, + deviceLocalCapacity: { + serializedName: "properties.deviceLocalCapacity", + readOnly: true, + type: { + name: "Number" + } + }, + timeZone: { + serializedName: "properties.timeZone", + readOnly: true, + type: { + name: "String" + } + }, + deviceHcsVersion: { + serializedName: "properties.deviceHcsVersion", + readOnly: true, + type: { + name: "String" + } + }, + configuredRoleTypes: { + serializedName: "properties.configuredRoleTypes", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + nodeCount: { + serializedName: "properties.nodeCount", + readOnly: true, + type: { + name: "Number" + } + }, + resourceMoveDetails: { + serializedName: "properties.resourceMoveDetails", + type: { + name: "Composite", + className: "ResourceMoveDetails" + } + }, + edgeProfile: { + serializedName: "properties.edgeProfile", + type: { + name: "Composite", + className: "EdgeProfile" + } + }, + dataResidency: { + serializedName: "properties.dataResidency", + type: { + name: "Composite", + className: "DataResidency" + } + } + } + } +}; + +export const Alert: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Alert", + modelProperties: { + ...ARMBaseModel.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + title: { + serializedName: "properties.title", + readOnly: true, + type: { + name: "String" + } + }, + alertType: { + serializedName: "properties.alertType", + readOnly: true, + type: { + name: "String" + } + }, + appearedAtDateTime: { + serializedName: "properties.appearedAtDateTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + recommendation: { + serializedName: "properties.recommendation", + readOnly: true, + type: { + name: "String" + } + }, + severity: { + serializedName: "properties.severity", + readOnly: true, + type: { + name: "String" + } + }, + errorDetails: { + serializedName: "properties.errorDetails", + type: { + name: "Composite", + className: "AlertErrorDetails" + } + }, + detailedInformation: { + serializedName: "properties.detailedInformation", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } } } } }; -export const PeriodicTimerSourceInfo: msRest.CompositeMapper = { - serializedName: "PeriodicTimerSourceInfo", +export const BandwidthSchedule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PeriodicTimerSourceInfo", + className: "BandwidthSchedule", modelProperties: { - startTime: { - required: true, - serializedName: "startTime", + ...ARMBaseModel.type.modelProperties, + systemData: { + serializedName: "systemData", type: { - name: "DateTime" + name: "Composite", + className: "SystemData" } }, - schedule: { + start: { + serializedName: "properties.start", required: true, - serializedName: "schedule", type: { name: "String" } }, - topic: { - serializedName: "topic", + stop: { + serializedName: "properties.stop", + required: true, type: { name: "String" } + }, + rateInMbps: { + serializedName: "properties.rateInMbps", + required: true, + type: { + name: "Number" + } + }, + days: { + serializedName: "properties.days", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } }; -export const PeriodicTimerEventTrigger: msRest.CompositeMapper = { - serializedName: "PeriodicTimerEvent", +export const DiagnosticProactiveLogCollectionSettings: coreClient.CompositeMapper = { type: { name: "Composite", - polymorphicDiscriminator: Trigger.type.polymorphicDiscriminator, - uberParent: "Trigger", - className: "PeriodicTimerEventTrigger", + className: "DiagnosticProactiveLogCollectionSettings", modelProperties: { - ...Trigger.type.modelProperties, - sourceInfo: { - required: true, - serializedName: "properties.sourceInfo", + ...ARMBaseModel.type.modelProperties, + systemData: { + serializedName: "systemData", type: { name: "Composite", - className: "PeriodicTimerSourceInfo" + className: "SystemData" } }, - sinkInfo: { + userConsent: { + serializedName: "properties.userConsent", required: true, - serializedName: "properties.sinkInfo", - type: { - name: "Composite", - className: "RoleSinkInfo" - } - }, - customContextTag: { - serializedName: "properties.customContextTag", type: { name: "String" } @@ -1940,39 +3644,27 @@ export const PeriodicTimerEventTrigger: msRest.CompositeMapper = { } }; -export const SkuLocationInfo: msRest.CompositeMapper = { - serializedName: "SkuLocationInfo", +export const DiagnosticRemoteSupportSettings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SkuLocationInfo", + className: "DiagnosticRemoteSupportSettings", modelProperties: { - location: { - readOnly: true, - serializedName: "location", - type: { - name: "String" - } - }, - zones: { - readOnly: true, - serializedName: "zones", + ...ARMBaseModel.type.modelProperties, + systemData: { + serializedName: "systemData", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "SystemData" } }, - sites: { - readOnly: true, - serializedName: "sites", + remoteSupportSettingsList: { + serializedName: "properties.remoteSupportSettingsList", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "RemoteSupportSettings" } } } @@ -1981,63 +3673,95 @@ export const SkuLocationInfo: msRest.CompositeMapper = { } }; -export const SkuCost: msRest.CompositeMapper = { - serializedName: "SkuCost", +export const DataBoxEdgeDeviceExtendedInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SkuCost", + className: "DataBoxEdgeDeviceExtendedInfo", modelProperties: { - meterId: { - readOnly: true, - serializedName: "meterId", + ...ARMBaseModel.type.modelProperties, + encryptionKeyThumbprint: { + serializedName: "properties.encryptionKeyThumbprint", type: { name: "String" } }, - quantity: { - readOnly: true, - serializedName: "quantity", + encryptionKey: { + serializedName: "properties.encryptionKey", type: { - name: "Number" + name: "String" } }, - extendedUnit: { + resourceKey: { + serializedName: "properties.resourceKey", readOnly: true, - serializedName: "extendedUnit", type: { name: "String" } + }, + clientSecretStoreId: { + serializedName: "properties.clientSecretStoreId", + type: { + name: "String" + } + }, + clientSecretStoreUrl: { + serializedName: "properties.clientSecretStoreUrl", + type: { + name: "String" + } + }, + channelIntegrityKeyName: { + serializedName: "properties.channelIntegrityKeyName", + type: { + name: "String" + } + }, + channelIntegrityKeyVersion: { + serializedName: "properties.channelIntegrityKeyVersion", + type: { + name: "String" + } + }, + keyVaultSyncStatus: { + serializedName: "properties.keyVaultSyncStatus", + type: { + name: "String" + } + }, + deviceSecrets: { + serializedName: "properties.deviceSecrets", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "Composite", className: "Secret" } } + } } } } }; -export const SkuRestrictionInfo: msRest.CompositeMapper = { - serializedName: "SkuRestrictionInfo", +export const NetworkSettings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SkuRestrictionInfo", + className: "NetworkSettings", modelProperties: { - locations: { - readOnly: true, - serializedName: "locations", + ...ARMBaseModel.type.modelProperties, + systemData: { + serializedName: "systemData", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "SystemData" } }, - zones: { + networkAdapters: { + serializedName: "properties.networkAdapters", readOnly: true, - serializedName: "zones", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "NetworkAdapter" } } } @@ -2046,208 +3770,275 @@ export const SkuRestrictionInfo: msRest.CompositeMapper = { } }; -export const SkuRestriction: msRest.CompositeMapper = { - serializedName: "SkuRestriction", +export const Node: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SkuRestriction", + className: "Node", modelProperties: { - type: { + ...ARMBaseModel.type.modelProperties, + nodeStatus: { + serializedName: "properties.nodeStatus", readOnly: true, - serializedName: "type", type: { name: "String" } }, - values: { + nodeChassisSerialNumber: { + serializedName: "properties.nodeChassisSerialNumber", readOnly: true, - serializedName: "values", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - reasonCode: { + nodeSerialNumber: { + serializedName: "properties.nodeSerialNumber", readOnly: true, - serializedName: "reasonCode", type: { name: "String" } }, - restrictionInfo: { + nodeDisplayName: { + serializedName: "properties.nodeDisplayName", readOnly: true, - serializedName: "restrictionInfo", type: { - name: "Composite", - className: "SkuRestrictionInfo" + name: "String" } - } - } - } -}; - -export const ResourceTypeSku: msRest.CompositeMapper = { - serializedName: "ResourceTypeSku", - type: { - name: "Composite", - className: "ResourceTypeSku", - modelProperties: { - resourceType: { + }, + nodeFriendlySoftwareVersion: { + serializedName: "properties.nodeFriendlySoftwareVersion", readOnly: true, - serializedName: "resourceType", type: { name: "String" } }, - name: { + nodeHcsVersion: { + serializedName: "properties.nodeHcsVersion", readOnly: true, - serializedName: "name", type: { name: "String" } }, - kind: { + nodeInstanceId: { + serializedName: "properties.nodeInstanceId", readOnly: true, - serializedName: "kind", type: { name: "String" } + } + } + } +}; + +export const Order: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Order", + modelProperties: { + ...ARMBaseModel.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } }, - tier: { - readOnly: true, - serializedName: "tier", + contactInformation: { + serializedName: "properties.contactInformation", type: { - name: "String" + name: "Composite", + className: "ContactDetails" } }, - family: { - readOnly: true, - serializedName: "family", + shippingAddress: { + serializedName: "properties.shippingAddress", type: { - name: "String" + name: "Composite", + className: "Address" } }, - locations: { - readOnly: true, - serializedName: "locations", + currentStatus: { + serializedName: "properties.currentStatus", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "OrderStatus" } }, - apiVersions: { + orderHistory: { + serializedName: "properties.orderHistory", readOnly: true, - serializedName: "apiVersions", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "OrderStatus" } } } }, - locationInfo: { + serialNumber: { + serializedName: "properties.serialNumber", readOnly: true, - serializedName: "locationInfo", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SkuLocationInfo" - } - } + name: "String" } }, - costs: { + deliveryTrackingInfo: { + serializedName: "properties.deliveryTrackingInfo", readOnly: true, - serializedName: "costs", type: { name: "Sequence", element: { type: { name: "Composite", - className: "SkuCost" + className: "TrackingInfo" } } } }, - restrictions: { + returnTrackingInfo: { + serializedName: "properties.returnTrackingInfo", readOnly: true, - serializedName: "restrictions", type: { name: "Sequence", element: { type: { name: "Composite", - className: "SkuRestriction" + className: "TrackingInfo" } } } + }, + shipmentType: { + serializedName: "properties.shipmentType", + type: { + name: "String" + } } } } }; -export const SecuritySettings: msRest.CompositeMapper = { - serializedName: "SecuritySettings", +export const Role: coreClient.CompositeMapper = { + serializedName: "Role", type: { name: "Composite", - className: "SecuritySettings", + className: "Role", + uberParent: "ARMBaseModel", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, modelProperties: { ...ARMBaseModel.type.modelProperties, - deviceAdminPassword: { + kind: { + serializedName: "kind", required: true, - serializedName: "properties.deviceAdminPassword", + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", type: { name: "Composite", - className: "AsymmetricEncryptedSecret" + className: "SystemData" } } } } }; -export const UserAccessRight: msRest.CompositeMapper = { - serializedName: "UserAccessRight", +export const Addon: coreClient.CompositeMapper = { + serializedName: "Addon", type: { name: "Composite", - className: "UserAccessRight", + className: "Addon", + uberParent: "ARMBaseModel", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, modelProperties: { - userId: { + ...ARMBaseModel.type.modelProperties, + kind: { + serializedName: "kind", required: true, - serializedName: "userId", type: { name: "String" } }, - accessType: { + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const MonitoringMetricConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MonitoringMetricConfiguration", + modelProperties: { + ...ARMBaseModel.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + metricConfigurations: { + serializedName: "properties.metricConfigurations", required: true, - serializedName: "accessType", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricConfiguration" + } + } + } + } + } + } +}; + +export const SecuritySettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecuritySettings", + modelProperties: { + ...ARMBaseModel.type.modelProperties, + deviceAdminPassword: { + serializedName: "properties.deviceAdminPassword", + type: { + name: "Composite", + className: "AsymmetricEncryptedSecret" } } } } }; -export const Share: msRest.CompositeMapper = { - serializedName: "Share", +export const Share: coreClient.CompositeMapper = { type: { name: "Composite", className: "Share", modelProperties: { ...ARMBaseModel.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, description: { serializedName: "properties.description", type: { @@ -2255,15 +4046,15 @@ export const Share: msRest.CompositeMapper = { } }, shareStatus: { - required: true, serializedName: "properties.shareStatus", + required: true, type: { name: "String" } }, monitoringStatus: { - required: true, serializedName: "properties.monitoringStatus", + required: true, type: { name: "String" } @@ -2276,8 +4067,8 @@ export const Share: msRest.CompositeMapper = { } }, accessProtocol: { - required: true, serializedName: "properties.accessProtocol", + required: true, type: { name: "String" } @@ -2314,8 +4105,8 @@ export const Share: msRest.CompositeMapper = { } }, shareMappings: { - readOnly: true, serializedName: "properties.shareMappings", + readOnly: true, type: { name: "Sequence", element: { @@ -2336,22 +4127,67 @@ export const Share: msRest.CompositeMapper = { } }; -export const ShareAccessRight: msRest.CompositeMapper = { - serializedName: "ShareAccessRight", +export const StorageAccountCredential: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ShareAccessRight", + className: "StorageAccountCredential", modelProperties: { - shareId: { + ...ARMBaseModel.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + alias: { + serializedName: "properties.alias", required: true, - serializedName: "shareId", type: { name: "String" } }, - accessType: { + userName: { + serializedName: "properties.userName", + type: { + name: "String" + } + }, + accountKey: { + serializedName: "properties.accountKey", + type: { + name: "Composite", + className: "AsymmetricEncryptedSecret" + } + }, + connectionString: { + serializedName: "properties.connectionString", + type: { + name: "String" + } + }, + sslStatus: { + serializedName: "properties.sslStatus", required: true, - serializedName: "accessType", + type: { + name: "String" + } + }, + blobDomainName: { + serializedName: "properties.blobDomainName", + type: { + name: "String" + } + }, + accountType: { + serializedName: "properties.accountType", + required: true, + type: { + name: "String" + } + }, + storageAccountId: { + serializedName: "properties.storageAccountId", type: { name: "String" } @@ -2360,13 +4196,19 @@ export const ShareAccessRight: msRest.CompositeMapper = { } }; -export const StorageAccount: msRest.CompositeMapper = { - serializedName: "StorageAccount", +export const StorageAccount: coreClient.CompositeMapper = { type: { name: "Composite", className: "StorageAccount", modelProperties: { ...ARMBaseModel.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, description: { serializedName: "properties.description", type: { @@ -2381,6 +4223,7 @@ export const StorageAccount: msRest.CompositeMapper = { }, dataPolicy: { serializedName: "properties.dataPolicy", + required: true, type: { name: "String" } @@ -2392,15 +4235,15 @@ export const StorageAccount: msRest.CompositeMapper = { } }, blobEndpoint: { - readOnly: true, serializedName: "properties.blobEndpoint", + readOnly: true, type: { name: "String" } }, containerCount: { - readOnly: true, serializedName: "properties.containerCount", + readOnly: true, type: { name: "Number" } @@ -2409,61 +4252,101 @@ export const StorageAccount: msRest.CompositeMapper = { } }; -export const StorageAccountCredential: msRest.CompositeMapper = { - serializedName: "StorageAccountCredential", +export const Container: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StorageAccountCredential", + className: "Container", modelProperties: { ...ARMBaseModel.type.modelProperties, - alias: { - required: true, - serializedName: "properties.alias", + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + containerStatus: { + serializedName: "properties.containerStatus", + readOnly: true, type: { name: "String" } }, - userName: { - serializedName: "properties.userName", + dataFormat: { + serializedName: "properties.dataFormat", + required: true, type: { name: "String" } }, - accountKey: { - serializedName: "properties.accountKey", + refreshDetails: { + serializedName: "properties.refreshDetails", type: { name: "Composite", - className: "AsymmetricEncryptedSecret" + className: "RefreshDetails" } }, - connectionString: { - serializedName: "properties.connectionString", + createdDateTime: { + serializedName: "properties.createdDateTime", + readOnly: true, type: { - name: "String" + name: "DateTime" + } + } + } + } +}; + +export const Trigger: coreClient.CompositeMapper = { + serializedName: "Trigger", + type: { + name: "Composite", + className: "Trigger", + uberParent: "ARMBaseModel", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + modelProperties: { + ...ARMBaseModel.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" } }, - sslStatus: { + kind: { + serializedName: "kind", required: true, - serializedName: "properties.sslStatus", type: { name: "String" } - }, - blobDomainName: { - serializedName: "properties.blobDomainName", + } + } + } +}; + +export const TriggerSupportPackageRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TriggerSupportPackageRequest", + modelProperties: { + ...ARMBaseModel.type.modelProperties, + minimumTimeStamp: { + serializedName: "properties.minimumTimeStamp", type: { - name: "String" + name: "DateTime" } }, - accountType: { - required: true, - serializedName: "properties.accountType", + maximumTimeStamp: { + serializedName: "properties.maximumTimeStamp", type: { - name: "String" + name: "DateTime" } }, - storageAccountId: { - serializedName: "properties.storageAccountId", + include: { + serializedName: "properties.include", type: { name: "String" } @@ -2472,117 +4355,163 @@ export const StorageAccountCredential: msRest.CompositeMapper = { } }; -export const UpdateSummary: msRest.CompositeMapper = { - serializedName: "UpdateSummary", +export const UpdateSummary: coreClient.CompositeMapper = { type: { name: "Composite", className: "UpdateSummary", modelProperties: { ...ARMBaseModel.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, deviceVersionNumber: { serializedName: "properties.deviceVersionNumber", type: { name: "String" } }, - friendlyDeviceVersionName: { - serializedName: "properties.friendlyDeviceVersionName", + friendlyDeviceVersionName: { + serializedName: "properties.friendlyDeviceVersionName", + type: { + name: "String" + } + }, + deviceLastScannedDateTime: { + serializedName: "properties.deviceLastScannedDateTime", + type: { + name: "DateTime" + } + }, + lastCompletedScanJobDateTime: { + serializedName: "properties.lastCompletedScanJobDateTime", + type: { + name: "DateTime" + } + }, + lastSuccessfulScanJobTime: { + serializedName: "properties.lastSuccessfulScanJobTime", + type: { + name: "DateTime" + } + }, + lastCompletedDownloadJobDateTime: { + serializedName: "properties.lastCompletedDownloadJobDateTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + lastCompletedDownloadJobId: { + serializedName: "properties.lastCompletedDownloadJobId", + readOnly: true, + type: { + name: "String" + } + }, + lastDownloadJobStatus: { + serializedName: "properties.lastDownloadJobStatus", + readOnly: true, type: { name: "String" } }, - deviceLastScannedDateTime: { - serializedName: "properties.deviceLastScannedDateTime", + lastSuccessfulInstallJobDateTime: { + serializedName: "properties.lastSuccessfulInstallJobDateTime", type: { name: "DateTime" } }, - lastCompletedScanJobDateTime: { - serializedName: "properties.lastCompletedScanJobDateTime", + lastCompletedInstallJobDateTime: { + serializedName: "properties.lastCompletedInstallJobDateTime", + readOnly: true, type: { name: "DateTime" } }, - lastCompletedDownloadJobDateTime: { + lastCompletedInstallJobId: { + serializedName: "properties.lastCompletedInstallJobId", readOnly: true, - serializedName: "properties.lastCompletedDownloadJobDateTime", type: { - name: "DateTime" + name: "String" } }, - lastCompletedInstallJobDateTime: { + lastInstallJobStatus: { + serializedName: "properties.lastInstallJobStatus", readOnly: true, - serializedName: "properties.lastCompletedInstallJobDateTime", type: { - name: "DateTime" + name: "String" } }, totalNumberOfUpdatesAvailable: { - readOnly: true, serializedName: "properties.totalNumberOfUpdatesAvailable", + readOnly: true, type: { name: "Number" } }, totalNumberOfUpdatesPendingDownload: { - readOnly: true, serializedName: "properties.totalNumberOfUpdatesPendingDownload", + readOnly: true, type: { name: "Number" } }, totalNumberOfUpdatesPendingInstall: { - readOnly: true, serializedName: "properties.totalNumberOfUpdatesPendingInstall", + readOnly: true, type: { name: "Number" } }, rebootBehavior: { - readOnly: true, serializedName: "properties.rebootBehavior", + readOnly: true, type: { name: "String" } }, ongoingUpdateOperation: { - readOnly: true, serializedName: "properties.ongoingUpdateOperation", + readOnly: true, type: { name: "String" } }, inProgressDownloadJobId: { - readOnly: true, serializedName: "properties.inProgressDownloadJobId", + readOnly: true, type: { name: "String" } }, inProgressInstallJobId: { - readOnly: true, serializedName: "properties.inProgressInstallJobId", + readOnly: true, type: { name: "String" } }, inProgressDownloadJobStartedDateTime: { - readOnly: true, serializedName: "properties.inProgressDownloadJobStartedDateTime", + readOnly: true, type: { name: "DateTime" } }, inProgressInstallJobStartedDateTime: { - readOnly: true, serializedName: "properties.inProgressInstallJobStartedDateTime", + readOnly: true, type: { name: "DateTime" } }, updateTitles: { - readOnly: true, serializedName: "properties.updateTitles", + readOnly: true, type: { name: "Sequence", element: { @@ -2592,112 +4521,50 @@ export const UpdateSummary: msRest.CompositeMapper = { } } }, - totalUpdateSizeInBytes: { - readOnly: true, - serializedName: "properties.totalUpdateSizeInBytes", - type: { - name: "Number" - } - } - } - } -}; - -export const UploadCertificateRequest: msRest.CompositeMapper = { - serializedName: "UploadCertificateRequest", - type: { - name: "Composite", - className: "UploadCertificateRequest", - modelProperties: { - authenticationType: { - serializedName: "properties.authenticationType", - type: { - name: "String" - } - }, - certificate: { - required: true, - serializedName: "properties.certificate", - type: { - name: "String" - } - } - } - } -}; - -export const UploadCertificateResponse: msRest.CompositeMapper = { - serializedName: "UploadCertificateResponse", - type: { - name: "Composite", - className: "UploadCertificateResponse", - modelProperties: { - authType: { - serializedName: "authType", - type: { - name: "String" - } - }, - resourceId: { - readOnly: true, - serializedName: "resourceId", - type: { - name: "String" - } - }, - aadAuthority: { - readOnly: true, - serializedName: "aadAuthority", - type: { - name: "String" - } - }, - aadTenantId: { - readOnly: true, - serializedName: "aadTenantId", - type: { - name: "String" - } - }, - servicePrincipalClientId: { - readOnly: true, - serializedName: "servicePrincipalClientId", - type: { - name: "String" - } - }, - servicePrincipalObjectId: { + updates: { + serializedName: "properties.updates", readOnly: true, - serializedName: "servicePrincipalObjectId", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UpdateDetails" + } + } } }, - azureManagementEndpointAudience: { + totalUpdateSizeInBytes: { + serializedName: "properties.totalUpdateSizeInBytes", readOnly: true, - serializedName: "azureManagementEndpointAudience", type: { - name: "String" + name: "Number" } }, - aadAudience: { + totalTimeInMinutes: { + serializedName: "properties.totalTimeInMinutes", readOnly: true, - serializedName: "aadAudience", type: { - name: "String" + name: "Number" } } } } }; -export const User: msRest.CompositeMapper = { - serializedName: "User", +export const User: coreClient.CompositeMapper = { type: { name: "Composite", className: "User", modelProperties: { ...ARMBaseModel.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, encryptedPassword: { serializedName: "properties.encryptedPassword", type: { @@ -2707,6 +4574,7 @@ export const User: msRest.CompositeMapper = { }, shareAccessRights: { serializedName: "properties.shareAccessRights", + readOnly: true, type: { name: "Sequence", element: { @@ -2718,37 +4586,8 @@ export const User: msRest.CompositeMapper = { } }, userType: { - required: true, serializedName: "properties.userType", - type: { - name: "String" - } - } - } - } -}; - -export const OperationsList: msRest.CompositeMapper = { - serializedName: "OperationsList", - type: { - name: "Composite", - className: "OperationsList", - modelProperties: { - value: { required: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Operation" - } - } - } - }, - nextLink: { - serializedName: "nextLink", type: { name: "String" } @@ -2757,58 +4596,31 @@ export const OperationsList: msRest.CompositeMapper = { } }; -export const DataBoxEdgeDeviceList: msRest.CompositeMapper = { - serializedName: "DataBoxEdgeDeviceList", +export const CloudEdgeManagementRole: coreClient.CompositeMapper = { + serializedName: "CloudEdgeManagement", type: { name: "Composite", - className: "DataBoxEdgeDeviceList", + className: "CloudEdgeManagementRole", + uberParent: "ARMBaseModel", + polymorphicDiscriminator: ARMBaseModel.type.polymorphicDiscriminator, modelProperties: { - value: { - readOnly: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataBoxEdgeDevice" - } - } - } - }, - nextLink: { + ...Role.type.modelProperties, + localManagementStatus: { + serializedName: "properties.localManagementStatus", readOnly: true, - serializedName: "nextLink", type: { name: "String" } - } - } - } -}; - -export const AlertList: msRest.CompositeMapper = { - serializedName: "AlertList", - type: { - name: "Composite", - className: "AlertList", - modelProperties: { - value: { - readOnly: true, - serializedName: "", + }, + edgeProfile: { + serializedName: "properties.edgeProfile", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Alert" - } - } + name: "Composite", + className: "EdgeProfile" } }, - nextLink: { - readOnly: true, - serializedName: "nextLink", + roleStatus: { + serializedName: "properties.roleStatus", type: { name: "String" } @@ -2817,81 +4629,70 @@ export const AlertList: msRest.CompositeMapper = { } }; -export const BandwidthSchedulesList: msRest.CompositeMapper = { - serializedName: "BandwidthSchedulesList", +export const IoTRole: coreClient.CompositeMapper = { + serializedName: "IOT", type: { name: "Composite", - className: "BandwidthSchedulesList", + className: "IoTRole", + uberParent: "ARMBaseModel", + polymorphicDiscriminator: ARMBaseModel.type.polymorphicDiscriminator, modelProperties: { - value: { - readOnly: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BandwidthSchedule" - } - } - } - }, - nextLink: { - readOnly: true, - serializedName: "nextLink", + ...Role.type.modelProperties, + hostPlatform: { + serializedName: "properties.hostPlatform", type: { name: "String" } - } - } - } -}; - -export const NodeList: msRest.CompositeMapper = { - serializedName: "NodeList", - type: { - name: "Composite", - className: "NodeList", - modelProperties: { - value: { - readOnly: true, - serializedName: "", + }, + ioTDeviceDetails: { + serializedName: "properties.ioTDeviceDetails", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Node" - } - } - } - } - } - } -}; - -export const OrderList: msRest.CompositeMapper = { - serializedName: "OrderList", - type: { - name: "Composite", - className: "OrderList", - modelProperties: { - value: { - readOnly: true, - serializedName: "", + name: "Composite", + className: "IoTDeviceInfo" + } + }, + ioTEdgeDeviceDetails: { + serializedName: "properties.ioTEdgeDeviceDetails", + type: { + name: "Composite", + className: "IoTDeviceInfo" + } + }, + shareMappings: { + serializedName: "properties.shareMappings", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Order" + className: "MountPointMap" } } } }, - nextLink: { + ioTEdgeAgentInfo: { + serializedName: "properties.ioTEdgeAgentInfo", + type: { + name: "Composite", + className: "IoTEdgeAgentInfo" + } + }, + hostPlatformType: { + serializedName: "properties.hostPlatformType", readOnly: true, - serializedName: "nextLink", + type: { + name: "String" + } + }, + computeResource: { + serializedName: "properties.computeResource", + type: { + name: "Composite", + className: "ComputeResource" + } + }, + roleStatus: { + serializedName: "properties.roleStatus", type: { name: "String" } @@ -2900,28 +4701,51 @@ export const OrderList: msRest.CompositeMapper = { } }; -export const RoleList: msRest.CompositeMapper = { - serializedName: "RoleList", +export const KubernetesRole: coreClient.CompositeMapper = { + serializedName: "Kubernetes", type: { name: "Composite", - className: "RoleList", + className: "KubernetesRole", + uberParent: "ARMBaseModel", + polymorphicDiscriminator: ARMBaseModel.type.polymorphicDiscriminator, modelProperties: { - value: { + ...Role.type.modelProperties, + hostPlatform: { + serializedName: "properties.hostPlatform", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, - serializedName: "", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Role" - } - } + name: "String" } }, - nextLink: { + hostPlatformType: { + serializedName: "properties.hostPlatformType", readOnly: true, - serializedName: "nextLink", + type: { + name: "String" + } + }, + kubernetesClusterInfo: { + serializedName: "properties.kubernetesClusterInfo", + type: { + name: "Composite", + className: "KubernetesClusterInfo" + } + }, + kubernetesRoleResources: { + serializedName: "properties.kubernetesRoleResources", + type: { + name: "Composite", + className: "KubernetesRoleResources" + } + }, + roleStatus: { + serializedName: "properties.roleStatus", type: { name: "String" } @@ -2930,28 +4754,36 @@ export const RoleList: msRest.CompositeMapper = { } }; -export const ShareList: msRest.CompositeMapper = { - serializedName: "ShareList", +export const MECRole: coreClient.CompositeMapper = { + serializedName: "MEC", type: { name: "Composite", - className: "ShareList", + className: "MECRole", + uberParent: "ARMBaseModel", + polymorphicDiscriminator: ARMBaseModel.type.polymorphicDiscriminator, modelProperties: { - value: { - readOnly: true, - serializedName: "", + ...Role.type.modelProperties, + connectionString: { + serializedName: "properties.connectionString", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Share" - } - } + name: "Composite", + className: "AsymmetricEncryptedSecret" } }, - nextLink: { - readOnly: true, - serializedName: "nextLink", + controllerEndpoint: { + serializedName: "properties.controllerEndpoint", + type: { + name: "String" + } + }, + resourceUniqueId: { + serializedName: "properties.resourceUniqueId", + type: { + name: "String" + } + }, + roleStatus: { + serializedName: "properties.roleStatus", type: { name: "String" } @@ -2960,58 +4792,67 @@ export const ShareList: msRest.CompositeMapper = { } }; -export const StorageAccountCredentialList: msRest.CompositeMapper = { - serializedName: "StorageAccountCredentialList", +export const ArcAddon: coreClient.CompositeMapper = { + serializedName: "ArcForKubernetes", type: { name: "Composite", - className: "StorageAccountCredentialList", + className: "ArcAddon", + uberParent: "ARMBaseModel", + polymorphicDiscriminator: ARMBaseModel.type.polymorphicDiscriminator, modelProperties: { - value: { + ...Addon.type.modelProperties, + subscriptionId: { + serializedName: "properties.subscriptionId", + required: true, + type: { + name: "String" + } + }, + resourceGroupName: { + serializedName: "properties.resourceGroupName", + required: true, + type: { + name: "String" + } + }, + resourceName: { + serializedName: "properties.resourceName", + required: true, + type: { + name: "String" + } + }, + resourceLocation: { + serializedName: "properties.resourceLocation", + required: true, + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", readOnly: true, - serializedName: "", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StorageAccountCredential" - } - } + name: "String" } }, - nextLink: { + hostPlatform: { + serializedName: "properties.hostPlatform", readOnly: true, - serializedName: "nextLink", type: { name: "String" } - } - } - } -}; - -export const StorageAccountList: msRest.CompositeMapper = { - serializedName: "StorageAccountList", - type: { - name: "Composite", - className: "StorageAccountList", - modelProperties: { - value: { + }, + hostPlatformType: { + serializedName: "properties.hostPlatformType", readOnly: true, - serializedName: "", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StorageAccount" - } - } + name: "String" } }, - nextLink: { + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, - serializedName: "nextLink", type: { name: "String" } @@ -3020,58 +4861,53 @@ export const StorageAccountList: msRest.CompositeMapper = { } }; -export const ContainerList: msRest.CompositeMapper = { - serializedName: "ContainerList", +export const IoTAddon: coreClient.CompositeMapper = { + serializedName: "IotEdge", type: { name: "Composite", - className: "ContainerList", + className: "IoTAddon", + uberParent: "ARMBaseModel", + polymorphicDiscriminator: ARMBaseModel.type.polymorphicDiscriminator, modelProperties: { - value: { + ...Addon.type.modelProperties, + ioTDeviceDetails: { + serializedName: "properties.ioTDeviceDetails", + type: { + name: "Composite", + className: "IoTDeviceInfo" + } + }, + ioTEdgeDeviceDetails: { + serializedName: "properties.ioTEdgeDeviceDetails", + type: { + name: "Composite", + className: "IoTDeviceInfo" + } + }, + version: { + serializedName: "properties.version", readOnly: true, - serializedName: "", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Container" - } - } + name: "String" } }, - nextLink: { + hostPlatform: { + serializedName: "properties.hostPlatform", readOnly: true, - serializedName: "nextLink", type: { name: "String" } - } - } - } -}; - -export const TriggerList: msRest.CompositeMapper = { - serializedName: "TriggerList", - type: { - name: "Composite", - className: "TriggerList", - modelProperties: { - value: { + }, + hostPlatformType: { + serializedName: "properties.hostPlatformType", readOnly: true, - serializedName: "", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Trigger" - } - } + name: "String" } }, - nextLink: { + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, - serializedName: "nextLink", type: { name: "String" } @@ -3080,28 +4916,34 @@ export const TriggerList: msRest.CompositeMapper = { } }; -export const UserList: msRest.CompositeMapper = { - serializedName: "UserList", +export const FileEventTrigger: coreClient.CompositeMapper = { + serializedName: "FileEvent", type: { name: "Composite", - className: "UserList", + className: "FileEventTrigger", + uberParent: "ARMBaseModel", + polymorphicDiscriminator: ARMBaseModel.type.polymorphicDiscriminator, modelProperties: { - value: { - readOnly: true, - serializedName: "", + ...Trigger.type.modelProperties, + sourceInfo: { + serializedName: "properties.sourceInfo", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "User" - } - } + name: "Composite", + className: "FileSourceInfo" } }, - nextLink: { - readOnly: true, - serializedName: "nextLink", + sinkInfo: { + serializedName: "properties.sinkInfo", + type: { + name: "Composite", + className: "RoleSinkInfo" + } + }, + customContextTag: { + constraints: { + MaxLength: 192 + }, + serializedName: "properties.customContextTag", type: { name: "String" } @@ -3110,34 +4952,52 @@ export const UserList: msRest.CompositeMapper = { } }; -export const SkuInformationList: msRest.CompositeMapper = { - serializedName: "SkuInformationList", +export const PeriodicTimerEventTrigger: coreClient.CompositeMapper = { + serializedName: "PeriodicTimerEvent", type: { name: "Composite", - className: "SkuInformationList", + className: "PeriodicTimerEventTrigger", + uberParent: "ARMBaseModel", + polymorphicDiscriminator: ARMBaseModel.type.polymorphicDiscriminator, modelProperties: { - value: { - readOnly: true, - serializedName: "", + ...Trigger.type.modelProperties, + sourceInfo: { + serializedName: "properties.sourceInfo", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceTypeSku" - } - } + name: "Composite", + className: "PeriodicTimerSourceInfo" + } + }, + sinkInfo: { + serializedName: "properties.sinkInfo", + type: { + name: "Composite", + className: "RoleSinkInfo" + } + }, + customContextTag: { + constraints: { + MaxLength: 192 + }, + serializedName: "properties.customContextTag", + type: { + name: "String" } } } } }; -export const discriminators = { - 'Trigger.FileEvent' : FileEventTrigger, - 'Role.IOT' : IoTRole, - 'Trigger.PeriodicTimerEvent' : PeriodicTimerEventTrigger, - 'Role' : Role, - 'Trigger' : Trigger - +export let discriminators = { + "ARMBaseModel.Role": Role, + "ARMBaseModel.Addon": Addon, + "ARMBaseModel.Trigger": Trigger, + "ARMBaseModel.CloudEdgeManagement": CloudEdgeManagementRole, + "ARMBaseModel.IOT": IoTRole, + "ARMBaseModel.Kubernetes": KubernetesRole, + "ARMBaseModel.MEC": MECRole, + "ARMBaseModel.ArcForKubernetes": ArcAddon, + "ARMBaseModel.IotEdge": IoTAddon, + "ARMBaseModel.FileEvent": FileEventTrigger, + "ARMBaseModel.PeriodicTimerEvent": PeriodicTimerEventTrigger }; diff --git a/sdk/databoxedge/arm-databoxedge/src/models/nodesMappers.ts b/sdk/databoxedge/arm-databoxedge/src/models/nodesMappers.ts deleted file mode 100644 index f03b310a1e46..000000000000 --- a/sdk/databoxedge/arm-databoxedge/src/models/nodesMappers.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - discriminators, - Address, - Alert, - AlertErrorDetails, - ARMBaseModel, - AsymmetricEncryptedSecret, - Authentication, - AzureContainerInfo, - BandwidthSchedule, - BaseResource, - ClientAccessRight, - CloudError, - ContactDetails, - Container, - DataBoxEdgeDevice, - DataBoxEdgeDeviceExtendedInfo, - FileEventTrigger, - FileSourceInfo, - IoTDeviceInfo, - IoTRole, - Ipv4Config, - Ipv6Config, - MountPointMap, - NetworkAdapter, - NetworkAdapterPosition, - NetworkSettings, - Node, - NodeList, - Order, - OrderStatus, - PeriodicTimerEventTrigger, - PeriodicTimerSourceInfo, - RefreshDetails, - Role, - RoleSinkInfo, - SecuritySettings, - Share, - ShareAccessRight, - Sku, - StorageAccount, - StorageAccountCredential, - SymmetricKey, - TrackingInfo, - Trigger, - UpdateSummary, - User, - UserAccessRight -} from "../models/mappers"; diff --git a/sdk/databoxedge/arm-databoxedge/src/models/operationsMappers.ts b/sdk/databoxedge/arm-databoxedge/src/models/operationsMappers.ts deleted file mode 100644 index af4a5e3a1bf6..000000000000 --- a/sdk/databoxedge/arm-databoxedge/src/models/operationsMappers.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - discriminators, - CloudError, - MetricDimensionV1, - MetricSpecificationV1, - Operation, - OperationDisplay, - OperationsList, - ServiceSpecification -} from "../models/mappers"; diff --git a/sdk/databoxedge/arm-databoxedge/src/models/operationsStatusMappers.ts b/sdk/databoxedge/arm-databoxedge/src/models/operationsStatusMappers.ts deleted file mode 100644 index 0f195ce2be53..000000000000 --- a/sdk/databoxedge/arm-databoxedge/src/models/operationsStatusMappers.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - discriminators, - CloudError, - Job, - JobErrorDetails, - JobErrorItem, - UpdateDownloadProgress, - UpdateInstallProgress -} from "../models/mappers"; diff --git a/sdk/databoxedge/arm-databoxedge/src/models/ordersMappers.ts b/sdk/databoxedge/arm-databoxedge/src/models/ordersMappers.ts deleted file mode 100644 index f11141788b6e..000000000000 --- a/sdk/databoxedge/arm-databoxedge/src/models/ordersMappers.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - discriminators, - Address, - Alert, - AlertErrorDetails, - ARMBaseModel, - AsymmetricEncryptedSecret, - Authentication, - AzureContainerInfo, - BandwidthSchedule, - BaseResource, - ClientAccessRight, - CloudError, - ContactDetails, - Container, - DataBoxEdgeDevice, - DataBoxEdgeDeviceExtendedInfo, - FileEventTrigger, - FileSourceInfo, - IoTDeviceInfo, - IoTRole, - Ipv4Config, - Ipv6Config, - MountPointMap, - NetworkAdapter, - NetworkAdapterPosition, - NetworkSettings, - Node, - Order, - OrderList, - OrderStatus, - PeriodicTimerEventTrigger, - PeriodicTimerSourceInfo, - RefreshDetails, - Role, - RoleSinkInfo, - SecuritySettings, - Share, - ShareAccessRight, - Sku, - StorageAccount, - StorageAccountCredential, - SymmetricKey, - TrackingInfo, - Trigger, - UpdateSummary, - User, - UserAccessRight -} from "../models/mappers"; diff --git a/sdk/databoxedge/arm-databoxedge/src/models/parameters.ts b/sdk/databoxedge/arm-databoxedge/src/models/parameters.ts index 4dbe31a0c020..582cea88c71f 100644 --- a/sdk/databoxedge/arm-databoxedge/src/models/parameters.ts +++ b/sdk/databoxedge/arm-databoxedge/src/models/parameters.ts @@ -1,60 +1,99 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; +import { + OperationParameter, + OperationURLParameter, + OperationQueryParameter +} from "@azure/core-client"; +import { + DataBoxEdgeDevice as DataBoxEdgeDeviceMapper, + DataBoxEdgeDevicePatch as DataBoxEdgeDevicePatchMapper, + SecuritySettings as SecuritySettingsMapper, + DataBoxEdgeDeviceExtendedInfoPatch as DataBoxEdgeDeviceExtendedInfoPatchMapper, + UploadCertificateRequest as UploadCertificateRequestMapper, + BandwidthSchedule as BandwidthScheduleMapper, + DiagnosticProactiveLogCollectionSettings as DiagnosticProactiveLogCollectionSettingsMapper, + DiagnosticRemoteSupportSettings as DiagnosticRemoteSupportSettingsMapper, + Order as OrderMapper, + Role as RoleMapper, + Addon as AddonMapper, + MonitoringMetricConfiguration as MonitoringMetricConfigurationMapper, + Share as ShareMapper, + StorageAccountCredential as StorageAccountCredentialMapper, + StorageAccount as StorageAccountMapper, + Container as ContainerMapper, + Trigger as TriggerMapper, + TriggerSupportPackageRequest as TriggerSupportPackageRequestMapper, + User as UserMapper +} from "../models/mappers"; -export const acceptLanguage: msRest.OperationParameter = { - parameterPath: "acceptLanguage", +export const accept: OperationParameter = { + parameterPath: "accept", mapper: { - serializedName: "accept-language", - defaultValue: 'en-US', + defaultValue: "application/json", + isConstant: true, + serializedName: "Accept", type: { name: "String" } } }; -export const apiVersion: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", + +export const $host: OperationURLParameter = { + parameterPath: "$host", mapper: { + serializedName: "$host", required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2021-06-01", + isConstant: true, serializedName: "api-version", type: { name: "String" } } }; -export const containerName: msRest.OperationURLParameter = { - parameterPath: "containerName", + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", mapper: { + serializedName: "nextLink", required: true, - serializedName: "containerName", type: { name: "String" } - } + }, + skipEncoding: true }; -export const deviceName: msRest.OperationURLParameter = { - parameterPath: "deviceName", + +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", mapper: { + serializedName: "subscriptionId", required: true, - serializedName: "deviceName", type: { name: "String" } } }; -export const expand: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "expand" - ], + +export const expand: OperationQueryParameter = { + parameterPath: ["options", "expand"], mapper: { serializedName: "$expand", type: { @@ -62,66 +101,197 @@ export const expand: msRest.OperationQueryParameter = { } } }; -export const filter: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "filter" - ], + +export const resourceGroupName: OperationURLParameter = { + parameterPath: "resourceGroupName", mapper: { - serializedName: "$filter", + serializedName: "resourceGroupName", + required: true, type: { name: "String" } } }; -export const name: msRest.OperationURLParameter = { - parameterPath: "name", + +export const deviceName: OperationURLParameter = { + parameterPath: "deviceName", mapper: { + serializedName: "deviceName", required: true, + type: { + name: "String" + } + } +}; + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String" + } + } +}; + +export const dataBoxEdgeDevice: OperationParameter = { + parameterPath: "dataBoxEdgeDevice", + mapper: DataBoxEdgeDeviceMapper +}; + +export const parameters: OperationParameter = { + parameterPath: "parameters", + mapper: DataBoxEdgeDevicePatchMapper +}; + +export const securitySettings: OperationParameter = { + parameterPath: "securitySettings", + mapper: SecuritySettingsMapper +}; + +export const parameters1: OperationParameter = { + parameterPath: "parameters", + mapper: DataBoxEdgeDeviceExtendedInfoPatchMapper +}; + +export const parameters2: OperationParameter = { + parameterPath: "parameters", + mapper: UploadCertificateRequestMapper +}; + +export const name: OperationURLParameter = { + parameterPath: "name", + mapper: { serializedName: "name", + required: true, type: { name: "String" } } }; -export const nextPageLink: msRest.OperationURLParameter = { - parameterPath: "nextPageLink", + +export const parameters3: OperationParameter = { + parameterPath: "parameters", + mapper: BandwidthScheduleMapper +}; + +export const proactiveLogCollectionSettings: OperationParameter = { + parameterPath: "proactiveLogCollectionSettings", + mapper: DiagnosticProactiveLogCollectionSettingsMapper +}; + +export const diagnosticRemoteSupportSettings: OperationParameter = { + parameterPath: "diagnosticRemoteSupportSettings", + mapper: DiagnosticRemoteSupportSettingsMapper +}; + +export const order: OperationParameter = { + parameterPath: "order", + mapper: OrderMapper +}; + +export const role: OperationParameter = { + parameterPath: "role", + mapper: RoleMapper +}; + +export const roleName: OperationURLParameter = { + parameterPath: "roleName", mapper: { + serializedName: "roleName", required: true, - serializedName: "nextLink", type: { name: "String" } - }, - skipEncoding: true + } }; -export const resourceGroupName: msRest.OperationURLParameter = { - parameterPath: "resourceGroupName", + +export const addonName: OperationURLParameter = { + parameterPath: "addonName", mapper: { + serializedName: "addonName", required: true, - serializedName: "resourceGroupName", type: { name: "String" } } }; -export const storageAccountName: msRest.OperationURLParameter = { + +export const addon: OperationParameter = { + parameterPath: "addon", + mapper: AddonMapper +}; + +export const monitoringMetricConfiguration: OperationParameter = { + parameterPath: "monitoringMetricConfiguration", + mapper: MonitoringMetricConfigurationMapper +}; + +export const share: OperationParameter = { + parameterPath: "share", + mapper: ShareMapper +}; + +export const storageAccountCredential: OperationParameter = { + parameterPath: "storageAccountCredential", + mapper: StorageAccountCredentialMapper +}; + +export const storageAccountName: OperationURLParameter = { parameterPath: "storageAccountName", mapper: { - required: true, serializedName: "storageAccountName", + required: true, type: { name: "String" } } }; -export const subscriptionId: msRest.OperationURLParameter = { - parameterPath: "subscriptionId", + +export const storageAccount: OperationParameter = { + parameterPath: "storageAccount", + mapper: StorageAccountMapper +}; + +export const containerName: OperationURLParameter = { + parameterPath: "containerName", mapper: { + serializedName: "containerName", required: true, - serializedName: "subscriptionId", type: { name: "String" } } }; + +export const container: OperationParameter = { + parameterPath: "container", + mapper: ContainerMapper +}; + +export const filter: OperationQueryParameter = { + parameterPath: ["options", "filter"], + mapper: { + serializedName: "$filter", + type: { + name: "String" + } + } +}; + +export const trigger: OperationParameter = { + parameterPath: "trigger", + mapper: TriggerMapper +}; + +export const triggerSupportPackageRequest: OperationParameter = { + parameterPath: "triggerSupportPackageRequest", + mapper: TriggerSupportPackageRequestMapper +}; + +export const user: OperationParameter = { + parameterPath: "user", + mapper: UserMapper +}; diff --git a/sdk/databoxedge/arm-databoxedge/src/models/rolesMappers.ts b/sdk/databoxedge/arm-databoxedge/src/models/rolesMappers.ts deleted file mode 100644 index cba36ea7003a..000000000000 --- a/sdk/databoxedge/arm-databoxedge/src/models/rolesMappers.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - discriminators, - Address, - Alert, - AlertErrorDetails, - ARMBaseModel, - AsymmetricEncryptedSecret, - Authentication, - AzureContainerInfo, - BandwidthSchedule, - BaseResource, - ClientAccessRight, - CloudError, - ContactDetails, - Container, - DataBoxEdgeDevice, - DataBoxEdgeDeviceExtendedInfo, - FileEventTrigger, - FileSourceInfo, - IoTDeviceInfo, - IoTRole, - Ipv4Config, - Ipv6Config, - MountPointMap, - NetworkAdapter, - NetworkAdapterPosition, - NetworkSettings, - Node, - Order, - OrderStatus, - PeriodicTimerEventTrigger, - PeriodicTimerSourceInfo, - RefreshDetails, - Role, - RoleList, - RoleSinkInfo, - SecuritySettings, - Share, - ShareAccessRight, - Sku, - StorageAccount, - StorageAccountCredential, - SymmetricKey, - TrackingInfo, - Trigger, - UpdateSummary, - User, - UserAccessRight -} from "../models/mappers"; diff --git a/sdk/databoxedge/arm-databoxedge/src/models/sharesMappers.ts b/sdk/databoxedge/arm-databoxedge/src/models/sharesMappers.ts deleted file mode 100644 index 603f3c72edac..000000000000 --- a/sdk/databoxedge/arm-databoxedge/src/models/sharesMappers.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - discriminators, - Address, - Alert, - AlertErrorDetails, - ARMBaseModel, - AsymmetricEncryptedSecret, - Authentication, - AzureContainerInfo, - BandwidthSchedule, - BaseResource, - ClientAccessRight, - CloudError, - ContactDetails, - Container, - DataBoxEdgeDevice, - DataBoxEdgeDeviceExtendedInfo, - FileEventTrigger, - FileSourceInfo, - IoTDeviceInfo, - IoTRole, - Ipv4Config, - Ipv6Config, - MountPointMap, - NetworkAdapter, - NetworkAdapterPosition, - NetworkSettings, - Node, - Order, - OrderStatus, - PeriodicTimerEventTrigger, - PeriodicTimerSourceInfo, - RefreshDetails, - Role, - RoleSinkInfo, - SecuritySettings, - Share, - ShareAccessRight, - ShareList, - Sku, - StorageAccount, - StorageAccountCredential, - SymmetricKey, - TrackingInfo, - Trigger, - UpdateSummary, - User, - UserAccessRight -} from "../models/mappers"; diff --git a/sdk/databoxedge/arm-databoxedge/src/models/skusMappers.ts b/sdk/databoxedge/arm-databoxedge/src/models/skusMappers.ts deleted file mode 100644 index bde0673c7017..000000000000 --- a/sdk/databoxedge/arm-databoxedge/src/models/skusMappers.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - discriminators, - CloudError, - ResourceTypeSku, - SkuCost, - SkuInformationList, - SkuLocationInfo, - SkuRestriction, - SkuRestrictionInfo -} from "../models/mappers"; diff --git a/sdk/databoxedge/arm-databoxedge/src/models/storageAccountCredentialsMappers.ts b/sdk/databoxedge/arm-databoxedge/src/models/storageAccountCredentialsMappers.ts deleted file mode 100644 index fe70da1500f3..000000000000 --- a/sdk/databoxedge/arm-databoxedge/src/models/storageAccountCredentialsMappers.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - discriminators, - Address, - Alert, - AlertErrorDetails, - ARMBaseModel, - AsymmetricEncryptedSecret, - Authentication, - AzureContainerInfo, - BandwidthSchedule, - BaseResource, - ClientAccessRight, - CloudError, - ContactDetails, - Container, - DataBoxEdgeDevice, - DataBoxEdgeDeviceExtendedInfo, - FileEventTrigger, - FileSourceInfo, - IoTDeviceInfo, - IoTRole, - Ipv4Config, - Ipv6Config, - MountPointMap, - NetworkAdapter, - NetworkAdapterPosition, - NetworkSettings, - Node, - Order, - OrderStatus, - PeriodicTimerEventTrigger, - PeriodicTimerSourceInfo, - RefreshDetails, - Role, - RoleSinkInfo, - SecuritySettings, - Share, - ShareAccessRight, - Sku, - StorageAccount, - StorageAccountCredential, - StorageAccountCredentialList, - SymmetricKey, - TrackingInfo, - Trigger, - UpdateSummary, - User, - UserAccessRight -} from "../models/mappers"; diff --git a/sdk/databoxedge/arm-databoxedge/src/models/storageAccountsMappers.ts b/sdk/databoxedge/arm-databoxedge/src/models/storageAccountsMappers.ts deleted file mode 100644 index 75464d8d0b4f..000000000000 --- a/sdk/databoxedge/arm-databoxedge/src/models/storageAccountsMappers.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - discriminators, - Address, - Alert, - AlertErrorDetails, - ARMBaseModel, - AsymmetricEncryptedSecret, - Authentication, - AzureContainerInfo, - BandwidthSchedule, - BaseResource, - ClientAccessRight, - CloudError, - ContactDetails, - Container, - DataBoxEdgeDevice, - DataBoxEdgeDeviceExtendedInfo, - FileEventTrigger, - FileSourceInfo, - IoTDeviceInfo, - IoTRole, - Ipv4Config, - Ipv6Config, - MountPointMap, - NetworkAdapter, - NetworkAdapterPosition, - NetworkSettings, - Node, - Order, - OrderStatus, - PeriodicTimerEventTrigger, - PeriodicTimerSourceInfo, - RefreshDetails, - Role, - RoleSinkInfo, - SecuritySettings, - Share, - ShareAccessRight, - Sku, - StorageAccount, - StorageAccountCredential, - StorageAccountList, - SymmetricKey, - TrackingInfo, - Trigger, - UpdateSummary, - User, - UserAccessRight -} from "../models/mappers"; diff --git a/sdk/databoxedge/arm-databoxedge/src/models/triggersMappers.ts b/sdk/databoxedge/arm-databoxedge/src/models/triggersMappers.ts deleted file mode 100644 index 6851ac5d88ac..000000000000 --- a/sdk/databoxedge/arm-databoxedge/src/models/triggersMappers.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - discriminators, - Address, - Alert, - AlertErrorDetails, - ARMBaseModel, - AsymmetricEncryptedSecret, - Authentication, - AzureContainerInfo, - BandwidthSchedule, - BaseResource, - ClientAccessRight, - CloudError, - ContactDetails, - Container, - DataBoxEdgeDevice, - DataBoxEdgeDeviceExtendedInfo, - FileEventTrigger, - FileSourceInfo, - IoTDeviceInfo, - IoTRole, - Ipv4Config, - Ipv6Config, - MountPointMap, - NetworkAdapter, - NetworkAdapterPosition, - NetworkSettings, - Node, - Order, - OrderStatus, - PeriodicTimerEventTrigger, - PeriodicTimerSourceInfo, - RefreshDetails, - Role, - RoleSinkInfo, - SecuritySettings, - Share, - ShareAccessRight, - Sku, - StorageAccount, - StorageAccountCredential, - SymmetricKey, - TrackingInfo, - Trigger, - TriggerList, - UpdateSummary, - User, - UserAccessRight -} from "../models/mappers"; diff --git a/sdk/databoxedge/arm-databoxedge/src/models/usersMappers.ts b/sdk/databoxedge/arm-databoxedge/src/models/usersMappers.ts deleted file mode 100644 index f0d6bae872b2..000000000000 --- a/sdk/databoxedge/arm-databoxedge/src/models/usersMappers.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - discriminators, - Address, - Alert, - AlertErrorDetails, - ARMBaseModel, - AsymmetricEncryptedSecret, - Authentication, - AzureContainerInfo, - BandwidthSchedule, - BaseResource, - ClientAccessRight, - CloudError, - ContactDetails, - Container, - DataBoxEdgeDevice, - DataBoxEdgeDeviceExtendedInfo, - FileEventTrigger, - FileSourceInfo, - IoTDeviceInfo, - IoTRole, - Ipv4Config, - Ipv6Config, - MountPointMap, - NetworkAdapter, - NetworkAdapterPosition, - NetworkSettings, - Node, - Order, - OrderStatus, - PeriodicTimerEventTrigger, - PeriodicTimerSourceInfo, - RefreshDetails, - Role, - RoleSinkInfo, - SecuritySettings, - Share, - ShareAccessRight, - Sku, - StorageAccount, - StorageAccountCredential, - SymmetricKey, - TrackingInfo, - Trigger, - UpdateSummary, - User, - UserAccessRight, - UserList -} from "../models/mappers"; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/addons.ts b/sdk/databoxedge/arm-databoxedge/src/operations/addons.ts new file mode 100644 index 000000000000..61d0bdc57e4c --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operations/addons.ts @@ -0,0 +1,506 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Addons } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + AddonUnion, + AddonsListByRoleNextOptionalParams, + AddonsListByRoleOptionalParams, + AddonsListByRoleResponse, + AddonsGetOptionalParams, + AddonsGetResponse, + AddonsCreateOrUpdateOptionalParams, + AddonsCreateOrUpdateResponse, + AddonsDeleteOptionalParams, + AddonsListByRoleNextResponse +} from "../models"; + +/// +/** Class containing Addons operations. */ +export class AddonsImpl implements Addons { + private readonly client: DataBoxEdgeManagementClient; + + /** + * Initialize a new instance of the class Addons class. + * @param client Reference to the service client + */ + constructor(client: DataBoxEdgeManagementClient) { + this.client = client; + } + + /** + * Lists all the addons configured in the role. + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + public listByRole( + deviceName: string, + roleName: string, + resourceGroupName: string, + options?: AddonsListByRoleOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByRolePagingAll( + deviceName, + roleName, + resourceGroupName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByRolePagingPage( + deviceName, + roleName, + resourceGroupName, + options + ); + } + }; + } + + private async *listByRolePagingPage( + deviceName: string, + roleName: string, + resourceGroupName: string, + options?: AddonsListByRoleOptionalParams + ): AsyncIterableIterator { + let result = await this._listByRole( + deviceName, + roleName, + resourceGroupName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByRoleNext( + deviceName, + roleName, + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByRolePagingAll( + deviceName: string, + roleName: string, + resourceGroupName: string, + options?: AddonsListByRoleOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByRolePagingPage( + deviceName, + roleName, + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Lists all the addons configured in the role. + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + private _listByRole( + deviceName: string, + roleName: string, + resourceGroupName: string, + options?: AddonsListByRoleOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, roleName, resourceGroupName, options }, + listByRoleOperationSpec + ); + } + + /** + * Gets a specific addon by name. + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + get( + deviceName: string, + roleName: string, + addonName: string, + resourceGroupName: string, + options?: AddonsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, roleName, addonName, resourceGroupName, options }, + getOperationSpec + ); + } + + /** + * Create or update a addon. + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param addon The addon properties. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + deviceName: string, + roleName: string, + addonName: string, + resourceGroupName: string, + addon: AddonUnion, + options?: AddonsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + AddonsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { deviceName, roleName, addonName, resourceGroupName, addon, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Create or update a addon. + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param addon The addon properties. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + deviceName: string, + roleName: string, + addonName: string, + resourceGroupName: string, + addon: AddonUnion, + options?: AddonsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + deviceName, + roleName, + addonName, + resourceGroupName, + addon, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes the addon on the device. + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + async beginDelete( + deviceName: string, + roleName: string, + addonName: string, + resourceGroupName: string, + options?: AddonsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { deviceName, roleName, addonName, resourceGroupName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Deletes the addon on the device. + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + async beginDeleteAndWait( + deviceName: string, + roleName: string, + addonName: string, + resourceGroupName: string, + options?: AddonsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + deviceName, + roleName, + addonName, + resourceGroupName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByRoleNext + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param nextLink The nextLink from the previous successful call to the ListByRole method. + * @param options The options parameters. + */ + private _listByRoleNext( + deviceName: string, + roleName: string, + resourceGroupName: string, + nextLink: string, + options?: AddonsListByRoleNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, roleName, resourceGroupName, nextLink, options }, + listByRoleNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByRoleOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AddonList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.roleName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Addon + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.roleName, + Parameters.addonName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Addon + }, + 201: { + bodyMapper: Mappers.Addon + }, + 202: { + bodyMapper: Mappers.Addon + }, + 204: { + bodyMapper: Mappers.Addon + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.addon, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.roleName, + Parameters.addonName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/addons/{addonName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.roleName, + Parameters.addonName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByRoleNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AddonList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.roleName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/alerts.ts b/sdk/databoxedge/arm-databoxedge/src/operations/alerts.ts index efee17c9614d..9a98ccbcd86a 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/alerts.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/alerts.ts @@ -1,28 +1,37 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/alertsMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Alerts } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { + Alert, + AlertsListByDataBoxEdgeDeviceNextOptionalParams, + AlertsListByDataBoxEdgeDeviceOptionalParams, + AlertsListByDataBoxEdgeDeviceResponse, + AlertsGetOptionalParams, + AlertsGetResponse, + AlertsListByDataBoxEdgeDeviceNextResponse +} from "../models"; -/** Class representing a Alerts. */ -export class Alerts { - private readonly client: DataBoxEdgeManagementClientContext; +/// +/** Class containing Alerts operations. */ +export class AlertsImpl implements Alerts { + private readonly client: DataBoxEdgeManagementClient; /** - * Create a Alerts. - * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Alerts class. + * @param client Reference to the service client */ - constructor(client: DataBoxEdgeManagementClientContext) { + constructor(client: DataBoxEdgeManagementClient) { this.client = client; } @@ -30,115 +39,136 @@ export class Alerts { * Gets all the alerts for a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param callback The callback - */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback - */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: AlertsListByDataBoxEdgeDeviceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByDataBoxEdgeDevicePagingAll( + deviceName, + resourceGroupName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByDataBoxEdgeDevicePagingPage( + deviceName, + resourceGroupName, + options + ); + } + }; + } + + private async *listByDataBoxEdgeDevicePagingPage( + deviceName: string, + resourceGroupName: string, + options?: AlertsListByDataBoxEdgeDeviceOptionalParams + ): AsyncIterableIterator { + let result = await this._listByDataBoxEdgeDevice( + deviceName, + resourceGroupName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByDataBoxEdgeDeviceNext( deviceName, resourceGroupName, + continuationToken, options - }, - listByDataBoxEdgeDeviceOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByDataBoxEdgeDevicePagingAll( + deviceName: string, + resourceGroupName: string, + options?: AlertsListByDataBoxEdgeDeviceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByDataBoxEdgeDevicePagingPage( + deviceName, + resourceGroupName, + options + )) { + yield* page; + } } /** - * @summary Gets an alert by name. - * @param deviceName The device name. - * @param name The alert name. - * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise - */ - get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** + * Gets all the alerts for a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. - * @param name The alert name. * @param resourceGroupName The resource group name. - * @param callback The callback + * @param options The options parameters. */ - get(deviceName: string, name: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + private _listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: AlertsListByDataBoxEdgeDeviceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, resourceGroupName, options }, + listByDataBoxEdgeDeviceOperationSpec + ); + } + /** + * Gets an alert by name. * @param deviceName The device name. * @param name The alert name. * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get(deviceName: string, name: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + deviceName: string, + name: string, + resourceGroupName: string, + options?: AlertsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - deviceName, - name, - resourceGroupName, - options - }, - getOperationSpec, - callback) as Promise; + { deviceName, name, resourceGroupName, options }, + getOperationSpec + ); } /** - * Gets all the alerts for a Data Box Edge/Data Box Gateway device. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListByDataBoxEdgeDeviceNext + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param nextLink The nextLink from the previous successful call to the ListByDataBoxEdgeDevice + * method. + * @param options The options parameters. */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByDataBoxEdgeDeviceNext( + deviceName: string, + resourceGroupName: string, + nextLink: string, + options?: AlertsListByDataBoxEdgeDeviceNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByDataBoxEdgeDeviceNextOperationSpec, - callback) as Promise; + { deviceName, resourceGroupName, nextLink, options }, + listByDataBoxEdgeDeviceNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByDataBoxEdgeDeviceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts", - urlParameters: [ - Parameters.deviceName, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.AlertList @@ -147,24 +177,20 @@ const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts/{name}", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, - Parameters.name, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts/{name}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.Alert @@ -173,19 +199,20 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.name + ], + headerParameters: [Parameters.accept], serializer }; - -const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByDataBoxEdgeDeviceNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.AlertList @@ -194,5 +221,14 @@ const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/availableSkus.ts b/sdk/databoxedge/arm-databoxedge/src/operations/availableSkus.ts new file mode 100644 index 000000000000..91e37623d643 --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operations/availableSkus.ts @@ -0,0 +1,142 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { AvailableSkus } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { + DataBoxEdgeSku, + AvailableSkusListNextOptionalParams, + AvailableSkusListOptionalParams, + AvailableSkusListResponse, + AvailableSkusListNextResponse +} from "../models"; + +/// +/** Class containing AvailableSkus operations. */ +export class AvailableSkusImpl implements AvailableSkus { + private readonly client: DataBoxEdgeManagementClient; + + /** + * Initialize a new instance of the class AvailableSkus class. + * @param client Reference to the service client + */ + constructor(client: DataBoxEdgeManagementClient) { + this.client = client; + } + + /** + * List all the available Skus and information related to them. + * @param options The options parameters. + */ + public list( + options?: AvailableSkusListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: AvailableSkusListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + options?: AvailableSkusListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * List all the available Skus and information related to them. + * @param options The options parameters. + */ + private _list( + options?: AvailableSkusListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: AvailableSkusListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/availableSkus", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DataBoxEdgeSkuList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DataBoxEdgeSkuList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/bandwidthSchedules.ts b/sdk/databoxedge/arm-databoxedge/src/operations/bandwidthSchedules.ts index 7c4b6aea7abd..241a7cdc6a8c 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/bandwidthSchedules.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/bandwidthSchedules.ts @@ -1,29 +1,42 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/bandwidthSchedulesMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { BandwidthSchedules } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + BandwidthSchedule, + BandwidthSchedulesListByDataBoxEdgeDeviceNextOptionalParams, + BandwidthSchedulesListByDataBoxEdgeDeviceOptionalParams, + BandwidthSchedulesListByDataBoxEdgeDeviceResponse, + BandwidthSchedulesGetOptionalParams, + BandwidthSchedulesGetResponse, + BandwidthSchedulesCreateOrUpdateOptionalParams, + BandwidthSchedulesCreateOrUpdateResponse, + BandwidthSchedulesDeleteOptionalParams, + BandwidthSchedulesListByDataBoxEdgeDeviceNextResponse +} from "../models"; -/** Class representing a BandwidthSchedules. */ -export class BandwidthSchedules { - private readonly client: DataBoxEdgeManagementClientContext; +/// +/** Class containing BandwidthSchedules operations. */ +export class BandwidthSchedulesImpl implements BandwidthSchedules { + private readonly client: DataBoxEdgeManagementClient; /** - * Create a BandwidthSchedules. - * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class BandwidthSchedules class. + * @param client Reference to the service client */ - constructor(client: DataBoxEdgeManagementClientContext) { + constructor(client: DataBoxEdgeManagementClient) { this.client = client; } @@ -31,117 +44,265 @@ export class BandwidthSchedules { * Gets all the bandwidth schedules for a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param callback The callback - */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback - */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: BandwidthSchedulesListByDataBoxEdgeDeviceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByDataBoxEdgeDevicePagingAll( + deviceName, + resourceGroupName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByDataBoxEdgeDevicePagingPage( + deviceName, + resourceGroupName, + options + ); + } + }; + } + + private async *listByDataBoxEdgeDevicePagingPage( + deviceName: string, + resourceGroupName: string, + options?: BandwidthSchedulesListByDataBoxEdgeDeviceOptionalParams + ): AsyncIterableIterator { + let result = await this._listByDataBoxEdgeDevice( + deviceName, + resourceGroupName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByDataBoxEdgeDeviceNext( deviceName, resourceGroupName, + continuationToken, options - }, - listByDataBoxEdgeDeviceOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByDataBoxEdgeDevicePagingAll( + deviceName: string, + resourceGroupName: string, + options?: BandwidthSchedulesListByDataBoxEdgeDeviceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByDataBoxEdgeDevicePagingPage( + deviceName, + resourceGroupName, + options + )) { + yield* page; + } } /** - * Gets the properties of the specified bandwidth schedule. - * @param deviceName The device name. - * @param name The bandwidth schedule name. - * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise - */ - get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** + * Gets all the bandwidth schedules for a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. - * @param name The bandwidth schedule name. * @param resourceGroupName The resource group name. - * @param callback The callback + * @param options The options parameters. */ - get(deviceName: string, name: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + private _listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: BandwidthSchedulesListByDataBoxEdgeDeviceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, resourceGroupName, options }, + listByDataBoxEdgeDeviceOperationSpec + ); + } + /** + * Gets the properties of the specified bandwidth schedule. * @param deviceName The device name. * @param name The bandwidth schedule name. * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get(deviceName: string, name: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + deviceName: string, + name: string, + resourceGroupName: string, + options?: BandwidthSchedulesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - deviceName, - name, - resourceGroupName, - options - }, - getOperationSpec, - callback) as Promise; + { deviceName, name, resourceGroupName, options }, + getOperationSpec + ); } /** * Creates or updates a bandwidth schedule. * @param deviceName The device name. * @param name The bandwidth schedule name which needs to be added/updated. - * @param parameters The bandwidth schedule to be added or updated. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param parameters The bandwidth schedule to be added or updated. + * @param options The options parameters. */ - createOrUpdate(deviceName: string, name: string, parameters: Models.BandwidthSchedule, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(deviceName,name,parameters,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginCreateOrUpdate( + deviceName: string, + name: string, + resourceGroupName: string, + parameters: BandwidthSchedule, + options?: BandwidthSchedulesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + BandwidthSchedulesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { deviceName, name, resourceGroupName, parameters, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * Deletes the specified bandwidth schedule. + * Creates or updates a bandwidth schedule. * @param deviceName The device name. - * @param name The bandwidth schedule name. + * @param name The bandwidth schedule name which needs to be added/updated. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param parameters The bandwidth schedule to be added or updated. + * @param options The options parameters. */ - deleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(deviceName,name,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginCreateOrUpdateAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + parameters: BandwidthSchedule, + options?: BandwidthSchedulesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + deviceName, + name, + resourceGroupName, + parameters, + options + ); + return poller.pollUntilDone(); } /** - * Creates or updates a bandwidth schedule. + * Deletes the specified bandwidth schedule. * @param deviceName The device name. - * @param name The bandwidth schedule name which needs to be added/updated. - * @param parameters The bandwidth schedule to be added or updated. + * @param name The bandwidth schedule name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginCreateOrUpdate(deviceName: string, name: string, parameters: Models.BandwidthSchedule, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - name, - parameters, - resourceGroupName, - options - }, - beginCreateOrUpdateOperationSpec, - options); + async beginDelete( + deviceName: string, + name: string, + resourceGroupName: string, + options?: BandwidthSchedulesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { deviceName, name, resourceGroupName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** @@ -149,66 +310,50 @@ export class BandwidthSchedules { * @param deviceName The device name. * @param name The bandwidth schedule name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - name, - resourceGroupName, - options - }, - beginDeleteMethodOperationSpec, - options); + async beginDeleteAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + options?: BandwidthSchedulesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + deviceName, + name, + resourceGroupName, + options + ); + return poller.pollUntilDone(); } /** - * Gets all the bandwidth schedules for a Data Box Edge/Data Box Gateway device. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListByDataBoxEdgeDeviceNext + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param nextLink The nextLink from the previous successful call to the ListByDataBoxEdgeDevice + * method. + * @param options The options parameters. */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByDataBoxEdgeDeviceNext( + deviceName: string, + resourceGroupName: string, + nextLink: string, + options?: BandwidthSchedulesListByDataBoxEdgeDeviceNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByDataBoxEdgeDeviceNextOperationSpec, - callback) as Promise; + { deviceName, resourceGroupName, nextLink, options }, + listByDataBoxEdgeDeviceNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByDataBoxEdgeDeviceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules", - urlParameters: [ - Parameters.deviceName, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.BandwidthSchedulesList @@ -217,24 +362,20 @@ const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, - Parameters.name, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.BandwidthSchedule @@ -243,79 +384,78 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, - Parameters.name, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.name ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.BandwidthSchedule, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.BandwidthSchedule }, - 202: {}, + 201: { + bodyMapper: Mappers.BandwidthSchedule + }, + 202: { + bodyMapper: Mappers.BandwidthSchedule + }, + 204: { + bodyMapper: Mappers.BandwidthSchedule + }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}", + requestBody: Parameters.parameters3, + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, - Parameters.name, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.name ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}", + httpMethod: "DELETE", responses: { 200: {}, + 201: {}, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.name + ], + headerParameters: [Parameters.accept], serializer }; - -const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByDataBoxEdgeDeviceNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.BandwidthSchedulesList @@ -324,5 +464,14 @@ const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/containers.ts b/sdk/databoxedge/arm-databoxedge/src/operations/containers.ts index 95e47ec04154..f39c0c4924c7 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/containers.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/containers.ts @@ -1,97 +1,160 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/containersMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Containers } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + Container, + ContainersListByStorageAccountNextOptionalParams, + ContainersListByStorageAccountOptionalParams, + ContainersListByStorageAccountResponse, + ContainersGetOptionalParams, + ContainersGetResponse, + ContainersCreateOrUpdateOptionalParams, + ContainersCreateOrUpdateResponse, + ContainersDeleteOptionalParams, + ContainersRefreshOptionalParams, + ContainersListByStorageAccountNextResponse +} from "../models"; -/** Class representing a Containers. */ -export class Containers { - private readonly client: DataBoxEdgeManagementClientContext; +/// +/** Class containing Containers operations. */ +export class ContainersImpl implements Containers { + private readonly client: DataBoxEdgeManagementClient; /** - * Create a Containers. - * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Containers class. + * @param client Reference to the service client */ - constructor(client: DataBoxEdgeManagementClientContext) { + constructor(client: DataBoxEdgeManagementClient) { this.client = client; } /** - * @summary Lists all the containers of a storage Account in a Data Box Edge/Data Box Gateway - * device. + * Lists all the containers of a storage Account in a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param storageAccountName The storage Account name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listByStorageAccount(deviceName: string, storageAccountName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param deviceName The device name. - * @param storageAccountName The storage Account name. - * @param resourceGroupName The resource group name. - * @param callback The callback - */ - listByStorageAccount(deviceName: string, storageAccountName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param deviceName The device name. - * @param storageAccountName The storage Account name. - * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback - */ - listByStorageAccount(deviceName: string, storageAccountName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByStorageAccount(deviceName: string, storageAccountName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public listByStorageAccount( + deviceName: string, + storageAccountName: string, + resourceGroupName: string, + options?: ContainersListByStorageAccountOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByStorageAccountPagingAll( + deviceName, + storageAccountName, + resourceGroupName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByStorageAccountPagingPage( + deviceName, + storageAccountName, + resourceGroupName, + options + ); + } + }; + } + + private async *listByStorageAccountPagingPage( + deviceName: string, + storageAccountName: string, + resourceGroupName: string, + options?: ContainersListByStorageAccountOptionalParams + ): AsyncIterableIterator { + let result = await this._listByStorageAccount( + deviceName, + storageAccountName, + resourceGroupName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByStorageAccountNext( deviceName, storageAccountName, resourceGroupName, + continuationToken, options - }, - listByStorageAccountOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByStorageAccountPagingAll( + deviceName: string, + storageAccountName: string, + resourceGroupName: string, + options?: ContainersListByStorageAccountOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByStorageAccountPagingPage( + deviceName, + storageAccountName, + resourceGroupName, + options + )) { + yield* page; + } } /** - * @summary Gets a container by name. - * @param deviceName The device name. - * @param storageAccountName The Storage Account Name - * @param containerName The container Name - * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise - */ - get(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** + * Lists all the containers of a storage Account in a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. - * @param storageAccountName The Storage Account Name - * @param containerName The container Name + * @param storageAccountName The storage Account name. * @param resourceGroupName The resource group name. - * @param callback The callback + * @param options The options parameters. */ - get(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + private _listByStorageAccount( + deviceName: string, + storageAccountName: string, + resourceGroupName: string, + options?: ContainersListByStorageAccountOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, storageAccountName, resourceGroupName, options }, + listByStorageAccountOperationSpec + ); + } + /** + * Gets a container by name. * @param deviceName The device name. * @param storageAccountName The Storage Account Name * @param containerName The container Name * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + deviceName: string, + storageAccountName: string, + containerName: string, + resourceGroupName: string, + options?: ContainersGetOptionalParams + ): Promise { return this.client.sendOperationRequest( { deviceName, @@ -100,75 +163,186 @@ export class Containers { resourceGroupName, options }, - getOperationSpec, - callback) as Promise; + getOperationSpec + ); } /** - * @summary Creates a new container or updates an existing container on the device. + * Creates a new container or updates an existing container on the device. * @param deviceName The device name. * @param storageAccountName The Storage Account Name * @param containerName The container name. - * @param container The container properties. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param container The container properties. + * @param options The options parameters. */ - createOrUpdate(deviceName: string, storageAccountName: string, containerName: string, container: Models.Container, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(deviceName,storageAccountName,containerName,container,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } + async beginCreateOrUpdate( + deviceName: string, + storageAccountName: string, + containerName: string, + resourceGroupName: string, + container: Container, + options?: ContainersCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ContainersCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * Deletes the container on the Data Box Edge/Data Box Gateway device. - * @param deviceName The device name. - * @param storageAccountName The Storage Account Name - * @param containerName The container name. - * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(deviceName,storageAccountName,containerName,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + const lro = new LroImpl( + sendOperation, + { + deviceName, + storageAccountName, + containerName, + resourceGroupName, + container, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * @summary Refreshes the container metadata with the data from the cloud. + * Creates a new container or updates an existing container on the device. * @param deviceName The device name. * @param storageAccountName The Storage Account Name * @param containerName The container name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param container The container properties. + * @param options The options parameters. */ - refresh(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginRefresh(deviceName,storageAccountName,containerName,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginCreateOrUpdateAndWait( + deviceName: string, + storageAccountName: string, + containerName: string, + resourceGroupName: string, + container: Container, + options?: ContainersCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + deviceName, + storageAccountName, + containerName, + resourceGroupName, + container, + options + ); + return poller.pollUntilDone(); } /** - * @summary Creates a new container or updates an existing container on the device. + * Deletes the container on the Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param storageAccountName The Storage Account Name * @param containerName The container name. - * @param container The container properties. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginCreateOrUpdate(deviceName: string, storageAccountName: string, containerName: string, container: Models.Container, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( + async beginDelete( + deviceName: string, + storageAccountName: string, + containerName: string, + resourceGroupName: string, + options?: ContainersDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, { deviceName, storageAccountName, containerName, - container, resourceGroupName, options }, - beginCreateOrUpdateOperationSpec, - options); + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** @@ -177,33 +351,81 @@ export class Containers { * @param storageAccountName The Storage Account Name * @param containerName The container name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - storageAccountName, - containerName, - resourceGroupName, - options - }, - beginDeleteMethodOperationSpec, - options); + async beginDeleteAndWait( + deviceName: string, + storageAccountName: string, + containerName: string, + resourceGroupName: string, + options?: ContainersDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + deviceName, + storageAccountName, + containerName, + resourceGroupName, + options + ); + return poller.pollUntilDone(); } /** - * @summary Refreshes the container metadata with the data from the cloud. + * Refreshes the container metadata with the data from the cloud. * @param deviceName The device name. * @param storageAccountName The Storage Account Name * @param containerName The container name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginRefresh(deviceName: string, storageAccountName: string, containerName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( + async beginRefresh( + deviceName: string, + storageAccountName: string, + containerName: string, + resourceGroupName: string, + options?: ContainersRefreshOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, { deviceName, storageAccountName, @@ -211,57 +433,67 @@ export class Containers { resourceGroupName, options }, - beginRefreshOperationSpec, - options); + refreshOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * @summary Lists all the containers of a storage Account in a Data Box Edge/Data Box Gateway - * device. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByStorageAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * Refreshes the container metadata with the data from the cloud. + * @param deviceName The device name. + * @param storageAccountName The Storage Account Name + * @param containerName The container name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. */ - listByStorageAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + async beginRefreshAndWait( + deviceName: string, + storageAccountName: string, + containerName: string, + resourceGroupName: string, + options?: ContainersRefreshOptionalParams + ): Promise { + const poller = await this.beginRefresh( + deviceName, + storageAccountName, + containerName, + resourceGroupName, + options + ); + return poller.pollUntilDone(); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListByStorageAccountNext + * @param deviceName The device name. + * @param storageAccountName The storage Account name. + * @param resourceGroupName The resource group name. + * @param nextLink The nextLink from the previous successful call to the ListByStorageAccount method. + * @param options The options parameters. */ - listByStorageAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByStorageAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByStorageAccountNext( + deviceName: string, + storageAccountName: string, + resourceGroupName: string, + nextLink: string, + options?: ContainersListByStorageAccountNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByStorageAccountNextOperationSpec, - callback) as Promise; + { deviceName, storageAccountName, resourceGroupName, nextLink, options }, + listByStorageAccountNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listByStorageAccountOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByStorageAccountOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers", - urlParameters: [ - Parameters.deviceName, - Parameters.storageAccountName, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.ContainerList @@ -270,25 +502,21 @@ const listByStorageAccountOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, - Parameters.storageAccountName, - Parameters.containerName, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.storageAccountName ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.Container @@ -297,106 +525,106 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.deviceName, Parameters.storageAccountName, - Parameters.containerName, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.containerName ], - requestBody: { - parameterPath: "container", - mapper: { - ...Mappers.Container, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.Container }, - 202: {}, + 201: { + bodyMapper: Mappers.Container + }, + 202: { + bodyMapper: Mappers.Container + }, + 204: { + bodyMapper: Mappers.Container + }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}", + requestBody: Parameters.container, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.deviceName, Parameters.storageAccountName, - Parameters.containerName, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.containerName ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}", + httpMethod: "DELETE", responses: { + 200: {}, + 201: {}, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginRefreshOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}/refresh", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.deviceName, Parameters.storageAccountName, - Parameters.containerName, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.containerName ], + headerParameters: [Parameters.accept], + serializer +}; +const refreshOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}/refresh", + httpMethod: "POST", responses: { 200: {}, + 201: {}, 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.storageAccountName, + Parameters.containerName + ], + headerParameters: [Parameters.accept], serializer }; - -const listByStorageAccountNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByStorageAccountNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ContainerList @@ -405,5 +633,15 @@ const listByStorageAccountNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.storageAccountName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/devices.ts b/sdk/databoxedge/arm-databoxedge/src/operations/devices.ts index e90235ad40f6..35b96759b537 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/devices.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/devices.ts @@ -1,543 +1,800 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/devicesMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Devices } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + DataBoxEdgeDevice, + DevicesListBySubscriptionNextOptionalParams, + DevicesListBySubscriptionOptionalParams, + DevicesListByResourceGroupNextOptionalParams, + DevicesListByResourceGroupOptionalParams, + DevicesListBySubscriptionResponse, + DevicesListByResourceGroupResponse, + DevicesGetOptionalParams, + DevicesGetResponse, + DevicesCreateOrUpdateOptionalParams, + DevicesCreateOrUpdateResponse, + DevicesDeleteOptionalParams, + DataBoxEdgeDevicePatch, + DevicesUpdateOptionalParams, + DevicesUpdateResponse, + DevicesDownloadUpdatesOptionalParams, + DevicesGenerateCertificateOptionalParams, + DevicesGenerateCertificateResponse, + DevicesGetExtendedInformationOptionalParams, + DevicesGetExtendedInformationResponse, + DevicesInstallUpdatesOptionalParams, + DevicesGetNetworkSettingsOptionalParams, + DevicesGetNetworkSettingsResponse, + DevicesScanForUpdatesOptionalParams, + SecuritySettings, + DevicesCreateOrUpdateSecuritySettingsOptionalParams, + DataBoxEdgeDeviceExtendedInfoPatch, + DevicesUpdateExtendedInformationOptionalParams, + DevicesUpdateExtendedInformationResponse, + DevicesGetUpdateSummaryOptionalParams, + DevicesGetUpdateSummaryResponse, + UploadCertificateRequest, + DevicesUploadCertificateOptionalParams, + DevicesUploadCertificateResponse, + DevicesListBySubscriptionNextResponse, + DevicesListByResourceGroupNextResponse +} from "../models"; -/** Class representing a Devices. */ -export class Devices { - private readonly client: DataBoxEdgeManagementClientContext; +/// +/** Class containing Devices operations. */ +export class DevicesImpl implements Devices { + private readonly client: DataBoxEdgeManagementClient; /** - * Create a Devices. - * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Devices class. + * @param client Reference to the service client */ - constructor(client: DataBoxEdgeManagementClientContext) { + constructor(client: DataBoxEdgeManagementClient) { this.client = client; } /** * Gets all the Data Box Edge/Data Box Gateway devices in a subscription. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listBySubscription(options?: Models.DevicesListBySubscriptionOptionalParams): Promise; - /** - * @param callback The callback - */ - listBySubscription(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listBySubscription(options: Models.DevicesListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; - listBySubscription(options?: Models.DevicesListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options + public listBySubscription( + options?: DevicesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); }, - listBySubscriptionOperationSpec, - callback) as Promise; + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBySubscriptionPagingPage(options); + } + }; + } + + private async *listBySubscriptionPagingPage( + options?: DevicesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + let result = await this._listBySubscription(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listBySubscriptionPagingAll( + options?: DevicesListBySubscriptionOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } } /** * Gets all the Data Box Edge/Data Box Gateway devices in a resource group. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: Models.DevicesListByResourceGroupOptionalParams): Promise; - /** - * @param resourceGroupName The resource group name. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - listByResourceGroup(resourceGroupName: string, options: Models.DevicesListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: Models.DevicesListByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public listByResourceGroup( + resourceGroupName: string, + options?: DevicesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: DevicesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( resourceGroupName, + continuationToken, options - }, - listByResourceGroupOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: DevicesListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } } /** - * Gets the properties of the Data Box Edge/Data Box Gateway device. - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * Gets all the Data Box Edge/Data Box Gateway devices in a subscription. + * @param options The options parameters. */ - get(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + private _listBySubscription( + options?: DevicesListBySubscriptionOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec + ); + } + /** - * @param deviceName The device name. + * Gets all the Data Box Edge/Data Box Gateway devices in a resource group. * @param resourceGroupName The resource group name. - * @param callback The callback + * @param options The options parameters. */ - get(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + private _listByResourceGroup( + resourceGroupName: string, + options?: DevicesListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + /** + * Gets the properties of the Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + deviceName: string, + resourceGroupName: string, + options?: DevicesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - deviceName, - resourceGroupName, - options - }, - getOperationSpec, - callback) as Promise; + { deviceName, resourceGroupName, options }, + getOperationSpec + ); } /** * Creates or updates a Data Box Edge/Data Box Gateway resource. * @param deviceName The device name. - * @param dataBoxEdgeDevice The resource object. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param dataBoxEdgeDevice The resource object. + * @param options The options parameters. */ - createOrUpdate(deviceName: string, dataBoxEdgeDevice: Models.DataBoxEdgeDevice, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(deviceName,dataBoxEdgeDevice,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + createOrUpdate( + deviceName: string, + resourceGroupName: string, + dataBoxEdgeDevice: DataBoxEdgeDevice, + options?: DevicesCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, resourceGroupName, dataBoxEdgeDevice, options }, + createOrUpdateOperationSpec + ); } /** * Deletes the Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - deleteMethod(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(deviceName,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginDelete( + deviceName: string, + resourceGroupName: string, + options?: DevicesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { deviceName, resourceGroupName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * Modifies a Data Box Edge/Data Box Gateway resource. + * Deletes the Data Box Edge/Data Box Gateway device. * @param deviceName The device name. - * @param parameters The resource parameters. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - update(deviceName: string, parameters: Models.DataBoxEdgeDevicePatch, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + async beginDeleteAndWait( + deviceName: string, + resourceGroupName: string, + options?: DevicesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + deviceName, + resourceGroupName, + options + ); + return poller.pollUntilDone(); + } + /** + * Modifies a Data Box Edge/Data Box Gateway resource. * @param deviceName The device name. - * @param parameters The resource parameters. * @param resourceGroupName The resource group name. - * @param callback The callback - */ - update(deviceName: string, parameters: Models.DataBoxEdgeDevicePatch, resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param deviceName The device name. * @param parameters The resource parameters. - * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - update(deviceName: string, parameters: Models.DataBoxEdgeDevicePatch, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(deviceName: string, parameters: Models.DataBoxEdgeDevicePatch, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update( + deviceName: string, + resourceGroupName: string, + parameters: DataBoxEdgeDevicePatch, + options?: DevicesUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - deviceName, - parameters, - resourceGroupName, - options - }, - updateOperationSpec, - callback) as Promise; + { deviceName, resourceGroupName, parameters, options }, + updateOperationSpec + ); } /** - * @summary Downloads the updates on a Data Box Edge/Data Box Gateway device. + * Downloads the updates on a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - downloadUpdates(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDownloadUpdates(deviceName,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginDownloadUpdates( + deviceName: string, + resourceGroupName: string, + options?: DevicesDownloadUpdatesOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { deviceName, resourceGroupName, options }, + downloadUpdatesOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * Gets additional information for the specified Data Box Edge/Data Box Gateway device. - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise - */ - getExtendedInformation(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param callback The callback - */ - getExtendedInformation(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** + * Downloads the updates on a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - getExtendedInformation(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getExtendedInformation(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - deviceName, - resourceGroupName, - options - }, - getExtendedInformationOperationSpec, - callback) as Promise; + async beginDownloadUpdatesAndWait( + deviceName: string, + resourceGroupName: string, + options?: DevicesDownloadUpdatesOptionalParams + ): Promise { + const poller = await this.beginDownloadUpdates( + deviceName, + resourceGroupName, + options + ); + return poller.pollUntilDone(); } /** - * @summary Installs the updates on the Data Box Edge/Data Box Gateway device. + * Generates certificate for activation key. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - installUpdates(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginInstallUpdates(deviceName,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + generateCertificate( + deviceName: string, + resourceGroupName: string, + options?: DevicesGenerateCertificateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, resourceGroupName, options }, + generateCertificateOperationSpec + ); } /** - * Gets the network settings of the specified Data Box Edge/Data Box Gateway device. - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise - */ - getNetworkSettings(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param callback The callback - */ - getNetworkSettings(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** + * Gets additional information for the specified Azure Stack Edge/Data Box Gateway device. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - getNetworkSettings(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getNetworkSettings(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getExtendedInformation( + deviceName: string, + resourceGroupName: string, + options?: DevicesGetExtendedInformationOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - deviceName, - resourceGroupName, - options - }, - getNetworkSettingsOperationSpec, - callback) as Promise; + { deviceName, resourceGroupName, options }, + getExtendedInformationOperationSpec + ); } /** - * @summary Scans for updates on a Data Box Edge/Data Box Gateway device. + * Installs the updates on the Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - scanForUpdates(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginScanForUpdates(deviceName,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginInstallUpdates( + deviceName: string, + resourceGroupName: string, + options?: DevicesInstallUpdatesOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { deviceName, resourceGroupName, options }, + installUpdatesOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * Updates the security settings on a Data Box Edge/Data Box Gateway device. + * Installs the updates on the Data Box Edge/Data Box Gateway device. * @param deviceName The device name. - * @param securitySettings The security settings. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - createOrUpdateSecuritySettings(deviceName: string, securitySettings: Models.SecuritySettings, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdateSecuritySettings(deviceName,securitySettings,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginInstallUpdatesAndWait( + deviceName: string, + resourceGroupName: string, + options?: DevicesInstallUpdatesOptionalParams + ): Promise { + const poller = await this.beginInstallUpdates( + deviceName, + resourceGroupName, + options + ); + return poller.pollUntilDone(); } /** - * @summary Gets information about the availability of updates based on the last scan of the - * device. It also gets information about any ongoing download or install jobs on the device. - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise - */ - getUpdateSummary(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param callback The callback - */ - getUpdateSummary(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** + * Gets the network settings of the specified Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - getUpdateSummary(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getUpdateSummary(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getNetworkSettings( + deviceName: string, + resourceGroupName: string, + options?: DevicesGetNetworkSettingsOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - deviceName, - resourceGroupName, - options - }, - getUpdateSummaryOperationSpec, - callback) as Promise; + { deviceName, resourceGroupName, options }, + getNetworkSettingsOperationSpec + ); } /** - * Uploads registration certificate for the device. - * @param deviceName The device name. - * @param parameters The upload certificate request. - * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise - */ - uploadCertificate(deviceName: string, parameters: Models.UploadCertificateRequest, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param deviceName The device name. - * @param parameters The upload certificate request. - * @param resourceGroupName The resource group name. - * @param callback The callback - */ - uploadCertificate(deviceName: string, parameters: Models.UploadCertificateRequest, resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** + * Scans for updates on a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. - * @param parameters The upload certificate request. * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - uploadCertificate(deviceName: string, parameters: Models.UploadCertificateRequest, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - uploadCertificate(deviceName: string, parameters: Models.UploadCertificateRequest, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - deviceName, - parameters, - resourceGroupName, - options - }, - uploadCertificateOperationSpec, - callback) as Promise; + async beginScanForUpdates( + deviceName: string, + resourceGroupName: string, + options?: DevicesScanForUpdatesOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { deviceName, resourceGroupName, options }, + scanForUpdatesOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * Creates or updates a Data Box Edge/Data Box Gateway resource. + * Scans for updates on a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. - * @param dataBoxEdgeDevice The resource object. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginCreateOrUpdate(deviceName: string, dataBoxEdgeDevice: Models.DataBoxEdgeDevice, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - dataBoxEdgeDevice, - resourceGroupName, - options - }, - beginCreateOrUpdateOperationSpec, - options); + async beginScanForUpdatesAndWait( + deviceName: string, + resourceGroupName: string, + options?: DevicesScanForUpdatesOptionalParams + ): Promise { + const poller = await this.beginScanForUpdates( + deviceName, + resourceGroupName, + options + ); + return poller.pollUntilDone(); } /** - * Deletes the Data Box Edge/Data Box Gateway device. + * Updates the security settings on a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param securitySettings The security settings. + * @param options The options parameters. */ - beginDeleteMethod(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - resourceGroupName, - options - }, - beginDeleteMethodOperationSpec, - options); + async beginCreateOrUpdateSecuritySettings( + deviceName: string, + resourceGroupName: string, + securitySettings: SecuritySettings, + options?: DevicesCreateOrUpdateSecuritySettingsOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { deviceName, resourceGroupName, securitySettings, options }, + createOrUpdateSecuritySettingsOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * @summary Downloads the updates on a Data Box Edge/Data Box Gateway device. + * Updates the security settings on a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param securitySettings The security settings. + * @param options The options parameters. */ - beginDownloadUpdates(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - resourceGroupName, - options - }, - beginDownloadUpdatesOperationSpec, - options); + async beginCreateOrUpdateSecuritySettingsAndWait( + deviceName: string, + resourceGroupName: string, + securitySettings: SecuritySettings, + options?: DevicesCreateOrUpdateSecuritySettingsOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdateSecuritySettings( + deviceName, + resourceGroupName, + securitySettings, + options + ); + return poller.pollUntilDone(); } /** - * @summary Installs the updates on the Data Box Edge/Data Box Gateway device. + * Gets additional information for the specified Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param parameters The patch object. + * @param options The options parameters. */ - beginInstallUpdates(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - resourceGroupName, - options - }, - beginInstallUpdatesOperationSpec, - options); + updateExtendedInformation( + deviceName: string, + resourceGroupName: string, + parameters: DataBoxEdgeDeviceExtendedInfoPatch, + options?: DevicesUpdateExtendedInformationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, resourceGroupName, parameters, options }, + updateExtendedInformationOperationSpec + ); } /** - * @summary Scans for updates on a Data Box Edge/Data Box Gateway device. + * Gets information about the availability of updates based on the last scan of the device. It also + * gets information about any ongoing download or install jobs on the device. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginScanForUpdates(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - resourceGroupName, - options - }, - beginScanForUpdatesOperationSpec, - options); + getUpdateSummary( + deviceName: string, + resourceGroupName: string, + options?: DevicesGetUpdateSummaryOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, resourceGroupName, options }, + getUpdateSummaryOperationSpec + ); } /** - * Updates the security settings on a Data Box Edge/Data Box Gateway device. + * Uploads registration certificate for the device. * @param deviceName The device name. - * @param securitySettings The security settings. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param parameters The upload certificate request. + * @param options The options parameters. */ - beginCreateOrUpdateSecuritySettings(deviceName: string, securitySettings: Models.SecuritySettings, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - securitySettings, - resourceGroupName, - options - }, - beginCreateOrUpdateSecuritySettingsOperationSpec, - options); + uploadCertificate( + deviceName: string, + resourceGroupName: string, + parameters: UploadCertificateRequest, + options?: DevicesUploadCertificateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, resourceGroupName, parameters, options }, + uploadCertificateOperationSpec + ); } /** - * Gets all the Data Box Edge/Data Box Gateway devices in a subscription. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. */ - listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listBySubscriptionNext( + nextLink: string, + options?: DevicesListBySubscriptionNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listBySubscriptionNextOperationSpec, - callback) as Promise; + { nextLink, options }, + listBySubscriptionNextOperationSpec + ); } /** - * Gets all the Data Box Edge/Data Box Gateway devices in a resource group. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListByResourceGroupNext + * @param resourceGroupName The resource group name. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: DevicesListByResourceGroupNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback) as Promise; + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listBySubscriptionOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.expand - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.DataBoxEdgeDeviceList @@ -546,23 +803,15 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion, Parameters.expand], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.expand - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.DataBoxEdgeDeviceList @@ -571,23 +820,19 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}", + queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ - Parameters.deviceName, + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.DataBoxEdgeDevice @@ -596,30 +841,20 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion + Parameters.resourceGroupName, + Parameters.deviceName ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.DataBoxEdgeDevicePatch, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.DataBoxEdgeDevice @@ -628,286 +863,298 @@ const updateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getExtendedInformationOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/getExtendedInformation", + requestBody: Parameters.dataBoxEdgeDevice, + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}", + httpMethod: "DELETE", responses: { - 200: { - bodyMapper: Mappers.DataBoxEdgeDeviceExtendedInfo - }, + 200: {}, + 201: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getNetworkSettingsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/networkSettings/default", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}", + httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.NetworkSettings + bodyMapper: Mappers.DataBoxEdgeDevice }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getUpdateSummaryOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/updateSummary/default", + requestBody: Parameters.parameters, + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const downloadUpdatesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/downloadUpdates", + httpMethod: "POST", responses: { - 200: { - bodyMapper: Mappers.UpdateSummary - }, + 200: {}, + 201: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const uploadCertificateOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/uploadCertificate", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.UploadCertificateRequest, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const generateCertificateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/generateCertificate", + httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.UploadCertificateResponse + bodyMapper: Mappers.GenerateCertResponse }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion + Parameters.resourceGroupName, + Parameters.deviceName ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "dataBoxEdgeDevice", - mapper: { - ...Mappers.DataBoxEdgeDevice, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const getExtendedInformationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/getExtendedInformation", + httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.DataBoxEdgeDevice + bodyMapper: Mappers.DataBoxEdgeDeviceExtendedInfo }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName ], + headerParameters: [Parameters.accept], + serializer +}; +const installUpdatesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/installUpdates", + httpMethod: "POST", responses: { 200: {}, + 201: {}, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDownloadUpdatesOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/downloadUpdates", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName ], + headerParameters: [Parameters.accept], + serializer +}; +const getNetworkSettingsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/networkSettings/default", + httpMethod: "GET", responses: { - 200: {}, - 202: {}, + 200: { + bodyMapper: Mappers.NetworkSettings + }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginInstallUpdatesOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/installUpdates", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName ], + headerParameters: [Parameters.accept], + serializer +}; +const scanForUpdatesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/scanForUpdates", + httpMethod: "POST", responses: { 200: {}, + 201: {}, 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginScanForUpdatesOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/scanForUpdates", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateSecuritySettingsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/securitySettings/default/update", + httpMethod: "POST", responses: { 200: {}, + 201: {}, 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, + requestBody: Parameters.securitySettings, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const beginCreateOrUpdateSecuritySettingsOperationSpec: msRest.OperationSpec = { +const updateExtendedInformationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/updateExtendedInformation", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/securitySettings/default/update", + responses: { + 200: { + bodyMapper: Mappers.DataBoxEdgeDeviceExtendedInfo + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.parameters1, + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName + Parameters.resourceGroupName, + Parameters.deviceName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "securitySettings", - mapper: { - ...Mappers.SecuritySettings, - required: true + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getUpdateSummaryOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/updateSummary/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.UpdateSummary + }, + default: { + bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const uploadCertificateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/uploadCertificate", + httpMethod: "POST", responses: { - 202: {}, - 204: {}, + 200: { + bodyMapper: Mappers.UploadCertificateResponse + }, default: { bodyMapper: Mappers.CloudError } }, + requestBody: Parameters.parameters2, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.DataBoxEdgeDeviceList @@ -916,19 +1163,18 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion, Parameters.expand], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], serializer }; - -const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.DataBoxEdgeDeviceList @@ -937,5 +1183,13 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion, Parameters.expand], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/diagnosticSettings.ts b/sdk/databoxedge/arm-databoxedge/src/operations/diagnosticSettings.ts new file mode 100644 index 000000000000..64c93b45ab2c --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operations/diagnosticSettings.ts @@ -0,0 +1,385 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { DiagnosticSettings } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsOptionalParams, + DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsResponse, + DiagnosticProactiveLogCollectionSettings, + DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsOptionalParams, + DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse, + DiagnosticSettingsGetDiagnosticRemoteSupportSettingsOptionalParams, + DiagnosticSettingsGetDiagnosticRemoteSupportSettingsResponse, + DiagnosticRemoteSupportSettings, + DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsOptionalParams, + DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse +} from "../models"; + +/** Class containing DiagnosticSettings operations. */ +export class DiagnosticSettingsImpl implements DiagnosticSettings { + private readonly client: DataBoxEdgeManagementClient; + + /** + * Initialize a new instance of the class DiagnosticSettings class. + * @param client Reference to the service client + */ + constructor(client: DataBoxEdgeManagementClient) { + this.client = client; + } + + /** + * Gets the proactive log collection settings of the specified Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + getDiagnosticProactiveLogCollectionSettings( + deviceName: string, + resourceGroupName: string, + options?: DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsOptionalParams + ): Promise< + DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsResponse + > { + return this.client.sendOperationRequest( + { deviceName, resourceGroupName, options }, + getDiagnosticProactiveLogCollectionSettingsOperationSpec + ); + } + + /** + * Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param proactiveLogCollectionSettings The proactive log collection settings. + * @param options The options parameters. + */ + async beginUpdateDiagnosticProactiveLogCollectionSettings( + deviceName: string, + resourceGroupName: string, + proactiveLogCollectionSettings: DiagnosticProactiveLogCollectionSettings, + options?: DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsOptionalParams + ): Promise< + PollerLike< + PollOperationState< + DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse + >, + DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + deviceName, + resourceGroupName, + proactiveLogCollectionSettings, + options + }, + updateDiagnosticProactiveLogCollectionSettingsOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param proactiveLogCollectionSettings The proactive log collection settings. + * @param options The options parameters. + */ + async beginUpdateDiagnosticProactiveLogCollectionSettingsAndWait( + deviceName: string, + resourceGroupName: string, + proactiveLogCollectionSettings: DiagnosticProactiveLogCollectionSettings, + options?: DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsOptionalParams + ): Promise< + DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse + > { + const poller = await this.beginUpdateDiagnosticProactiveLogCollectionSettings( + deviceName, + resourceGroupName, + proactiveLogCollectionSettings, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets the diagnostic remote support settings of the specified Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + getDiagnosticRemoteSupportSettings( + deviceName: string, + resourceGroupName: string, + options?: DiagnosticSettingsGetDiagnosticRemoteSupportSettingsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, resourceGroupName, options }, + getDiagnosticRemoteSupportSettingsOperationSpec + ); + } + + /** + * Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param diagnosticRemoteSupportSettings The diagnostic remote support settings. + * @param options The options parameters. + */ + async beginUpdateDiagnosticRemoteSupportSettings( + deviceName: string, + resourceGroupName: string, + diagnosticRemoteSupportSettings: DiagnosticRemoteSupportSettings, + options?: DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsOptionalParams + ): Promise< + PollerLike< + PollOperationState< + DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse + >, + DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + deviceName, + resourceGroupName, + diagnosticRemoteSupportSettings, + options + }, + updateDiagnosticRemoteSupportSettingsOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param diagnosticRemoteSupportSettings The diagnostic remote support settings. + * @param options The options parameters. + */ + async beginUpdateDiagnosticRemoteSupportSettingsAndWait( + deviceName: string, + resourceGroupName: string, + diagnosticRemoteSupportSettings: DiagnosticRemoteSupportSettings, + options?: DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsOptionalParams + ): Promise { + const poller = await this.beginUpdateDiagnosticRemoteSupportSettings( + deviceName, + resourceGroupName, + diagnosticRemoteSupportSettings, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getDiagnosticProactiveLogCollectionSettingsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/diagnosticProactiveLogCollectionSettings/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticProactiveLogCollectionSettings + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateDiagnosticProactiveLogCollectionSettingsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/diagnosticProactiveLogCollectionSettings/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticProactiveLogCollectionSettings + }, + 201: { + bodyMapper: Mappers.DiagnosticProactiveLogCollectionSettings + }, + 202: { + bodyMapper: Mappers.DiagnosticProactiveLogCollectionSettings + }, + 204: { + bodyMapper: Mappers.DiagnosticProactiveLogCollectionSettings + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.proactiveLogCollectionSettings, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getDiagnosticRemoteSupportSettingsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/diagnosticRemoteSupportSettings/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticRemoteSupportSettings + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateDiagnosticRemoteSupportSettingsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/diagnosticRemoteSupportSettings/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DiagnosticRemoteSupportSettings + }, + 201: { + bodyMapper: Mappers.DiagnosticRemoteSupportSettings + }, + 202: { + bodyMapper: Mappers.DiagnosticRemoteSupportSettings + }, + 204: { + bodyMapper: Mappers.DiagnosticRemoteSupportSettings + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.diagnosticRemoteSupportSettings, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/index.ts b/sdk/databoxedge/arm-databoxedge/src/operations/index.ts index 70c72cf33126..1d8cf8228116 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/index.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/index.ts @@ -1,26 +1,28 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export * from "./operations"; +export * from "./availableSkus"; export * from "./devices"; export * from "./alerts"; export * from "./bandwidthSchedules"; +export * from "./diagnosticSettings"; export * from "./jobs"; export * from "./nodes"; export * from "./operationsStatus"; export * from "./orders"; export * from "./roles"; +export * from "./addons"; +export * from "./monitoringConfig"; export * from "./shares"; export * from "./storageAccountCredentials"; export * from "./storageAccounts"; export * from "./containers"; export * from "./triggers"; +export * from "./supportPackages"; export * from "./users"; -export * from "./skus"; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/jobs.ts b/sdk/databoxedge/arm-databoxedge/src/operations/jobs.ts index c5ce0b5b04bd..391994d335ca 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/jobs.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/jobs.ts @@ -1,85 +1,56 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/jobsMappers"; +import { Jobs } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { JobsGetOptionalParams, JobsGetResponse } from "../models"; -/** Class representing a Jobs. */ -export class Jobs { - private readonly client: DataBoxEdgeManagementClientContext; +/** Class containing Jobs operations. */ +export class JobsImpl implements Jobs { + private readonly client: DataBoxEdgeManagementClient; /** - * Create a Jobs. - * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Jobs class. + * @param client Reference to the service client */ - constructor(client: DataBoxEdgeManagementClientContext) { + constructor(client: DataBoxEdgeManagementClient) { this.client = client; } /** - * @summary Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. + * Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param name The job name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param deviceName The device name. - * @param name The job name. - * @param resourceGroupName The resource group name. - * @param callback The callback - */ - get(deviceName: string, name: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param deviceName The device name. - * @param name The job name. - * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback - */ - get(deviceName: string, name: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + deviceName: string, + name: string, + resourceGroupName: string, + options?: JobsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - deviceName, - name, - resourceGroupName, - options - }, - getOperationSpec, - callback) as Promise; + { deviceName, name, resourceGroupName, options }, + getOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/jobs/{name}", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/jobs/{name}", - urlParameters: [ - Parameters.deviceName, - Parameters.name, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.Job @@ -88,5 +59,14 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.name + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/monitoringConfig.ts b/sdk/databoxedge/arm-databoxedge/src/operations/monitoringConfig.ts new file mode 100644 index 000000000000..2658ec144903 --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operations/monitoringConfig.ts @@ -0,0 +1,497 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { MonitoringConfig } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + MonitoringMetricConfiguration, + MonitoringConfigListNextOptionalParams, + MonitoringConfigListOptionalParams, + MonitoringConfigListResponse, + MonitoringConfigGetOptionalParams, + MonitoringConfigGetResponse, + MonitoringConfigCreateOrUpdateOptionalParams, + MonitoringConfigCreateOrUpdateResponse, + MonitoringConfigDeleteOptionalParams, + MonitoringConfigListNextResponse +} from "../models"; + +/// +/** Class containing MonitoringConfig operations. */ +export class MonitoringConfigImpl implements MonitoringConfig { + private readonly client: DataBoxEdgeManagementClient; + + /** + * Initialize a new instance of the class MonitoringConfig class. + * @param client Reference to the service client + */ + constructor(client: DataBoxEdgeManagementClient) { + this.client = client; + } + + /** + * Lists metric configurations in a role. + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + public list( + deviceName: string, + roleName: string, + resourceGroupName: string, + options?: MonitoringConfigListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + deviceName, + roleName, + resourceGroupName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + deviceName, + roleName, + resourceGroupName, + options + ); + } + }; + } + + private async *listPagingPage( + deviceName: string, + roleName: string, + resourceGroupName: string, + options?: MonitoringConfigListOptionalParams + ): AsyncIterableIterator { + let result = await this._list( + deviceName, + roleName, + resourceGroupName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + deviceName, + roleName, + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + deviceName: string, + roleName: string, + resourceGroupName: string, + options?: MonitoringConfigListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + deviceName, + roleName, + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Lists metric configurations in a role. + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + private _list( + deviceName: string, + roleName: string, + resourceGroupName: string, + options?: MonitoringConfigListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, roleName, resourceGroupName, options }, + listOperationSpec + ); + } + + /** + * Gets a metric configuration of a role. + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + get( + deviceName: string, + roleName: string, + resourceGroupName: string, + options?: MonitoringConfigGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, roleName, resourceGroupName, options }, + getOperationSpec + ); + } + + /** + * Creates a new metric configuration or updates an existing one for a role. + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param monitoringMetricConfiguration The metric configuration. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + deviceName: string, + roleName: string, + resourceGroupName: string, + monitoringMetricConfiguration: MonitoringMetricConfiguration, + options?: MonitoringConfigCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + MonitoringConfigCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + deviceName, + roleName, + resourceGroupName, + monitoringMetricConfiguration, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Creates a new metric configuration or updates an existing one for a role. + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param monitoringMetricConfiguration The metric configuration. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + deviceName: string, + roleName: string, + resourceGroupName: string, + monitoringMetricConfiguration: MonitoringMetricConfiguration, + options?: MonitoringConfigCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + deviceName, + roleName, + resourceGroupName, + monitoringMetricConfiguration, + options + ); + return poller.pollUntilDone(); + } + + /** + * deletes a new metric configuration for a role. + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + async beginDelete( + deviceName: string, + roleName: string, + resourceGroupName: string, + options?: MonitoringConfigDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { deviceName, roleName, resourceGroupName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * deletes a new metric configuration for a role. + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + async beginDeleteAndWait( + deviceName: string, + roleName: string, + resourceGroupName: string, + options?: MonitoringConfigDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + deviceName, + roleName, + resourceGroupName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + deviceName: string, + roleName: string, + resourceGroupName: string, + nextLink: string, + options?: MonitoringConfigListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, roleName, resourceGroupName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MonitoringMetricConfigurationList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.roleName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MonitoringMetricConfiguration + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.roleName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.MonitoringMetricConfiguration + }, + 201: { + bodyMapper: Mappers.MonitoringMetricConfiguration + }, + 202: { + bodyMapper: Mappers.MonitoringMetricConfiguration + }, + 204: { + bodyMapper: Mappers.MonitoringMetricConfiguration + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.monitoringMetricConfiguration, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.roleName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{roleName}/monitoringConfig/default", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.roleName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MonitoringMetricConfigurationList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.roleName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/nodes.ts b/sdk/databoxedge/arm-databoxedge/src/operations/nodes.ts index 1ec2ea69128f..f4fd83317c7b 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/nodes.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/nodes.ts @@ -1,28 +1,35 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/nodesMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Nodes } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { + Node, + NodesListByDataBoxEdgeDeviceNextOptionalParams, + NodesListByDataBoxEdgeDeviceOptionalParams, + NodesListByDataBoxEdgeDeviceResponse, + NodesListByDataBoxEdgeDeviceNextResponse +} from "../models"; -/** Class representing a Nodes. */ -export class Nodes { - private readonly client: DataBoxEdgeManagementClientContext; +/// +/** Class containing Nodes operations. */ +export class NodesImpl implements Nodes { + private readonly client: DataBoxEdgeManagementClient; /** - * Create a Nodes. - * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Nodes class. + * @param client Reference to the service client */ - constructor(client: DataBoxEdgeManagementClientContext) { + constructor(client: DataBoxEdgeManagementClient) { this.client = client; } @@ -30,51 +37,138 @@ export class Nodes { * Gets all the nodes currently configured under this Data Box Edge device * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + public listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: NodesListByDataBoxEdgeDeviceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByDataBoxEdgeDevicePagingAll( + deviceName, + resourceGroupName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByDataBoxEdgeDevicePagingPage( + deviceName, + resourceGroupName, + options + ); + } + }; + } + + private async *listByDataBoxEdgeDevicePagingPage( + deviceName: string, + resourceGroupName: string, + options?: NodesListByDataBoxEdgeDeviceOptionalParams + ): AsyncIterableIterator { + let result = await this._listByDataBoxEdgeDevice( + deviceName, + resourceGroupName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByDataBoxEdgeDeviceNext( + deviceName, + resourceGroupName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByDataBoxEdgeDevicePagingAll( + deviceName: string, + resourceGroupName: string, + options?: NodesListByDataBoxEdgeDeviceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByDataBoxEdgeDevicePagingPage( + deviceName, + resourceGroupName, + options + )) { + yield* page; + } + } + /** + * Gets all the nodes currently configured under this Data Box Edge device * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param callback The callback + * @param options The options parameters. */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + private _listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: NodesListByDataBoxEdgeDeviceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, resourceGroupName, options }, + listByDataBoxEdgeDeviceOperationSpec + ); + } + /** + * ListByDataBoxEdgeDeviceNext * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback + * @param nextLink The nextLink from the previous successful call to the ListByDataBoxEdgeDevice + * method. + * @param options The options parameters. */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByDataBoxEdgeDeviceNext( + deviceName: string, + resourceGroupName: string, + nextLink: string, + options?: NodesListByDataBoxEdgeDeviceNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - deviceName, - resourceGroupName, - options - }, - listByDataBoxEdgeDeviceOperationSpec, - callback) as Promise; + { deviceName, resourceGroupName, nextLink, options }, + listByDataBoxEdgeDeviceNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByDataBoxEdgeDeviceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/nodes", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/nodes", + responses: { + 200: { + bodyMapper: Mappers.NodeList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName ], + headerParameters: [Parameters.accept], + serializer +}; +const listByDataBoxEdgeDeviceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.NodeList @@ -83,5 +177,14 @@ const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/operations.ts b/sdk/databoxedge/arm-databoxedge/src/operations/operations.ts index 2b80ef77c415..75e658d5e1e4 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/operations.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/operations.ts @@ -1,95 +1,111 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/operationsMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Operations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { + Operation, + OperationsListNextOptionalParams, + OperationsListOptionalParams, + OperationsListResponse, + OperationsListNextResponse +} from "../models"; -/** Class representing a Operations. */ -export class Operations { - private readonly client: DataBoxEdgeManagementClientContext; +/// +/** Class containing Operations operations. */ +export class OperationsImpl implements Operations { + private readonly client: DataBoxEdgeManagementClient; /** - * Create a Operations. - * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Operations class. + * @param client Reference to the service client */ - constructor(client: DataBoxEdgeManagementClientContext) { + constructor(client: DataBoxEdgeManagementClient) { this.client = client; } /** - * @summary List all the supported operations. - * @param [options] The optional parameters - * @returns Promise + * List all the supported operations. + * @param options The options parameters. */ - list(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options + public list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; }, - listOperationSpec, - callback) as Promise; + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + options?: OperationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } } /** - * @summary List all the supported operations. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * List all the supported operations. + * @param options The options parameters. */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + private _list( + options?: OperationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listNext( + nextLink: string, + options?: OperationsListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; + { nextLink, options }, + listNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.DataBoxEdge/operations", httpMethod: "GET", - path: "providers/Microsoft.DataBoxEdge/operations", - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.OperationsList @@ -98,19 +114,14 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host], + headerParameters: [Parameters.accept], serializer }; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.OperationsList @@ -119,5 +130,8 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/operationsStatus.ts b/sdk/databoxedge/arm-databoxedge/src/operations/operationsStatus.ts index d8a2994ebc5b..6dcfbc331216 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/operationsStatus.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/operationsStatus.ts @@ -1,85 +1,59 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/operationsStatusMappers"; +import { OperationsStatus } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { + OperationsStatusGetOptionalParams, + OperationsStatusGetResponse +} from "../models"; -/** Class representing a OperationsStatus. */ -export class OperationsStatus { - private readonly client: DataBoxEdgeManagementClientContext; +/** Class containing OperationsStatus operations. */ +export class OperationsStatusImpl implements OperationsStatus { + private readonly client: DataBoxEdgeManagementClient; /** - * Create a OperationsStatus. - * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class OperationsStatus class. + * @param client Reference to the service client */ - constructor(client: DataBoxEdgeManagementClientContext) { + constructor(client: DataBoxEdgeManagementClient) { this.client = client; } /** - * @summary Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. + * Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param name The job name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param deviceName The device name. - * @param name The job name. - * @param resourceGroupName The resource group name. - * @param callback The callback - */ - get(deviceName: string, name: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param deviceName The device name. - * @param name The job name. - * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback - */ - get(deviceName: string, name: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + deviceName: string, + name: string, + resourceGroupName: string, + options?: OperationsStatusGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - deviceName, - name, - resourceGroupName, - options - }, - getOperationSpec, - callback) as Promise; + { deviceName, name, resourceGroupName, options }, + getOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/operationsStatus/{name}", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/operationsStatus/{name}", - urlParameters: [ - Parameters.deviceName, - Parameters.name, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.Job @@ -88,5 +62,14 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.name + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/orders.ts b/sdk/databoxedge/arm-databoxedge/src/operations/orders.ts index 42da15c6a1d1..7ff0c65187ba 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/orders.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/orders.ts @@ -1,204 +1,366 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/ordersMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Orders } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + Order, + OrdersListByDataBoxEdgeDeviceNextOptionalParams, + OrdersListByDataBoxEdgeDeviceOptionalParams, + OrdersListByDataBoxEdgeDeviceResponse, + OrdersGetOptionalParams, + OrdersGetResponse, + OrdersCreateOrUpdateOptionalParams, + OrdersCreateOrUpdateResponse, + OrdersDeleteOptionalParams, + OrdersListDCAccessCodeOptionalParams, + OrdersListDCAccessCodeResponse, + OrdersListByDataBoxEdgeDeviceNextResponse +} from "../models"; -/** Class representing a Orders. */ -export class Orders { - private readonly client: DataBoxEdgeManagementClientContext; +/// +/** Class containing Orders operations. */ +export class OrdersImpl implements Orders { + private readonly client: DataBoxEdgeManagementClient; /** - * Create a Orders. - * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Orders class. + * @param client Reference to the service client */ - constructor(client: DataBoxEdgeManagementClientContext) { + constructor(client: DataBoxEdgeManagementClient) { this.client = client; } /** - * @summary Lists all the orders related to a Data Box Edge/Data Box Gateway device. + * Lists all the orders related to a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param callback The callback - */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback - */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: OrdersListByDataBoxEdgeDeviceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByDataBoxEdgeDevicePagingAll( + deviceName, + resourceGroupName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByDataBoxEdgeDevicePagingPage( + deviceName, + resourceGroupName, + options + ); + } + }; + } + + private async *listByDataBoxEdgeDevicePagingPage( + deviceName: string, + resourceGroupName: string, + options?: OrdersListByDataBoxEdgeDeviceOptionalParams + ): AsyncIterableIterator { + let result = await this._listByDataBoxEdgeDevice( + deviceName, + resourceGroupName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByDataBoxEdgeDeviceNext( deviceName, resourceGroupName, + continuationToken, options - }, - listByDataBoxEdgeDeviceOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByDataBoxEdgeDevicePagingAll( + deviceName: string, + resourceGroupName: string, + options?: OrdersListByDataBoxEdgeDeviceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByDataBoxEdgeDevicePagingPage( + deviceName, + resourceGroupName, + options + )) { + yield* page; + } } /** - * @summary Gets a specific order by name. - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise - */ - get(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** + * Lists all the orders related to a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param callback The callback + * @param options The options parameters. */ - get(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + private _listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: OrdersListByDataBoxEdgeDeviceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, resourceGroupName, options }, + listByDataBoxEdgeDeviceOperationSpec + ); + } + /** + * Gets a specific order by name. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + deviceName: string, + resourceGroupName: string, + options?: OrdersGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - deviceName, - resourceGroupName, - options - }, - getOperationSpec, - callback) as Promise; + { deviceName, resourceGroupName, options }, + getOperationSpec + ); } /** - * @summary Creates or updates an order. + * Creates or updates an order. * @param deviceName The order details of a device. - * @param order The order to be created or updated. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param order The order to be created or updated. + * @param options The options parameters. */ - createOrUpdate(deviceName: string, order: Models.Order, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(deviceName,order,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginCreateOrUpdate( + deviceName: string, + resourceGroupName: string, + order: Order, + options?: OrdersCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + OrdersCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { deviceName, resourceGroupName, order, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * @summary Deletes the order related to the device. - * @param deviceName The device name. + * Creates or updates an order. + * @param deviceName The order details of a device. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param order The order to be created or updated. + * @param options The options parameters. */ - deleteMethod(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(deviceName,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginCreateOrUpdateAndWait( + deviceName: string, + resourceGroupName: string, + order: Order, + options?: OrdersCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + deviceName, + resourceGroupName, + order, + options + ); + return poller.pollUntilDone(); } /** - * @summary Creates or updates an order. - * @param deviceName The order details of a device. - * @param order The order to be created or updated. + * Deletes the order related to the device. + * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginCreateOrUpdate(deviceName: string, order: Models.Order, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - order, - resourceGroupName, - options - }, - beginCreateOrUpdateOperationSpec, - options); + async beginDelete( + deviceName: string, + resourceGroupName: string, + options?: OrdersDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { deviceName, resourceGroupName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * @summary Deletes the order related to the device. + * Deletes the order related to the device. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - resourceGroupName, - options - }, - beginDeleteMethodOperationSpec, - options); + async beginDeleteAndWait( + deviceName: string, + resourceGroupName: string, + options?: OrdersDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + deviceName, + resourceGroupName, + options + ); + return poller.pollUntilDone(); } /** - * @summary Lists all the orders related to a Data Box Edge/Data Box Gateway device. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * Gets the DCAccess Code + * @param deviceName The device name + * @param resourceGroupName The resource group name. + * @param options The options parameters. */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listDCAccessCode( + deviceName: string, + resourceGroupName: string, + options?: OrdersListDCAccessCodeOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, resourceGroupName, options }, + listDCAccessCodeOperationSpec + ); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListByDataBoxEdgeDeviceNext + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param nextLink The nextLink from the previous successful call to the ListByDataBoxEdgeDevice + * method. + * @param options The options parameters. */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByDataBoxEdgeDeviceNext( + deviceName: string, + resourceGroupName: string, + nextLink: string, + options?: OrdersListByDataBoxEdgeDeviceNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByDataBoxEdgeDeviceNextOperationSpec, - callback) as Promise; + { deviceName, resourceGroupName, nextLink, options }, + listByDataBoxEdgeDeviceNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByDataBoxEdgeDeviceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders", - urlParameters: [ - Parameters.deviceName, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.OrderList @@ -207,23 +369,20 @@ const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.Order @@ -232,77 +391,97 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName + Parameters.resourceGroupName, + Parameters.deviceName ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "order", - mapper: { - ...Mappers.Order, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.Order }, - 202: {}, + 201: { + bodyMapper: Mappers.Order + }, + 202: { + bodyMapper: Mappers.Order + }, + 204: { + bodyMapper: Mappers.Order + }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default", + requestBody: Parameters.order, + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default", + httpMethod: "DELETE", responses: { 200: {}, + 201: {}, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName + ], + headerParameters: [Parameters.accept], serializer }; - -const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", +const listDCAccessCodeOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default/listDCAccessCode", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.DCAccessCode + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName ], + headerParameters: [Parameters.accept], + serializer +}; +const listByDataBoxEdgeDeviceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.OrderList @@ -311,5 +490,14 @@ const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/roles.ts b/sdk/databoxedge/arm-databoxedge/src/operations/roles.ts index bbde415fc14f..941c8621ce06 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/roles.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/roles.ts @@ -1,29 +1,42 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/rolesMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Roles } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + RoleUnion, + RolesListByDataBoxEdgeDeviceNextOptionalParams, + RolesListByDataBoxEdgeDeviceOptionalParams, + RolesListByDataBoxEdgeDeviceResponse, + RolesGetOptionalParams, + RolesGetResponse, + RolesCreateOrUpdateOptionalParams, + RolesCreateOrUpdateResponse, + RolesDeleteOptionalParams, + RolesListByDataBoxEdgeDeviceNextResponse +} from "../models"; -/** Class representing a Roles. */ -export class Roles { - private readonly client: DataBoxEdgeManagementClientContext; +/// +/** Class containing Roles operations. */ +export class RolesImpl implements Roles { + private readonly client: DataBoxEdgeManagementClient; /** - * Create a Roles. - * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Roles class. + * @param client Reference to the service client */ - constructor(client: DataBoxEdgeManagementClientContext) { + constructor(client: DataBoxEdgeManagementClient) { this.client = client; } @@ -31,117 +44,265 @@ export class Roles { * Lists all the roles configured in a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param callback The callback - */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback - */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: RolesListByDataBoxEdgeDeviceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByDataBoxEdgeDevicePagingAll( + deviceName, + resourceGroupName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByDataBoxEdgeDevicePagingPage( + deviceName, + resourceGroupName, + options + ); + } + }; + } + + private async *listByDataBoxEdgeDevicePagingPage( + deviceName: string, + resourceGroupName: string, + options?: RolesListByDataBoxEdgeDeviceOptionalParams + ): AsyncIterableIterator { + let result = await this._listByDataBoxEdgeDevice( + deviceName, + resourceGroupName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByDataBoxEdgeDeviceNext( deviceName, resourceGroupName, + continuationToken, options - }, - listByDataBoxEdgeDeviceOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByDataBoxEdgeDevicePagingAll( + deviceName: string, + resourceGroupName: string, + options?: RolesListByDataBoxEdgeDeviceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByDataBoxEdgeDevicePagingPage( + deviceName, + resourceGroupName, + options + )) { + yield* page; + } } /** - * Gets a specific role by name. - * @param deviceName The device name. - * @param name The role name. - * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise - */ - get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** + * Lists all the roles configured in a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. - * @param name The role name. * @param resourceGroupName The resource group name. - * @param callback The callback + * @param options The options parameters. */ - get(deviceName: string, name: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + private _listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: RolesListByDataBoxEdgeDeviceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, resourceGroupName, options }, + listByDataBoxEdgeDeviceOperationSpec + ); + } + /** + * Gets a specific role by name. * @param deviceName The device name. * @param name The role name. * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get(deviceName: string, name: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + deviceName: string, + name: string, + resourceGroupName: string, + options?: RolesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - deviceName, - name, - resourceGroupName, - options - }, - getOperationSpec, - callback) as Promise; + { deviceName, name, resourceGroupName, options }, + getOperationSpec + ); } /** * Create or update a role. * @param deviceName The device name. * @param name The role name. - * @param role The role properties. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param role The role properties. + * @param options The options parameters. */ - createOrUpdate(deviceName: string, name: string, role: Models.RoleUnion, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(deviceName,name,role,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginCreateOrUpdate( + deviceName: string, + name: string, + resourceGroupName: string, + role: RoleUnion, + options?: RolesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + RolesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { deviceName, name, resourceGroupName, role, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * Deletes the role on the device. + * Create or update a role. * @param deviceName The device name. * @param name The role name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param role The role properties. + * @param options The options parameters. */ - deleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(deviceName,name,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginCreateOrUpdateAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + role: RoleUnion, + options?: RolesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + deviceName, + name, + resourceGroupName, + role, + options + ); + return poller.pollUntilDone(); } /** - * Create or update a role. + * Deletes the role on the device. * @param deviceName The device name. * @param name The role name. - * @param role The role properties. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginCreateOrUpdate(deviceName: string, name: string, role: Models.RoleUnion, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - name, - role, - resourceGroupName, - options - }, - beginCreateOrUpdateOperationSpec, - options); + async beginDelete( + deviceName: string, + name: string, + resourceGroupName: string, + options?: RolesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { deviceName, name, resourceGroupName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** @@ -149,66 +310,50 @@ export class Roles { * @param deviceName The device name. * @param name The role name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - name, - resourceGroupName, - options - }, - beginDeleteMethodOperationSpec, - options); + async beginDeleteAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + options?: RolesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + deviceName, + name, + resourceGroupName, + options + ); + return poller.pollUntilDone(); } /** - * Lists all the roles configured in a Data Box Edge/Data Box Gateway device. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListByDataBoxEdgeDeviceNext + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param nextLink The nextLink from the previous successful call to the ListByDataBoxEdgeDevice + * method. + * @param options The options parameters. */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByDataBoxEdgeDeviceNext( + deviceName: string, + resourceGroupName: string, + nextLink: string, + options?: RolesListByDataBoxEdgeDeviceNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByDataBoxEdgeDeviceNextOperationSpec, - callback) as Promise; + { deviceName, resourceGroupName, nextLink, options }, + listByDataBoxEdgeDeviceNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByDataBoxEdgeDeviceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles", - urlParameters: [ - Parameters.deviceName, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.RoleList @@ -217,24 +362,20 @@ const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, - Parameters.name, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.Role @@ -243,79 +384,78 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, - Parameters.name, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.name ], - requestBody: { - parameterPath: "role", - mapper: { - ...Mappers.Role, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.Role }, - 202: {}, + 201: { + bodyMapper: Mappers.Role + }, + 202: { + bodyMapper: Mappers.Role + }, + 204: { + bodyMapper: Mappers.Role + }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}", + requestBody: Parameters.role, + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, - Parameters.name, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.name ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}", + httpMethod: "DELETE", responses: { 200: {}, + 201: {}, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.name + ], + headerParameters: [Parameters.accept], serializer }; - -const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByDataBoxEdgeDeviceNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.RoleList @@ -324,5 +464,14 @@ const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/shares.ts b/sdk/databoxedge/arm-databoxedge/src/operations/shares.ts index 39d13d53d5b5..77f53bac22c0 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/shares.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/shares.ts @@ -1,247 +1,445 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/sharesMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Shares } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + Share, + SharesListByDataBoxEdgeDeviceNextOptionalParams, + SharesListByDataBoxEdgeDeviceOptionalParams, + SharesListByDataBoxEdgeDeviceResponse, + SharesGetOptionalParams, + SharesGetResponse, + SharesCreateOrUpdateOptionalParams, + SharesCreateOrUpdateResponse, + SharesDeleteOptionalParams, + SharesRefreshOptionalParams, + SharesListByDataBoxEdgeDeviceNextResponse +} from "../models"; -/** Class representing a Shares. */ -export class Shares { - private readonly client: DataBoxEdgeManagementClientContext; +/// +/** Class containing Shares operations. */ +export class SharesImpl implements Shares { + private readonly client: DataBoxEdgeManagementClient; /** - * Create a Shares. - * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Shares class. + * @param client Reference to the service client */ - constructor(client: DataBoxEdgeManagementClientContext) { + constructor(client: DataBoxEdgeManagementClient) { this.client = client; } /** - * @summary Lists all the shares in a Data Box Edge/Data Box Gateway device. + * Lists all the shares in a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param callback The callback - */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback - */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: SharesListByDataBoxEdgeDeviceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByDataBoxEdgeDevicePagingAll( + deviceName, + resourceGroupName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByDataBoxEdgeDevicePagingPage( + deviceName, + resourceGroupName, + options + ); + } + }; + } + + private async *listByDataBoxEdgeDevicePagingPage( + deviceName: string, + resourceGroupName: string, + options?: SharesListByDataBoxEdgeDeviceOptionalParams + ): AsyncIterableIterator { + let result = await this._listByDataBoxEdgeDevice( + deviceName, + resourceGroupName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByDataBoxEdgeDeviceNext( deviceName, resourceGroupName, + continuationToken, options - }, - listByDataBoxEdgeDeviceOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByDataBoxEdgeDevicePagingAll( + deviceName: string, + resourceGroupName: string, + options?: SharesListByDataBoxEdgeDeviceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByDataBoxEdgeDevicePagingPage( + deviceName, + resourceGroupName, + options + )) { + yield* page; + } } /** - * @summary Gets a share by name. - * @param deviceName The device name. - * @param name The share name. - * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise - */ - get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** + * Lists all the shares in a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. - * @param name The share name. * @param resourceGroupName The resource group name. - * @param callback The callback + * @param options The options parameters. */ - get(deviceName: string, name: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + private _listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: SharesListByDataBoxEdgeDeviceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, resourceGroupName, options }, + listByDataBoxEdgeDeviceOperationSpec + ); + } + /** + * Gets a share by name. * @param deviceName The device name. * @param name The share name. * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get(deviceName: string, name: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + deviceName: string, + name: string, + resourceGroupName: string, + options?: SharesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - deviceName, - name, - resourceGroupName, - options - }, - getOperationSpec, - callback) as Promise; + { deviceName, name, resourceGroupName, options }, + getOperationSpec + ); } /** - * @summary Creates a new share or updates an existing share on the device. + * Creates a new share or updates an existing share on the device. * @param deviceName The device name. * @param name The share name. - * @param share The share properties. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param share The share properties. + * @param options The options parameters. */ - createOrUpdate(deviceName: string, name: string, share: Models.Share, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(deviceName,name,share,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginCreateOrUpdate( + deviceName: string, + name: string, + resourceGroupName: string, + share: Share, + options?: SharesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SharesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { deviceName, name, resourceGroupName, share, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * Deletes the share on the Data Box Edge/Data Box Gateway device. + * Creates a new share or updates an existing share on the device. * @param deviceName The device name. * @param name The share name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param share The share properties. + * @param options The options parameters. */ - deleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(deviceName,name,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginCreateOrUpdateAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + share: Share, + options?: SharesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + deviceName, + name, + resourceGroupName, + share, + options + ); + return poller.pollUntilDone(); } /** - * @summary Refreshes the share metadata with the data from the cloud. + * Deletes the share on the Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param name The share name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - refresh(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginRefresh(deviceName,name,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginDelete( + deviceName: string, + name: string, + resourceGroupName: string, + options?: SharesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { deviceName, name, resourceGroupName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * @summary Creates a new share or updates an existing share on the device. + * Deletes the share on the Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param name The share name. - * @param share The share properties. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginCreateOrUpdate(deviceName: string, name: string, share: Models.Share, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - name, - share, - resourceGroupName, - options - }, - beginCreateOrUpdateOperationSpec, - options); + async beginDeleteAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + options?: SharesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + deviceName, + name, + resourceGroupName, + options + ); + return poller.pollUntilDone(); } /** - * Deletes the share on the Data Box Edge/Data Box Gateway device. + * Refreshes the share metadata with the data from the cloud. * @param deviceName The device name. * @param name The share name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - name, - resourceGroupName, - options - }, - beginDeleteMethodOperationSpec, - options); + async beginRefresh( + deviceName: string, + name: string, + resourceGroupName: string, + options?: SharesRefreshOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { deviceName, name, resourceGroupName, options }, + refreshOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * @summary Refreshes the share metadata with the data from the cloud. + * Refreshes the share metadata with the data from the cloud. * @param deviceName The device name. * @param name The share name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginRefresh(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - name, - resourceGroupName, - options - }, - beginRefreshOperationSpec, - options); + async beginRefreshAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + options?: SharesRefreshOptionalParams + ): Promise { + const poller = await this.beginRefresh( + deviceName, + name, + resourceGroupName, + options + ); + return poller.pollUntilDone(); } /** - * @summary Lists all the shares in a Data Box Edge/Data Box Gateway device. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListByDataBoxEdgeDeviceNext + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param nextLink The nextLink from the previous successful call to the ListByDataBoxEdgeDevice + * method. + * @param options The options parameters. */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByDataBoxEdgeDeviceNext( + deviceName: string, + resourceGroupName: string, + nextLink: string, + options?: SharesListByDataBoxEdgeDeviceNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByDataBoxEdgeDeviceNextOperationSpec, - callback) as Promise; + { deviceName, resourceGroupName, nextLink, options }, + listByDataBoxEdgeDeviceNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByDataBoxEdgeDeviceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares", - urlParameters: [ - Parameters.deviceName, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.ShareList @@ -250,24 +448,20 @@ const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, - Parameters.name, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.Share @@ -276,104 +470,102 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, - Parameters.name, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.name ], - requestBody: { - parameterPath: "share", - mapper: { - ...Mappers.Share, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.Share }, - 202: {}, + 201: { + bodyMapper: Mappers.Share + }, + 202: { + bodyMapper: Mappers.Share + }, + 204: { + bodyMapper: Mappers.Share + }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}", + requestBody: Parameters.share, + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, - Parameters.name, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.name ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}", + httpMethod: "DELETE", responses: { 200: {}, + 201: {}, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginRefreshOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}/refresh", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, - Parameters.name, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.name ], + headerParameters: [Parameters.accept], + serializer +}; +const refreshOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}/refresh", + httpMethod: "POST", responses: { 200: {}, + 201: {}, 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.name + ], + headerParameters: [Parameters.accept], serializer }; - -const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByDataBoxEdgeDeviceNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ShareList @@ -382,5 +574,14 @@ const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/skus.ts b/sdk/databoxedge/arm-databoxedge/src/operations/skus.ts deleted file mode 100644 index 0978d6df11a6..000000000000 --- a/sdk/databoxedge/arm-databoxedge/src/operations/skus.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/skusMappers"; -import * as Parameters from "../models/parameters"; -import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; - -/** Class representing a Skus. */ -export class Skus { - private readonly client: DataBoxEdgeManagementClientContext; - - /** - * Create a Skus. - * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. - */ - constructor(client: DataBoxEdgeManagementClientContext) { - this.client = client; - } - - /** - * @summary List all the available Skus in the region and information related to them - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: Models.SkusListOptionalParams): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: Models.SkusListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.SkusListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/skus", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.filter - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.SkuInformationList - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/storageAccountCredentials.ts b/sdk/databoxedge/arm-databoxedge/src/operations/storageAccountCredentials.ts index da22d4710ab4..d34a40623eee 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/storageAccountCredentials.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/storageAccountCredentials.ts @@ -1,112 +1,252 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/storageAccountCredentialsMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { StorageAccountCredentials } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + StorageAccountCredential, + StorageAccountCredentialsListByDataBoxEdgeDeviceNextOptionalParams, + StorageAccountCredentialsListByDataBoxEdgeDeviceOptionalParams, + StorageAccountCredentialsListByDataBoxEdgeDeviceResponse, + StorageAccountCredentialsGetOptionalParams, + StorageAccountCredentialsGetResponse, + StorageAccountCredentialsCreateOrUpdateOptionalParams, + StorageAccountCredentialsCreateOrUpdateResponse, + StorageAccountCredentialsDeleteOptionalParams, + StorageAccountCredentialsListByDataBoxEdgeDeviceNextResponse +} from "../models"; -/** Class representing a StorageAccountCredentials. */ -export class StorageAccountCredentials { - private readonly client: DataBoxEdgeManagementClientContext; +/// +/** Class containing StorageAccountCredentials operations. */ +export class StorageAccountCredentialsImpl + implements StorageAccountCredentials { + private readonly client: DataBoxEdgeManagementClient; /** - * Create a StorageAccountCredentials. - * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class StorageAccountCredentials class. + * @param client Reference to the service client */ - constructor(client: DataBoxEdgeManagementClientContext) { + constructor(client: DataBoxEdgeManagementClient) { this.client = client; } /** - * @summary Gets all the storage account credentials in a Data Box Edge/Data Box Gateway device. + * Gets all the storage account credentials in a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param callback The callback - */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback - */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: StorageAccountCredentialsListByDataBoxEdgeDeviceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByDataBoxEdgeDevicePagingAll( + deviceName, + resourceGroupName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByDataBoxEdgeDevicePagingPage( + deviceName, + resourceGroupName, + options + ); + } + }; + } + + private async *listByDataBoxEdgeDevicePagingPage( + deviceName: string, + resourceGroupName: string, + options?: StorageAccountCredentialsListByDataBoxEdgeDeviceOptionalParams + ): AsyncIterableIterator { + let result = await this._listByDataBoxEdgeDevice( + deviceName, + resourceGroupName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByDataBoxEdgeDeviceNext( deviceName, resourceGroupName, + continuationToken, options - }, - listByDataBoxEdgeDeviceOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByDataBoxEdgeDevicePagingAll( + deviceName: string, + resourceGroupName: string, + options?: StorageAccountCredentialsListByDataBoxEdgeDeviceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByDataBoxEdgeDevicePagingPage( + deviceName, + resourceGroupName, + options + )) { + yield* page; + } } /** - * Gets the properties of the specified storage account credential. + * Gets all the storage account credentials in a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. - * @param name The storage account credential name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + private _listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: StorageAccountCredentialsListByDataBoxEdgeDeviceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, resourceGroupName, options }, + listByDataBoxEdgeDeviceOperationSpec + ); + } + /** + * Gets the properties of the specified storage account credential. * @param deviceName The device name. * @param name The storage account credential name. * @param resourceGroupName The resource group name. - * @param callback The callback + * @param options The options parameters. */ - get(deviceName: string, name: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + get( + deviceName: string, + name: string, + resourceGroupName: string, + options?: StorageAccountCredentialsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, name, resourceGroupName, options }, + getOperationSpec + ); + } + /** + * Creates or updates the storage account credential. * @param deviceName The device name. * @param name The storage account credential name. * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback + * @param storageAccountCredential The storage account credential. + * @param options The options parameters. */ - get(deviceName: string, name: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + async beginCreateOrUpdate( + deviceName: string, + name: string, + resourceGroupName: string, + storageAccountCredential: StorageAccountCredential, + options?: StorageAccountCredentialsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + StorageAccountCredentialsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, { deviceName, name, resourceGroupName, + storageAccountCredential, options }, - getOperationSpec, - callback) as Promise; + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** * Creates or updates the storage account credential. * @param deviceName The device name. * @param name The storage account credential name. - * @param storageAccountCredential The storage account credential. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param storageAccountCredential The storage account credential. + * @param options The options parameters. */ - createOrUpdate(deviceName: string, name: string, storageAccountCredential: Models.StorageAccountCredential, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(deviceName,name,storageAccountCredential,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginCreateOrUpdateAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + storageAccountCredential: StorageAccountCredential, + options?: StorageAccountCredentialsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + deviceName, + name, + resourceGroupName, + storageAccountCredential, + options + ); + return poller.pollUntilDone(); } /** @@ -114,34 +254,62 @@ export class StorageAccountCredentials { * @param deviceName The device name. * @param name The storage account credential name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - deleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(deviceName,name,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } + async beginDelete( + deviceName: string, + name: string, + resourceGroupName: string, + options?: StorageAccountCredentialsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * Creates or updates the storage account credential. - * @param deviceName The device name. - * @param name The storage account credential name. - * @param storageAccountCredential The storage account credential. - * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise - */ - beginCreateOrUpdate(deviceName: string, name: string, storageAccountCredential: Models.StorageAccountCredential, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - name, - storageAccountCredential, - resourceGroupName, - options - }, - beginCreateOrUpdateOperationSpec, - options); + const lro = new LroImpl( + sendOperation, + { deviceName, name, resourceGroupName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** @@ -149,66 +317,50 @@ export class StorageAccountCredentials { * @param deviceName The device name. * @param name The storage account credential name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - name, - resourceGroupName, - options - }, - beginDeleteMethodOperationSpec, - options); + async beginDeleteAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + options?: StorageAccountCredentialsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + deviceName, + name, + resourceGroupName, + options + ); + return poller.pollUntilDone(); } /** - * @summary Gets all the storage account credentials in a Data Box Edge/Data Box Gateway device. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListByDataBoxEdgeDeviceNext + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param nextLink The nextLink from the previous successful call to the ListByDataBoxEdgeDevice + * method. + * @param options The options parameters. */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByDataBoxEdgeDeviceNext( + deviceName: string, + resourceGroupName: string, + nextLink: string, + options?: StorageAccountCredentialsListByDataBoxEdgeDeviceNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByDataBoxEdgeDeviceNextOperationSpec, - callback) as Promise; + { deviceName, resourceGroupName, nextLink, options }, + listByDataBoxEdgeDeviceNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByDataBoxEdgeDeviceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials", - urlParameters: [ - Parameters.deviceName, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.StorageAccountCredentialList @@ -217,24 +369,20 @@ const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, - Parameters.name, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.StorageAccountCredential @@ -243,79 +391,78 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, - Parameters.name, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.name ], - requestBody: { - parameterPath: "storageAccountCredential", - mapper: { - ...Mappers.StorageAccountCredential, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.StorageAccountCredential }, - 202: {}, + 201: { + bodyMapper: Mappers.StorageAccountCredential + }, + 202: { + bodyMapper: Mappers.StorageAccountCredential + }, + 204: { + bodyMapper: Mappers.StorageAccountCredential + }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}", + requestBody: Parameters.storageAccountCredential, + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, - Parameters.name, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.name ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}", + httpMethod: "DELETE", responses: { 200: {}, + 201: {}, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.name + ], + headerParameters: [Parameters.accept], serializer }; - -const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByDataBoxEdgeDeviceNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.StorageAccountCredentialList @@ -324,5 +471,14 @@ const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/storageAccounts.ts b/sdk/databoxedge/arm-databoxedge/src/operations/storageAccounts.ts index 3bb7576b410c..9e08713fcda5 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/storageAccounts.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/storageAccounts.ts @@ -1,112 +1,251 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/storageAccountsMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { StorageAccounts } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + StorageAccount, + StorageAccountsListByDataBoxEdgeDeviceNextOptionalParams, + StorageAccountsListByDataBoxEdgeDeviceOptionalParams, + StorageAccountsListByDataBoxEdgeDeviceResponse, + StorageAccountsGetOptionalParams, + StorageAccountsGetResponse, + StorageAccountsCreateOrUpdateOptionalParams, + StorageAccountsCreateOrUpdateResponse, + StorageAccountsDeleteOptionalParams, + StorageAccountsListByDataBoxEdgeDeviceNextResponse +} from "../models"; -/** Class representing a StorageAccounts. */ -export class StorageAccounts { - private readonly client: DataBoxEdgeManagementClientContext; +/// +/** Class containing StorageAccounts operations. */ +export class StorageAccountsImpl implements StorageAccounts { + private readonly client: DataBoxEdgeManagementClient; /** - * Create a StorageAccounts. - * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class StorageAccounts class. + * @param client Reference to the service client */ - constructor(client: DataBoxEdgeManagementClientContext) { + constructor(client: DataBoxEdgeManagementClient) { this.client = client; } /** - * @summary Lists all the storage accounts in a Data Box Edge/Data Box Gateway device. + * Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param callback The callback - */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback - */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: StorageAccountsListByDataBoxEdgeDeviceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByDataBoxEdgeDevicePagingAll( + deviceName, + resourceGroupName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByDataBoxEdgeDevicePagingPage( + deviceName, + resourceGroupName, + options + ); + } + }; + } + + private async *listByDataBoxEdgeDevicePagingPage( + deviceName: string, + resourceGroupName: string, + options?: StorageAccountsListByDataBoxEdgeDeviceOptionalParams + ): AsyncIterableIterator { + let result = await this._listByDataBoxEdgeDevice( + deviceName, + resourceGroupName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByDataBoxEdgeDeviceNext( deviceName, resourceGroupName, + continuationToken, options - }, - listByDataBoxEdgeDeviceOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByDataBoxEdgeDevicePagingAll( + deviceName: string, + resourceGroupName: string, + options?: StorageAccountsListByDataBoxEdgeDeviceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByDataBoxEdgeDevicePagingPage( + deviceName, + resourceGroupName, + options + )) { + yield* page; + } } /** - * @summary Gets a StorageAccount by name. + * Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. - * @param storageAccountName The storage account name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - get(deviceName: string, storageAccountName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + private _listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: StorageAccountsListByDataBoxEdgeDeviceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, resourceGroupName, options }, + listByDataBoxEdgeDeviceOperationSpec + ); + } + /** + * Gets a StorageAccount by name. * @param deviceName The device name. * @param storageAccountName The storage account name. * @param resourceGroupName The resource group name. - * @param callback The callback + * @param options The options parameters. */ - get(deviceName: string, storageAccountName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + get( + deviceName: string, + storageAccountName: string, + resourceGroupName: string, + options?: StorageAccountsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, storageAccountName, resourceGroupName, options }, + getOperationSpec + ); + } + /** + * Creates a new StorageAccount or updates an existing StorageAccount on the device. * @param deviceName The device name. - * @param storageAccountName The storage account name. + * @param storageAccountName The StorageAccount name. * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback + * @param storageAccount The StorageAccount properties. + * @param options The options parameters. */ - get(deviceName: string, storageAccountName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(deviceName: string, storageAccountName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + async beginCreateOrUpdate( + deviceName: string, + storageAccountName: string, + resourceGroupName: string, + storageAccount: StorageAccount, + options?: StorageAccountsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + StorageAccountsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, { deviceName, storageAccountName, resourceGroupName, + storageAccount, options }, - getOperationSpec, - callback) as Promise; + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * @summary Creates a new StorageAccount or updates an existing StorageAccount on the device. + * Creates a new StorageAccount or updates an existing StorageAccount on the device. * @param deviceName The device name. * @param storageAccountName The StorageAccount name. - * @param storageAccount The StorageAccount properties. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param storageAccount The StorageAccount properties. + * @param options The options parameters. */ - createOrUpdate(deviceName: string, storageAccountName: string, storageAccount: Models.StorageAccount, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(deviceName,storageAccountName,storageAccount,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginCreateOrUpdateAndWait( + deviceName: string, + storageAccountName: string, + resourceGroupName: string, + storageAccount: StorageAccount, + options?: StorageAccountsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + deviceName, + storageAccountName, + resourceGroupName, + storageAccount, + options + ); + return poller.pollUntilDone(); } /** @@ -114,34 +253,62 @@ export class StorageAccounts { * @param deviceName The device name. * @param storageAccountName The StorageAccount name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - deleteMethod(deviceName: string, storageAccountName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(deviceName,storageAccountName,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } + async beginDelete( + deviceName: string, + storageAccountName: string, + resourceGroupName: string, + options?: StorageAccountsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; - /** - * @summary Creates a new StorageAccount or updates an existing StorageAccount on the device. - * @param deviceName The device name. - * @param storageAccountName The StorageAccount name. - * @param storageAccount The StorageAccount properties. - * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise - */ - beginCreateOrUpdate(deviceName: string, storageAccountName: string, storageAccount: Models.StorageAccount, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - storageAccountName, - storageAccount, - resourceGroupName, - options - }, - beginCreateOrUpdateOperationSpec, - options); + const lro = new LroImpl( + sendOperation, + { deviceName, storageAccountName, resourceGroupName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** @@ -149,66 +316,50 @@ export class StorageAccounts { * @param deviceName The device name. * @param storageAccountName The StorageAccount name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod(deviceName: string, storageAccountName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - storageAccountName, - resourceGroupName, - options - }, - beginDeleteMethodOperationSpec, - options); + async beginDeleteAndWait( + deviceName: string, + storageAccountName: string, + resourceGroupName: string, + options?: StorageAccountsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + deviceName, + storageAccountName, + resourceGroupName, + options + ); + return poller.pollUntilDone(); } /** - * @summary Lists all the storage accounts in a Data Box Edge/Data Box Gateway device. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListByDataBoxEdgeDeviceNext + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param nextLink The nextLink from the previous successful call to the ListByDataBoxEdgeDevice + * method. + * @param options The options parameters. */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByDataBoxEdgeDeviceNext( + deviceName: string, + resourceGroupName: string, + nextLink: string, + options?: StorageAccountsListByDataBoxEdgeDeviceNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByDataBoxEdgeDeviceNextOperationSpec, - callback) as Promise; + { deviceName, resourceGroupName, nextLink, options }, + listByDataBoxEdgeDeviceNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByDataBoxEdgeDeviceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts", - urlParameters: [ - Parameters.deviceName, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.StorageAccountList @@ -217,24 +368,20 @@ const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, - Parameters.storageAccountName, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.StorageAccount @@ -243,78 +390,78 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, - Parameters.storageAccountName, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.storageAccountName ], - requestBody: { - parameterPath: "storageAccount", - mapper: { - ...Mappers.StorageAccount, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.StorageAccount }, - 202: {}, + 201: { + bodyMapper: Mappers.StorageAccount + }, + 202: { + bodyMapper: Mappers.StorageAccount + }, + 204: { + bodyMapper: Mappers.StorageAccount + }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}", + requestBody: Parameters.storageAccount, + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, - Parameters.storageAccountName, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.storageAccountName ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}", + httpMethod: "DELETE", responses: { + 200: {}, + 201: {}, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.storageAccountName + ], + headerParameters: [Parameters.accept], serializer }; - -const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByDataBoxEdgeDeviceNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.StorageAccountList @@ -323,5 +470,14 @@ const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/supportPackages.ts b/sdk/databoxedge/arm-databoxedge/src/operations/supportPackages.ts new file mode 100644 index 000000000000..2904fe9f297e --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operations/supportPackages.ts @@ -0,0 +1,145 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { SupportPackages } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + TriggerSupportPackageRequest, + SupportPackagesTriggerSupportPackageOptionalParams +} from "../models"; + +/** Class containing SupportPackages operations. */ +export class SupportPackagesImpl implements SupportPackages { + private readonly client: DataBoxEdgeManagementClient; + + /** + * Initialize a new instance of the class SupportPackages class. + * @param client Reference to the service client + */ + constructor(client: DataBoxEdgeManagementClient) { + this.client = client; + } + + /** + * Triggers support package on the device + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param triggerSupportPackageRequest The trigger support package request object + * @param options The options parameters. + */ + async beginTriggerSupportPackage( + deviceName: string, + resourceGroupName: string, + triggerSupportPackageRequest: TriggerSupportPackageRequest, + options?: SupportPackagesTriggerSupportPackageOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { deviceName, resourceGroupName, triggerSupportPackageRequest, options }, + triggerSupportPackageOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + + /** + * Triggers support package on the device + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param triggerSupportPackageRequest The trigger support package request object + * @param options The options parameters. + */ + async beginTriggerSupportPackageAndWait( + deviceName: string, + resourceGroupName: string, + triggerSupportPackageRequest: TriggerSupportPackageRequest, + options?: SupportPackagesTriggerSupportPackageOptionalParams + ): Promise { + const poller = await this.beginTriggerSupportPackage( + deviceName, + resourceGroupName, + triggerSupportPackageRequest, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const triggerSupportPackageOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggerSupportPackage", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.triggerSupportPackageRequest, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/triggers.ts b/sdk/databoxedge/arm-databoxedge/src/operations/triggers.ts index eac6491364c7..9ffa300cf86e 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/triggers.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/triggers.ts @@ -1,29 +1,42 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/triggersMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Triggers } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + TriggerUnion, + TriggersListByDataBoxEdgeDeviceNextOptionalParams, + TriggersListByDataBoxEdgeDeviceOptionalParams, + TriggersListByDataBoxEdgeDeviceResponse, + TriggersGetOptionalParams, + TriggersGetResponse, + TriggersCreateOrUpdateOptionalParams, + TriggersCreateOrUpdateResponse, + TriggersDeleteOptionalParams, + TriggersListByDataBoxEdgeDeviceNextResponse +} from "../models"; -/** Class representing a Triggers. */ -export class Triggers { - private readonly client: DataBoxEdgeManagementClientContext; +/// +/** Class containing Triggers operations. */ +export class TriggersImpl implements Triggers { + private readonly client: DataBoxEdgeManagementClient; /** - * Create a Triggers. - * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Triggers class. + * @param client Reference to the service client */ - constructor(client: DataBoxEdgeManagementClientContext) { + constructor(client: DataBoxEdgeManagementClient) { this.client = client; } @@ -31,117 +44,265 @@ export class Triggers { * Lists all the triggers configured in the device. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: Models.TriggersListByDataBoxEdgeDeviceOptionalParams): Promise; - /** - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param callback The callback - */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback - */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options: Models.TriggersListByDataBoxEdgeDeviceOptionalParams, callback: msRest.ServiceCallback): void; - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: Models.TriggersListByDataBoxEdgeDeviceOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: TriggersListByDataBoxEdgeDeviceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByDataBoxEdgeDevicePagingAll( + deviceName, + resourceGroupName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByDataBoxEdgeDevicePagingPage( + deviceName, + resourceGroupName, + options + ); + } + }; + } + + private async *listByDataBoxEdgeDevicePagingPage( + deviceName: string, + resourceGroupName: string, + options?: TriggersListByDataBoxEdgeDeviceOptionalParams + ): AsyncIterableIterator { + let result = await this._listByDataBoxEdgeDevice( + deviceName, + resourceGroupName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByDataBoxEdgeDeviceNext( deviceName, resourceGroupName, + continuationToken, options - }, - listByDataBoxEdgeDeviceOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByDataBoxEdgeDevicePagingAll( + deviceName: string, + resourceGroupName: string, + options?: TriggersListByDataBoxEdgeDeviceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByDataBoxEdgeDevicePagingPage( + deviceName, + resourceGroupName, + options + )) { + yield* page; + } } /** - * Get a specific trigger by name. - * @param deviceName The device name. - * @param name The trigger name. - * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise - */ - get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** + * Lists all the triggers configured in the device. * @param deviceName The device name. - * @param name The trigger name. * @param resourceGroupName The resource group name. - * @param callback The callback + * @param options The options parameters. */ - get(deviceName: string, name: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + private _listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: TriggersListByDataBoxEdgeDeviceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, resourceGroupName, options }, + listByDataBoxEdgeDeviceOperationSpec + ); + } + /** + * Get a specific trigger by name. * @param deviceName The device name. * @param name The trigger name. * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get(deviceName: string, name: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + deviceName: string, + name: string, + resourceGroupName: string, + options?: TriggersGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - deviceName, - name, - resourceGroupName, - options - }, - getOperationSpec, - callback) as Promise; + { deviceName, name, resourceGroupName, options }, + getOperationSpec + ); } /** * Creates or updates a trigger. * @param deviceName Creates or updates a trigger * @param name The trigger name. - * @param trigger The trigger. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param trigger The trigger. + * @param options The options parameters. */ - createOrUpdate(deviceName: string, name: string, trigger: Models.TriggerUnion, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(deviceName,name,trigger,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginCreateOrUpdate( + deviceName: string, + name: string, + resourceGroupName: string, + trigger: TriggerUnion, + options?: TriggersCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + TriggersCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { deviceName, name, resourceGroupName, trigger, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * Deletes the trigger on the gateway device. - * @param deviceName The device name. + * Creates or updates a trigger. + * @param deviceName Creates or updates a trigger * @param name The trigger name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param trigger The trigger. + * @param options The options parameters. */ - deleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(deviceName,name,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginCreateOrUpdateAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + trigger: TriggerUnion, + options?: TriggersCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + deviceName, + name, + resourceGroupName, + trigger, + options + ); + return poller.pollUntilDone(); } /** - * Creates or updates a trigger. - * @param deviceName Creates or updates a trigger + * Deletes the trigger on the gateway device. + * @param deviceName The device name. * @param name The trigger name. - * @param trigger The trigger. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginCreateOrUpdate(deviceName: string, name: string, trigger: Models.TriggerUnion, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - name, - trigger, - resourceGroupName, - options - }, - beginCreateOrUpdateOperationSpec, - options); + async beginDelete( + deviceName: string, + name: string, + resourceGroupName: string, + options?: TriggersDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { deviceName, name, resourceGroupName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** @@ -149,67 +310,50 @@ export class Triggers { * @param deviceName The device name. * @param name The trigger name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - name, - resourceGroupName, - options - }, - beginDeleteMethodOperationSpec, - options); + async beginDeleteAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + options?: TriggersDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + deviceName, + name, + resourceGroupName, + options + ); + return poller.pollUntilDone(); } /** - * Lists all the triggers configured in the device. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListByDataBoxEdgeDeviceNext + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param nextLink The nextLink from the previous successful call to the ListByDataBoxEdgeDevice + * method. + * @param options The options parameters. */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByDataBoxEdgeDeviceNext( + deviceName: string, + resourceGroupName: string, + nextLink: string, + options?: TriggersListByDataBoxEdgeDeviceNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByDataBoxEdgeDeviceNextOperationSpec, - callback) as Promise; + { deviceName, resourceGroupName, nextLink, options }, + listByDataBoxEdgeDeviceNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByDataBoxEdgeDeviceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers", - urlParameters: [ - Parameters.deviceName, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.filter - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.TriggerList @@ -218,24 +362,20 @@ const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}", + queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [ - Parameters.deviceName, - Parameters.name, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.Trigger @@ -244,79 +384,78 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, - Parameters.name, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.name ], - requestBody: { - parameterPath: "trigger", - mapper: { - ...Mappers.Trigger, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.Trigger }, - 202: {}, + 201: { + bodyMapper: Mappers.Trigger + }, + 202: { + bodyMapper: Mappers.Trigger + }, + 204: { + bodyMapper: Mappers.Trigger + }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}", + requestBody: Parameters.trigger, + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, - Parameters.name, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.name ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}", + httpMethod: "DELETE", responses: { 200: {}, + 201: {}, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.name + ], + headerParameters: [Parameters.accept], serializer }; - -const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByDataBoxEdgeDeviceNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.TriggerList @@ -325,5 +464,14 @@ const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/databoxedge/arm-databoxedge/src/operations/users.ts b/sdk/databoxedge/arm-databoxedge/src/operations/users.ts index 4cb6ad492aa5..d665dc5ecd67 100644 --- a/sdk/databoxedge/arm-databoxedge/src/operations/users.ts +++ b/sdk/databoxedge/arm-databoxedge/src/operations/users.ts @@ -1,29 +1,42 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/usersMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Users } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; +import { DataBoxEdgeManagementClient } from "../dataBoxEdgeManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + User, + UsersListByDataBoxEdgeDeviceNextOptionalParams, + UsersListByDataBoxEdgeDeviceOptionalParams, + UsersListByDataBoxEdgeDeviceResponse, + UsersGetOptionalParams, + UsersGetResponse, + UsersCreateOrUpdateOptionalParams, + UsersCreateOrUpdateResponse, + UsersDeleteOptionalParams, + UsersListByDataBoxEdgeDeviceNextResponse +} from "../models"; -/** Class representing a Users. */ -export class Users { - private readonly client: DataBoxEdgeManagementClientContext; +/// +/** Class containing Users operations. */ +export class UsersImpl implements Users { + private readonly client: DataBoxEdgeManagementClient; /** - * Create a Users. - * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Users class. + * @param client Reference to the service client */ - constructor(client: DataBoxEdgeManagementClientContext) { + constructor(client: DataBoxEdgeManagementClient) { this.client = client; } @@ -31,68 +44,107 @@ export class Users { * Gets all the users registered on a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: Models.UsersListByDataBoxEdgeDeviceOptionalParams): Promise; - /** - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param callback The callback - */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param deviceName The device name. - * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback - */ - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options: Models.UsersListByDataBoxEdgeDeviceOptionalParams, callback: msRest.ServiceCallback): void; - listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: Models.UsersListByDataBoxEdgeDeviceOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: UsersListByDataBoxEdgeDeviceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByDataBoxEdgeDevicePagingAll( + deviceName, + resourceGroupName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByDataBoxEdgeDevicePagingPage( + deviceName, + resourceGroupName, + options + ); + } + }; + } + + private async *listByDataBoxEdgeDevicePagingPage( + deviceName: string, + resourceGroupName: string, + options?: UsersListByDataBoxEdgeDeviceOptionalParams + ): AsyncIterableIterator { + let result = await this._listByDataBoxEdgeDevice( + deviceName, + resourceGroupName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByDataBoxEdgeDeviceNext( deviceName, resourceGroupName, + continuationToken, options - }, - listByDataBoxEdgeDeviceOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByDataBoxEdgeDevicePagingAll( + deviceName: string, + resourceGroupName: string, + options?: UsersListByDataBoxEdgeDeviceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByDataBoxEdgeDevicePagingPage( + deviceName, + resourceGroupName, + options + )) { + yield* page; + } } /** - * Gets the properties of the specified user. - * @param deviceName The device name. - * @param name The user name. - * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise - */ - get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** + * Gets all the users registered on a Data Box Edge/Data Box Gateway device. * @param deviceName The device name. - * @param name The user name. * @param resourceGroupName The resource group name. - * @param callback The callback + * @param options The options parameters. */ - get(deviceName: string, name: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + private _listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: UsersListByDataBoxEdgeDeviceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { deviceName, resourceGroupName, options }, + listByDataBoxEdgeDeviceOperationSpec + ); + } + /** + * Gets the properties of the specified user. * @param deviceName The device name. * @param name The user name. * @param resourceGroupName The resource group name. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - get(deviceName: string, name: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get( + deviceName: string, + name: string, + resourceGroupName: string, + options?: UsersGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - deviceName, - name, - resourceGroupName, - options - }, - getOperationSpec, - callback) as Promise; + { deviceName, name, resourceGroupName, options }, + getOperationSpec + ); } /** @@ -100,50 +152,159 @@ export class Users { * device. * @param deviceName The device name. * @param name The user name. - * @param user The user details. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param user The user details. + * @param options The options parameters. */ - createOrUpdate(deviceName: string, name: string, user: Models.User, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(deviceName,name,user,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + async beginCreateOrUpdate( + deviceName: string, + name: string, + resourceGroupName: string, + user: User, + options?: UsersCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + UsersCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { deviceName, name, resourceGroupName, user, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * Deletes the user on a databox edge/gateway device. + * Creates a new user or updates an existing user's information on a Data Box Edge/Data Box Gateway + * device. * @param deviceName The device name. * @param name The user name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param user The user details. + * @param options The options parameters. */ - deleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(deviceName,name,resourceGroupName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + async beginCreateOrUpdateAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + user: User, + options?: UsersCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + deviceName, + name, + resourceGroupName, + user, + options + ); + return poller.pollUntilDone(); } /** - * Creates a new user or updates an existing user's information on a Data Box Edge/Data Box Gateway - * device. + * Deletes the user on a databox edge/gateway device. * @param deviceName The device name. * @param name The user name. - * @param user The user details. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginCreateOrUpdate(deviceName: string, name: string, user: Models.User, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - name, - user, - resourceGroupName, - options - }, - beginCreateOrUpdateOperationSpec, - options); + async beginDelete( + deviceName: string, + name: string, + resourceGroupName: string, + options?: UsersDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { deviceName, name, resourceGroupName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** @@ -151,67 +312,50 @@ export class Users { * @param deviceName The device name. * @param name The user name. * @param resourceGroupName The resource group name. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginDeleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - deviceName, - name, - resourceGroupName, - options - }, - beginDeleteMethodOperationSpec, - options); + async beginDeleteAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + options?: UsersDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + deviceName, + name, + resourceGroupName, + options + ); + return poller.pollUntilDone(); } /** - * Gets all the users registered on a Data Box Edge/Data Box Gateway device. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * ListByDataBoxEdgeDeviceNext + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param nextLink The nextLink from the previous successful call to the ListByDataBoxEdgeDevice + * method. + * @param options The options parameters. */ - listByDataBoxEdgeDeviceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByDataBoxEdgeDeviceNext( + deviceName: string, + resourceGroupName: string, + nextLink: string, + options?: UsersListByDataBoxEdgeDeviceNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByDataBoxEdgeDeviceNextOperationSpec, - callback) as Promise; + { deviceName, resourceGroupName, nextLink, options }, + listByDataBoxEdgeDeviceNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByDataBoxEdgeDeviceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users", - urlParameters: [ - Parameters.deviceName, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.filter - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.UserList @@ -220,24 +364,20 @@ const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}", + queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [ - Parameters.deviceName, - Parameters.name, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.User @@ -246,79 +386,78 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}", + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, - Parameters.name, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.name ], - requestBody: { - parameterPath: "user", - mapper: { - ...Mappers.User, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.User }, - 202: {}, + 201: { + bodyMapper: Mappers.User + }, + 202: { + bodyMapper: Mappers.User + }, + 204: { + bodyMapper: Mappers.User + }, default: { bodyMapper: Mappers.CloudError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}", + requestBody: Parameters.user, + queryParameters: [Parameters.apiVersion], urlParameters: [ - Parameters.deviceName, - Parameters.name, + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.name ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}", + httpMethod: "DELETE", responses: { 200: {}, + 201: {}, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName, + Parameters.name + ], + headerParameters: [Parameters.accept], serializer }; - -const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", +const listByDataBoxEdgeDeviceNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.UserList @@ -327,5 +466,14 @@ const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CloudError } }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.deviceName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/addons.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/addons.ts new file mode 100644 index 000000000000..fa13c29bc96d --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/addons.ts @@ -0,0 +1,121 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + AddonUnion, + AddonsListByRoleOptionalParams, + AddonsGetOptionalParams, + AddonsGetResponse, + AddonsCreateOrUpdateOptionalParams, + AddonsCreateOrUpdateResponse, + AddonsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a Addons. */ +export interface Addons { + /** + * Lists all the addons configured in the role. + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + listByRole( + deviceName: string, + roleName: string, + resourceGroupName: string, + options?: AddonsListByRoleOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a specific addon by name. + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + get( + deviceName: string, + roleName: string, + addonName: string, + resourceGroupName: string, + options?: AddonsGetOptionalParams + ): Promise; + /** + * Create or update a addon. + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param addon The addon properties. + * @param options The options parameters. + */ + beginCreateOrUpdate( + deviceName: string, + roleName: string, + addonName: string, + resourceGroupName: string, + addon: AddonUnion, + options?: AddonsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + AddonsCreateOrUpdateResponse + > + >; + /** + * Create or update a addon. + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param addon The addon properties. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + deviceName: string, + roleName: string, + addonName: string, + resourceGroupName: string, + addon: AddonUnion, + options?: AddonsCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the addon on the device. + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDelete( + deviceName: string, + roleName: string, + addonName: string, + resourceGroupName: string, + options?: AddonsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the addon on the device. + * @param deviceName The device name. + * @param roleName The role name. + * @param addonName The addon name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDeleteAndWait( + deviceName: string, + roleName: string, + addonName: string, + resourceGroupName: string, + options?: AddonsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/alerts.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/alerts.ts new file mode 100644 index 000000000000..d63bfbecb25c --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/alerts.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + Alert, + AlertsListByDataBoxEdgeDeviceOptionalParams, + AlertsGetOptionalParams, + AlertsGetResponse +} from "../models"; + +/// +/** Interface representing a Alerts. */ +export interface Alerts { + /** + * Gets all the alerts for a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: AlertsListByDataBoxEdgeDeviceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets an alert by name. + * @param deviceName The device name. + * @param name The alert name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + get( + deviceName: string, + name: string, + resourceGroupName: string, + options?: AlertsGetOptionalParams + ): Promise; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/availableSkus.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/availableSkus.ts new file mode 100644 index 000000000000..9d7e9125758b --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/availableSkus.ts @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { DataBoxEdgeSku, AvailableSkusListOptionalParams } from "../models"; + +/// +/** Interface representing a AvailableSkus. */ +export interface AvailableSkus { + /** + * List all the available Skus and information related to them. + * @param options The options parameters. + */ + list( + options?: AvailableSkusListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/bandwidthSchedules.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/bandwidthSchedules.ts new file mode 100644 index 000000000000..3af876d0745a --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/bandwidthSchedules.ts @@ -0,0 +1,109 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + BandwidthSchedule, + BandwidthSchedulesListByDataBoxEdgeDeviceOptionalParams, + BandwidthSchedulesGetOptionalParams, + BandwidthSchedulesGetResponse, + BandwidthSchedulesCreateOrUpdateOptionalParams, + BandwidthSchedulesCreateOrUpdateResponse, + BandwidthSchedulesDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a BandwidthSchedules. */ +export interface BandwidthSchedules { + /** + * Gets all the bandwidth schedules for a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: BandwidthSchedulesListByDataBoxEdgeDeviceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the properties of the specified bandwidth schedule. + * @param deviceName The device name. + * @param name The bandwidth schedule name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + get( + deviceName: string, + name: string, + resourceGroupName: string, + options?: BandwidthSchedulesGetOptionalParams + ): Promise; + /** + * Creates or updates a bandwidth schedule. + * @param deviceName The device name. + * @param name The bandwidth schedule name which needs to be added/updated. + * @param resourceGroupName The resource group name. + * @param parameters The bandwidth schedule to be added or updated. + * @param options The options parameters. + */ + beginCreateOrUpdate( + deviceName: string, + name: string, + resourceGroupName: string, + parameters: BandwidthSchedule, + options?: BandwidthSchedulesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + BandwidthSchedulesCreateOrUpdateResponse + > + >; + /** + * Creates or updates a bandwidth schedule. + * @param deviceName The device name. + * @param name The bandwidth schedule name which needs to be added/updated. + * @param resourceGroupName The resource group name. + * @param parameters The bandwidth schedule to be added or updated. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + parameters: BandwidthSchedule, + options?: BandwidthSchedulesCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the specified bandwidth schedule. + * @param deviceName The device name. + * @param name The bandwidth schedule name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDelete( + deviceName: string, + name: string, + resourceGroupName: string, + options?: BandwidthSchedulesDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the specified bandwidth schedule. + * @param deviceName The device name. + * @param name The bandwidth schedule name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDeleteAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + options?: BandwidthSchedulesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/containers.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/containers.ts new file mode 100644 index 000000000000..44b012cd9bbe --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/containers.ts @@ -0,0 +1,152 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + Container, + ContainersListByStorageAccountOptionalParams, + ContainersGetOptionalParams, + ContainersGetResponse, + ContainersCreateOrUpdateOptionalParams, + ContainersCreateOrUpdateResponse, + ContainersDeleteOptionalParams, + ContainersRefreshOptionalParams +} from "../models"; + +/// +/** Interface representing a Containers. */ +export interface Containers { + /** + * Lists all the containers of a storage Account in a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param storageAccountName The storage Account name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + listByStorageAccount( + deviceName: string, + storageAccountName: string, + resourceGroupName: string, + options?: ContainersListByStorageAccountOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a container by name. + * @param deviceName The device name. + * @param storageAccountName The Storage Account Name + * @param containerName The container Name + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + get( + deviceName: string, + storageAccountName: string, + containerName: string, + resourceGroupName: string, + options?: ContainersGetOptionalParams + ): Promise; + /** + * Creates a new container or updates an existing container on the device. + * @param deviceName The device name. + * @param storageAccountName The Storage Account Name + * @param containerName The container name. + * @param resourceGroupName The resource group name. + * @param container The container properties. + * @param options The options parameters. + */ + beginCreateOrUpdate( + deviceName: string, + storageAccountName: string, + containerName: string, + resourceGroupName: string, + container: Container, + options?: ContainersCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ContainersCreateOrUpdateResponse + > + >; + /** + * Creates a new container or updates an existing container on the device. + * @param deviceName The device name. + * @param storageAccountName The Storage Account Name + * @param containerName The container name. + * @param resourceGroupName The resource group name. + * @param container The container properties. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + deviceName: string, + storageAccountName: string, + containerName: string, + resourceGroupName: string, + container: Container, + options?: ContainersCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the container on the Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param storageAccountName The Storage Account Name + * @param containerName The container name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDelete( + deviceName: string, + storageAccountName: string, + containerName: string, + resourceGroupName: string, + options?: ContainersDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the container on the Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param storageAccountName The Storage Account Name + * @param containerName The container name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDeleteAndWait( + deviceName: string, + storageAccountName: string, + containerName: string, + resourceGroupName: string, + options?: ContainersDeleteOptionalParams + ): Promise; + /** + * Refreshes the container metadata with the data from the cloud. + * @param deviceName The device name. + * @param storageAccountName The Storage Account Name + * @param containerName The container name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginRefresh( + deviceName: string, + storageAccountName: string, + containerName: string, + resourceGroupName: string, + options?: ContainersRefreshOptionalParams + ): Promise, void>>; + /** + * Refreshes the container metadata with the data from the cloud. + * @param deviceName The device name. + * @param storageAccountName The Storage Account Name + * @param containerName The container name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginRefreshAndWait( + deviceName: string, + storageAccountName: string, + containerName: string, + resourceGroupName: string, + options?: ContainersRefreshOptionalParams + ): Promise; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/devices.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/devices.ts new file mode 100644 index 000000000000..776da5a8a6b1 --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/devices.ts @@ -0,0 +1,285 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + DataBoxEdgeDevice, + DevicesListBySubscriptionOptionalParams, + DevicesListByResourceGroupOptionalParams, + DevicesGetOptionalParams, + DevicesGetResponse, + DevicesCreateOrUpdateOptionalParams, + DevicesCreateOrUpdateResponse, + DevicesDeleteOptionalParams, + DataBoxEdgeDevicePatch, + DevicesUpdateOptionalParams, + DevicesUpdateResponse, + DevicesDownloadUpdatesOptionalParams, + DevicesGenerateCertificateOptionalParams, + DevicesGenerateCertificateResponse, + DevicesGetExtendedInformationOptionalParams, + DevicesGetExtendedInformationResponse, + DevicesInstallUpdatesOptionalParams, + DevicesGetNetworkSettingsOptionalParams, + DevicesGetNetworkSettingsResponse, + DevicesScanForUpdatesOptionalParams, + SecuritySettings, + DevicesCreateOrUpdateSecuritySettingsOptionalParams, + DataBoxEdgeDeviceExtendedInfoPatch, + DevicesUpdateExtendedInformationOptionalParams, + DevicesUpdateExtendedInformationResponse, + DevicesGetUpdateSummaryOptionalParams, + DevicesGetUpdateSummaryResponse, + UploadCertificateRequest, + DevicesUploadCertificateOptionalParams, + DevicesUploadCertificateResponse +} from "../models"; + +/// +/** Interface representing a Devices. */ +export interface Devices { + /** + * Gets all the Data Box Edge/Data Box Gateway devices in a subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: DevicesListBySubscriptionOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets all the Data Box Edge/Data Box Gateway devices in a resource group. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: DevicesListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the properties of the Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + get( + deviceName: string, + resourceGroupName: string, + options?: DevicesGetOptionalParams + ): Promise; + /** + * Creates or updates a Data Box Edge/Data Box Gateway resource. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param dataBoxEdgeDevice The resource object. + * @param options The options parameters. + */ + createOrUpdate( + deviceName: string, + resourceGroupName: string, + dataBoxEdgeDevice: DataBoxEdgeDevice, + options?: DevicesCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDelete( + deviceName: string, + resourceGroupName: string, + options?: DevicesDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDeleteAndWait( + deviceName: string, + resourceGroupName: string, + options?: DevicesDeleteOptionalParams + ): Promise; + /** + * Modifies a Data Box Edge/Data Box Gateway resource. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param parameters The resource parameters. + * @param options The options parameters. + */ + update( + deviceName: string, + resourceGroupName: string, + parameters: DataBoxEdgeDevicePatch, + options?: DevicesUpdateOptionalParams + ): Promise; + /** + * Downloads the updates on a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDownloadUpdates( + deviceName: string, + resourceGroupName: string, + options?: DevicesDownloadUpdatesOptionalParams + ): Promise, void>>; + /** + * Downloads the updates on a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDownloadUpdatesAndWait( + deviceName: string, + resourceGroupName: string, + options?: DevicesDownloadUpdatesOptionalParams + ): Promise; + /** + * Generates certificate for activation key. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + generateCertificate( + deviceName: string, + resourceGroupName: string, + options?: DevicesGenerateCertificateOptionalParams + ): Promise; + /** + * Gets additional information for the specified Azure Stack Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + getExtendedInformation( + deviceName: string, + resourceGroupName: string, + options?: DevicesGetExtendedInformationOptionalParams + ): Promise; + /** + * Installs the updates on the Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginInstallUpdates( + deviceName: string, + resourceGroupName: string, + options?: DevicesInstallUpdatesOptionalParams + ): Promise, void>>; + /** + * Installs the updates on the Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginInstallUpdatesAndWait( + deviceName: string, + resourceGroupName: string, + options?: DevicesInstallUpdatesOptionalParams + ): Promise; + /** + * Gets the network settings of the specified Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + getNetworkSettings( + deviceName: string, + resourceGroupName: string, + options?: DevicesGetNetworkSettingsOptionalParams + ): Promise; + /** + * Scans for updates on a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginScanForUpdates( + deviceName: string, + resourceGroupName: string, + options?: DevicesScanForUpdatesOptionalParams + ): Promise, void>>; + /** + * Scans for updates on a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginScanForUpdatesAndWait( + deviceName: string, + resourceGroupName: string, + options?: DevicesScanForUpdatesOptionalParams + ): Promise; + /** + * Updates the security settings on a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param securitySettings The security settings. + * @param options The options parameters. + */ + beginCreateOrUpdateSecuritySettings( + deviceName: string, + resourceGroupName: string, + securitySettings: SecuritySettings, + options?: DevicesCreateOrUpdateSecuritySettingsOptionalParams + ): Promise, void>>; + /** + * Updates the security settings on a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param securitySettings The security settings. + * @param options The options parameters. + */ + beginCreateOrUpdateSecuritySettingsAndWait( + deviceName: string, + resourceGroupName: string, + securitySettings: SecuritySettings, + options?: DevicesCreateOrUpdateSecuritySettingsOptionalParams + ): Promise; + /** + * Gets additional information for the specified Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param parameters The patch object. + * @param options The options parameters. + */ + updateExtendedInformation( + deviceName: string, + resourceGroupName: string, + parameters: DataBoxEdgeDeviceExtendedInfoPatch, + options?: DevicesUpdateExtendedInformationOptionalParams + ): Promise; + /** + * Gets information about the availability of updates based on the last scan of the device. It also + * gets information about any ongoing download or install jobs on the device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + getUpdateSummary( + deviceName: string, + resourceGroupName: string, + options?: DevicesGetUpdateSummaryOptionalParams + ): Promise; + /** + * Uploads registration certificate for the device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param parameters The upload certificate request. + * @param options The options parameters. + */ + uploadCertificate( + deviceName: string, + resourceGroupName: string, + parameters: UploadCertificateRequest, + options?: DevicesUploadCertificateOptionalParams + ): Promise; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/diagnosticSettings.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/diagnosticSettings.ts new file mode 100644 index 000000000000..6337680f9d5a --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/diagnosticSettings.ts @@ -0,0 +1,117 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsOptionalParams, + DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsResponse, + DiagnosticProactiveLogCollectionSettings, + DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsOptionalParams, + DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse, + DiagnosticSettingsGetDiagnosticRemoteSupportSettingsOptionalParams, + DiagnosticSettingsGetDiagnosticRemoteSupportSettingsResponse, + DiagnosticRemoteSupportSettings, + DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsOptionalParams, + DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse +} from "../models"; + +/** Interface representing a DiagnosticSettings. */ +export interface DiagnosticSettings { + /** + * Gets the proactive log collection settings of the specified Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + getDiagnosticProactiveLogCollectionSettings( + deviceName: string, + resourceGroupName: string, + options?: DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsOptionalParams + ): Promise< + DiagnosticSettingsGetDiagnosticProactiveLogCollectionSettingsResponse + >; + /** + * Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param proactiveLogCollectionSettings The proactive log collection settings. + * @param options The options parameters. + */ + beginUpdateDiagnosticProactiveLogCollectionSettings( + deviceName: string, + resourceGroupName: string, + proactiveLogCollectionSettings: DiagnosticProactiveLogCollectionSettings, + options?: DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsOptionalParams + ): Promise< + PollerLike< + PollOperationState< + DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse + >, + DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse + > + >; + /** + * Updates the proactive log collection settings on a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param proactiveLogCollectionSettings The proactive log collection settings. + * @param options The options parameters. + */ + beginUpdateDiagnosticProactiveLogCollectionSettingsAndWait( + deviceName: string, + resourceGroupName: string, + proactiveLogCollectionSettings: DiagnosticProactiveLogCollectionSettings, + options?: DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsOptionalParams + ): Promise< + DiagnosticSettingsUpdateDiagnosticProactiveLogCollectionSettingsResponse + >; + /** + * Gets the diagnostic remote support settings of the specified Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + getDiagnosticRemoteSupportSettings( + deviceName: string, + resourceGroupName: string, + options?: DiagnosticSettingsGetDiagnosticRemoteSupportSettingsOptionalParams + ): Promise; + /** + * Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param diagnosticRemoteSupportSettings The diagnostic remote support settings. + * @param options The options parameters. + */ + beginUpdateDiagnosticRemoteSupportSettings( + deviceName: string, + resourceGroupName: string, + diagnosticRemoteSupportSettings: DiagnosticRemoteSupportSettings, + options?: DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsOptionalParams + ): Promise< + PollerLike< + PollOperationState< + DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse + >, + DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsResponse + > + >; + /** + * Updates the diagnostic remote support settings on a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param diagnosticRemoteSupportSettings The diagnostic remote support settings. + * @param options The options parameters. + */ + beginUpdateDiagnosticRemoteSupportSettingsAndWait( + deviceName: string, + resourceGroupName: string, + diagnosticRemoteSupportSettings: DiagnosticRemoteSupportSettings, + options?: DiagnosticSettingsUpdateDiagnosticRemoteSupportSettingsOptionalParams + ): Promise; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/index.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/index.ts new file mode 100644 index 000000000000..1d8cf8228116 --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/index.ts @@ -0,0 +1,28 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export * from "./operations"; +export * from "./availableSkus"; +export * from "./devices"; +export * from "./alerts"; +export * from "./bandwidthSchedules"; +export * from "./diagnosticSettings"; +export * from "./jobs"; +export * from "./nodes"; +export * from "./operationsStatus"; +export * from "./orders"; +export * from "./roles"; +export * from "./addons"; +export * from "./monitoringConfig"; +export * from "./shares"; +export * from "./storageAccountCredentials"; +export * from "./storageAccounts"; +export * from "./containers"; +export * from "./triggers"; +export * from "./supportPackages"; +export * from "./users"; diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/jobs.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/jobs.ts new file mode 100644 index 000000000000..c10701318380 --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/jobs.ts @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { JobsGetOptionalParams, JobsGetResponse } from "../models"; + +/** Interface representing a Jobs. */ +export interface Jobs { + /** + * Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param name The job name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + get( + deviceName: string, + name: string, + resourceGroupName: string, + options?: JobsGetOptionalParams + ): Promise; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/monitoringConfig.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/monitoringConfig.ts new file mode 100644 index 000000000000..f18c2b99fda6 --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/monitoringConfig.ts @@ -0,0 +1,111 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + MonitoringMetricConfiguration, + MonitoringConfigListOptionalParams, + MonitoringConfigGetOptionalParams, + MonitoringConfigGetResponse, + MonitoringConfigCreateOrUpdateOptionalParams, + MonitoringConfigCreateOrUpdateResponse, + MonitoringConfigDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a MonitoringConfig. */ +export interface MonitoringConfig { + /** + * Lists metric configurations in a role. + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + list( + deviceName: string, + roleName: string, + resourceGroupName: string, + options?: MonitoringConfigListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a metric configuration of a role. + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + get( + deviceName: string, + roleName: string, + resourceGroupName: string, + options?: MonitoringConfigGetOptionalParams + ): Promise; + /** + * Creates a new metric configuration or updates an existing one for a role. + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param monitoringMetricConfiguration The metric configuration. + * @param options The options parameters. + */ + beginCreateOrUpdate( + deviceName: string, + roleName: string, + resourceGroupName: string, + monitoringMetricConfiguration: MonitoringMetricConfiguration, + options?: MonitoringConfigCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + MonitoringConfigCreateOrUpdateResponse + > + >; + /** + * Creates a new metric configuration or updates an existing one for a role. + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param monitoringMetricConfiguration The metric configuration. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + deviceName: string, + roleName: string, + resourceGroupName: string, + monitoringMetricConfiguration: MonitoringMetricConfiguration, + options?: MonitoringConfigCreateOrUpdateOptionalParams + ): Promise; + /** + * deletes a new metric configuration for a role. + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDelete( + deviceName: string, + roleName: string, + resourceGroupName: string, + options?: MonitoringConfigDeleteOptionalParams + ): Promise, void>>; + /** + * deletes a new metric configuration for a role. + * @param deviceName The device name. + * @param roleName The role name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDeleteAndWait( + deviceName: string, + roleName: string, + resourceGroupName: string, + options?: MonitoringConfigDeleteOptionalParams + ): Promise; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/nodes.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/nodes.ts new file mode 100644 index 000000000000..cfa552ffeed8 --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/nodes.ts @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Node, NodesListByDataBoxEdgeDeviceOptionalParams } from "../models"; + +/// +/** Interface representing a Nodes. */ +export interface Nodes { + /** + * Gets all the nodes currently configured under this Data Box Edge device + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: NodesListByDataBoxEdgeDeviceOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/operations.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/operations.ts new file mode 100644 index 000000000000..f528bd71d702 --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/operations.ts @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Operation, OperationsListOptionalParams } from "../models"; + +/// +/** Interface representing a Operations. */ +export interface Operations { + /** + * List all the supported operations. + * @param options The options parameters. + */ + list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/operationsStatus.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/operationsStatus.ts new file mode 100644 index 000000000000..001e719a50a3 --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/operationsStatus.ts @@ -0,0 +1,29 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + OperationsStatusGetOptionalParams, + OperationsStatusGetResponse +} from "../models"; + +/** Interface representing a OperationsStatus. */ +export interface OperationsStatus { + /** + * Gets the details of a specified job on a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param name The job name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + get( + deviceName: string, + name: string, + resourceGroupName: string, + options?: OperationsStatusGetOptionalParams + ): Promise; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/orders.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/orders.ts new file mode 100644 index 000000000000..eff6276ab14d --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/orders.ts @@ -0,0 +1,112 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + Order, + OrdersListByDataBoxEdgeDeviceOptionalParams, + OrdersGetOptionalParams, + OrdersGetResponse, + OrdersCreateOrUpdateOptionalParams, + OrdersCreateOrUpdateResponse, + OrdersDeleteOptionalParams, + OrdersListDCAccessCodeOptionalParams, + OrdersListDCAccessCodeResponse +} from "../models"; + +/// +/** Interface representing a Orders. */ +export interface Orders { + /** + * Lists all the orders related to a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: OrdersListByDataBoxEdgeDeviceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a specific order by name. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + get( + deviceName: string, + resourceGroupName: string, + options?: OrdersGetOptionalParams + ): Promise; + /** + * Creates or updates an order. + * @param deviceName The order details of a device. + * @param resourceGroupName The resource group name. + * @param order The order to be created or updated. + * @param options The options parameters. + */ + beginCreateOrUpdate( + deviceName: string, + resourceGroupName: string, + order: Order, + options?: OrdersCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + OrdersCreateOrUpdateResponse + > + >; + /** + * Creates or updates an order. + * @param deviceName The order details of a device. + * @param resourceGroupName The resource group name. + * @param order The order to be created or updated. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + deviceName: string, + resourceGroupName: string, + order: Order, + options?: OrdersCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the order related to the device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDelete( + deviceName: string, + resourceGroupName: string, + options?: OrdersDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the order related to the device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDeleteAndWait( + deviceName: string, + resourceGroupName: string, + options?: OrdersDeleteOptionalParams + ): Promise; + /** + * Gets the DCAccess Code + * @param deviceName The device name + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + listDCAccessCode( + deviceName: string, + resourceGroupName: string, + options?: OrdersListDCAccessCodeOptionalParams + ): Promise; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/roles.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/roles.ts new file mode 100644 index 000000000000..71a4698e81f9 --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/roles.ts @@ -0,0 +1,109 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + RoleUnion, + RolesListByDataBoxEdgeDeviceOptionalParams, + RolesGetOptionalParams, + RolesGetResponse, + RolesCreateOrUpdateOptionalParams, + RolesCreateOrUpdateResponse, + RolesDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a Roles. */ +export interface Roles { + /** + * Lists all the roles configured in a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: RolesListByDataBoxEdgeDeviceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a specific role by name. + * @param deviceName The device name. + * @param name The role name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + get( + deviceName: string, + name: string, + resourceGroupName: string, + options?: RolesGetOptionalParams + ): Promise; + /** + * Create or update a role. + * @param deviceName The device name. + * @param name The role name. + * @param resourceGroupName The resource group name. + * @param role The role properties. + * @param options The options parameters. + */ + beginCreateOrUpdate( + deviceName: string, + name: string, + resourceGroupName: string, + role: RoleUnion, + options?: RolesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + RolesCreateOrUpdateResponse + > + >; + /** + * Create or update a role. + * @param deviceName The device name. + * @param name The role name. + * @param resourceGroupName The resource group name. + * @param role The role properties. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + role: RoleUnion, + options?: RolesCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the role on the device. + * @param deviceName The device name. + * @param name The role name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDelete( + deviceName: string, + name: string, + resourceGroupName: string, + options?: RolesDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the role on the device. + * @param deviceName The device name. + * @param name The role name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDeleteAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + options?: RolesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/shares.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/shares.ts new file mode 100644 index 000000000000..da6ff331ebc6 --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/shares.ts @@ -0,0 +1,136 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + Share, + SharesListByDataBoxEdgeDeviceOptionalParams, + SharesGetOptionalParams, + SharesGetResponse, + SharesCreateOrUpdateOptionalParams, + SharesCreateOrUpdateResponse, + SharesDeleteOptionalParams, + SharesRefreshOptionalParams +} from "../models"; + +/// +/** Interface representing a Shares. */ +export interface Shares { + /** + * Lists all the shares in a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: SharesListByDataBoxEdgeDeviceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a share by name. + * @param deviceName The device name. + * @param name The share name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + get( + deviceName: string, + name: string, + resourceGroupName: string, + options?: SharesGetOptionalParams + ): Promise; + /** + * Creates a new share or updates an existing share on the device. + * @param deviceName The device name. + * @param name The share name. + * @param resourceGroupName The resource group name. + * @param share The share properties. + * @param options The options parameters. + */ + beginCreateOrUpdate( + deviceName: string, + name: string, + resourceGroupName: string, + share: Share, + options?: SharesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SharesCreateOrUpdateResponse + > + >; + /** + * Creates a new share or updates an existing share on the device. + * @param deviceName The device name. + * @param name The share name. + * @param resourceGroupName The resource group name. + * @param share The share properties. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + share: Share, + options?: SharesCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the share on the Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param name The share name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDelete( + deviceName: string, + name: string, + resourceGroupName: string, + options?: SharesDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the share on the Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param name The share name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDeleteAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + options?: SharesDeleteOptionalParams + ): Promise; + /** + * Refreshes the share metadata with the data from the cloud. + * @param deviceName The device name. + * @param name The share name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginRefresh( + deviceName: string, + name: string, + resourceGroupName: string, + options?: SharesRefreshOptionalParams + ): Promise, void>>; + /** + * Refreshes the share metadata with the data from the cloud. + * @param deviceName The device name. + * @param name The share name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginRefreshAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + options?: SharesRefreshOptionalParams + ): Promise; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/storageAccountCredentials.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/storageAccountCredentials.ts new file mode 100644 index 000000000000..c5705ff6bc6a --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/storageAccountCredentials.ts @@ -0,0 +1,109 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + StorageAccountCredential, + StorageAccountCredentialsListByDataBoxEdgeDeviceOptionalParams, + StorageAccountCredentialsGetOptionalParams, + StorageAccountCredentialsGetResponse, + StorageAccountCredentialsCreateOrUpdateOptionalParams, + StorageAccountCredentialsCreateOrUpdateResponse, + StorageAccountCredentialsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a StorageAccountCredentials. */ +export interface StorageAccountCredentials { + /** + * Gets all the storage account credentials in a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: StorageAccountCredentialsListByDataBoxEdgeDeviceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the properties of the specified storage account credential. + * @param deviceName The device name. + * @param name The storage account credential name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + get( + deviceName: string, + name: string, + resourceGroupName: string, + options?: StorageAccountCredentialsGetOptionalParams + ): Promise; + /** + * Creates or updates the storage account credential. + * @param deviceName The device name. + * @param name The storage account credential name. + * @param resourceGroupName The resource group name. + * @param storageAccountCredential The storage account credential. + * @param options The options parameters. + */ + beginCreateOrUpdate( + deviceName: string, + name: string, + resourceGroupName: string, + storageAccountCredential: StorageAccountCredential, + options?: StorageAccountCredentialsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + StorageAccountCredentialsCreateOrUpdateResponse + > + >; + /** + * Creates or updates the storage account credential. + * @param deviceName The device name. + * @param name The storage account credential name. + * @param resourceGroupName The resource group name. + * @param storageAccountCredential The storage account credential. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + storageAccountCredential: StorageAccountCredential, + options?: StorageAccountCredentialsCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the storage account credential. + * @param deviceName The device name. + * @param name The storage account credential name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDelete( + deviceName: string, + name: string, + resourceGroupName: string, + options?: StorageAccountCredentialsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the storage account credential. + * @param deviceName The device name. + * @param name The storage account credential name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDeleteAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + options?: StorageAccountCredentialsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/storageAccounts.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/storageAccounts.ts new file mode 100644 index 000000000000..1ad5ec26c4ec --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/storageAccounts.ts @@ -0,0 +1,109 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + StorageAccount, + StorageAccountsListByDataBoxEdgeDeviceOptionalParams, + StorageAccountsGetOptionalParams, + StorageAccountsGetResponse, + StorageAccountsCreateOrUpdateOptionalParams, + StorageAccountsCreateOrUpdateResponse, + StorageAccountsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a StorageAccounts. */ +export interface StorageAccounts { + /** + * Lists all the StorageAccounts in a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: StorageAccountsListByDataBoxEdgeDeviceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a StorageAccount by name. + * @param deviceName The device name. + * @param storageAccountName The storage account name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + get( + deviceName: string, + storageAccountName: string, + resourceGroupName: string, + options?: StorageAccountsGetOptionalParams + ): Promise; + /** + * Creates a new StorageAccount or updates an existing StorageAccount on the device. + * @param deviceName The device name. + * @param storageAccountName The StorageAccount name. + * @param resourceGroupName The resource group name. + * @param storageAccount The StorageAccount properties. + * @param options The options parameters. + */ + beginCreateOrUpdate( + deviceName: string, + storageAccountName: string, + resourceGroupName: string, + storageAccount: StorageAccount, + options?: StorageAccountsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + StorageAccountsCreateOrUpdateResponse + > + >; + /** + * Creates a new StorageAccount or updates an existing StorageAccount on the device. + * @param deviceName The device name. + * @param storageAccountName The StorageAccount name. + * @param resourceGroupName The resource group name. + * @param storageAccount The StorageAccount properties. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + deviceName: string, + storageAccountName: string, + resourceGroupName: string, + storageAccount: StorageAccount, + options?: StorageAccountsCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the StorageAccount on the Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param storageAccountName The StorageAccount name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDelete( + deviceName: string, + storageAccountName: string, + resourceGroupName: string, + options?: StorageAccountsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the StorageAccount on the Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param storageAccountName The StorageAccount name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDeleteAndWait( + deviceName: string, + storageAccountName: string, + resourceGroupName: string, + options?: StorageAccountsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/supportPackages.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/supportPackages.ts new file mode 100644 index 000000000000..5a7b1911d316 --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/supportPackages.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + TriggerSupportPackageRequest, + SupportPackagesTriggerSupportPackageOptionalParams +} from "../models"; + +/** Interface representing a SupportPackages. */ +export interface SupportPackages { + /** + * Triggers support package on the device + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param triggerSupportPackageRequest The trigger support package request object + * @param options The options parameters. + */ + beginTriggerSupportPackage( + deviceName: string, + resourceGroupName: string, + triggerSupportPackageRequest: TriggerSupportPackageRequest, + options?: SupportPackagesTriggerSupportPackageOptionalParams + ): Promise, void>>; + /** + * Triggers support package on the device + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param triggerSupportPackageRequest The trigger support package request object + * @param options The options parameters. + */ + beginTriggerSupportPackageAndWait( + deviceName: string, + resourceGroupName: string, + triggerSupportPackageRequest: TriggerSupportPackageRequest, + options?: SupportPackagesTriggerSupportPackageOptionalParams + ): Promise; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/triggers.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/triggers.ts new file mode 100644 index 000000000000..b7c138aabc8a --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/triggers.ts @@ -0,0 +1,109 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + TriggerUnion, + TriggersListByDataBoxEdgeDeviceOptionalParams, + TriggersGetOptionalParams, + TriggersGetResponse, + TriggersCreateOrUpdateOptionalParams, + TriggersCreateOrUpdateResponse, + TriggersDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a Triggers. */ +export interface Triggers { + /** + * Lists all the triggers configured in the device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: TriggersListByDataBoxEdgeDeviceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a specific trigger by name. + * @param deviceName The device name. + * @param name The trigger name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + get( + deviceName: string, + name: string, + resourceGroupName: string, + options?: TriggersGetOptionalParams + ): Promise; + /** + * Creates or updates a trigger. + * @param deviceName Creates or updates a trigger + * @param name The trigger name. + * @param resourceGroupName The resource group name. + * @param trigger The trigger. + * @param options The options parameters. + */ + beginCreateOrUpdate( + deviceName: string, + name: string, + resourceGroupName: string, + trigger: TriggerUnion, + options?: TriggersCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + TriggersCreateOrUpdateResponse + > + >; + /** + * Creates or updates a trigger. + * @param deviceName Creates or updates a trigger + * @param name The trigger name. + * @param resourceGroupName The resource group name. + * @param trigger The trigger. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + trigger: TriggerUnion, + options?: TriggersCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the trigger on the gateway device. + * @param deviceName The device name. + * @param name The trigger name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDelete( + deviceName: string, + name: string, + resourceGroupName: string, + options?: TriggersDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the trigger on the gateway device. + * @param deviceName The device name. + * @param name The trigger name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDeleteAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + options?: TriggersDeleteOptionalParams + ): Promise; +} diff --git a/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/users.ts b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/users.ts new file mode 100644 index 000000000000..648d6e49d850 --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/src/operationsInterfaces/users.ts @@ -0,0 +1,111 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + User, + UsersListByDataBoxEdgeDeviceOptionalParams, + UsersGetOptionalParams, + UsersGetResponse, + UsersCreateOrUpdateOptionalParams, + UsersCreateOrUpdateResponse, + UsersDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a Users. */ +export interface Users { + /** + * Gets all the users registered on a Data Box Edge/Data Box Gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + listByDataBoxEdgeDevice( + deviceName: string, + resourceGroupName: string, + options?: UsersListByDataBoxEdgeDeviceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the properties of the specified user. + * @param deviceName The device name. + * @param name The user name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + get( + deviceName: string, + name: string, + resourceGroupName: string, + options?: UsersGetOptionalParams + ): Promise; + /** + * Creates a new user or updates an existing user's information on a Data Box Edge/Data Box Gateway + * device. + * @param deviceName The device name. + * @param name The user name. + * @param resourceGroupName The resource group name. + * @param user The user details. + * @param options The options parameters. + */ + beginCreateOrUpdate( + deviceName: string, + name: string, + resourceGroupName: string, + user: User, + options?: UsersCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + UsersCreateOrUpdateResponse + > + >; + /** + * Creates a new user or updates an existing user's information on a Data Box Edge/Data Box Gateway + * device. + * @param deviceName The device name. + * @param name The user name. + * @param resourceGroupName The resource group name. + * @param user The user details. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + user: User, + options?: UsersCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the user on a databox edge/gateway device. + * @param deviceName The device name. + * @param name The user name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDelete( + deviceName: string, + name: string, + resourceGroupName: string, + options?: UsersDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the user on a databox edge/gateway device. + * @param deviceName The device name. + * @param name The user name. + * @param resourceGroupName The resource group name. + * @param options The options parameters. + */ + beginDeleteAndWait( + deviceName: string, + name: string, + resourceGroupName: string, + options?: UsersDeleteOptionalParams + ): Promise; +} diff --git a/sdk/databoxedge/arm-databoxedge/test/sampleTest.ts b/sdk/databoxedge/arm-databoxedge/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/databoxedge/arm-databoxedge/test/sampleTest.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + env, + record, + RecorderEnvironmentSetup, + Recorder +} from "@azure-tools/test-recorder"; +import * as assert from "assert"; + +const recorderEnvSetup: RecorderEnvironmentSetup = { + replaceableVariables: { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" + }, + customizationsOnRecordings: [ + (recording: any): any => + recording.replace( + /"access_token":"[^"]*"/g, + `"access_token":"access_token"` + ) + ], + queryParametersToSkip: [] +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function() { + recorder = record(this, recorderEnvSetup); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/databoxedge/arm-databoxedge/tsconfig.json b/sdk/databoxedge/arm-databoxedge/tsconfig.json index 422b584abd5e..6e3251194117 100644 --- a/sdk/databoxedge/arm-databoxedge/tsconfig.json +++ b/sdk/databoxedge/arm-databoxedge/tsconfig.json @@ -3,7 +3,7 @@ "module": "es6", "moduleResolution": "node", "strict": true, - "target": "es5", + "target": "es6", "sourceMap": true, "declarationMap": true, "esModuleInterop": true, @@ -11,9 +11,9 @@ "forceConsistentCasingInFileNames": true, "lib": ["es6", "dom"], "declaration": true, - "outDir": "./esm", + "outDir": "./dist-esm", "importHelpers": true }, - "include": ["./src/**/*.ts"], + "include": ["./src/**/*.ts", "./test/**/*.ts"], "exclude": ["node_modules"] } diff --git a/sdk/databoxedge/ci.yml b/sdk/databoxedge/ci.yml new file mode 100644 index 000000000000..021d52ebf819 --- /dev/null +++ b/sdk/databoxedge/ci.yml @@ -0,0 +1,29 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - release/* + - hotfix/* + paths: + include: + - sdk/databoxedge/ + +pr: + branches: + include: + - main + - release/* + - hotfix/* + paths: + include: + - sdk/databoxedge/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: databoxedge + Artifacts: + - name: azure-arm-databoxedge + safeName: azurearmdataboxedge + \ No newline at end of file