diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 694e81b4a476..ef34128fc2e6 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-databox': file:./projects/arm-databox.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-databox': file:projects/arm-databox.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-databox.tgz: + resolution: {integrity: sha512-47bAdlP3IA+sZDyX6lHa/mJPm33/LT8PLcByf5TzJa2XS5zq7+vK+rAcVarOiy1h20saKmAK0/2uDFPxwRemHw==, tarball: file:projects/arm-databox.tgz} + name: '@rush-temp/arm-databox' + 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..ea5f948b0af4 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-databox", + "projectFolder": "sdk/databox/arm-databox", + "versionPolicyName": "management" } ] } \ No newline at end of file diff --git a/sdk/databox/arm-databox/CHANGELOG.md b/sdk/databox/arm-databox/CHANGELOG.md new file mode 100644 index 000000000000..3f37c7581439 --- /dev/null +++ b/sdk/databox/arm-databox/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 5.0.0-beta.1 (2022-01-05) + +The package of @azure/arm-databox is using our next generation design principles since version 5.0.0-beta.1, 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/databox/arm-databox/LICENSE.txt b/sdk/databox/arm-databox/LICENSE similarity index 96% rename from sdk/databox/arm-databox/LICENSE.txt rename to sdk/databox/arm-databox/LICENSE index ea8fb1516028..5d1d36e0af80 100644 --- a/sdk/databox/arm-databox/LICENSE.txt +++ b/sdk/databox/arm-databox/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/databox/arm-databox/README.md b/sdk/databox/arm-databox/README.md index da15b9671dab..67ef1131e9b9 100644 --- a/sdk/databox/arm-databox/README.md +++ b/sdk/databox/arm-databox/README.md @@ -1,109 +1,98 @@ -## Azure DataBoxManagementClient SDK for JavaScript +# Azure DataBoxManagement client library for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for DataBoxManagementClient. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure DataBoxManagement client. + + + +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/databox/arm-databox) | +[Package (NPM)](https://www.npmjs.com/package/@azure/arm-databox) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-databox?view=azure-node-preview) | +[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-databox` package -To use this SDK in your project, you will need to install two packages. -- `@azure/arm-databox` that contains the client. -- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. +Install the Azure DataBoxManagement client library for JavaScript with `npm`: -Install both packages using the below command: ```bash -npm install --save @azure/arm-databox @azure/identity +npm install @azure/arm-databox ``` -> **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 `DataBoxManagementClient` + +To create a client object to access the Azure DataBoxManagement API, you will need the `endpoint` of your Azure DataBoxManagement resource and a `credential`. The Azure DataBoxManagement client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure DataBoxManagement 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 DataBoxManagement** 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 { DataBoxManagementClient } = require("@azure/arm-databox"); -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 DataBoxManagementClient(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 DataBoxManagementClient(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-databox 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 + +### DataBoxManagementClient + +`DataBoxManagementClient` is the primary interface for developers using the Azure DataBoxManagement client library. Explore the methods on this client object to understand the different features of the Azure DataBoxManagement 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%2Fdatabox%2Farm-databox%2FREADME.png) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/databox/arm-databox/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/databox/arm-databox/_meta.json b/sdk/databox/arm-databox/_meta.json new file mode 100644 index 000000000000..42287f1168af --- /dev/null +++ b/sdk/databox/arm-databox/_meta.json @@ -0,0 +1,7 @@ +{ + "commit": "754938e4cb9416358b02dcc11f444adf14b3b7b6", + "readme": "specification/databox/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/databox/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/databox/arm-databox/api-extractor.json b/sdk/databox/arm-databox/api-extractor.json new file mode 100644 index 000000000000..b443f717559f --- /dev/null +++ b/sdk/databox/arm-databox/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-databox.d.ts" + }, + "messages": { + "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "extractorMessageReporting": { + "ae-missing-release-tag": { "logLevel": "none" }, + "ae-unresolved-link": { "logLevel": "none" } + } + } +} diff --git a/sdk/databox/arm-databox/package.json b/sdk/databox/arm-databox/package.json index 16cd93139780..cef21f64fd88 100644 --- a/sdk/databox/arm-databox/package.json +++ b/sdk/databox/arm-databox/package.json @@ -1,58 +1,91 @@ { "name": "@azure/arm-databox", + "sdk-type": "mgmt", "author": "Microsoft Corporation", - "description": "DataBoxManagementClient Library with typescript type definitions for node.js and browser.", - "version": "4.1.0", + "description": "A generated SDK for DataBoxManagementClient.", + "version": "5.0.0-beta.1", + "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-databox.js", - "module": "./esm/dataBoxManagementClient.js", - "types": "./esm/dataBoxManagementClient.d.ts", + "main": "./dist/index.js", + "module": "./dist-esm/src/index.js", + "types": "./types/arm-databox.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/databox/arm-databox", "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-databox.js.map'\" -o ./dist/arm-databox.min.js ./dist/arm-databox.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/databox/arm-databox/review/arm-databox.api.md b/sdk/databox/arm-databox/review/arm-databox.api.md new file mode 100644 index 000000000000..14f686cf11df --- /dev/null +++ b/sdk/databox/arm-databox/review/arm-databox.api.md @@ -0,0 +1,1376 @@ +## API Report File for "@azure/arm-databox" + +> 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 AccessProtocol = "SMB" | "NFS"; + +// @public +export interface AccountCredentialDetails { + readonly accountConnectionString?: string; + readonly accountName?: string; + readonly dataAccountType?: DataAccountType; + readonly shareCredentialDetails?: ShareCredentialDetails[]; +} + +// @public +export interface AdditionalErrorInfo { + info?: Record; + type?: string; +} + +// @public +export type AddressType = "None" | "Residential" | "Commercial"; + +// @public +export interface AddressValidationOutput { + readonly alternateAddresses?: ShippingAddress[]; + readonly error?: CloudError; + readonly validationStatus?: AddressValidationStatus; + validationType?: ValidationInputDiscriminator; +} + +// @public +export type AddressValidationProperties = ValidationInputResponse & { + validationType: "ValidateAddress"; + readonly validationStatus?: AddressValidationStatus; + readonly alternateAddresses?: ShippingAddress[]; +}; + +// @public +export type AddressValidationStatus = "Valid" | "Invalid" | "Ambiguous"; + +// @public (undocumented) +export interface ApiError { + // (undocumented) + error: ErrorDetail; +} + +// @public +export interface ApplianceNetworkConfiguration { + readonly macAddress?: string; + readonly name?: string; +} + +// @public +export interface ArmBaseObject { + readonly id?: string; + readonly name?: string; + readonly type?: string; +} + +// @public +export interface AvailableSkuRequest { + country: string; + location: string; + skuNames?: SkuName[]; + transferType: TransferType; +} + +// @public +export interface AvailableSkusResult { + nextLink?: string; + readonly value?: SkuInformation[]; +} + +// @public +export interface AzureFileFilterDetails { + filePathList?: string[]; + filePrefixList?: string[]; + fileShareList?: string[]; +} + +// @public +export interface BlobFilterDetails { + blobPathList?: string[]; + blobPrefixList?: string[]; + containerList?: string[]; +} + +// @public +export interface CancellationReason { + reason: string; +} + +// @public +export type ClassDiscriminator = "DataBox" | "DataBoxDisk" | "DataBoxHeavy" | "DataBoxCustomerDisk"; + +// @public +export interface CloudError { + readonly additionalInfo?: AdditionalErrorInfo[]; + code?: string; + readonly details?: CloudError[]; + message?: string; + target?: string; +} + +// @public +export interface ContactDetails { + contactName: string; + emailList: string[]; + mobile?: string; + notificationPreference?: NotificationPreference[]; + phone: string; + phoneExtension?: string; +} + +// @public +export interface CopyLogDetails { + copyLogDetailsType: "DataBox" | "DataBoxCustomerDisk" | "DataBoxDisk" | "DataBoxHeavy"; +} + +// @public (undocumented) +export type CopyLogDetailsUnion = CopyLogDetails | DataBoxAccountCopyLogDetails | DataBoxCustomerDiskCopyLogDetails | DataBoxDiskCopyLogDetails | DataBoxHeavyAccountCopyLogDetails; + +// @public +export interface CopyProgress { + readonly accountId?: string; + readonly bytesProcessed?: number; + readonly dataAccountType?: DataAccountType; + readonly directoriesErroredOut?: number; + readonly filesErroredOut?: number; + readonly filesProcessed?: number; + readonly invalidDirectoriesProcessed?: number; + readonly invalidFileBytesUploaded?: number; + readonly invalidFilesProcessed?: number; + readonly isEnumerationInProgress?: boolean; + readonly renamedContainerCount?: number; + readonly storageAccountName?: string; + readonly totalBytesToProcess?: number; + readonly totalFilesToProcess?: number; + readonly transferType?: TransferType; +} + +// @public +export type CopyStatus = string; + +// @public +export type CreateJobValidations = ValidationRequest & { + validationCategory: "JobCreationValidation"; +}; + +// @public +export type CreateOrderLimitForSubscriptionValidationRequest = ValidationInputRequest & { + validationType: "ValidateCreateOrderLimit"; + deviceType: SkuName; +}; + +// @public +export type CreateOrderLimitForSubscriptionValidationResponseProperties = ValidationInputResponse & { + validationType: "ValidateCreateOrderLimit"; + readonly status?: ValidationStatus; +}; + +// @public +export type CustomerDiskJobSecrets = JobSecrets & { + jobSecretsType: "DataBoxCustomerDisk"; + readonly diskSecrets?: DiskSecret[]; + readonly carrierAccountNumber?: string; +}; + +// @public +export type CustomerResolutionCode = "None" | "MoveToCleanUpDevice" | "Resume"; + +// @public +export interface DataAccountDetails { + dataAccountType: "ManagedDisk" | "StorageAccount"; + sharePassword?: string; +} + +// @public (undocumented) +export type DataAccountDetailsUnion = DataAccountDetails | ManagedDiskDetails | StorageAccountDetails; + +// @public +export type DataAccountType = "StorageAccount" | "ManagedDisk"; + +// @public +export type DataBoxAccountCopyLogDetails = CopyLogDetails & { + copyLogDetailsType: "DataBox"; + readonly accountName?: string; + readonly copyLogLink?: string; + readonly copyVerboseLogLink?: string; +}; + +// @public +export type DataBoxCustomerDiskCopyLogDetails = CopyLogDetails & { + copyLogDetailsType: "DataBoxCustomerDisk"; + readonly serialNumber?: string; + readonly errorLogLink?: string; + readonly verboseLogLink?: string; +}; + +// @public +export type DataBoxCustomerDiskCopyProgress = CopyProgress & { + readonly serialNumber?: string; + readonly copyStatus?: CopyStatus; +}; + +// @public +export type DataBoxCustomerDiskJobDetails = JobDetails & { + jobDetailsType: "DataBoxCustomerDisk"; + importDiskDetailsCollection?: { + [propertyName: string]: ImportDiskDetails; + }; + readonly exportDiskDetailsCollection?: { + [propertyName: string]: ExportDiskDetails; + }; + readonly copyProgress?: DataBoxCustomerDiskCopyProgress[]; + readonly deliverToDcPackageDetails?: PackageCarrierInfo; + returnToCustomerPackageDetails: PackageCarrierDetails; + enableManifestBackup?: boolean; +}; + +// @public +export type DataBoxDiskCopyLogDetails = CopyLogDetails & { + copyLogDetailsType: "DataBoxDisk"; + readonly diskSerialNumber?: string; + readonly errorLogLink?: string; + readonly verboseLogLink?: string; +}; + +// @public +export interface DataBoxDiskCopyProgress { + readonly bytesCopied?: number; + readonly percentComplete?: number; + readonly serialNumber?: string; + readonly status?: CopyStatus; +} + +// @public +export type DataBoxDiskJobDetails = JobDetails & { + jobDetailsType: "DataBoxDisk"; + preferredDisks?: { + [propertyName: string]: number; + }; + readonly copyProgress?: DataBoxDiskCopyProgress[]; + readonly disksAndSizeDetails?: { + [propertyName: string]: number; + }; + passkey?: string; +}; + +// @public +export type DataBoxDiskJobSecrets = JobSecrets & { + jobSecretsType: "DataBoxDisk"; + readonly diskSecrets?: DiskSecret[]; + readonly passKey?: string; + readonly isPasskeyUserDefined?: boolean; +}; + +// @public +export type DataBoxHeavyAccountCopyLogDetails = CopyLogDetails & { + copyLogDetailsType: "DataBoxHeavy"; + readonly accountName?: string; + readonly copyLogLink?: string[]; + readonly copyVerboseLogLink?: string[]; +}; + +// @public +export type DataBoxHeavyJobDetails = JobDetails & { + jobDetailsType: "DataBoxHeavy"; + readonly copyProgress?: CopyProgress[]; + devicePassword?: string; +}; + +// @public +export type DataBoxHeavyJobSecrets = JobSecrets & { + jobSecretsType: "DataBoxHeavy"; + readonly cabinetPodSecrets?: DataBoxHeavySecret[]; +}; + +// @public +export interface DataBoxHeavySecret { + readonly accountCredentialDetails?: AccountCredentialDetails[]; + readonly devicePassword?: string; + readonly deviceSerialNumber?: string; + readonly encodedValidationCertPubKey?: string; + readonly networkConfigurations?: ApplianceNetworkConfiguration[]; +} + +// @public +export type DataBoxJobDetails = JobDetails & { + jobDetailsType: "DataBox"; + readonly copyProgress?: CopyProgress[]; + devicePassword?: string; +}; + +// @public +export type DataboxJobSecrets = JobSecrets & { + jobSecretsType: "DataBox"; + podSecrets?: DataBoxSecret[]; +}; + +// @public (undocumented) +export class DataBoxManagementClient extends coreClient.ServiceClient { + // (undocumented) + $host: string; + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: DataBoxManagementClientOptionalParams); + // (undocumented) + apiVersion: string; + // (undocumented) + jobs: Jobs; + mitigate(jobName: string, resourceGroupName: string, mitigateJobRequest: MitigateJobRequest, options?: MitigateOptionalParams): Promise; + // (undocumented) + operations: Operations; + // (undocumented) + service: Service; + // (undocumented) + subscriptionId: string; +} + +// @public +export interface DataBoxManagementClientOptionalParams extends coreClient.ServiceClientOptions { + $host?: string; + apiVersion?: string; + endpoint?: string; +} + +// @public +export type DataBoxScheduleAvailabilityRequest = ScheduleAvailabilityRequest & { + skuName: "DataBox"; +}; + +// @public +export interface DataBoxSecret { + readonly accountCredentialDetails?: AccountCredentialDetails[]; + readonly devicePassword?: string; + readonly deviceSerialNumber?: string; + readonly encodedValidationCertPubKey?: string; + readonly networkConfigurations?: ApplianceNetworkConfiguration[]; +} + +// @public +export type DatacenterAddressInstructionResponse = DatacenterAddressResponse & { + datacenterAddressType: "DatacenterAddressInstruction"; + readonly communicationInstruction?: string; +}; + +// @public +export type DatacenterAddressLocationResponse = DatacenterAddressResponse & { + datacenterAddressType: "DatacenterAddressLocation"; + readonly contactPersonName?: string; + readonly company?: string; + readonly street1?: string; + readonly street2?: string; + readonly street3?: string; + readonly city?: string; + readonly state?: string; + readonly zip?: string; + readonly country?: string; + readonly phone?: string; + readonly phoneExtension?: string; + readonly addressType?: string; + readonly additionalShippingInformation?: string; +}; + +// @public +export interface DatacenterAddressRequest { + skuName: SkuName; + storageLocation: string; +} + +// @public +export interface DatacenterAddressResponse { + datacenterAddressType: "DatacenterAddressInstruction" | "DatacenterAddressLocation"; + readonly dataCenterAzureLocation?: string; + readonly supportedCarriersForReturnShipment?: string[]; +} + +// @public (undocumented) +export type DatacenterAddressResponseUnion = DatacenterAddressResponse | DatacenterAddressInstructionResponse | DatacenterAddressLocationResponse; + +// @public +export type DatacenterAddressType = "DatacenterAddressLocation" | "DatacenterAddressInstruction"; + +// @public +export type DataCenterCode = string; + +// @public +export interface DataExportDetails { + accountDetails: DataAccountDetailsUnion; + logCollectionLevel?: LogCollectionLevel; + transferConfiguration: TransferConfiguration; +} + +// @public +export interface DataImportDetails { + accountDetails: DataAccountDetailsUnion; + logCollectionLevel?: LogCollectionLevel; +} + +// @public +export interface DataLocationToServiceLocationMap { + readonly dataLocation?: string; + readonly serviceLocation?: string; +} + +// @public +export type DataTransferDetailsValidationRequest = ValidationInputRequest & { + validationType: "ValidateDataTransferDetails"; + dataExportDetails?: DataExportDetails[]; + dataImportDetails?: DataImportDetails[]; + deviceType: SkuName; + transferType: TransferType; +}; + +// @public +export type DataTransferDetailsValidationResponseProperties = ValidationInputResponse & { + validationType: "ValidateDataTransferDetails"; + readonly status?: ValidationStatus; +}; + +// @public +export interface DcAccessSecurityCode { + forwardDCAccessCode?: string; + reverseDCAccessCode?: string; +} + +// @public (undocumented) +export interface Details { + // (undocumented) + code: string; + // (undocumented) + message: string; +} + +// @public +export type DiskScheduleAvailabilityRequest = ScheduleAvailabilityRequest & { + skuName: "DataBoxDisk"; + expectedDataSizeInTeraBytes: number; +}; + +// @public +export interface DiskSecret { + readonly bitLockerKey?: string; + readonly diskSerialNumber?: string; +} + +// @public +export type DoubleEncryption = "Enabled" | "Disabled"; + +// @public +export interface EncryptionPreferences { + doubleEncryption?: DoubleEncryption; +} + +// @public (undocumented) +export interface ErrorDetail { + // (undocumented) + code: string; + // (undocumented) + details?: Details[]; + // (undocumented) + message: string; + // (undocumented) + target?: string; +} + +// @public +export interface ExportDiskDetails { + readonly backupManifestCloudPath?: string; + readonly manifestFile?: string; + readonly manifestHash?: string; +} + +// @public +export interface FilterFileDetails { + filterFilePath: string; + filterFileType: FilterFileType; +} + +// @public +export type FilterFileType = "AzureBlob" | "AzureFile"; + +// @public +export type HeavyScheduleAvailabilityRequest = ScheduleAvailabilityRequest & { + skuName: "DataBoxHeavy"; +}; + +// @public +export interface IdentityProperties { + type?: string; + userAssigned?: UserAssignedProperties; +} + +// @public +export interface ImportDiskDetails { + readonly backupManifestCloudPath?: string; + bitLockerKey: string; + manifestFile: string; + manifestHash: string; +} + +// @public +export interface JobDeliveryInfo { + scheduledDateTime?: Date; +} + +// @public +export type JobDeliveryType = "NonScheduled" | "Scheduled"; + +// @public +export interface JobDetails { + readonly actions?: CustomerResolutionCode[]; + readonly chainOfCustodySasKey?: string; + contactDetails: ContactDetails; + readonly copyLogDetails?: CopyLogDetailsUnion[]; + readonly datacenterAddress?: DatacenterAddressResponseUnion; + readonly dataCenterCode?: DataCenterCode; + dataExportDetails?: DataExportDetails[]; + dataImportDetails?: DataImportDetails[]; + readonly deliveryPackage?: PackageShippingDetails; + expectedDataSizeInTeraBytes?: number; + jobDetailsType: "DataBoxCustomerDisk" | "DataBoxDisk" | "DataBoxHeavy" | "DataBox"; + readonly jobStages?: JobStages[]; + keyEncryptionKey?: KeyEncryptionKey; + readonly lastMitigationActionOnJob?: LastMitigationActionOnJob; + preferences?: Preferences; + readonly returnPackage?: PackageShippingDetails; + readonly reverseShipmentLabelSasKey?: string; + shippingAddress?: ShippingAddress; +} + +// @public (undocumented) +export type JobDetailsUnion = JobDetails | DataBoxCustomerDiskJobDetails | DataBoxDiskJobDetails | DataBoxHeavyJobDetails | DataBoxJobDetails; + +// @public +export type JobResource = Resource & { + readonly name?: string; + readonly id?: string; + readonly type?: string; + readonly systemData?: SystemData; + transferType: TransferType; + readonly isCancellable?: boolean; + readonly isDeletable?: boolean; + readonly isShippingAddressEditable?: boolean; + readonly isPrepareToShipEnabled?: boolean; + readonly status?: StageName; + readonly startTime?: Date; + readonly error?: CloudError; + details?: JobDetailsUnion; + readonly cancellationReason?: string; + deliveryType?: JobDeliveryType; + deliveryInfo?: JobDeliveryInfo; + readonly isCancellableWithoutFee?: boolean; +}; + +// @public +export interface JobResourceList { + nextLink?: string; + value?: JobResource[]; +} + +// @public +export interface JobResourceUpdateParameter { + details?: UpdateJobDetails; + identity?: ResourceIdentity; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface Jobs { + beginCreate(resourceGroupName: string, jobName: string, jobResource: JobResource, options?: JobsCreateOptionalParams): Promise, JobsCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, jobName: string, jobResource: JobResource, options?: JobsCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, jobName: string, options?: JobsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, jobName: string, options?: JobsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, jobName: string, jobResourceUpdateParameter: JobResourceUpdateParameter, options?: JobsUpdateOptionalParams): Promise, JobsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, jobName: string, jobResourceUpdateParameter: JobResourceUpdateParameter, options?: JobsUpdateOptionalParams): Promise; + bookShipmentPickUp(resourceGroupName: string, jobName: string, shipmentPickUpRequest: ShipmentPickUpRequest, options?: JobsBookShipmentPickUpOptionalParams): Promise; + cancel(resourceGroupName: string, jobName: string, cancellationReason: CancellationReason, options?: JobsCancelOptionalParams): Promise; + get(resourceGroupName: string, jobName: string, options?: JobsGetOptionalParams): Promise; + list(options?: JobsListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: JobsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listCredentials(resourceGroupName: string, jobName: string, options?: JobsListCredentialsOptionalParams): PagedAsyncIterableIterator; + markDevicesShipped(jobName: string, resourceGroupName: string, markDevicesShippedRequest: MarkDevicesShippedRequest, options?: JobsMarkDevicesShippedOptionalParams): Promise; +} + +// @public +export interface JobsBookShipmentPickUpOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type JobsBookShipmentPickUpResponse = ShipmentPickUpResponse; + +// @public +export interface JobsCancelOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface JobsCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type JobsCreateResponse = JobResource; + +// @public +export interface JobsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface JobSecrets { + readonly dcAccessSecurityCode?: DcAccessSecurityCode; + readonly error?: CloudError; + jobSecretsType: "DataBoxCustomerDisk" | "DataBoxDisk" | "DataBoxHeavy" | "DataBox"; +} + +// @public (undocumented) +export type JobSecretsUnion = JobSecrets | CustomerDiskJobSecrets | DataBoxDiskJobSecrets | DataBoxHeavyJobSecrets | DataboxJobSecrets; + +// @public +export interface JobsGetOptionalParams extends coreClient.OperationOptions { + expand?: string; +} + +// @public +export type JobsGetResponse = JobResource; + +// @public +export interface JobsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { + skipToken?: string; +} + +// @public +export type JobsListByResourceGroupNextResponse = JobResourceList; + +// @public +export interface JobsListByResourceGroupOptionalParams extends coreClient.OperationOptions { + skipToken?: string; +} + +// @public +export type JobsListByResourceGroupResponse = JobResourceList; + +// @public +export interface JobsListCredentialsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type JobsListCredentialsResponse = UnencryptedCredentialsList; + +// @public +export interface JobsListNextOptionalParams extends coreClient.OperationOptions { + skipToken?: string; +} + +// @public +export type JobsListNextResponse = JobResourceList; + +// @public +export interface JobsListOptionalParams extends coreClient.OperationOptions { + skipToken?: string; +} + +// @public +export type JobsListResponse = JobResourceList; + +// @public +export interface JobsMarkDevicesShippedOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface JobStages { + readonly displayName?: string; + readonly jobStageDetails?: Record; + readonly stageName?: StageName; + readonly stageStatus?: StageStatus; + readonly stageTime?: Date; +} + +// @public +export interface JobsUpdateOptionalParams extends coreClient.OperationOptions { + ifMatch?: string; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type JobsUpdateResponse = JobResource; + +// @public +export type KekType = "MicrosoftManaged" | "CustomerManaged"; + +// @public +export interface KeyEncryptionKey { + identityProperties?: IdentityProperties; + kekType: KekType; + kekUrl?: string; + kekVaultResourceID?: string; +} + +// @public +export enum KnownCopyStatus { + Completed = "Completed", + CompletedWithErrors = "CompletedWithErrors", + DeviceFormatted = "DeviceFormatted", + DeviceMetadataModified = "DeviceMetadataModified", + DriveCorrupted = "DriveCorrupted", + DriveNotDetected = "DriveNotDetected", + DriveNotReceived = "DriveNotReceived", + Failed = "Failed", + HardwareError = "HardwareError", + InProgress = "InProgress", + MetadataFilesModifiedOrRemoved = "MetadataFilesModifiedOrRemoved", + NotReturned = "NotReturned", + NotStarted = "NotStarted", + OtherServiceError = "OtherServiceError", + OtherUserError = "OtherUserError", + StorageAccountNotAccessible = "StorageAccountNotAccessible", + UnsupportedData = "UnsupportedData", + UnsupportedDrive = "UnsupportedDrive" +} + +// @public +export enum KnownDataCenterCode { + // (undocumented) + AdHoc = "AdHoc", + // (undocumented) + AM2 = "AM2", + // (undocumented) + AMS06 = "AMS06", + // (undocumented) + AMS20 = "AMS20", + // (undocumented) + AUH20 = "AUH20", + // (undocumented) + BJB = "BJB", + // (undocumented) + BL20 = "BL20", + // (undocumented) + BL7 = "BL7", + // (undocumented) + BN1 = "BN1", + // (undocumented) + BOM01 = "BOM01", + // (undocumented) + BY1 = "BY1", + // (undocumented) + BY2 = "BY2", + // (undocumented) + BY21 = "BY21", + // (undocumented) + BY24 = "BY24", + // (undocumented) + CBR20 = "CBR20", + // (undocumented) + CH1 = "CH1", + // (undocumented) + CPQ02 = "CPQ02", + // (undocumented) + CPQ20 = "CPQ20", + // (undocumented) + CWL20 = "CWL20", + // (undocumented) + CYS04 = "CYS04", + // (undocumented) + DSM05 = "DSM05", + // (undocumented) + FRA22 = "FRA22", + // (undocumented) + HKG20 = "HKG20", + // (undocumented) + Invalid = "Invalid", + // (undocumented) + JNB21 = "JNB21", + // (undocumented) + JNB22 = "JNB22", + // (undocumented) + LON24 = "LON24", + // (undocumented) + MAA01 = "MAA01", + // (undocumented) + MEL23 = "MEL23", + // (undocumented) + MNZ21 = "MNZ21", + // (undocumented) + MWH01 = "MWH01", + // (undocumented) + ORK70 = "ORK70", + // (undocumented) + OSA20 = "OSA20", + // (undocumented) + PUS20 = "PUS20", + // (undocumented) + SEL20 = "SEL20", + // (undocumented) + SEL21 = "SEL21", + // (undocumented) + SG2 = "SG2", + // (undocumented) + SHA03 = "SHA03", + // (undocumented) + SIN20 = "SIN20", + // (undocumented) + SN5 = "SN5", + // (undocumented) + SN8 = "SN8", + // (undocumented) + SSE90 = "SSE90", + // (undocumented) + SYD03 = "SYD03", + // (undocumented) + SYD23 = "SYD23", + // (undocumented) + TYO01 = "TYO01", + // (undocumented) + TYO22 = "TYO22", + // (undocumented) + YQB20 = "YQB20", + // (undocumented) + YTO20 = "YTO20", + // (undocumented) + YTO21 = "YTO21", + // (undocumented) + ZRH20 = "ZRH20" +} + +// @public +export enum KnownNotificationStageName { + AtAzureDC = "AtAzureDC", + Created = "Created", + DataCopy = "DataCopy", + Delivered = "Delivered", + DevicePrepared = "DevicePrepared", + Dispatched = "Dispatched", + PickedUp = "PickedUp", + ShippedToCustomer = "ShippedToCustomer" +} + +// @public +export enum KnownStageName { + Aborted = "Aborted", + AtAzureDC = "AtAzureDC", + AwaitingShipmentDetails = "AwaitingShipmentDetails", + Cancelled = "Cancelled", + Completed = "Completed", + CompletedWithErrors = "CompletedWithErrors", + CompletedWithWarnings = "CompletedWithWarnings", + Created = "Created", + DataCopy = "DataCopy", + Delivered = "Delivered", + DeviceOrdered = "DeviceOrdered", + DevicePrepared = "DevicePrepared", + Dispatched = "Dispatched", + FailedIssueDetectedAtAzureDC = "Failed_IssueDetectedAtAzureDC", + FailedIssueReportedAtCustomer = "Failed_IssueReportedAtCustomer", + PickedUp = "PickedUp", + PreparingToShipFromAzureDC = "PreparingToShipFromAzureDC", + ReadyToDispatchFromAzureDC = "ReadyToDispatchFromAzureDC", + ReadyToReceiveAtAzureDC = "ReadyToReceiveAtAzureDC", + ShippedToAzureDC = "ShippedToAzureDC", + ShippedToCustomer = "ShippedToCustomer" +} + +// @public +export interface LastMitigationActionOnJob { + actionDateTimeInUtc?: Date; + customerResolution?: CustomerResolutionCode; + isPerformedByCustomer?: boolean; +} + +// @public +export type LogCollectionLevel = "Error" | "Verbose"; + +// @public +export type ManagedDiskDetails = DataAccountDetails & { + dataAccountType: "ManagedDisk"; + resourceGroupId: string; + stagingStorageAccountId: string; +}; + +// @public +export interface MarkDevicesShippedRequest { + deliverToDcPackageDetails: PackageCarrierInfo; +} + +// @public +export interface MitigateJobRequest { + customerResolutionCode: CustomerResolutionCode; +} + +// @public +export interface MitigateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface NotificationPreference { + sendNotification: boolean; + stageName: NotificationStageName; +} + +// @public +export type NotificationStageName = string; + +// @public +export interface Operation { + readonly display?: OperationDisplay; + isDataAction?: boolean; + readonly name?: string; + readonly origin?: string; + readonly properties?: Record; +} + +// @public +export interface OperationDisplay { + description?: string; + operation?: string; + provider?: string; + resource?: string; +} + +// @public +export interface OperationList { + nextLink?: string; + readonly value?: Operation[]; +} + +// @public +export interface Operations { + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListNextResponse = OperationList; + +// @public +export interface OperationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type OperationsListResponse = OperationList; + +// @public +export type OverallValidationStatus = "AllValidToProceed" | "InputsRevisitRequired" | "CertainInputValidationsSkipped"; + +// @public +export interface PackageCarrierDetails { + carrierAccountNumber?: string; + carrierName?: string; + trackingId?: string; +} + +// @public +export interface PackageCarrierInfo { + carrierName?: string; + trackingId?: string; +} + +// @public +export interface PackageShippingDetails { + readonly carrierName?: string; + readonly trackingId?: string; + readonly trackingUrl?: string; +} + +// @public +export interface Preferences { + encryptionPreferences?: EncryptionPreferences; + preferredDataCenterRegion?: string[]; + transportPreferences?: TransportPreferences; +} + +// @public +export type PreferencesValidationRequest = ValidationInputRequest & { + validationType: "ValidatePreferences"; + preference?: Preferences; + deviceType: SkuName; +}; + +// @public +export type PreferencesValidationResponseProperties = ValidationInputResponse & { + validationType: "ValidatePreferences"; + readonly status?: ValidationStatus; +}; + +// @public +export interface RegionConfigurationRequest { + datacenterAddressRequest?: DatacenterAddressRequest; + scheduleAvailabilityRequest?: ScheduleAvailabilityRequestUnion; + transportAvailabilityRequest?: TransportAvailabilityRequest; +} + +// @public +export interface RegionConfigurationResponse { + readonly datacenterAddressResponse?: DatacenterAddressResponseUnion; + readonly scheduleAvailabilityResponse?: ScheduleAvailabilityResponse; + readonly transportAvailabilityResponse?: TransportAvailabilityResponse; +} + +// @public +export interface Resource { + identity?: ResourceIdentity; + location: string; + sku: Sku; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface ResourceIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type?: string; + userAssignedIdentities?: { + [propertyName: string]: UserAssignedIdentity; + }; +} + +// @public +export interface ScheduleAvailabilityRequest { + country?: string; + skuName: "DataBox" | "DataBoxDisk" | "DataBoxHeavy"; + storageLocation: string; +} + +// @public (undocumented) +export type ScheduleAvailabilityRequestUnion = ScheduleAvailabilityRequest | DataBoxScheduleAvailabilityRequest | DiskScheduleAvailabilityRequest | HeavyScheduleAvailabilityRequest; + +// @public +export interface ScheduleAvailabilityResponse { + readonly availableDates?: Date[]; +} + +// @public +export interface Service { + listAvailableSkusByResourceGroup(resourceGroupName: string, location: string, availableSkuRequest: AvailableSkuRequest, options?: ServiceListAvailableSkusByResourceGroupOptionalParams): PagedAsyncIterableIterator; + regionConfiguration(location: string, regionConfigurationRequest: RegionConfigurationRequest, options?: ServiceRegionConfigurationOptionalParams): Promise; + regionConfigurationByResourceGroup(resourceGroupName: string, location: string, regionConfigurationRequest: RegionConfigurationRequest, options?: ServiceRegionConfigurationByResourceGroupOptionalParams): Promise; + validateAddress(location: string, validateAddress: ValidateAddress, options?: ServiceValidateAddressOptionalParams): Promise; + validateInputs(location: string, validationRequest: ValidationRequestUnion, options?: ServiceValidateInputsOptionalParams): Promise; + validateInputsByResourceGroup(resourceGroupName: string, location: string, validationRequest: ValidationRequestUnion, options?: ServiceValidateInputsByResourceGroupOptionalParams): Promise; +} + +// @public +export interface ServiceListAvailableSkusByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ServiceListAvailableSkusByResourceGroupNextResponse = AvailableSkusResult; + +// @public +export interface ServiceListAvailableSkusByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ServiceListAvailableSkusByResourceGroupResponse = AvailableSkusResult; + +// @public +export interface ServiceRegionConfigurationByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ServiceRegionConfigurationByResourceGroupResponse = RegionConfigurationResponse; + +// @public +export interface ServiceRegionConfigurationOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ServiceRegionConfigurationResponse = RegionConfigurationResponse; + +// @public +export interface ServiceValidateAddressOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ServiceValidateAddressResponse = AddressValidationOutput; + +// @public +export interface ServiceValidateInputsByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ServiceValidateInputsByResourceGroupResponse = ValidationResponse; + +// @public +export interface ServiceValidateInputsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ServiceValidateInputsResponse = ValidationResponse; + +// @public +export interface ShareCredentialDetails { + readonly password?: string; + readonly shareName?: string; + readonly shareType?: ShareDestinationFormatType; + readonly supportedAccessProtocols?: AccessProtocol[]; + readonly userName?: string; +} + +// @public +export type ShareDestinationFormatType = "UnknownType" | "HCS" | "BlockBlob" | "PageBlob" | "AzureFile" | "ManagedDisk"; + +// @public +export interface ShipmentPickUpRequest { + endTime: Date; + shipmentLocation: string; + startTime: Date; +} + +// @public +export interface ShipmentPickUpResponse { + readonly confirmationNumber?: string; + readonly readyByTime?: Date; +} + +// @public +export interface ShippingAddress { + addressType?: AddressType; + city?: string; + companyName?: string; + country: string; + postalCode?: string; + stateOrProvince?: string; + streetAddress1: string; + streetAddress2?: string; + streetAddress3?: string; + zipExtendedCode?: string; +} + +// @public +export interface Sku { + displayName?: string; + family?: string; + name: SkuName; +} + +// @public +export type SkuAvailabilityValidationRequest = ValidationInputRequest & { + validationType: "ValidateSkuAvailability"; + deviceType: SkuName; + transferType: TransferType; + country: string; + location: string; +}; + +// @public +export type SkuAvailabilityValidationResponseProperties = ValidationInputResponse & { + validationType: "ValidateSkuAvailability"; + readonly status?: ValidationStatus; +}; + +// @public +export interface SkuCapacity { + readonly maximum?: string; + readonly usable?: string; +} + +// @public +export interface SkuCost { + readonly meterId?: string; + readonly meterType?: string; + readonly multiplier?: number; +} + +// @public +export type SkuDisabledReason = "None" | "Country" | "Region" | "Feature" | "OfferType" | "NoSubscriptionInfo"; + +// @public +export interface SkuInformation { + readonly apiVersions?: string[]; + readonly capacity?: SkuCapacity; + readonly costs?: SkuCost[]; + readonly dataLocationToServiceLocationMap?: DataLocationToServiceLocationMap[]; + readonly disabledReason?: SkuDisabledReason; + readonly disabledReasonMessage?: string; + readonly enabled?: boolean; + readonly requiredFeature?: string; + readonly sku?: Sku; +} + +// @public +export type SkuName = "DataBox" | "DataBoxDisk" | "DataBoxHeavy" | "DataBoxCustomerDisk"; + +// @public +export type StageName = string; + +// @public +export type StageStatus = "None" | "InProgress" | "Succeeded" | "Failed" | "Cancelled" | "Cancelling" | "SucceededWithErrors" | "WaitingForCustomerAction" | "SucceededWithWarnings" | "WaitingForCustomerActionForKek" | "WaitingForCustomerActionForCleanUp" | "CustomerActionPerformedForCleanUp"; + +// @public +export type StorageAccountDetails = DataAccountDetails & { + dataAccountType: "StorageAccount"; + storageAccountId: string; +}; + +// @public +export type SubscriptionIsAllowedToCreateJobValidationRequest = ValidationInputRequest & { + validationType: "ValidateSubscriptionIsAllowedToCreateJob"; +}; + +// @public +export type SubscriptionIsAllowedToCreateJobValidationResponseProperties = ValidationInputResponse & { + validationType: "ValidateSubscriptionIsAllowedToCreateJob"; + readonly status?: ValidationStatus; +}; + +// @public +export interface SystemData { + readonly createdAt?: Date; + readonly createdBy?: string; + readonly createdByType?: string; + readonly lastModifiedAt?: Date; + readonly lastModifiedBy?: string; + readonly lastModifiedByType?: string; +} + +// @public +export interface TransferAllDetails { + dataAccountType: DataAccountType; + transferAllBlobs?: boolean; + transferAllFiles?: boolean; +} + +// @public +export interface TransferConfiguration { + transferAllDetails?: TransferConfigurationTransferAllDetails; + transferConfigurationType: TransferConfigurationType; + transferFilterDetails?: TransferConfigurationTransferFilterDetails; +} + +// @public +export interface TransferConfigurationTransferAllDetails { + include?: TransferAllDetails; +} + +// @public +export interface TransferConfigurationTransferFilterDetails { + include?: TransferFilterDetails; +} + +// @public +export type TransferConfigurationType = "TransferAll" | "TransferUsingFilter"; + +// @public +export interface TransferFilterDetails { + azureFileFilterDetails?: AzureFileFilterDetails; + blobFilterDetails?: BlobFilterDetails; + dataAccountType: DataAccountType; + filterFileDetails?: FilterFileDetails[]; +} + +// @public +export type TransferType = "ImportToAzure" | "ExportFromAzure"; + +// @public +export interface TransportAvailabilityDetails { + readonly shipmentType?: TransportShipmentTypes; +} + +// @public +export interface TransportAvailabilityRequest { + skuName?: SkuName; +} + +// @public +export interface TransportAvailabilityResponse { + readonly transportAvailabilityDetails?: TransportAvailabilityDetails[]; +} + +// @public +export interface TransportPreferences { + preferredShipmentType: TransportShipmentTypes; +} + +// @public +export type TransportShipmentTypes = "CustomerManaged" | "MicrosoftManaged"; + +// @public +export interface UnencryptedCredentials { + readonly jobName?: string; + readonly jobSecrets?: JobSecretsUnion; +} + +// @public +export interface UnencryptedCredentialsList { + nextLink?: string; + value?: UnencryptedCredentials[]; +} + +// @public +export interface UpdateJobDetails { + contactDetails?: ContactDetails; + keyEncryptionKey?: KeyEncryptionKey; + returnToCustomerPackageDetails?: PackageCarrierDetails; + shippingAddress?: ShippingAddress; +} + +// @public +export interface UserAssignedIdentity { + readonly clientId?: string; + readonly principalId?: string; +} + +// @public +export interface UserAssignedProperties { + resourceId?: string; +} + +// @public +export type ValidateAddress = ValidationInputRequest & { + validationType: "ValidateAddress"; + shippingAddress: ShippingAddress; + deviceType: SkuName; + transportPreferences?: TransportPreferences; +}; + +// @public +export type ValidationInputDiscriminator = "ValidateAddress" | "ValidateSubscriptionIsAllowedToCreateJob" | "ValidatePreferences" | "ValidateCreateOrderLimit" | "ValidateSkuAvailability" | "ValidateDataTransferDetails"; + +// @public +export interface ValidationInputRequest { + validationType: "ValidateAddress" | "ValidateCreateOrderLimit" | "ValidateDataTransferDetails" | "ValidatePreferences" | "ValidateSkuAvailability" | "ValidateSubscriptionIsAllowedToCreateJob"; +} + +// @public (undocumented) +export type ValidationInputRequestUnion = ValidationInputRequest | ValidateAddress | CreateOrderLimitForSubscriptionValidationRequest | DataTransferDetailsValidationRequest | PreferencesValidationRequest | SkuAvailabilityValidationRequest | SubscriptionIsAllowedToCreateJobValidationRequest; + +// @public +export interface ValidationInputResponse { + readonly error?: CloudError; + validationType: "ValidateAddress" | "ValidateCreateOrderLimit" | "ValidateDataTransferDetails" | "ValidatePreferences" | "ValidateSkuAvailability" | "ValidateSubscriptionIsAllowedToCreateJob"; +} + +// @public (undocumented) +export type ValidationInputResponseUnion = ValidationInputResponse | AddressValidationProperties | CreateOrderLimitForSubscriptionValidationResponseProperties | DataTransferDetailsValidationResponseProperties | PreferencesValidationResponseProperties | SkuAvailabilityValidationResponseProperties | SubscriptionIsAllowedToCreateJobValidationResponseProperties; + +// @public +export interface ValidationRequest { + individualRequestDetails: ValidationInputRequestUnion[]; + validationCategory: "JobCreationValidation"; +} + +// @public (undocumented) +export type ValidationRequestUnion = ValidationRequest | CreateJobValidations; + +// @public +export interface ValidationResponse { + readonly individualResponseDetails?: ValidationInputResponseUnion[]; + readonly status?: OverallValidationStatus; +} + +// @public +export type ValidationStatus = "Valid" | "Invalid" | "Skipped"; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/databox/arm-databox/rollup.config.js b/sdk/databox/arm-databox/rollup.config.js index b5c16bd4ad21..9be1955eb7f1 100644 --- a/sdk/databox/arm-databox/rollup.config.js +++ b/sdk/databox/arm-databox/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/dataBoxManagementClient.js", - external: [ - "@azure/ms-rest-js", - "@azure/ms-rest-azure-js" - ], - output: { - file: "./dist/arm-databox.js", - format: "umd", - name: "Azure.ArmDatabox", - 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/databox/arm-databox/src/dataBoxManagementClient.ts b/sdk/databox/arm-databox/src/dataBoxManagementClient.ts index ef58e9ba9067..3f211a36f8e5 100644 --- a/sdk/databox/arm-databox/src/dataBoxManagementClient.ts +++ b/sdk/databox/arm-databox/src/dataBoxManagementClient.ts @@ -1,52 +1,130 @@ /* - * 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 coreClient from "@azure/core-client"; +import * as coreAuth from "@azure/core-auth"; +import { OperationsImpl, JobsImpl, ServiceImpl } from "./operations"; +import { Operations, Jobs, Service } from "./operationsInterfaces"; +import * as Parameters from "./models/parameters"; import * as Mappers from "./models/mappers"; -import * as operations from "./operations"; -import { DataBoxManagementClientContext } from "./dataBoxManagementClientContext"; +import { + DataBoxManagementClientOptionalParams, + MitigateJobRequest, + MitigateOptionalParams +} from "./models"; - -class DataBoxManagementClient extends DataBoxManagementClientContext { - // Operation groups - operations: operations.Operations; - jobs: operations.Jobs; - service: operations.Service; +export class DataBoxManagementClient extends coreClient.ServiceClient { + $host: string; + apiVersion: string; + subscriptionId: string; /** * Initializes a new instance of the DataBoxManagementClient 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.DataBoxManagementClientOptions) { - super(credentials, subscriptionId, options); - this.operations = new operations.Operations(this); - this.jobs = new operations.Jobs(this); - this.service = new operations.Service(this); + constructor( + credentials: coreAuth.TokenCredential, + subscriptionId: string, + options?: DataBoxManagementClientOptionalParams + ) { + 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: DataBoxManagementClientOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; + + const packageDetails = `azsdk-js-arm-databox/5.0.0-beta.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + + 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-08-01-preview"; + this.operations = new OperationsImpl(this); + this.jobs = new JobsImpl(this); + this.service = new ServiceImpl(this); } -} + /** + * Request to mitigate for a given job + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param resourceGroupName The Resource Group Name + * @param mitigateJobRequest Mitigation Request + * @param options The options parameters. + */ + mitigate( + jobName: string, + resourceGroupName: string, + mitigateJobRequest: MitigateJobRequest, + options?: MitigateOptionalParams + ): Promise { + return this.sendOperationRequest( + { jobName, resourceGroupName, mitigateJobRequest, options }, + mitigateOperationSpec + ); + } + + operations: Operations; + jobs: Jobs; + service: Service; +} // Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -export { - DataBoxManagementClient, - DataBoxManagementClientContext, - Models as DataBoxManagementModels, - Mappers as DataBoxManagementMappers +const mitigateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/mitigate", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + requestBody: Parameters.mitigateJobRequest, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.jobName, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer }; -export * from "./operations"; diff --git a/sdk/databox/arm-databox/src/dataBoxManagementClientContext.ts b/sdk/databox/arm-databox/src/dataBoxManagementClientContext.ts deleted file mode 100644 index dd8008144963..000000000000 --- a/sdk/databox/arm-databox/src/dataBoxManagementClientContext.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-databox"; -const packageVersion = "4.1.0"; - -export class DataBoxManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials | TokenCredential; - apiVersion?: string; - subscriptionId: string; - - /** - * Initializes a new instance of the DataBoxManagementClient 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.DataBoxManagementClientOptions) { - 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-09-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/databox/arm-databox/src/index.ts b/sdk/databox/arm-databox/src/index.ts new file mode 100644 index 000000000000..c84d7505578a --- /dev/null +++ b/sdk/databox/arm-databox/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 { DataBoxManagementClient } from "./dataBoxManagementClient"; +export * from "./operationsInterfaces"; diff --git a/sdk/databox/arm-databox/src/lroImpl.ts b/sdk/databox/arm-databox/src/lroImpl.ts new file mode 100644 index 000000000000..518d5f053b4e --- /dev/null +++ b/sdk/databox/arm-databox/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/databox/arm-databox/src/models/index.ts b/sdk/databox/arm-databox/src/models/index.ts index cb6886205c43..1786edc46313 100644 --- a/sdk/databox/arm-databox/src/models/index.ts +++ b/sdk/databox/arm-databox/src/models/index.ts @@ -1,2584 +1,2430 @@ /* - * 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"; - -export { BaseResource, CloudError }; +import * as coreClient from "@azure/core-client"; + +export type JobDetailsUnion = + | JobDetails + | DataBoxCustomerDiskJobDetails + | DataBoxDiskJobDetails + | DataBoxHeavyJobDetails + | DataBoxJobDetails; +export type DataAccountDetailsUnion = + | DataAccountDetails + | ManagedDiskDetails + | StorageAccountDetails; +export type CopyLogDetailsUnion = + | CopyLogDetails + | DataBoxAccountCopyLogDetails + | DataBoxCustomerDiskCopyLogDetails + | DataBoxDiskCopyLogDetails + | DataBoxHeavyAccountCopyLogDetails; +export type DatacenterAddressResponseUnion = + | DatacenterAddressResponse + | DatacenterAddressInstructionResponse + | DatacenterAddressLocationResponse; +export type ValidationInputRequestUnion = + | ValidationInputRequest + | ValidateAddress + | CreateOrderLimitForSubscriptionValidationRequest + | DataTransferDetailsValidationRequest + | PreferencesValidationRequest + | SkuAvailabilityValidationRequest + | SubscriptionIsAllowedToCreateJobValidationRequest; +export type ValidationInputResponseUnion = + | ValidationInputResponse + | AddressValidationProperties + | CreateOrderLimitForSubscriptionValidationResponseProperties + | DataTransferDetailsValidationResponseProperties + | PreferencesValidationResponseProperties + | SkuAvailabilityValidationResponseProperties + | SubscriptionIsAllowedToCreateJobValidationResponseProperties; +export type ValidationRequestUnion = ValidationRequest | CreateJobValidations; +export type JobSecretsUnion = + | JobSecrets + | CustomerDiskJobSecrets + | DataBoxDiskJobSecrets + | DataBoxHeavyJobSecrets + | DataboxJobSecrets; +export type ScheduleAvailabilityRequestUnion = + | ScheduleAvailabilityRequest + | DataBoxScheduleAvailabilityRequest + | DiskScheduleAvailabilityRequest + | HeavyScheduleAvailabilityRequest; + +/** Operation Collection. */ +export interface OperationList { + /** + * List of operations. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Operation[]; + /** Link for the next set of operations. */ + nextLink?: string; +} -/** - * Credential details of the shares in account. - */ -export interface ShareCredentialDetails { +/** Operation entity. */ +export interface Operation { /** - * Name of the share. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Name of the operation. Format: {resourceProviderNamespace}/{resourceType}/{read|write|delete|action} + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly shareName?: string; + readonly name?: string; /** - * Type of the share. Possible values include: 'UnknownType', 'HCS', 'BlockBlob', 'PageBlob', - * 'AzureFile', 'ManagedDisk' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Operation display values. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly shareType?: ShareDestinationFormatType; + readonly display?: OperationDisplay; /** - * User name for the share. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Operation properties. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly userName?: string; + readonly properties?: Record; /** - * Password for the share. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Origin of the operation. Can be : user|system|user,system + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly password?: string; + readonly origin?: string; + /** Indicates whether the operation is a data action */ + isDataAction?: boolean; +} + +/** Operation display */ +export interface OperationDisplay { + /** Provider name. */ + provider?: string; + /** Resource name. */ + resource?: string; + /** Localized name of the operation for display purpose. */ + operation?: string; + /** Localized description of the operation for display purpose. */ + description?: string; +} + +export interface ApiError { + error: ErrorDetail; +} + +export interface ErrorDetail { + code: string; + message: string; + details?: Details[]; + target?: string; +} + +export interface Details { + code: string; + message: string; +} + +/** Job Resource Collection */ +export interface JobResourceList { + /** List of job resources. */ + value?: JobResource[]; + /** Link for the next set of job resources. */ + nextLink?: string; +} + +/** Cloud error. */ +export interface CloudError { + /** Cloud error code. */ + code?: string; + /** Cloud error message. */ + message?: string; + /** Cloud error target. */ + target?: string; /** - * Access protocols supported on the device. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Cloud error details. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly supportedAccessProtocols?: AccessProtocol[]; + readonly details?: CloudError[]; + /** + * Cloud error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: AdditionalErrorInfo[]; } -/** - * Credential details of the account. - */ -export interface AccountCredentialDetails { +/** Additional error info. */ +export interface AdditionalErrorInfo { + /** Additional error type. */ + type?: string; + /** Additional error info. */ + info?: Record; +} + +/** Job details. */ +export interface JobDetails { + /** Polymorphic discriminator, which specifies the different types this object can be */ + jobDetailsType: + | "DataBoxCustomerDisk" + | "DataBoxDisk" + | "DataBoxHeavy" + | "DataBox"; /** - * Name of the account. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * List of stages that run in the job. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly accountName?: string; + readonly jobStages?: JobStages[]; + /** Contact details for notification and shipping. */ + contactDetails: ContactDetails; + /** Shipping address of the customer. */ + shippingAddress?: ShippingAddress; /** - * Data Destination Type. Possible values include: 'StorageAccount', 'ManagedDisk' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Delivery package shipping details. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly dataDestinationType?: DataDestinationType; + readonly deliveryPackage?: PackageShippingDetails; /** - * Connection string of the account endpoint to use the account as a storage endpoint on the - * device. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Return package shipping details. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly accountConnectionString?: string; + readonly returnPackage?: PackageShippingDetails; + /** Details of the data to be imported into azure. */ + dataImportDetails?: DataImportDetails[]; + /** Details of the data to be exported from azure. */ + dataExportDetails?: DataExportDetails[]; + /** Preferences for the order. */ + preferences?: Preferences; /** - * Per share level unencrypted access credentials. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * List of copy log details. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly shareCredentialDetails?: ShareCredentialDetails[]; -} - -/** - * Shipping address where customer wishes to receive the device. - */ -export interface ShippingAddress { + readonly copyLogDetails?: CopyLogDetailsUnion[]; /** - * Street Address line 1. + * Shared access key to download the return shipment label + * NOTE: This property will not be serialized. It can only be populated by the server. */ - streetAddress1: string; + readonly reverseShipmentLabelSasKey?: string; /** - * Street Address line 2. + * Shared access key to download the chain of custody logs + * NOTE: This property will not be serialized. It can only be populated by the server. */ - streetAddress2?: string; + readonly chainOfCustodySasKey?: string; + /** Details about which key encryption type is being used. */ + keyEncryptionKey?: KeyEncryptionKey; + /** The expected size of the data, which needs to be transferred in this job, in terabytes. */ + expectedDataSizeInTeraBytes?: number; /** - * Street Address line 3. + * Available actions on the job. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - streetAddress3?: string; + readonly actions?: CustomerResolutionCode[]; /** - * Name of the City. + * Last mitigation action performed on the job. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - city?: string; + readonly lastMitigationActionOnJob?: LastMitigationActionOnJob; /** - * Name of the State or Province. + * Datacenter address to ship to, for the given sku and storage location. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - stateOrProvince?: string; + readonly datacenterAddress?: DatacenterAddressResponseUnion; /** - * Name of the Country. + * DataCenter code. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - country: string; + readonly dataCenterCode?: DataCenterCode; +} + +/** Job stages. */ +export interface JobStages { /** - * Postal code. + * Name of the job stage. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - postalCode: string; + readonly stageName?: StageName; /** - * Extended Zip Code. + * Display name of the job stage. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - zipExtendedCode?: string; + readonly displayName?: string; /** - * Name of the company. + * Status of the job stage. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - companyName?: string; + readonly stageStatus?: StageStatus; + /** + * Time for the job stage in UTC ISO 8601 format. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly stageTime?: Date; /** - * Type of address. Possible values include: 'None', 'Residential', 'Commercial' + * Job Stage Details + * NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly jobStageDetails?: Record; +} + +/** Contact Details. */ +export interface ContactDetails { + /** Contact name of the person. */ + contactName: string; + /** Phone number of the contact person. */ + phone: string; + /** Phone extension number of the contact person. */ + phoneExtension?: string; + /** Mobile number of the contact person. */ + mobile?: string; + /** List of Email-ids to be notified about job progress. */ + emailList: string[]; + /** Notification preference for a job stage. */ + notificationPreference?: NotificationPreference[]; +} + +/** Notification preference for a job stage. */ +export interface NotificationPreference { + /** Name of the stage. */ + stageName: NotificationStageName; + /** Notification is required or not. */ + sendNotification: boolean; +} + +/** Shipping address where customer wishes to receive the device. */ +export interface ShippingAddress { + /** Street Address line 1. */ + streetAddress1: string; + /** Street Address line 2. */ + streetAddress2?: string; + /** Street Address line 3. */ + streetAddress3?: string; + /** Name of the City. */ + city?: string; + /** Name of the State or Province. */ + stateOrProvince?: string; + /** Name of the Country. */ + country: string; + /** Postal code. */ + postalCode?: string; + /** Extended Zip Code. */ + zipExtendedCode?: string; + /** Name of the company. */ + companyName?: string; + /** Type of address. */ addressType?: AddressType; } -/** - * Output of the address validation api. - */ -export interface AddressValidationOutput { +/** package shipping details */ +export interface PackageShippingDetails { /** - * Error code and message of validation response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Url where shipment can be tracked. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly error?: ErrorModel; + readonly trackingUrl?: string; /** - * Polymorphic Discriminator + * Name of the carrier. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - validationType: string; + readonly carrierName?: string; /** - * The address validation status. Possible values include: 'Valid', 'Invalid', 'Ambiguous' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Tracking Id of shipment. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly validationStatus?: AddressValidationStatus; + readonly trackingId?: string; +} + +/** Details of the data to be used for importing data to azure. */ +export interface DataImportDetails { + /** Account details of the data to be transferred */ + accountDetails: DataAccountDetailsUnion; + /** Level of the logs to be collected. */ + logCollectionLevel?: LogCollectionLevel; +} + +/** Account details of the data to be transferred */ +export interface DataAccountDetails { + /** Polymorphic discriminator, which specifies the different types this object can be */ + dataAccountType: "ManagedDisk" | "StorageAccount"; + /** Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+ */ + sharePassword?: string; +} + +/** Details of the data to be used for exporting data from azure. */ +export interface DataExportDetails { + /** Configuration for the data transfer. */ + transferConfiguration: TransferConfiguration; + /** Level of the logs to be collected. */ + logCollectionLevel?: LogCollectionLevel; + /** Account details of the data to be transferred */ + accountDetails: DataAccountDetailsUnion; +} + +/** Configuration for defining the transfer of data. */ +export interface TransferConfiguration { + /** Type of the configuration for transfer. */ + transferConfigurationType: TransferConfigurationType; + /** Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter. */ + transferFilterDetails?: TransferConfigurationTransferFilterDetails; + /** Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll */ + transferAllDetails?: TransferConfigurationTransferAllDetails; +} + +/** Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter. */ +export interface TransferConfigurationTransferFilterDetails { + /** Details of the filtering the transfer of data. */ + include?: TransferFilterDetails; +} + +/** Details of the filtering the transfer of data. */ +export interface TransferFilterDetails { + /** Type of the account of data. */ + dataAccountType: DataAccountType; + /** Filter details to transfer blobs. */ + blobFilterDetails?: BlobFilterDetails; + /** Filter details to transfer Azure files. */ + azureFileFilterDetails?: AzureFileFilterDetails; + /** Details of the filter files to be used for data transfer. */ + filterFileDetails?: FilterFileDetails[]; +} + +/** Filter details to transfer Azure Blobs */ +export interface BlobFilterDetails { + /** Prefix list of the Azure blobs to be transferred. */ + blobPrefixList?: string[]; + /** List of full path of the blobs to be transferred. */ + blobPathList?: string[]; + /** List of blob containers to be transferred. */ + containerList?: string[]; +} + +/** Filter details to transfer Azure files */ +export interface AzureFileFilterDetails { + /** Prefix list of the Azure files to be transferred. */ + filePrefixList?: string[]; + /** List of full path of the files to be transferred. */ + filePathList?: string[]; + /** List of file shares to be transferred. */ + fileShareList?: string[]; +} + +/** Details of the filter files to be used for data transfer. */ +export interface FilterFileDetails { + /** Type of the filter file. */ + filterFileType: FilterFileType; + /** Path of the file that contains the details of all items to transfer. */ + filterFilePath: string; +} + +/** Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll */ +export interface TransferConfigurationTransferAllDetails { + /** Details to transfer all data. */ + include?: TransferAllDetails; +} + +/** Details to transfer all data. */ +export interface TransferAllDetails { + /** Type of the account of data */ + dataAccountType: DataAccountType; + /** To indicate if all Azure blobs have to be transferred */ + transferAllBlobs?: boolean; + /** To indicate if all Azure Files have to be transferred */ + transferAllFiles?: boolean; +} + +/** Preferences related to the order */ +export interface Preferences { + /** Preferred data center region. */ + preferredDataCenterRegion?: string[]; + /** Preferences related to the shipment logistics of the sku. */ + transportPreferences?: TransportPreferences; + /** Preferences related to the Encryption. */ + encryptionPreferences?: EncryptionPreferences; +} + +/** Preferences related to the shipment logistics of the sku */ +export interface TransportPreferences { + /** Indicates Shipment Logistics type that the customer preferred. */ + preferredShipmentType: TransportShipmentTypes; +} + +/** Preferences related to the Encryption. */ +export interface EncryptionPreferences { + /** Defines secondary layer of software-based encryption enablement. */ + doubleEncryption?: DoubleEncryption; +} + +/** Details for log generated during copy. */ +export interface CopyLogDetails { + /** Polymorphic discriminator, which specifies the different types this object can be */ + copyLogDetailsType: + | "DataBox" + | "DataBoxCustomerDisk" + | "DataBoxDisk" + | "DataBoxHeavy"; +} + +/** Encryption key containing details about key to encrypt different keys. */ +export interface KeyEncryptionKey { + /** Type of encryption key used for key encryption. */ + kekType: KekType; + /** Managed identity properties used for key encryption. */ + identityProperties?: IdentityProperties; + /** Key encryption key. It is required in case of Customer managed KekType. */ + kekUrl?: string; + /** Kek vault resource id. It is required in case of Customer managed KekType. */ + kekVaultResourceID?: string; +} + +/** Managed identity properties. */ +export interface IdentityProperties { + /** Managed service identity type. */ + type?: string; + /** User assigned identity properties. */ + userAssigned?: UserAssignedProperties; +} + +/** User assigned identity properties. */ +export interface UserAssignedProperties { + /** Arm resource id for user assigned identity to be used to fetch MSI token. */ + resourceId?: string; +} + +/** Last Mitigation Action Performed On Job */ +export interface LastMitigationActionOnJob { + /** Action performed date time */ + actionDateTimeInUtc?: Date; /** - * List of alternate addresses. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Action performed by customer, + * possibility is that mitigation might happen by customer or service or by ops */ - readonly alternateAddresses?: ShippingAddress[]; + isPerformedByCustomer?: boolean; + /** Resolution code provided by customer */ + customerResolution?: CustomerResolutionCode; } -/** - * The Network Adapter configuration of a DataBox. - */ -export interface ApplianceNetworkConfiguration { +/** Datacenter address for given storage location. */ +export interface DatacenterAddressResponse { + /** Polymorphic discriminator, which specifies the different types this object can be */ + datacenterAddressType: + | "DatacenterAddressInstruction" + | "DatacenterAddressLocation"; /** - * Name of the network. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * List of supported carriers for return shipment. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly supportedCarriersForReturnShipment?: string[]; /** - * Mac Address. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Azure Location where the Data Center serves primarily. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly macAddress?: string; + readonly dataCenterAzureLocation?: string; } -/** - * Base class for all objects under resource. - */ -export interface ArmBaseObject { +/** Additional delivery info. */ +export interface JobDeliveryInfo { + /** Scheduled date time. */ + scheduledDateTime?: Date; +} + +/** Provides details about resource creation and update time */ +export interface SystemData { /** - * Name of the object. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * A string identifier for the identity that created the resource + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly createdBy?: string; /** - * Id of the object. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The type of identity that created the resource: user, application, managedIdentity + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly createdByType?: string; /** - * Type of the object. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The timestamp of resource creation (UTC) + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; -} - -/** - * The filters for showing the available skus. - */ -export interface AvailableSkuRequest { + readonly createdAt?: Date; /** - * ISO country code. Country for hardware shipment. For codes check: - * https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements + * A string identifier for the identity that last modified the resource + * NOTE: This property will not be serialized. It can only be populated by the server. */ - country: string; + readonly lastModifiedBy?: string; /** - * Location for data transfer. For locations check: - * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + * The type of identity that last modified the resource: user, application, managedIdentity + * NOTE: This property will not be serialized. It can only be populated by the server. */ - location: string; + readonly lastModifiedByType?: string; /** - * Sku Names to filter for available skus + * The timestamp of resource last modification (UTC) + * NOTE: This property will not be serialized. It can only be populated by the server. */ - skuNames?: SkuName[]; + readonly lastModifiedAt?: Date; } -/** - * The Sku. - */ +/** Model of the Resource. */ +export interface Resource { + /** The location of the resource. This will be one of the supported and registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a resource cannot be changed once it is created, but if an identical region is specified on update the request will succeed. */ + location: string; + /** The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). */ + tags?: { [propertyName: string]: string }; + /** The sku type. */ + sku: Sku; + /** Msi identity of the resource */ + identity?: ResourceIdentity; +} + +/** The Sku. */ export interface Sku { - /** - * The sku name. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' - */ + /** The sku name. */ name: SkuName; - /** - * The display name of the sku. - */ + /** The display name of the sku. */ displayName?: string; - /** - * The sku family. - */ + /** The sku family. */ family?: string; } -/** - * Map of destination location to service location. - */ -export interface DestinationToServiceLocationMap { +/** Msi identity details of the resource */ +export interface ResourceIdentity { + /** Identity type */ + type?: string; /** - * Location of the destination. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Service Principal Id backing the Msi + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly destinationLocation?: string; + readonly principalId?: string; /** - * Location of the service. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Home Tenant Id + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly serviceLocation?: string; + readonly tenantId?: string; + /** User Assigned Identities */ + userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentity }; } -/** - * Capacity of the sku. - */ -export interface SkuCapacity { +/** Class defining User assigned identity details. */ +export interface UserAssignedIdentity { /** - * Usable capacity in TB. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The principal id of user assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly usable?: string; + readonly principalId?: string; /** - * Maximum capacity in TB. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The client id of user assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly maximum?: string; + readonly clientId?: string; } -/** - * Describes metadata for retrieving price info. - */ -export interface SkuCost { - /** - * Meter id of the Sku. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly meterId?: string; +/** The Mitigate Job captured from request body for Mitigate API */ +export interface MitigateJobRequest { + /** Resolution code for the job */ + customerResolutionCode: CustomerResolutionCode; +} + +/** The request body to provide the delivery package details of job */ +export interface MarkDevicesShippedRequest { + /** Delivery package details */ + deliverToDcPackageDetails: PackageCarrierInfo; +} + +/** package carrier info */ +export interface PackageCarrierInfo { + /** Name of the carrier. */ + carrierName?: string; + /** Tracking Id of shipment. */ + trackingId?: string; +} + +/** The filters for showing the available skus. */ +export interface AvailableSkuRequest { + /** Type of the transfer. */ + transferType: TransferType; + /** ISO country code. Country for hardware shipment. For codes check: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements */ + country: string; + /** Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 */ + location: string; + /** Sku Names to filter for available skus */ + skuNames?: SkuName[]; +} + +/** The available skus operation response. */ +export interface AvailableSkusResult { /** - * The type of the meter. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * List of available skus. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly meterType?: string; + readonly value?: SkuInformation[]; + /** Link for the next set of skus. */ + nextLink?: string; } -/** - * Information of the sku. - */ +/** Information of the sku. */ export interface SkuInformation { /** * The Sku. - * **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 sku?: Sku; /** * The sku is enabled or not. - * **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 enabled?: boolean; /** - * The map of destination location to service location. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The map of data location to service location. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly destinationToServiceLocationMap?: DestinationToServiceLocationMap[]; + readonly dataLocationToServiceLocationMap?: DataLocationToServiceLocationMap[]; /** * Capacity of the Sku. - * **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 capacity?: SkuCapacity; /** * Cost of the Sku. - * **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 costs?: SkuCost[]; /** * Api versions that support this Sku. - * **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 apiVersions?: string[]; /** - * Reason why the Sku is disabled. Possible values include: 'None', 'Country', 'Region', - * 'Feature', 'OfferType', 'NoSubscriptionInfo' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Reason why the Sku is disabled. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly disabledReason?: SkuDisabledReason; /** * Message for why the Sku is disabled. - * **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 disabledReasonMessage?: string; /** * Required feature to access the sku. - * **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 requiredFeature?: string; } -/** - * Reason for cancellation. - */ -export interface CancellationReason { +/** Map of data location to service location */ +export interface DataLocationToServiceLocationMap { /** - * Reason for cancellation. + * Location of the data. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - reason: string; + readonly dataLocation?: string; + /** + * Location of the service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly serviceLocation?: string; } -/** - * Notification preference for a job stage. - */ -export interface NotificationPreference { +/** Capacity of the sku. */ +export interface SkuCapacity { /** - * Name of the stage. Possible values include: 'DevicePrepared', 'Dispatched', 'Delivered', - * 'PickedUp', 'AtAzureDC', 'DataCopy' + * Usable capacity in TB. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - stageName: NotificationStageName; + readonly usable?: string; /** - * Notification is required or not. + * Maximum capacity in TB. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - sendNotification: boolean; + readonly maximum?: string; } -/** - * Contact Details. - */ -export interface ContactDetails { +/** Describes metadata for retrieving price info. */ +export interface SkuCost { /** - * Contact name of the person. + * Meter id of the Sku. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - contactName: string; + readonly meterId?: string; /** - * Phone number of the contact person. + * The type of the meter. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - phone: string; + readonly meterType?: string; /** - * Phone extension number of the contact person. + * Multiplier specifies the region specific value to be multiplied with 1$ guid. Eg: Our new regions will be using 1$ shipping guid with appropriate multiplier specific to region. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - phoneExtension?: string; + readonly multiplier?: number; +} + +/** Minimum fields that must be present in any type of validation request. */ +export interface ValidationInputRequest { + /** Polymorphic discriminator, which specifies the different types this object can be */ + validationType: + | "ValidateAddress" + | "ValidateCreateOrderLimit" + | "ValidateDataTransferDetails" + | "ValidatePreferences" + | "ValidateSkuAvailability" + | "ValidateSubscriptionIsAllowedToCreateJob"; +} + +/** Output of the address validation api. */ +export interface AddressValidationOutput { + /** Identifies the type of validation response. */ + validationType?: ValidationInputDiscriminator; /** - * Mobile number of the contact person. + * Error code and message of validation response. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - mobile?: string; + readonly error?: CloudError; /** - * List of Email-ids to be notified about job progress. + * The address validation status. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - emailList: string[]; + readonly validationStatus?: AddressValidationStatus; /** - * Notification preference for a job stage. + * List of alternate addresses. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - notificationPreference?: NotificationPreference[]; + readonly alternateAddresses?: ShippingAddress[]; } -/** - * Contains the possible cases for CopyLogDetails. - */ -export type CopyLogDetailsUnion = CopyLogDetails | DataBoxAccountCopyLogDetails | DataBoxDiskCopyLogDetails | DataBoxHeavyAccountCopyLogDetails; - -/** - * Details for log generated during copy. - */ -export interface CopyLogDetails { +/** Minimum properties that should be present in each individual validation response. */ +export interface ValidationInputResponse { + /** Polymorphic discriminator, which specifies the different types this object can be */ + validationType: + | "ValidateAddress" + | "ValidateCreateOrderLimit" + | "ValidateDataTransferDetails" + | "ValidatePreferences" + | "ValidateSkuAvailability" + | "ValidateSubscriptionIsAllowedToCreateJob"; /** - * Polymorphic Discriminator + * Error code and message of validation response. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - copyLogDetailsType: "CopyLogDetails"; + readonly error?: CloudError; } -/** - * Copy progress. - */ -export interface CopyProgress { +/** Minimum request requirement of any validation category. */ +export interface ValidationRequest { + /** Polymorphic discriminator, which specifies the different types this object can be */ + validationCategory: "JobCreationValidation"; + /** List of request details contain validationType and its request as key and value respectively. */ + individualRequestDetails: ValidationInputRequestUnion[]; +} + +/** Response of pre job creation validations. */ +export interface ValidationResponse { /** - * Name of the storage account where the data needs to be uploaded. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Overall validation status. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly storageAccountName?: string; + readonly status?: OverallValidationStatus; /** - * Data Destination Type. Possible values include: 'StorageAccount', 'ManagedDisk' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * List of response details contain validationType and its response as key and value respectively. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly dataDestinationType?: DataDestinationType; + readonly individualResponseDetails?: ValidationInputResponseUnion[]; +} + +/** The JobResourceUpdateParameter. */ +export interface JobResourceUpdateParameter { + /** The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). */ + tags?: { [propertyName: string]: string }; + /** Msi identity of the resource */ + identity?: ResourceIdentity; + /** Details of a job to be updated. */ + details?: UpdateJobDetails; +} + +/** Job details for update. */ +export interface UpdateJobDetails { + /** Contact details for notification and shipping. */ + contactDetails?: ContactDetails; + /** Shipping address of the customer. */ + shippingAddress?: ShippingAddress; + /** Key encryption key for the job. */ + keyEncryptionKey?: KeyEncryptionKey; + /** Return package details of job. */ + returnToCustomerPackageDetails?: PackageCarrierDetails; +} + +/** Package carrier details. */ +export interface PackageCarrierDetails { + /** Carrier Account Number of customer for customer disk. */ + carrierAccountNumber?: string; + /** Name of the carrier. */ + carrierName?: string; + /** Tracking Id of shipment. */ + trackingId?: string; +} + +/** Shipment pick up request details. */ +export interface ShipmentPickUpRequest { + /** Minimum date after which the pick up should commence, this must be in local time of pick up area. */ + startTime: Date; + /** Maximum date before which the pick up should commence, this must be in local time of pick up area. */ + endTime: Date; + /** Shipment Location in the pickup place. Eg.front desk */ + shipmentLocation: string; +} + +/** Shipment pick up response. */ +export interface ShipmentPickUpResponse { /** - * Id of the account where the data needs to be uploaded. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Confirmation number for the pick up request. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly accountId?: string; + readonly confirmationNumber?: string; /** - * Amount of data uploaded by the job as of now. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Time by which shipment should be ready for pick up, this is in local time of pick up area. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly bytesSentToCloud?: number; + readonly readyByTime?: Date; +} + +/** Reason for cancellation. */ +export interface CancellationReason { + /** Reason for cancellation. */ + reason: string; +} + +/** List of unencrypted credentials for accessing device. */ +export interface UnencryptedCredentialsList { + /** List of unencrypted credentials. */ + value?: UnencryptedCredentials[]; + /** Link for the next set of unencrypted credentials. */ + nextLink?: string; +} + +/** Unencrypted credentials for accessing device. */ +export interface UnencryptedCredentials { /** - * Total amount of data to be processed by the job. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Name of the job. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly totalBytesToProcess?: number; + readonly jobName?: string; /** - * Number of files processed by the job as of now. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Secrets related to this job. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly filesProcessed?: number; + readonly jobSecrets?: JobSecretsUnion; +} + +/** The base class for the secrets */ +export interface JobSecrets { + /** Polymorphic discriminator, which specifies the different types this object can be */ + jobSecretsType: + | "DataBoxCustomerDisk" + | "DataBoxDisk" + | "DataBoxHeavy" + | "DataBox"; /** - * Total number of files to be processed by the job. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Dc Access Security Code for Customer Managed Shipping + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly totalFilesToProcess?: number; + readonly dcAccessSecurityCode?: DcAccessSecurityCode; /** - * Number of files not adhering to azure naming conventions which were processed by automatic - * renaming - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Error while fetching the secrets. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly invalidFilesProcessed?: number; + readonly error?: CloudError; +} + +/** Dc access security code */ +export interface DcAccessSecurityCode { + /** Reverse Dc access security code. */ + reverseDCAccessCode?: string; + /** Forward Dc access security code. */ + forwardDCAccessCode?: string; +} + +/** Request body to get the configuration for the region. */ +export interface RegionConfigurationRequest { + /** Request body to get the availability for scheduling orders. */ + scheduleAvailabilityRequest?: ScheduleAvailabilityRequestUnion; + /** Request body to get the transport availability for given sku. */ + transportAvailabilityRequest?: TransportAvailabilityRequest; + /** Request body to get the datacenter address for given sku. */ + datacenterAddressRequest?: DatacenterAddressRequest; +} + +/** Request body to get the availability for scheduling orders. */ +export interface ScheduleAvailabilityRequest { + /** Polymorphic discriminator, which specifies the different types this object can be */ + skuName: "DataBox" | "DataBoxDisk" | "DataBoxHeavy"; + /** Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 */ + storageLocation: string; + /** Country in which storage location should be supported. */ + country?: string; +} + +/** Request body to get the transport availability for given sku. */ +export interface TransportAvailabilityRequest { + /** Type of the device. */ + skuName?: SkuName; +} + +/** Request body to get the datacenter address. */ +export interface DatacenterAddressRequest { + /** Storage location. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 */ + storageLocation: string; + /** Sku Name for which the data center address requested. */ + skuName: SkuName; +} + +/** Configuration response specific to a region. */ +export interface RegionConfigurationResponse { /** - * Total amount of data not adhering to azure naming conventions which were processed by - * automatic renaming - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Schedule availability for given sku in a region. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly invalidFileBytesUploaded?: number; + readonly scheduleAvailabilityResponse?: ScheduleAvailabilityResponse; /** - * Number of folders not adhering to azure naming conventions which were processed by automatic - * renaming - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Transport options available for given sku in a region. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly renamedContainerCount?: number; + readonly transportAvailabilityResponse?: TransportAvailabilityResponse; /** - * Number of files which could not be copied - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Datacenter address for given sku in a region. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly filesErroredOut?: number; + readonly datacenterAddressResponse?: DatacenterAddressResponseUnion; } -/** - * Contains the possible cases for ValidationInputRequest. - */ -export type ValidationInputRequestUnion = ValidationInputRequest | CreateOrderLimitForSubscriptionValidationRequest | DataDestinationDetailsValidationRequest | PreferencesValidationRequest | SkuAvailabilityValidationRequest | SubscriptionIsAllowedToCreateJobValidationRequest | ValidateAddress; - -/** - * Minimum fields that must be present in any type of validation request. - */ -export interface ValidationInputRequest { +/** Schedule availability for given sku in a region. */ +export interface ScheduleAvailabilityResponse { /** - * Polymorphic Discriminator + * List of dates available to schedule + * NOTE: This property will not be serialized. It can only be populated by the server. */ - validationType: "ValidationInputRequest"; + readonly availableDates?: Date[]; } -/** - * Request to validate create order limit for current subscription. - */ -export interface CreateOrderLimitForSubscriptionValidationRequest { - /** - * Polymorphic Discriminator - */ - validationType: "ValidateCreateOrderLimit"; +/** Transport options available for given sku in a region. */ +export interface TransportAvailabilityResponse { /** - * Device type to be used for the job. Possible values include: 'DataBox', 'DataBoxDisk', - * 'DataBoxHeavy' + * List of transport availability details for given region + * NOTE: This property will not be serialized. It can only be populated by the server. */ - deviceType: SkuName; + readonly transportAvailabilityDetails?: TransportAvailabilityDetails[]; } -/** - * Contains the possible cases for ValidationInputResponse. - */ -export type ValidationInputResponseUnion = ValidationInputResponse | CreateOrderLimitForSubscriptionValidationResponseProperties | DataDestinationDetailsValidationResponseProperties | PreferencesValidationResponseProperties | SkuAvailabilityValidationResponseProperties | SubscriptionIsAllowedToCreateJobValidationResponseProperties; - -/** - * Minimum properties that should be present in each individual validation response. - */ -export interface ValidationInputResponse { - /** - * Polymorphic Discriminator - */ - validationType: "ValidationInputResponse"; +/** Transport options availability details for given region. */ +export interface TransportAvailabilityDetails { /** - * Error code and message of validation response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Transport Shipment Type supported for given region. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly error?: ErrorModel; + readonly shipmentType?: TransportShipmentTypes; } -/** - * Properties of create order limit for subscription validation response. - */ -export interface CreateOrderLimitForSubscriptionValidationResponseProperties { +/** Credential details of the account. */ +export interface AccountCredentialDetails { /** - * Polymorphic Discriminator + * Name of the account. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - validationType: "ValidateCreateOrderLimit"; + readonly accountName?: string; /** - * Error code and message of validation response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Type of the account. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly error?: ErrorModel; + readonly dataAccountType?: DataAccountType; /** - * Create order limit validation status. Possible values include: 'Valid', 'Invalid', 'Skipped' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Connection string of the account endpoint to use the account as a storage endpoint on the device. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: ValidationStatus; + readonly accountConnectionString?: string; + /** + * Per share level unencrypted access credentials. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly shareCredentialDetails?: ShareCredentialDetails[]; } -/** - * Copy log details for a storage account of a DataBox job - */ -export interface DataBoxAccountCopyLogDetails { +/** Credential details of the shares in account. */ +export interface ShareCredentialDetails { /** - * Polymorphic Discriminator + * Name of the share. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - copyLogDetailsType: "DataBox"; + readonly shareName?: string; /** - * Destination account name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Type of the share. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly accountName?: string; + readonly shareType?: ShareDestinationFormatType; /** - * Link for copy logs. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * User name for the share. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly copyLogLink?: string; -} - -/** - * Copy Log Details for a disk - */ -export interface DataBoxDiskCopyLogDetails { + readonly userName?: string; /** - * Polymorphic Discriminator + * Password for the share. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - copyLogDetailsType: "DataBoxDisk"; + readonly password?: string; /** - * Disk Serial Number. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Access protocols supported on the device. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly diskSerialNumber?: string; + readonly supportedAccessProtocols?: AccessProtocol[]; +} + +/** The Network Adapter configuration of a DataBox. */ +export interface ApplianceNetworkConfiguration { /** - * Link for copy error logs. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Name of the network. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorLogLink?: string; + readonly name?: string; /** - * Link for copy verbose logs. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Mac Address. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly verboseLogLink?: string; + readonly macAddress?: string; } -/** - * DataBox Disk Copy Progress - */ -export interface DataBoxDiskCopyProgress { - /** - * The serial number of the disk - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly serialNumber?: string; +/** Base class for all objects under resource. */ +export interface ArmBaseObject { /** - * Bytes copied during the copy of disk. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Name of the object. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly bytesCopied?: number; + readonly name?: string; /** - * Indicates the percentage completed for the copy of the disk. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Id of the object. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly percentComplete?: number; + readonly id?: string; /** - * The Status of the copy. Possible values include: 'NotStarted', 'InProgress', 'Completed', - * 'CompletedWithErrors', 'Failed', 'NotReturned', 'HardwareError', 'DeviceFormatted', - * 'DeviceMetadataModified', 'StorageAccountNotAccessible', 'UnsupportedData' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Type of the object. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: CopyStatus; + readonly type?: string; } -/** - * Contains the possible cases for JobDetails. - */ -export type JobDetailsUnion = JobDetails | DataBoxDiskJobDetails | DataBoxHeavyJobDetails | DataBoxJobDetails; - -/** - * Job details. - */ -export interface JobDetails { +/** Copy progress. */ +export interface CopyProgress { /** - * Polymorphic Discriminator + * Name of the storage account. This will be empty for data account types other than storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - jobDetailsType: "JobDetails"; + readonly storageAccountName?: string; /** - * The expected size of the data, which needs to be transferred in this job, in terabytes. + * Transfer type of data + * NOTE: This property will not be serialized. It can only be populated by the server. */ - expectedDataSizeInTerabytes?: number; + readonly transferType?: TransferType; /** - * List of stages that run in the job. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Data Account Type. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly jobStages?: JobStages[]; + readonly dataAccountType?: DataAccountType; /** - * Contact details for notification and shipping. + * Id of the account where the data needs to be uploaded. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - contactDetails: ContactDetails; + readonly accountId?: string; /** - * Shipping address of the customer. + * To indicate bytes transferred. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - shippingAddress: ShippingAddress; + readonly bytesProcessed?: number; /** - * Delivery package shipping details. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Total amount of data to be processed by the job. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly deliveryPackage?: PackageShippingDetails; + readonly totalBytesToProcess?: number; /** - * Return package shipping details. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Number of files processed + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly returnPackage?: PackageShippingDetails; + readonly filesProcessed?: number; /** - * Destination account details. + * Total files to process + * NOTE: This property will not be serialized. It can only be populated by the server. */ - destinationAccountDetails: DestinationAccountDetailsUnion[]; + readonly totalFilesToProcess?: number; /** - * Error details for failure. This is optional. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Number of files not adhering to azure naming conventions which were processed by automatic renaming + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorDetails?: JobErrorDetails[]; + readonly invalidFilesProcessed?: number; /** - * Preferences for the order. + * Total amount of data not adhering to azure naming conventions which were processed by automatic renaming + * NOTE: This property will not be serialized. It can only be populated by the server. */ - preferences?: Preferences; + readonly invalidFileBytesUploaded?: number; /** - * List of copy log details. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Number of folders not adhering to azure naming conventions which were processed by automatic renaming + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly copyLogDetails?: CopyLogDetailsUnion[]; + readonly renamedContainerCount?: number; /** - * Shared access key to download the return shipment label - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Number of files which could not be copied + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly reverseShipmentLabelSasKey?: string; + readonly filesErroredOut?: number; /** - * Shared access key to download the chain of custody logs - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * To indicate directories errored out in the job. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly chainOfCustodySasKey?: string; -} - -/** - * DataBox Disk Job Details. - */ -export interface DataBoxDiskJobDetails { + readonly directoriesErroredOut?: number; /** - * Polymorphic Discriminator + * To indicate directories renamed + * NOTE: This property will not be serialized. It can only be populated by the server. */ - jobDetailsType: "DataBoxDisk"; + readonly invalidDirectoriesProcessed?: number; /** - * The expected size of the data, which needs to be transferred in this job, in terabytes. + * To indicate if enumeration of data is in progress. + * Until this is true, the TotalBytesToProcess may not be valid. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - expectedDataSizeInTerabytes?: number; + readonly isEnumerationInProgress?: boolean; +} + +/** Import disk details */ +export interface ImportDiskDetails { + /** The relative path of the manifest file on the disk. */ + manifestFile: string; + /** The Base16-encoded MD5 hash of the manifest file on the disk. */ + manifestHash: string; + /** BitLocker key used to encrypt the disk. */ + bitLockerKey: string; /** - * List of stages that run in the job. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Path to backed up manifest, only returned if enableManifestBackup is true. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly jobStages?: JobStages[]; + readonly backupManifestCloudPath?: string; +} + +/** Export disk details */ +export interface ExportDiskDetails { /** - * Contact details for notification and shipping. + * The relative path of the manifest file on the disk. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - contactDetails: ContactDetails; + readonly manifestFile?: string; /** - * Shipping address of the customer. + * The Base16-encoded MD5 hash of the manifest file on the disk. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - shippingAddress: ShippingAddress; + readonly manifestHash?: string; /** - * Delivery package shipping details. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Path to backed up manifest, only returned if enableManifestBackup is true. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly deliveryPackage?: PackageShippingDetails; + readonly backupManifestCloudPath?: string; +} + +/** Contains all the secrets of a Disk. */ +export interface DiskSecret { /** - * Return package shipping details. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Serial number of the assigned disk. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly returnPackage?: PackageShippingDetails; + readonly diskSerialNumber?: string; /** - * Destination account details. + * Bit Locker key of the disk which can be used to unlock the disk to copy data. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - destinationAccountDetails: DestinationAccountDetailsUnion[]; + readonly bitLockerKey?: string; +} + +/** DataBox Disk Copy Progress */ +export interface DataBoxDiskCopyProgress { /** - * Error details for failure. This is optional. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The serial number of the disk + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorDetails?: JobErrorDetails[]; + readonly serialNumber?: string; /** - * Preferences for the order. + * Bytes copied during the copy of disk. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - preferences?: Preferences; + readonly bytesCopied?: number; /** - * List of copy log details. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Indicates the percentage completed for the copy of the disk. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly copyLogDetails?: CopyLogDetailsUnion[]; + readonly percentComplete?: number; /** - * Shared access key to download the return shipment label - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The Status of the copy + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly reverseShipmentLabelSasKey?: string; + readonly status?: CopyStatus; +} + +/** The secrets related to a databox heavy. */ +export interface DataBoxHeavySecret { /** - * Shared access key to download the chain of custody logs - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Serial number of the assigned device. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly chainOfCustodySasKey?: string; + readonly deviceSerialNumber?: string; /** - * User preference on what size disks are needed for the job. The map is from the disk size in TB - * to the count. Eg. {2,5} means 5 disks of 2 TB size. Key is string but will be checked against - * an int. + * Password for out of the box experience on device. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - preferredDisks?: { [propertyName: string]: number }; + readonly devicePassword?: string; /** - * Copy progress per disk. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Network configuration of the appliance. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly copyProgress?: DataBoxDiskCopyProgress[]; + readonly networkConfigurations?: ApplianceNetworkConfiguration[]; /** - * Contains the map of disk serial number to the disk size being used for the job. Is returned - * only after the disks are shipped to the customer. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The base 64 encoded public key to authenticate with the device + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly disksAndSizeDetails?: { [propertyName: string]: number }; + readonly encodedValidationCertPubKey?: string; /** - * User entered passkey for DataBox Disk job. + * Per account level access credentials. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - passkey?: string; + readonly accountCredentialDetails?: AccountCredentialDetails[]; } -/** - * Contains all the secrets of a Disk. - */ -export interface DiskSecret { +/** The secrets related to a DataBox. */ +export interface DataBoxSecret { /** - * Serial number of the assigned disk. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Serial number of the assigned device. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly diskSerialNumber?: string; + readonly deviceSerialNumber?: string; /** - * Bit Locker key of the disk which can be used to unlock the disk to copy data. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Password for out of the box experience on device. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly bitLockerKey?: string; -} - -/** - * Contains the possible cases for JobSecrets. - */ -export type JobSecretsUnion = JobSecrets | DataBoxDiskJobSecrets | DataBoxHeavyJobSecrets | DataboxJobSecrets; - -/** - * The base class for the secrets - */ -export interface JobSecrets { + readonly devicePassword?: string; /** - * Polymorphic Discriminator + * Network configuration of the appliance. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - jobSecretsType: "JobSecrets"; + readonly networkConfigurations?: ApplianceNetworkConfiguration[]; /** - * Dc Access Security Code for Customer Managed Shipping + * The base 64 encoded public key to authenticate with the device + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly encodedValidationCertPubKey?: string; + /** + * Per account level access credentials. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - dcAccessSecurityCode?: DcAccessSecurityCode; + readonly accountCredentialDetails?: AccountCredentialDetails[]; } -/** - * The secrets related to disk job. - */ -export interface DataBoxDiskJobSecrets { +/** Customer disk job details. */ +export type DataBoxCustomerDiskJobDetails = JobDetails & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + jobDetailsType: "DataBoxCustomerDisk"; + /** Contains the map of disk serial number to the disk details for import jobs. */ + importDiskDetailsCollection?: { [propertyName: string]: ImportDiskDetails }; /** - * Polymorphic Discriminator + * Contains the map of disk serial number to the disk details for export jobs. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - jobSecretsType: "DataBoxDisk"; + readonly exportDiskDetailsCollection?: { + [propertyName: string]: ExportDiskDetails; + }; /** - * Dc Access Security Code for Customer Managed Shipping + * Copy progress per disk. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - dcAccessSecurityCode?: DcAccessSecurityCode; + readonly copyProgress?: DataBoxCustomerDiskCopyProgress[]; /** - * Contains the list of secrets object for that device. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Delivery package shipping details. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly diskSecrets?: DiskSecret[]; + readonly deliverToDcPackageDetails?: PackageCarrierInfo; + /** Return package shipping details. */ + returnToCustomerPackageDetails: PackageCarrierDetails; + /** Flag to indicate if disk manifest should be backed-up in the Storage Account. */ + enableManifestBackup?: boolean; +}; + +/** DataBox Disk Job Details. */ +export type DataBoxDiskJobDetails = JobDetails & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + jobDetailsType: "DataBoxDisk"; + /** User preference on what size disks are needed for the job. The map is from the disk size in TB to the count. Eg. {2,5} means 5 disks of 2 TB size. Key is string but will be checked against an int. */ + preferredDisks?: { [propertyName: string]: number }; /** - * PassKey for the disk Job. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Copy progress per disk. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly passKey?: string; + readonly copyProgress?: DataBoxDiskCopyProgress[]; /** - * Whether passkey was provided by user. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Contains the map of disk serial number to the disk size being used for the job. Is returned only after the disks are shipped to the customer. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isPasskeyUserDefined?: boolean; -} + readonly disksAndSizeDetails?: { [propertyName: string]: number }; + /** User entered passkey for DataBox Disk job. */ + passkey?: string; +}; -/** - * Copy log details for a storage account for Databox heavy - */ -export interface DataBoxHeavyAccountCopyLogDetails { +/** Databox Heavy Device Job Details */ +export type DataBoxHeavyJobDetails = JobDetails & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + jobDetailsType: "DataBoxHeavy"; /** - * Polymorphic Discriminator + * Copy progress per account. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - copyLogDetailsType: "DataBoxHeavy"; + readonly copyProgress?: CopyProgress[]; + /** Set Device password for unlocking Databox Heavy. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+ */ + devicePassword?: string; +}; + +/** Databox Job Details */ +export type DataBoxJobDetails = JobDetails & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + jobDetailsType: "DataBox"; /** - * Destination account name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Copy progress per storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly accountName?: string; + readonly copyProgress?: CopyProgress[]; + /** Set Device password for unlocking Databox. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+ */ + devicePassword?: string; +}; + +/** Details of the managed disks. */ +export type ManagedDiskDetails = DataAccountDetails & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + dataAccountType: "ManagedDisk"; + /** Resource Group Id of the compute disks. */ + resourceGroupId: string; + /** Resource Id of the storage account that can be used to copy the vhd for staging. */ + stagingStorageAccountId: string; +}; + +/** Details for the storage account. */ +export type StorageAccountDetails = DataAccountDetails & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + dataAccountType: "StorageAccount"; + /** Storage Account Resource Id. */ + storageAccountId: string; +}; + +/** Copy log details for a storage account of a DataBox job */ +export type DataBoxAccountCopyLogDetails = CopyLogDetails & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + copyLogDetailsType: "DataBox"; /** - * Link for copy logs. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Account name. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly copyLogLink?: string[]; -} - -/** - * Databox Heavy Device Job Details - */ -export interface DataBoxHeavyJobDetails { + readonly accountName?: string; /** - * Polymorphic Discriminator + * Link for copy logs. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - jobDetailsType: "DataBoxHeavy"; + readonly copyLogLink?: string; /** - * The expected size of the data, which needs to be transferred in this job, in terabytes. + * Link for copy verbose logs. This will be set only when LogCollectionLevel is set to Verbose. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - expectedDataSizeInTerabytes?: number; + readonly copyVerboseLogLink?: string; +}; + +/** Copy Log Details for customer disk */ +export type DataBoxCustomerDiskCopyLogDetails = CopyLogDetails & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + copyLogDetailsType: "DataBoxCustomerDisk"; /** - * List of stages that run in the job. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Disk Serial Number. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly jobStages?: JobStages[]; + readonly serialNumber?: string; /** - * Contact details for notification and shipping. + * Link for copy error logs. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - contactDetails: ContactDetails; + readonly errorLogLink?: string; /** - * Shipping address of the customer. + * Link for copy verbose logs. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - shippingAddress: ShippingAddress; + readonly verboseLogLink?: string; +}; + +/** Copy Log Details for a disk */ +export type DataBoxDiskCopyLogDetails = CopyLogDetails & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + copyLogDetailsType: "DataBoxDisk"; /** - * Delivery package shipping details. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Disk Serial Number. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly deliveryPackage?: PackageShippingDetails; + readonly diskSerialNumber?: string; /** - * Return package shipping details. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Link for copy error logs. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly returnPackage?: PackageShippingDetails; + readonly errorLogLink?: string; /** - * Destination account details. + * Link for copy verbose logs. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - destinationAccountDetails: DestinationAccountDetailsUnion[]; + readonly verboseLogLink?: string; +}; + +/** Copy log details for a storage account for Databox heavy */ +export type DataBoxHeavyAccountCopyLogDetails = CopyLogDetails & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + copyLogDetailsType: "DataBoxHeavy"; /** - * Error details for failure. This is optional. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Account name. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorDetails?: JobErrorDetails[]; + readonly accountName?: string; /** - * Preferences for the order. + * Link for copy logs. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - preferences?: Preferences; + readonly copyLogLink?: string[]; /** - * List of copy log details. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Link for copy verbose logs. This will be set only when the LogCollectionLevel is set to verbose. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly copyLogDetails?: CopyLogDetailsUnion[]; + readonly copyVerboseLogLink?: string[]; +}; + +/** Datacenter instruction for given storage location. */ +export type DatacenterAddressInstructionResponse = DatacenterAddressResponse & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + datacenterAddressType: "DatacenterAddressInstruction"; /** - * Shared access key to download the return shipment label - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Data center communication instruction + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly reverseShipmentLabelSasKey?: string; + readonly communicationInstruction?: string; +}; + +/** Datacenter address for given storage location. */ +export type DatacenterAddressLocationResponse = DatacenterAddressResponse & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + datacenterAddressType: "DatacenterAddressLocation"; /** - * Shared access key to download the chain of custody logs - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Contact person name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly chainOfCustodySasKey?: string; + readonly contactPersonName?: string; /** - * Copy progress per account. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Company name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly copyProgress?: CopyProgress[]; + readonly company?: string; /** - * Set Device password for unlocking Databox Heavy + * Street address line 1 + * NOTE: This property will not be serialized. It can only be populated by the server. */ - devicePassword?: string; -} - -/** - * The secrets related to a databox heavy. - */ -export interface DataBoxHeavySecret { + readonly street1?: string; /** - * Serial number of the assigned device. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Street address line 2 + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly deviceSerialNumber?: string; + readonly street2?: string; /** - * Password for out of the box experience on device. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Street address line 3 + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly devicePassword?: string; + readonly street3?: string; /** - * Network configuration of the appliance. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * City name + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly networkConfigurations?: ApplianceNetworkConfiguration[]; + readonly city?: string; /** - * The base 64 encoded public key to authenticate with the device - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * name of the state + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly encodedValidationCertPubKey?: string; + readonly state?: string; /** - * Per account level access credentials. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Zip code + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly accountCredentialDetails?: AccountCredentialDetails[]; -} - -/** - * The secrets related to a databox heavy job. - */ -export interface DataBoxHeavyJobSecrets { + readonly zip?: string; /** - * Polymorphic Discriminator + * name of the country + * NOTE: This property will not be serialized. It can only be populated by the server. */ - jobSecretsType: "DataBoxHeavy"; + readonly country?: string; /** - * Dc Access Security Code for Customer Managed Shipping + * Phone number + * NOTE: This property will not be serialized. It can only be populated by the server. */ - dcAccessSecurityCode?: DcAccessSecurityCode; + readonly phone?: string; /** - * Contains the list of secret objects for a databox heavy job. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Phone extension + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly cabinetPodSecrets?: DataBoxHeavySecret[]; -} - -/** - * Databox Job Details - */ -export interface DataBoxJobDetails { + readonly phoneExtension?: string; /** - * Polymorphic Discriminator + * Address type + * NOTE: This property will not be serialized. It can only be populated by the server. */ - jobDetailsType: "DataBox"; + readonly addressType?: string; /** - * The expected size of the data, which needs to be transferred in this job, in terabytes. + * Special instruction for shipping + * NOTE: This property will not be serialized. It can only be populated by the server. */ - expectedDataSizeInTerabytes?: number; + readonly additionalShippingInformation?: string; +}; + +/** Job Resource. */ +export type JobResource = Resource & { /** - * List of stages that run in the job. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Name of the object. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly jobStages?: JobStages[]; + readonly name?: string; /** - * Contact details for notification and shipping. + * Id of the object. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - contactDetails: ContactDetails; + readonly id?: string; /** - * Shipping address of the customer. + * Type of the object. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - shippingAddress: ShippingAddress; + readonly type?: string; /** - * Delivery package shipping details. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly deliveryPackage?: PackageShippingDetails; + readonly systemData?: SystemData; + /** Type of the data transfer. */ + transferType: TransferType; /** - * Return package shipping details. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Describes whether the job is cancellable or not. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly returnPackage?: PackageShippingDetails; + readonly isCancellable?: boolean; /** - * Destination account details. + * Describes whether the job is deletable or not. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - destinationAccountDetails: DestinationAccountDetailsUnion[]; + readonly isDeletable?: boolean; /** - * Error details for failure. This is optional. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Describes whether the shipping address is editable or not. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorDetails?: JobErrorDetails[]; + readonly isShippingAddressEditable?: boolean; /** - * Preferences for the order. + * Is Prepare To Ship Enabled on this job + * NOTE: This property will not be serialized. It can only be populated by the server. */ - preferences?: Preferences; + readonly isPrepareToShipEnabled?: boolean; /** - * List of copy log details. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Name of the stage which is in progress. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly copyLogDetails?: CopyLogDetailsUnion[]; + readonly status?: StageName; /** - * Shared access key to download the return shipment label - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Time at which the job was started in UTC ISO 8601 format. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly reverseShipmentLabelSasKey?: string; + readonly startTime?: Date; /** - * Shared access key to download the chain of custody logs - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Top level error for the job. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly chainOfCustodySasKey?: string; + readonly error?: CloudError; + /** Details of a job run. This field will only be sent for expand details filter. */ + details?: JobDetailsUnion; /** - * Copy progress per storage account. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Reason for cancellation. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly copyProgress?: CopyProgress[]; + readonly cancellationReason?: string; + /** Delivery type of Job. */ + deliveryType?: JobDeliveryType; + /** Delivery Info of Job. */ + deliveryInfo?: JobDeliveryInfo; /** - * Set Device password for unlocking Databox - */ - devicePassword?: string; -} - -/** - * The secrets related to a DataBox. - */ -export interface DataBoxSecret { - /** - * Serial number of the assigned device. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deviceSerialNumber?: string; - /** - * Password for out of the box experience on device. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly devicePassword?: string; - /** - * Network configuration of the appliance. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly networkConfigurations?: ApplianceNetworkConfiguration[]; - /** - * The base 64 encoded public key to authenticate with the device - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly encodedValidationCertPubKey?: string; - /** - * Per account level access credentials. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly accountCredentialDetails?: AccountCredentialDetails[]; -} - -/** - * The secrets related to a databox job. - */ -export interface DataboxJobSecrets { - /** - * Polymorphic Discriminator - */ - jobSecretsType: "DataBox"; - /** - * Dc Access Security Code for Customer Managed Shipping - */ - dcAccessSecurityCode?: DcAccessSecurityCode; - /** - * Contains the list of secret objects for a job. - */ - podSecrets?: DataBoxSecret[]; -} - -/** - * Contains the possible cases for ScheduleAvailabilityRequest. - */ -export type ScheduleAvailabilityRequestUnion = ScheduleAvailabilityRequest | DataBoxScheduleAvailabilityRequest | DiskScheduleAvailabilityRequest | HeavyScheduleAvailabilityRequest; - -/** - * Request body to get the availability for scheduling orders. - */ -export interface ScheduleAvailabilityRequest { - /** - * Polymorphic Discriminator - */ - skuName: "ScheduleAvailabilityRequest"; - /** - * Location for data transfer. - * For locations check: - * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 - */ - storageLocation: string; -} - -/** - * Request body to get the availability for scheduling data box orders orders. - */ -export interface DataBoxScheduleAvailabilityRequest { - /** - * Polymorphic Discriminator - */ - skuName: "DataBox"; - /** - * Location for data transfer. - * For locations check: - * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 - */ - storageLocation: string; -} - -/** - * Contains the possible cases for DestinationAccountDetails. - */ -export type DestinationAccountDetailsUnion = DestinationAccountDetails | DestinationManagedDiskDetails | DestinationStorageAccountDetails; - -/** - * Details of the destination storage accounts. - */ -export interface DestinationAccountDetails { - /** - * Polymorphic Discriminator - */ - dataDestinationType: "DestinationAccountDetails"; - /** - * Arm Id of the destination where the data has to be moved. - */ - accountId?: string; - /** - * Share password to be shared by all shares in SA. - */ - sharePassword?: string; -} - -/** - * Request to validate data destination details. - */ -export interface DataDestinationDetailsValidationRequest { - /** - * Polymorphic Discriminator - */ - validationType: "ValidateDataDestinationDetails"; - /** - * Destination account details list. - */ - destinationAccountDetails: DestinationAccountDetailsUnion[]; - /** - * Location of stamp or geo. - */ - location: string; -} - -/** - * Properties of data destination details validation response. - */ -export interface DataDestinationDetailsValidationResponseProperties { - /** - * Polymorphic Discriminator - */ - validationType: "ValidateDataDestinationDetails"; - /** - * Error code and message of validation response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly error?: ErrorModel; - /** - * Data destination details validation status. Possible values include: 'Valid', 'Invalid', - * 'Skipped' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly status?: ValidationStatus; -} - -/** - * Dc Access Security code for device. - */ -export interface DcAccessSecurityCode { - /** - * Dc Access Code for dispatching from DC. - */ - forwardDcAccessCode?: string; - /** - * Dc Access code for dropping off at DC. - */ - reverseDcAccessCode?: string; -} - -/** - * Details for the destination compute disks. - */ -export interface DestinationManagedDiskDetails { - /** - * Polymorphic Discriminator - */ - dataDestinationType: "ManagedDisk"; - /** - * Arm Id of the destination where the data has to be moved. - */ - accountId?: string; - /** - * Share password to be shared by all shares in SA. - */ - sharePassword?: string; - /** - * Destination Resource Group Id where the Compute disks should be created. - */ - resourceGroupId: string; - /** - * Arm Id of the storage account that can be used to copy the vhd for staging. - */ - stagingStorageAccountId: string; -} - -/** - * Details for the destination storage account. - */ -export interface DestinationStorageAccountDetails { - /** - * Polymorphic Discriminator - */ - dataDestinationType: "StorageAccount"; - /** - * Arm Id of the destination where the data has to be moved. - */ - accountId?: string; - /** - * Share password to be shared by all shares in SA. - */ - sharePassword?: string; - /** - * Destination Storage Account Arm Id. - */ - storageAccountId: string; -} - -/** - * Request body to get the availability for scheduling disk orders. - */ -export interface DiskScheduleAvailabilityRequest { - /** - * Polymorphic Discriminator - */ - skuName: "DataBoxDisk"; - /** - * Location for data transfer. - * For locations check: - * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 - */ - storageLocation: string; - /** - * The expected size of the data, which needs to be transferred in this job, in terabytes. - */ - expectedDataSizeInTerabytes: number; -} - -/** - * Top level error for the job. - */ -export interface ErrorModel { - /** - * Error code that can be used to programmatically identify the error. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly code?: string; - /** - * Describes the error in detail and provides debugging information. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly message?: string; -} - -/** - * Request body to get the availability for scheduling heavy orders. - */ -export interface HeavyScheduleAvailabilityRequest { - /** - * Polymorphic Discriminator - */ - skuName: "DataBoxHeavy"; - /** - * Location for data transfer. - * For locations check: - * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 - */ - storageLocation: string; -} - -/** - * Additional delivery info. - */ -export interface JobDeliveryInfo { - /** - * Scheduled date time. - */ - scheduledDateTime?: Date; -} - -/** - * Job Error Details for providing the information and recommended action. - */ -export interface JobErrorDetails { - /** - * Message for the error. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly errorMessage?: string; - /** - * Code for the error. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly errorCode?: number; - /** - * Recommended action for the error. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly recommendedAction?: string; - /** - * Contains the non localized exception message - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly exceptionMessage?: string; -} - -/** - * Job stages. - */ -export interface JobStages { - /** - * Name of the job stage. Possible values include: 'DeviceOrdered', 'DevicePrepared', - * 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', 'DataCopy', 'Completed', - * 'CompletedWithErrors', 'Cancelled', 'Failed_IssueReportedAtCustomer', - * 'Failed_IssueDetectedAtAzureDC', 'Aborted', 'CompletedWithWarnings', - * 'ReadyToDispatchFromAzureDC', 'ReadyToReceiveAtAzureDC' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly stageName?: StageName; - /** - * Display name of the job stage. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly displayName?: string; - /** - * Status of the job stage. Possible values include: 'None', 'InProgress', 'Succeeded', 'Failed', - * 'Cancelled', 'Cancelling', 'SucceededWithErrors' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly stageStatus?: StageStatus; - /** - * Time for the job stage in UTC ISO 8601 format. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly stageTime?: Date; - /** - * Job Stage Details - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly jobStageDetails?: any; - /** - * Error details for the stage. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly errorDetails?: JobErrorDetails[]; -} - -/** - * Shipping details. - */ -export interface PackageShippingDetails { - /** - * Name of the carrier. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly carrierName?: string; - /** - * Tracking Id of shipment. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly trackingId?: string; - /** - * Url where shipment can be tracked. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly trackingUrl?: string; -} - -/** - * Preferences related to the shipment logistics of the sku - */ -export interface TransportPreferences { - /** - * Indicates Shipment Logistics type that the customer preferred. Possible values include: - * 'CustomerManaged', 'MicrosoftManaged' - */ - preferredShipmentType: TransportShipmentTypes; -} - -/** - * Preferences related to the order - */ -export interface Preferences { - /** - * Preferred Data Center Region. - */ - preferredDataCenterRegion?: string[]; - /** - * Preferences related to the shipment logistics of the sku. - */ - transportPreferences?: TransportPreferences; -} - -/** - * Model of the Resource. - */ -export interface Resource extends BaseResource { - /** - * The location of the resource. This will be one of the supported and registered Azure Regions - * (e.g. West US, East US, Southeast Asia, etc.). The region of a resource cannot be changed once - * it is created, but if an identical region is specified on update the request will succeed. - */ - location: string; - /** - * The list of key value pairs that describe the resource. These tags can be used in viewing and - * grouping this resource (across resource groups). - */ - tags?: { [propertyName: string]: string }; - /** - * The sku type. - */ - sku: Sku; -} - -/** - * Job Resource. - */ -export interface JobResource extends Resource { - /** - * Describes whether the job is cancellable or not. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly isCancellable?: boolean; - /** - * Describes whether the job is deletable or not. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly isDeletable?: boolean; - /** - * Describes whether the shipping address is editable or not. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly isShippingAddressEditable?: boolean; - /** - * Name of the stage which is in progress. Possible values include: 'DeviceOrdered', - * 'DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', 'DataCopy', 'Completed', - * 'CompletedWithErrors', 'Cancelled', 'Failed_IssueReportedAtCustomer', - * 'Failed_IssueDetectedAtAzureDC', 'Aborted', 'CompletedWithWarnings', - * 'ReadyToDispatchFromAzureDC', 'ReadyToReceiveAtAzureDC' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly status?: StageName; - /** - * Time at which the job was started in UTC ISO 8601 format. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly startTime?: Date; - /** - * Top level error for the job. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly error?: ErrorModel; - /** - * Details of a job run. This field will only be sent for expand details filter. - */ - details?: JobDetailsUnion; - /** - * Reason for cancellation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly cancellationReason?: string; - /** - * Delivery type of Job. Possible values include: 'NonScheduled', 'Scheduled' - */ - deliveryType?: JobDeliveryType; - /** - * Delivery Info of Job. - */ - deliveryInfo?: JobDeliveryInfo; - /** - * Flag to indicate cancellation of scheduled job. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Flag to indicate cancellation of scheduled job. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly isCancellableWithoutFee?: boolean; - /** - * Name of the object. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Id of the object. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Type of the object. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; -} - -/** - * Job details for update. - */ -export interface UpdateJobDetails { - /** - * Contact details for notification and shipping. - */ - contactDetails?: ContactDetails; - /** - * Shipping address of the customer. - */ - shippingAddress?: ShippingAddress; -} +}; -/** - * The JobResourceUpdateParameter. - */ -export interface JobResourceUpdateParameter { - /** - * Details of a job to be updated. - */ - details?: UpdateJobDetails; - /** - * Destination account details. - */ - destinationAccountDetails?: DestinationAccountDetailsUnion[]; - /** - * The list of key value pairs that describe the resource. These tags can be used in viewing and - * grouping this resource (across resource groups). - */ - tags?: { [propertyName: string]: string }; -} +/** The requirements to validate customer address where the device needs to be shipped. */ +export type ValidateAddress = ValidationInputRequest & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + validationType: "ValidateAddress"; + /** Shipping address of the customer. */ + shippingAddress: ShippingAddress; + /** Device type to be used for the job. */ + deviceType: SkuName; + /** Preferences related to the shipment logistics of the sku. */ + transportPreferences?: TransportPreferences; +}; -/** - * Operation display - */ -export interface OperationDisplay { - /** - * Provider name. - */ - provider?: string; - /** - * Resource name. - */ - resource?: string; - /** - * Localized name of the operation for display purpose. - */ - operation?: string; - /** - * Localized description of the operation for display purpose. - */ - description?: string; -} +/** Request to validate create order limit for current subscription. */ +export type CreateOrderLimitForSubscriptionValidationRequest = ValidationInputRequest & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + validationType: "ValidateCreateOrderLimit"; + /** Device type to be used for the job. */ + deviceType: SkuName; +}; -/** - * Operation entity. - */ -export interface Operation { - /** - * Name of the operation. Format: - * {resourceProviderNamespace}/{resourceType}/{read|write|delete|action} - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Operation display values. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly display?: OperationDisplay; - /** - * Operation properties. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly properties?: any; - /** - * Origin of the operation. Can be : user|system|user,system - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly origin?: string; -} +/** Request to validate export and import data details. */ +export type DataTransferDetailsValidationRequest = ValidationInputRequest & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + validationType: "ValidateDataTransferDetails"; + /** List of DataTransfer details to be used to export data from azure. */ + dataExportDetails?: DataExportDetails[]; + /** List of DataTransfer details to be used to import data to azure. */ + dataImportDetails?: DataImportDetails[]; + /** Device type. */ + deviceType: SkuName; + /** Type of the transfer. */ + transferType: TransferType; +}; -/** - * Request to validate preference of transport and data center. - */ -export interface PreferencesValidationRequest { - /** - * Polymorphic Discriminator - */ +/** Request to validate preference of transport and data center. */ +export type PreferencesValidationRequest = ValidationInputRequest & { + /** Polymorphic discriminator, which specifies the different types this object can be */ validationType: "ValidatePreferences"; - /** - * Preference requested with respect to transport type and data center - */ + /** Preference of transport and data center. */ preference?: Preferences; - /** - * Device type to be used for the job. Possible values include: 'DataBox', 'DataBoxDisk', - * 'DataBoxHeavy' - */ + /** Device type to be used for the job. */ deviceType: SkuName; -} - -/** - * Properties of data center and transport preference validation response. - */ -export interface PreferencesValidationResponseProperties { - /** - * Polymorphic Discriminator - */ - validationType: "ValidatePreferences"; - /** - * Error code and message of validation response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly error?: ErrorModel; - /** - * Validation status of requested data center and transport. Possible values include: 'Valid', - * 'Invalid', 'Skipped' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly status?: ValidationStatus; -} - -/** - * Request body to get the transport availability for given sku. - */ -export interface TransportAvailabilityRequest { - /** - * Type of the device. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' - */ - skuName?: SkuName; -} - -/** - * Request body to get the configuration for the region. - */ -export interface RegionConfigurationRequest { - /** - * Request body to get the availability for scheduling orders. - */ - scheduleAvailabilityRequest?: ScheduleAvailabilityRequestUnion; - /** - * Request body to get the transport availability for given sku. - */ - transportAvailabilityRequest?: TransportAvailabilityRequest; -} - -/** - * Schedule availability response for given sku in a region. - */ -export interface ScheduleAvailabilityResponse { - /** - * List of dates available to schedule - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly availableDates?: Date[] | string[]; -} - -/** - * Transport options availability details for given region. - */ -export interface TransportAvailabilityDetails { - /** - * Transport Shipment Type supported for given region. Possible values include: - * 'CustomerManaged', 'MicrosoftManaged' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly shipmentType?: TransportShipmentTypes; -} - -/** - * Transport options available for given sku in a region. - */ -export interface TransportAvailabilityResponse { - /** - * List of transport availability details for given region - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly transportAvailabilityDetails?: TransportAvailabilityDetails[]; -} - -/** - * Configuration response specific to a region. - */ -export interface RegionConfigurationResponse { - /** - * Schedule availability for given sku in a region. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scheduleAvailabilityResponse?: ScheduleAvailabilityResponse; - /** - * Transport options available for given sku in a region. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly transportAvailabilityResponse?: TransportAvailabilityResponse; -} - -/** - * Shipment pick up request details. - */ -export interface ShipmentPickUpRequest { - /** - * Minimum date after which the pick up should commence, this must be in local time of pick up - * area. - */ - startTime: Date; - /** - * Maximum date before which the pick up should commence, this must be in local time of pick up - * area. - */ - endTime: Date; - /** - * Shipment Location in the pickup place. Eg.front desk - */ - shipmentLocation: string; -} - -/** - * Shipment pick up response. - */ -export interface ShipmentPickUpResponse { - /** - * Confirmation number for the pick up request. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly confirmationNumber?: string; - /** - * Time by which shipment should be ready for pick up, this is in local time of pick up area. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly readyByTime?: Date; -} +}; -/** - * Request to validate sku availability. - */ -export interface SkuAvailabilityValidationRequest { - /** - * Polymorphic Discriminator - */ +/** Request to validate sku availability. */ +export type SkuAvailabilityValidationRequest = ValidationInputRequest & { + /** Polymorphic discriminator, which specifies the different types this object can be */ validationType: "ValidateSkuAvailability"; - /** - * Device type to be used for the job. Possible values include: 'DataBox', 'DataBoxDisk', - * 'DataBoxHeavy' - */ + /** Device type to be used for the job. */ deviceType: SkuName; - /** - * ISO country code. Country for hardware shipment. For codes check: - * https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - */ + /** Type of the transfer. */ + transferType: TransferType; + /** ISO country code. Country for hardware shipment. For codes check: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements */ country: string; - /** - * Location for data transfer. For locations check: - * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 - */ + /** Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 */ location: string; -} - -/** - * Properties of sku availability validation response. - */ -export interface SkuAvailabilityValidationResponseProperties { - /** - * Polymorphic Discriminator - */ - validationType: "ValidateSkuAvailability"; - /** - * Error code and message of validation response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly error?: ErrorModel; - /** - * Sku availability validation status. Possible values include: 'Valid', 'Invalid', 'Skipped' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly status?: ValidationStatus; -} - -/** - * Request to validate subscription permission to create jobs. - */ -export interface SubscriptionIsAllowedToCreateJobValidationRequest { - /** - * Polymorphic Discriminator - */ - validationType: "ValidateSubscriptionIsAllowedToCreateJob"; -} +}; -/** - * Properties of subscription permission to create job validation response. - */ -export interface SubscriptionIsAllowedToCreateJobValidationResponseProperties { - /** - * Polymorphic Discriminator - */ +/** Request to validate subscription permission to create jobs. */ +export type SubscriptionIsAllowedToCreateJobValidationRequest = ValidationInputRequest & { + /** Polymorphic discriminator, which specifies the different types this object can be */ validationType: "ValidateSubscriptionIsAllowedToCreateJob"; - /** - * Error code and message of validation response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly error?: ErrorModel; - /** - * Validation status of subscription permission to create job. Possible values include: 'Valid', - * 'Invalid', 'Skipped' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly status?: ValidationStatus; -} - -/** - * Unencrypted credentials for accessing device. - */ -export interface UnencryptedCredentials { - /** - * Name of the job. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly jobName?: string; - /** - * Secrets related to this job. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly jobSecrets?: JobSecretsUnion; -} - -/** - * The requirements to validate customer address where the device needs to be shipped. - */ -export interface ValidateAddress { - /** - * Polymorphic Discriminator - */ - validationType: "ValidateAddress"; - /** - * Shipping address of the customer. - */ - shippingAddress: ShippingAddress; - /** - * Device type to be used for the job. Possible values include: 'DataBox', 'DataBoxDisk', - * 'DataBoxHeavy' - */ - deviceType: SkuName; - /** - * Preferences related to the shipment logistics of the sku. - */ - transportPreferences?: TransportPreferences; -} - -/** - * Contains the possible cases for ValidationRequest. - */ -export type ValidationRequestUnion = ValidationRequest | CreateJobValidations; - -/** - * Input request for all pre job creation validation. - */ -export interface ValidationRequest { - /** - * Polymorphic Discriminator - */ - validationCategory: "ValidationRequest"; - /** - * List of request details contain validationType and its request as key and value respectively. - */ - individualRequestDetails: ValidationInputRequestUnion[]; -} - -/** - * It does all pre-job creation validations. - */ -export interface CreateJobValidations { - /** - * Polymorphic Discriminator - */ - validationCategory: "JobCreationValidation"; - /** - * List of request details contain validationType and its request as key and value respectively. - */ - individualRequestDetails: ValidationInputRequestUnion[]; -} - -/** - * Response of pre job creation validations. - */ -export interface ValidationResponse { - /** - * Overall validation status. Possible values include: 'AllValidToProceed', - * 'InputsRevisitRequired', 'CertainInputValidationsSkipped' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly status?: OverallValidationStatus; - /** - * List of response details contain validationType and its response as key and value - * respectively. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly individualResponseDetails?: ValidationInputResponseUnion[]; -} +}; -/** - * Optional Parameters. - */ -export interface JobsListOptionalParams extends msRest.RequestOptionsBase { +/** The address validation output. */ +export type AddressValidationProperties = ValidationInputResponse & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + validationType: "ValidateAddress"; /** - * $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. + * The address validation status. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - skipToken?: string; -} - -/** - * Optional Parameters. - */ -export interface JobsListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { + readonly validationStatus?: AddressValidationStatus; /** - * $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. + * List of alternate addresses. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - skipToken?: string; -} + readonly alternateAddresses?: ShippingAddress[]; +}; -/** - * Optional Parameters. - */ -export interface JobsGetOptionalParams extends msRest.RequestOptionsBase { +/** Properties of create order limit for subscription validation response. */ +export type CreateOrderLimitForSubscriptionValidationResponseProperties = ValidationInputResponse & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + validationType: "ValidateCreateOrderLimit"; /** - * $expand is supported on details parameter for job, which provides details on the job stages. + * Create order limit validation status. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - expand?: string; -} + readonly status?: ValidationStatus; +}; -/** - * Optional Parameters. - */ -export interface JobsUpdateOptionalParams extends msRest.RequestOptionsBase { +/** Properties of data transfer details validation response. */ +export type DataTransferDetailsValidationResponseProperties = ValidationInputResponse & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + validationType: "ValidateDataTransferDetails"; /** - * Defines the If-Match condition. The patch will be performed only if the ETag of the job on the - * server matches this value. + * Data transfer details validation status. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - ifMatch?: string; -} + readonly status?: ValidationStatus; +}; -/** - * Optional Parameters. - */ -export interface JobsBeginUpdateOptionalParams extends msRest.RequestOptionsBase { +/** Properties of data center and transport preference validation response. */ +export type PreferencesValidationResponseProperties = ValidationInputResponse & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + validationType: "ValidatePreferences"; /** - * Defines the If-Match condition. The patch will be performed only if the ETag of the job on the - * server matches this value. + * Validation status of requested data center and transport. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - ifMatch?: string; -} + readonly status?: ValidationStatus; +}; -/** - * Optional Parameters. - */ -export interface ServiceRegionConfigurationOptionalParams extends msRest.RequestOptionsBase { +/** Properties of sku availability validation response. */ +export type SkuAvailabilityValidationResponseProperties = ValidationInputResponse & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + validationType: "ValidateSkuAvailability"; /** - * Request body to get the availability for scheduling orders. + * Sku availability validation status. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - scheduleAvailabilityRequest?: ScheduleAvailabilityRequestUnion; + readonly status?: ValidationStatus; +}; + +/** Properties of subscription permission to create job validation response. */ +export type SubscriptionIsAllowedToCreateJobValidationResponseProperties = ValidationInputResponse & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + validationType: "ValidateSubscriptionIsAllowedToCreateJob"; /** - * Request body to get the transport availability for given sku. + * Validation status of subscription permission to create job. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - transportAvailabilityRequest?: TransportAvailabilityRequest; -} + readonly status?: ValidationStatus; +}; -/** - * An interface representing DataBoxManagementClientOptions. - */ -export interface DataBoxManagementClientOptions extends AzureServiceClientOptions { - baseUri?: string; -} +/** It does all pre-job creation validations. */ +export type CreateJobValidations = ValidationRequest & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + validationCategory: "JobCreationValidation"; +}; -/** - * @interface - * Operation Collection. - * @extends Array - */ -export interface OperationList extends Array { +/** The secrets related to customer disk job. */ +export type CustomerDiskJobSecrets = JobSecrets & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + jobSecretsType: "DataBoxCustomerDisk"; /** - * Link for the next set of operations. + * Contains the list of secrets object for that device. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - nextLink?: string; -} - -/** - * @interface - * Job Resource Collection - * @extends Array - */ -export interface JobResourceList extends Array { + readonly diskSecrets?: DiskSecret[]; /** - * Link for the next set of job resources. + * Carrier Account Number of the customer + * NOTE: This property will not be serialized. It can only be populated by the server. */ - nextLink?: string; -} + readonly carrierAccountNumber?: string; +}; -/** - * @interface - * List of unencrypted credentials for accessing device. - * @extends Array - */ -export interface UnencryptedCredentialsList extends Array { +/** The secrets related to disk job. */ +export type DataBoxDiskJobSecrets = JobSecrets & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + jobSecretsType: "DataBoxDisk"; /** - * Link for the next set of unencrypted credentials. + * Contains the list of secrets object for that device. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - nextLink?: string; -} - -/** - * @interface - * The available skus operation response. - * @extends Array - */ -export interface AvailableSkusResult extends Array { + readonly diskSecrets?: DiskSecret[]; /** - * Link for the next set of skus. + * PassKey for the disk Job. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - nextLink?: string; -} - -/** - * Defines values for DataDestinationType. - * Possible values include: 'StorageAccount', 'ManagedDisk' - * @readonly - * @enum {string} - */ -export type DataDestinationType = 'StorageAccount' | 'ManagedDisk'; - -/** - * Defines values for ShareDestinationFormatType. - * Possible values include: 'UnknownType', 'HCS', 'BlockBlob', 'PageBlob', 'AzureFile', - * 'ManagedDisk' - * @readonly - * @enum {string} - */ -export type ShareDestinationFormatType = 'UnknownType' | 'HCS' | 'BlockBlob' | 'PageBlob' | 'AzureFile' | 'ManagedDisk'; - -/** - * Defines values for AccessProtocol. - * Possible values include: 'SMB', 'NFS' - * @readonly - * @enum {string} - */ -export type AccessProtocol = 'SMB' | 'NFS'; - -/** - * Defines values for AddressValidationStatus. - * Possible values include: 'Valid', 'Invalid', 'Ambiguous' - * @readonly - * @enum {string} - */ -export type AddressValidationStatus = 'Valid' | 'Invalid' | 'Ambiguous'; - -/** - * Defines values for AddressType. - * Possible values include: 'None', 'Residential', 'Commercial' - * @readonly - * @enum {string} - */ -export type AddressType = 'None' | 'Residential' | 'Commercial'; - -/** - * Defines values for SkuName. - * Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' - * @readonly - * @enum {string} - */ -export type SkuName = 'DataBox' | 'DataBoxDisk' | 'DataBoxHeavy'; - -/** - * Defines values for SkuDisabledReason. - * Possible values include: 'None', 'Country', 'Region', 'Feature', 'OfferType', - * 'NoSubscriptionInfo' - * @readonly - * @enum {string} - */ -export type SkuDisabledReason = 'None' | 'Country' | 'Region' | 'Feature' | 'OfferType' | 'NoSubscriptionInfo'; - -/** - * Defines values for NotificationStageName. - * Possible values include: 'DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', - * 'DataCopy' - * @readonly - * @enum {string} - */ -export type NotificationStageName = 'DevicePrepared' | 'Dispatched' | 'Delivered' | 'PickedUp' | 'AtAzureDC' | 'DataCopy'; - -/** - * Defines values for ValidationStatus. - * Possible values include: 'Valid', 'Invalid', 'Skipped' - * @readonly - * @enum {string} - */ -export type ValidationStatus = 'Valid' | 'Invalid' | 'Skipped'; - -/** - * Defines values for CopyStatus. - * Possible values include: 'NotStarted', 'InProgress', 'Completed', 'CompletedWithErrors', - * 'Failed', 'NotReturned', 'HardwareError', 'DeviceFormatted', 'DeviceMetadataModified', - * 'StorageAccountNotAccessible', 'UnsupportedData' - * @readonly - * @enum {string} - */ -export type CopyStatus = 'NotStarted' | 'InProgress' | 'Completed' | 'CompletedWithErrors' | 'Failed' | 'NotReturned' | 'HardwareError' | 'DeviceFormatted' | 'DeviceMetadataModified' | 'StorageAccountNotAccessible' | 'UnsupportedData'; - -/** - * Defines values for StageName. - * Possible values include: 'DeviceOrdered', 'DevicePrepared', 'Dispatched', 'Delivered', - * 'PickedUp', 'AtAzureDC', 'DataCopy', 'Completed', 'CompletedWithErrors', 'Cancelled', - * 'Failed_IssueReportedAtCustomer', 'Failed_IssueDetectedAtAzureDC', 'Aborted', - * 'CompletedWithWarnings', 'ReadyToDispatchFromAzureDC', 'ReadyToReceiveAtAzureDC' - * @readonly - * @enum {string} - */ -export type StageName = 'DeviceOrdered' | 'DevicePrepared' | 'Dispatched' | 'Delivered' | 'PickedUp' | 'AtAzureDC' | 'DataCopy' | 'Completed' | 'CompletedWithErrors' | 'Cancelled' | 'Failed_IssueReportedAtCustomer' | 'Failed_IssueDetectedAtAzureDC' | 'Aborted' | 'CompletedWithWarnings' | 'ReadyToDispatchFromAzureDC' | 'ReadyToReceiveAtAzureDC'; - -/** - * Defines values for StageStatus. - * Possible values include: 'None', 'InProgress', 'Succeeded', 'Failed', 'Cancelled', 'Cancelling', - * 'SucceededWithErrors' - * @readonly - * @enum {string} - */ -export type StageStatus = 'None' | 'InProgress' | 'Succeeded' | 'Failed' | 'Cancelled' | 'Cancelling' | 'SucceededWithErrors'; - -/** - * Defines values for TransportShipmentTypes. - * Possible values include: 'CustomerManaged', 'MicrosoftManaged' - * @readonly - * @enum {string} - */ -export type TransportShipmentTypes = 'CustomerManaged' | 'MicrosoftManaged'; - -/** - * Defines values for JobDeliveryType. - * Possible values include: 'NonScheduled', 'Scheduled' - * @readonly - * @enum {string} - */ -export type JobDeliveryType = 'NonScheduled' | 'Scheduled'; - -/** - * Defines values for OverallValidationStatus. - * Possible values include: 'AllValidToProceed', 'InputsRevisitRequired', - * 'CertainInputValidationsSkipped' - * @readonly - * @enum {string} - */ -export type OverallValidationStatus = 'AllValidToProceed' | 'InputsRevisitRequired' | 'CertainInputValidationsSkipped'; - -/** - * Contains response data for the list operation. - */ -export type OperationsListResponse = OperationList & { + readonly passKey?: string; /** - * The underlying HTTP response. + * Whether passkey was provided by user. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationList; - }; + readonly isPasskeyUserDefined?: boolean; }; -/** - * Contains response data for the listNext operation. - */ -export type OperationsListNextResponse = OperationList & { +/** The secrets related to a databox heavy job. */ +export type DataBoxHeavyJobSecrets = JobSecrets & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + jobSecretsType: "DataBoxHeavy"; /** - * The underlying HTTP response. + * Contains the list of secret objects for a databox heavy job. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OperationList; - }; + readonly cabinetPodSecrets?: DataBoxHeavySecret[]; }; -/** - * Contains response data for the list operation. - */ -export type JobsListResponse = JobResourceList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** The secrets related to a databox job. */ +export type DataboxJobSecrets = JobSecrets & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + jobSecretsType: "DataBox"; + /** Contains the list of secret objects for a job. */ + podSecrets?: DataBoxSecret[]; +}; - /** - * The response body as parsed JSON or XML - */ - parsedBody: JobResourceList; - }; +/** Request body to get the availability for scheduling data box orders orders. */ +export type DataBoxScheduleAvailabilityRequest = ScheduleAvailabilityRequest & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + skuName: "DataBox"; }; -/** - * Contains response data for the listByResourceGroup operation. - */ -export type JobsListByResourceGroupResponse = JobResourceList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Request body to get the availability for scheduling disk orders. */ +export type DiskScheduleAvailabilityRequest = ScheduleAvailabilityRequest & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + skuName: "DataBoxDisk"; + /** The expected size of the data, which needs to be transferred in this job, in terabytes. */ + expectedDataSizeInTeraBytes: number; +}; - /** - * The response body as parsed JSON or XML - */ - parsedBody: JobResourceList; - }; +/** Request body to get the availability for scheduling heavy orders. */ +export type HeavyScheduleAvailabilityRequest = ScheduleAvailabilityRequest & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + skuName: "DataBoxHeavy"; }; -/** - * Contains response data for the get operation. - */ -export type JobsGetResponse = JobResource & { +/** DataBox CustomerDisk Copy Progress */ +export type DataBoxCustomerDiskCopyProgress = CopyProgress & { /** - * The underlying HTTP response. + * Disk Serial Number. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: JobResource; - }; -}; - -/** - * Contains response data for the create operation. - */ -export type JobsCreateResponse = JobResource & { + readonly serialNumber?: string; /** - * The underlying HTTP response. + * The Status of the copy + * NOTE: This property will not be serialized. It can only be populated by the server. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: JobResource; - }; + readonly copyStatus?: CopyStatus; }; -/** - * Contains response data for the update operation. - */ -export type JobsUpdateResponse = JobResource & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Known values of {@link StageName} that the service accepts. */ +export enum KnownStageName { + /** An order has been created. */ + DeviceOrdered = "DeviceOrdered", + /** A device has been prepared for the order. */ + DevicePrepared = "DevicePrepared", + /** Device has been dispatched to the user of the order. */ + Dispatched = "Dispatched", + /** Device has been delivered to the user of the order. */ + Delivered = "Delivered", + /** Device has been picked up from user and in transit to Azure datacenter. */ + PickedUp = "PickedUp", + /** Device has been received at Azure datacenter from the user. */ + AtAzureDC = "AtAzureDC", + /** Data copy from the device at Azure datacenter. */ + DataCopy = "DataCopy", + /** Order has completed. */ + Completed = "Completed", + /** Order has completed with errors. */ + CompletedWithErrors = "CompletedWithErrors", + /** Order has been cancelled. */ + Cancelled = "Cancelled", + /** Order has failed due to issue reported by user. */ + FailedIssueReportedAtCustomer = "Failed_IssueReportedAtCustomer", + /** Order has failed due to issue detected at Azure datacenter. */ + FailedIssueDetectedAtAzureDC = "Failed_IssueDetectedAtAzureDC", + /** Order has been aborted. */ + Aborted = "Aborted", + /** Order has completed with warnings. */ + CompletedWithWarnings = "CompletedWithWarnings", + /** Device is ready to be handed to customer from Azure DC. */ + ReadyToDispatchFromAzureDC = "ReadyToDispatchFromAzureDC", + /** Device can be dropped off at Azure DC. */ + ReadyToReceiveAtAzureDC = "ReadyToReceiveAtAzureDC", + /** Job created by the customer. */ + Created = "Created", + /** User shipped the device to AzureDC. */ + ShippedToAzureDC = "ShippedToAzureDC", + /** Awaiting shipment details of device from customer. */ + AwaitingShipmentDetails = "AwaitingShipmentDetails", + /** Preparing the device to ship to customer. */ + PreparingToShipFromAzureDC = "PreparingToShipFromAzureDC", + /** Shipped the device to customer. */ + ShippedToCustomer = "ShippedToCustomer" +} + +/** + * Defines values for StageName. \ + * {@link KnownStageName} can be used interchangeably with StageName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **DeviceOrdered**: An order has been created. \ + * **DevicePrepared**: A device has been prepared for the order. \ + * **Dispatched**: Device has been dispatched to the user of the order. \ + * **Delivered**: Device has been delivered to the user of the order. \ + * **PickedUp**: Device has been picked up from user and in transit to Azure datacenter. \ + * **AtAzureDC**: Device has been received at Azure datacenter from the user. \ + * **DataCopy**: Data copy from the device at Azure datacenter. \ + * **Completed**: Order has completed. \ + * **CompletedWithErrors**: Order has completed with errors. \ + * **Cancelled**: Order has been cancelled. \ + * **Failed_IssueReportedAtCustomer**: Order has failed due to issue reported by user. \ + * **Failed_IssueDetectedAtAzureDC**: Order has failed due to issue detected at Azure datacenter. \ + * **Aborted**: Order has been aborted. \ + * **CompletedWithWarnings**: Order has completed with warnings. \ + * **ReadyToDispatchFromAzureDC**: Device is ready to be handed to customer from Azure DC. \ + * **ReadyToReceiveAtAzureDC**: Device can be dropped off at Azure DC. \ + * **Created**: Job created by the customer. \ + * **ShippedToAzureDC**: User shipped the device to AzureDC. \ + * **AwaitingShipmentDetails**: Awaiting shipment details of device from customer. \ + * **PreparingToShipFromAzureDC**: Preparing the device to ship to customer. \ + * **ShippedToCustomer**: Shipped the device to customer. + */ +export type StageName = string; + +/** Known values of {@link NotificationStageName} that the service accepts. */ +export enum KnownNotificationStageName { + /** Notification at device prepared stage. */ + DevicePrepared = "DevicePrepared", + /** Notification at device dispatched stage. */ + Dispatched = "Dispatched", + /** Notification at device delivered stage. */ + Delivered = "Delivered", + /** Notification at device picked up from user stage. */ + PickedUp = "PickedUp", + /** Notification at device received at Azure datacenter stage. */ + AtAzureDC = "AtAzureDC", + /** Notification at data copy started stage. */ + DataCopy = "DataCopy", + /** Notification at job created stage. */ + Created = "Created", + /** Notification at shipped devices to customer stage. */ + ShippedToCustomer = "ShippedToCustomer" +} + +/** + * Defines values for NotificationStageName. \ + * {@link KnownNotificationStageName} can be used interchangeably with NotificationStageName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **DevicePrepared**: Notification at device prepared stage. \ + * **Dispatched**: Notification at device dispatched stage. \ + * **Delivered**: Notification at device delivered stage. \ + * **PickedUp**: Notification at device picked up from user stage. \ + * **AtAzureDC**: Notification at device received at Azure datacenter stage. \ + * **DataCopy**: Notification at data copy started stage. \ + * **Created**: Notification at job created stage. \ + * **ShippedToCustomer**: Notification at shipped devices to customer stage. + */ +export type NotificationStageName = string; + +/** Known values of {@link DataCenterCode} that the service accepts. */ +export enum KnownDataCenterCode { + Invalid = "Invalid", + BY2 = "BY2", + BY1 = "BY1", + ORK70 = "ORK70", + AM2 = "AM2", + AMS20 = "AMS20", + BY21 = "BY21", + BY24 = "BY24", + MWH01 = "MWH01", + AMS06 = "AMS06", + SSE90 = "SSE90", + SYD03 = "SYD03", + SYD23 = "SYD23", + CBR20 = "CBR20", + YTO20 = "YTO20", + CWL20 = "CWL20", + LON24 = "LON24", + BOM01 = "BOM01", + BL20 = "BL20", + BL7 = "BL7", + SEL20 = "SEL20", + TYO01 = "TYO01", + BN1 = "BN1", + SN5 = "SN5", + CYS04 = "CYS04", + TYO22 = "TYO22", + YTO21 = "YTO21", + YQB20 = "YQB20", + FRA22 = "FRA22", + MAA01 = "MAA01", + CPQ02 = "CPQ02", + CPQ20 = "CPQ20", + SIN20 = "SIN20", + HKG20 = "HKG20", + SG2 = "SG2", + MEL23 = "MEL23", + SEL21 = "SEL21", + OSA20 = "OSA20", + SHA03 = "SHA03", + BJB = "BJB", + JNB22 = "JNB22", + JNB21 = "JNB21", + MNZ21 = "MNZ21", + SN8 = "SN8", + AUH20 = "AUH20", + ZRH20 = "ZRH20", + PUS20 = "PUS20", + AdHoc = "AdHoc", + CH1 = "CH1", + DSM05 = "DSM05" +} + +/** + * Defines values for DataCenterCode. \ + * {@link KnownDataCenterCode} can be used interchangeably with DataCenterCode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **BY2** \ + * **BY1** \ + * **ORK70** \ + * **AM2** \ + * **AMS20** \ + * **BY21** \ + * **BY24** \ + * **MWH01** \ + * **AMS06** \ + * **SSE90** \ + * **SYD03** \ + * **SYD23** \ + * **CBR20** \ + * **YTO20** \ + * **CWL20** \ + * **LON24** \ + * **BOM01** \ + * **BL20** \ + * **BL7** \ + * **SEL20** \ + * **TYO01** \ + * **BN1** \ + * **SN5** \ + * **CYS04** \ + * **TYO22** \ + * **YTO21** \ + * **YQB20** \ + * **FRA22** \ + * **MAA01** \ + * **CPQ02** \ + * **CPQ20** \ + * **SIN20** \ + * **HKG20** \ + * **SG2** \ + * **MEL23** \ + * **SEL21** \ + * **OSA20** \ + * **SHA03** \ + * **BJB** \ + * **JNB22** \ + * **JNB21** \ + * **MNZ21** \ + * **SN8** \ + * **AUH20** \ + * **ZRH20** \ + * **PUS20** \ + * **AdHoc** \ + * **CH1** \ + * **DSM05** + */ +export type DataCenterCode = string; + +/** Known values of {@link CopyStatus} that the service accepts. */ +export enum KnownCopyStatus { + /** Data copy hasn't started yet. */ + NotStarted = "NotStarted", + /** Data copy is in progress. */ + InProgress = "InProgress", + /** Data copy completed. */ + Completed = "Completed", + /** Data copy completed with errors. */ + CompletedWithErrors = "CompletedWithErrors", + /** Data copy failed. No data was copied. */ + Failed = "Failed", + /** No copy triggered as device was not returned. */ + NotReturned = "NotReturned", + /** The Device has hit hardware issues. */ + HardwareError = "HardwareError", + /** Data copy failed. The Device was formatted by user. */ + DeviceFormatted = "DeviceFormatted", + /** Data copy failed. Device metadata was modified by user. */ + DeviceMetadataModified = "DeviceMetadataModified", + /** Data copy failed. Storage Account was not accessible during copy. */ + StorageAccountNotAccessible = "StorageAccountNotAccessible", + /** Data copy failed. The Device data content is not supported. */ + UnsupportedData = "UnsupportedData", + /** No copy triggered as device was not received. */ + DriveNotReceived = "DriveNotReceived", + /** No copy triggered as device type is not supported. */ + UnsupportedDrive = "UnsupportedDrive", + /** Copy failed due to service error. */ + OtherServiceError = "OtherServiceError", + /** Copy failed due to user error. */ + OtherUserError = "OtherUserError", + /** Copy failed due to disk detection error. */ + DriveNotDetected = "DriveNotDetected", + /** Copy failed due to corrupted drive. */ + DriveCorrupted = "DriveCorrupted", + /** Copy failed due to modified or removed metadata files. */ + MetadataFilesModifiedOrRemoved = "MetadataFilesModifiedOrRemoved" +} + +/** + * Defines values for CopyStatus. \ + * {@link KnownCopyStatus} can be used interchangeably with CopyStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotStarted**: Data copy hasn't started yet. \ + * **InProgress**: Data copy is in progress. \ + * **Completed**: Data copy completed. \ + * **CompletedWithErrors**: Data copy completed with errors. \ + * **Failed**: Data copy failed. No data was copied. \ + * **NotReturned**: No copy triggered as device was not returned. \ + * **HardwareError**: The Device has hit hardware issues. \ + * **DeviceFormatted**: Data copy failed. The Device was formatted by user. \ + * **DeviceMetadataModified**: Data copy failed. Device metadata was modified by user. \ + * **StorageAccountNotAccessible**: Data copy failed. Storage Account was not accessible during copy. \ + * **UnsupportedData**: Data copy failed. The Device data content is not supported. \ + * **DriveNotReceived**: No copy triggered as device was not received. \ + * **UnsupportedDrive**: No copy triggered as device type is not supported. \ + * **OtherServiceError**: Copy failed due to service error. \ + * **OtherUserError**: Copy failed due to user error. \ + * **DriveNotDetected**: Copy failed due to disk detection error. \ + * **DriveCorrupted**: Copy failed due to corrupted drive. \ + * **MetadataFilesModifiedOrRemoved**: Copy failed due to modified or removed metadata files. + */ +export type CopyStatus = string; +/** Defines values for TransferType. */ +export type TransferType = "ImportToAzure" | "ExportFromAzure"; +/** Defines values for StageStatus. */ +export type StageStatus = + | "None" + | "InProgress" + | "Succeeded" + | "Failed" + | "Cancelled" + | "Cancelling" + | "SucceededWithErrors" + | "WaitingForCustomerAction" + | "SucceededWithWarnings" + | "WaitingForCustomerActionForKek" + | "WaitingForCustomerActionForCleanUp" + | "CustomerActionPerformedForCleanUp"; +/** Defines values for AddressType. */ +export type AddressType = "None" | "Residential" | "Commercial"; +/** Defines values for DataAccountType. */ +export type DataAccountType = "StorageAccount" | "ManagedDisk"; +/** Defines values for LogCollectionLevel. */ +export type LogCollectionLevel = "Error" | "Verbose"; +/** Defines values for TransferConfigurationType. */ +export type TransferConfigurationType = "TransferAll" | "TransferUsingFilter"; +/** Defines values for FilterFileType. */ +export type FilterFileType = "AzureBlob" | "AzureFile"; +/** Defines values for ClassDiscriminator. */ +export type ClassDiscriminator = + | "DataBox" + | "DataBoxDisk" + | "DataBoxHeavy" + | "DataBoxCustomerDisk"; +/** Defines values for TransportShipmentTypes. */ +export type TransportShipmentTypes = "CustomerManaged" | "MicrosoftManaged"; +/** Defines values for DoubleEncryption. */ +export type DoubleEncryption = "Enabled" | "Disabled"; +/** Defines values for KekType. */ +export type KekType = "MicrosoftManaged" | "CustomerManaged"; +/** Defines values for CustomerResolutionCode. */ +export type CustomerResolutionCode = "None" | "MoveToCleanUpDevice" | "Resume"; +/** Defines values for DatacenterAddressType. */ +export type DatacenterAddressType = + | "DatacenterAddressLocation" + | "DatacenterAddressInstruction"; +/** Defines values for JobDeliveryType. */ +export type JobDeliveryType = "NonScheduled" | "Scheduled"; +/** Defines values for SkuName. */ +export type SkuName = + | "DataBox" + | "DataBoxDisk" + | "DataBoxHeavy" + | "DataBoxCustomerDisk"; +/** Defines values for SkuDisabledReason. */ +export type SkuDisabledReason = + | "None" + | "Country" + | "Region" + | "Feature" + | "OfferType" + | "NoSubscriptionInfo"; +/** Defines values for ValidationInputDiscriminator. */ +export type ValidationInputDiscriminator = + | "ValidateAddress" + | "ValidateSubscriptionIsAllowedToCreateJob" + | "ValidatePreferences" + | "ValidateCreateOrderLimit" + | "ValidateSkuAvailability" + | "ValidateDataTransferDetails"; +/** Defines values for AddressValidationStatus. */ +export type AddressValidationStatus = "Valid" | "Invalid" | "Ambiguous"; +/** Defines values for OverallValidationStatus. */ +export type OverallValidationStatus = + | "AllValidToProceed" + | "InputsRevisitRequired" + | "CertainInputValidationsSkipped"; +/** Defines values for ShareDestinationFormatType. */ +export type ShareDestinationFormatType = + | "UnknownType" + | "HCS" + | "BlockBlob" + | "PageBlob" + | "AzureFile" + | "ManagedDisk"; +/** Defines values for AccessProtocol. */ +export type AccessProtocol = "SMB" | "NFS"; +/** Defines values for ValidationStatus. */ +export type ValidationStatus = "Valid" | "Invalid" | "Skipped"; + +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = OperationList; + +/** Optional parameters. */ +export interface OperationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = OperationList; + +/** Optional parameters. */ +export interface JobsListOptionalParams extends coreClient.OperationOptions { + /** $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. */ + skipToken?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: JobResource; - }; -}; +/** Contains response data for the list operation. */ +export type JobsListResponse = JobResourceList; -/** - * Contains response data for the bookShipmentPickUp operation. - */ -export type JobsBookShipmentPickUpResponse = ShipmentPickUpResponse & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface JobsMarkDevicesShippedOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ShipmentPickUpResponse; - }; -}; +/** Optional parameters. */ +export interface JobsListByResourceGroupOptionalParams + extends coreClient.OperationOptions { + /** $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. */ + skipToken?: string; +} -/** - * Contains response data for the listCredentials operation. - */ -export type JobsListCredentialsResponse = UnencryptedCredentialsList & { - /** - * 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 JobsListByResourceGroupResponse = JobResourceList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: UnencryptedCredentialsList; - }; -}; +/** Optional parameters. */ +export interface JobsGetOptionalParams extends coreClient.OperationOptions { + /** $expand is supported on details parameter for job, which provides details on the job stages. */ + expand?: string; +} -/** - * Contains response data for the beginCreate operation. - */ -export type JobsBeginCreateResponse = JobResource & { - /** - * 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 = JobResource; - /** - * The response body as parsed JSON or XML - */ - parsedBody: JobResource; - }; -}; +/** Optional parameters. */ +export interface JobsCreateOptionalParams 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 beginUpdate operation. - */ -export type JobsBeginUpdateResponse = JobResource & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the create operation. */ +export type JobsCreateResponse = JobResource; - /** - * The response body as parsed JSON or XML - */ - parsedBody: JobResource; - }; -}; +/** Optional parameters. */ +export interface JobsDeleteOptionalParams 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 listNext operation. - */ -export type JobsListNextResponse = JobResourceList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface JobsUpdateOptionalParams extends coreClient.OperationOptions { + /** Defines the If-Match condition. The patch will be performed only if the ETag of the job on the server matches this value. */ + ifMatch?: string; + /** 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: JobResourceList; - }; -}; +/** Contains response data for the update operation. */ +export type JobsUpdateResponse = JobResource; -/** - * Contains response data for the listByResourceGroupNext operation. - */ -export type JobsListByResourceGroupNextResponse = JobResourceList & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface JobsBookShipmentPickUpOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: JobResourceList; - }; -}; +/** Contains response data for the bookShipmentPickUp operation. */ +export type JobsBookShipmentPickUpResponse = ShipmentPickUpResponse; -/** - * Contains response data for the listAvailableSkus operation. - */ -export type ServiceListAvailableSkusResponse = AvailableSkusResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface JobsCancelOptionalParams extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: AvailableSkusResult; - }; -}; +/** Optional parameters. */ +export interface JobsListCredentialsOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the listAvailableSkusByResourceGroup operation. - */ -export type ServiceListAvailableSkusByResourceGroupResponse = AvailableSkusResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listCredentials operation. */ +export type JobsListCredentialsResponse = UnencryptedCredentialsList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AvailableSkusResult; - }; -}; +/** Optional parameters. */ +export interface JobsListNextOptionalParams + extends coreClient.OperationOptions { + /** $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. */ + skipToken?: string; +} -/** - * Contains response data for the validateAddressMethod operation. - */ -export type ServiceValidateAddressMethodResponse = AddressValidationOutput & { - /** - * 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 JobsListNextResponse = JobResourceList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: AddressValidationOutput; - }; -}; +/** Optional parameters. */ +export interface JobsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions { + /** $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. */ + skipToken?: string; +} -/** - * Contains response data for the validateInputsByResourceGroup operation. - */ -export type ServiceValidateInputsByResourceGroupResponse = ValidationResponse & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Contains response data for the listByResourceGroupNext operation. */ +export type JobsListByResourceGroupNextResponse = JobResourceList; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ValidationResponse; - }; -}; +/** Optional parameters. */ +export interface MitigateOptionalParams extends coreClient.OperationOptions {} -/** - * Contains response data for the validateInputs operation. - */ -export type ServiceValidateInputsResponse = ValidationResponse & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface ServiceListAvailableSkusByResourceGroupOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: ValidationResponse; - }; -}; +/** Contains response data for the listAvailableSkusByResourceGroup operation. */ +export type ServiceListAvailableSkusByResourceGroupResponse = AvailableSkusResult; -/** - * Contains response data for the regionConfiguration operation. - */ -export type ServiceRegionConfigurationResponse = RegionConfigurationResponse & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface ServiceValidateAddressOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: RegionConfigurationResponse; - }; -}; +/** Contains response data for the validateAddress operation. */ +export type ServiceValidateAddressResponse = AddressValidationOutput; -/** - * Contains response data for the listAvailableSkusNext operation. - */ -export type ServiceListAvailableSkusNextResponse = AvailableSkusResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface ServiceValidateInputsByResourceGroupOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: AvailableSkusResult; - }; -}; +/** Contains response data for the validateInputsByResourceGroup operation. */ +export type ServiceValidateInputsByResourceGroupResponse = ValidationResponse; -/** - * Contains response data for the listAvailableSkusByResourceGroupNext operation. - */ -export type ServiceListAvailableSkusByResourceGroupNextResponse = AvailableSkusResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +/** Optional parameters. */ +export interface ServiceValidateInputsOptionalParams + extends coreClient.OperationOptions {} - /** - * The response body as parsed JSON or XML - */ - parsedBody: AvailableSkusResult; - }; -}; +/** Contains response data for the validateInputs operation. */ +export type ServiceValidateInputsResponse = ValidationResponse; + +/** Optional parameters. */ +export interface ServiceRegionConfigurationOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the regionConfiguration operation. */ +export type ServiceRegionConfigurationResponse = RegionConfigurationResponse; + +/** Optional parameters. */ +export interface ServiceRegionConfigurationByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the regionConfigurationByResourceGroup operation. */ +export type ServiceRegionConfigurationByResourceGroupResponse = RegionConfigurationResponse; + +/** Optional parameters. */ +export interface ServiceListAvailableSkusByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listAvailableSkusByResourceGroupNext operation. */ +export type ServiceListAvailableSkusByResourceGroupNextResponse = AvailableSkusResult; + +/** Optional parameters. */ +export interface DataBoxManagementClientOptionalParams + extends coreClient.ServiceClientOptions { + /** server parameter */ + $host?: string; + /** Api Version */ + apiVersion?: string; + /** Overrides client endpoint. */ + endpoint?: string; +} diff --git a/sdk/databox/arm-databox/src/models/jobsMappers.ts b/sdk/databox/arm-databox/src/models/jobsMappers.ts deleted file mode 100644 index 5aa3a445167f..000000000000 --- a/sdk/databox/arm-databox/src/models/jobsMappers.ts +++ /dev/null @@ -1,58 +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, - AccountCredentialDetails, - ApplianceNetworkConfiguration, - BaseResource, - CancellationReason, - CloudError, - ContactDetails, - CopyLogDetails, - CopyProgress, - DataBoxAccountCopyLogDetails, - DataBoxDiskCopyLogDetails, - DataBoxDiskCopyProgress, - DataBoxDiskJobDetails, - DataBoxDiskJobSecrets, - DataBoxHeavyAccountCopyLogDetails, - DataBoxHeavyJobDetails, - DataBoxHeavyJobSecrets, - DataBoxHeavySecret, - DataBoxJobDetails, - DataboxJobSecrets, - DataBoxSecret, - DcAccessSecurityCode, - DestinationAccountDetails, - DestinationManagedDiskDetails, - DestinationStorageAccountDetails, - DiskSecret, - ErrorModel, - JobDeliveryInfo, - JobDetails, - JobErrorDetails, - JobResource, - JobResourceList, - JobResourceUpdateParameter, - JobSecrets, - JobStages, - NotificationPreference, - PackageShippingDetails, - Preferences, - Resource, - ShareCredentialDetails, - ShipmentPickUpRequest, - ShipmentPickUpResponse, - ShippingAddress, - Sku, - TransportPreferences, - UnencryptedCredentials, - UnencryptedCredentialsList, - UpdateJobDetails -} from "../models/mappers"; diff --git a/sdk/databox/arm-databox/src/models/mappers.ts b/sdk/databox/arm-databox/src/models/mappers.ts index b8820e4085a4..a48a105ad0ce 100644 --- a/sdk/databox/arm-databox/src/models/mappers.ts +++ b/sdk/databox/arm-databox/src/models/mappers.ts @@ -1,271 +1,190 @@ /* - * 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 ShareCredentialDetails: msRest.CompositeMapper = { - serializedName: "ShareCredentialDetails", +export const OperationList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ShareCredentialDetails", + className: "OperationList", modelProperties: { - shareName: { - readOnly: true, - serializedName: "shareName", - type: { - name: "String" - } - }, - shareType: { - readOnly: true, - serializedName: "shareType", - type: { - name: "Enum", - allowedValues: [ - "UnknownType", - "HCS", - "BlockBlob", - "PageBlob", - "AzureFile", - "ManagedDisk" - ] - } - }, - userName: { - readOnly: true, - serializedName: "userName", - type: { - name: "String" - } - }, - password: { - readOnly: true, - serializedName: "password", - type: { - name: "String" - } - }, - supportedAccessProtocols: { + value: { + serializedName: "value", readOnly: true, - serializedName: "supportedAccessProtocols", type: { name: "Sequence", element: { type: { - name: "Enum", - allowedValues: [ - "SMB", - "NFS" - ] + name: "Composite", + className: "Operation" } } } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const AccountCredentialDetails: msRest.CompositeMapper = { - serializedName: "AccountCredentialDetails", +export const Operation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AccountCredentialDetails", + className: "Operation", modelProperties: { - accountName: { + name: { + serializedName: "name", readOnly: true, - serializedName: "accountName", type: { name: "String" } }, - dataDestinationType: { + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + properties: { + serializedName: "properties", readOnly: true, - serializedName: "dataDestinationType", type: { - name: "Enum", - allowedValues: [ - "StorageAccount", - "ManagedDisk" - ] + name: "Dictionary", + value: { type: { name: "any" } } } }, - accountConnectionString: { + origin: { + serializedName: "origin", readOnly: true, - serializedName: "accountConnectionString", type: { name: "String" } }, - shareCredentialDetails: { - readOnly: true, - serializedName: "shareCredentialDetails", + isDataAction: { + serializedName: "isDataAction", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ShareCredentialDetails" - } - } + name: "Boolean" } } } } }; -export const ShippingAddress: msRest.CompositeMapper = { - serializedName: "ShippingAddress", +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ShippingAddress", + className: "OperationDisplay", modelProperties: { - streetAddress1: { - required: true, - serializedName: "streetAddress1", - type: { - name: "String" - } - }, - streetAddress2: { - serializedName: "streetAddress2", - type: { - name: "String" - } - }, - streetAddress3: { - serializedName: "streetAddress3", - type: { - name: "String" - } - }, - city: { - serializedName: "city", - type: { - name: "String" - } - }, - stateOrProvince: { - serializedName: "stateOrProvince", - type: { - name: "String" - } - }, - country: { - required: true, - serializedName: "country", + provider: { + serializedName: "provider", type: { name: "String" } }, - postalCode: { - required: true, - serializedName: "postalCode", + resource: { + serializedName: "resource", type: { name: "String" } }, - zipExtendedCode: { - serializedName: "zipExtendedCode", + operation: { + serializedName: "operation", type: { name: "String" } }, - companyName: { - serializedName: "companyName", + description: { + serializedName: "description", type: { name: "String" } - }, - addressType: { - serializedName: "addressType", - type: { - name: "Enum", - allowedValues: [ - "None", - "Residential", - "Commercial" - ] - } } } } }; -export const AddressValidationOutput: msRest.CompositeMapper = { - serializedName: "AddressValidationOutput", +export const ApiError: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AddressValidationOutput", + className: "ApiError", modelProperties: { error: { - readOnly: true, - serializedName: "properties.error", + serializedName: "error", type: { name: "Composite", - className: "ErrorModel" + className: "ErrorDetail" } - }, - validationType: { + } + } + } +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", required: true, - serializedName: "properties.validationType", type: { name: "String" } }, - validationStatus: { - readOnly: true, - serializedName: "properties.validationStatus", + message: { + serializedName: "message", + required: true, type: { - name: "Enum", - allowedValues: [ - "Valid", - "Invalid", - "Ambiguous" - ] + name: "String" } }, - alternateAddresses: { - readOnly: true, - serializedName: "properties.alternateAddresses", + details: { + serializedName: "details", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ShippingAddress" + className: "Details" } } } + }, + target: { + serializedName: "target", + type: { + name: "String" + } } } } }; -export const ApplianceNetworkConfiguration: msRest.CompositeMapper = { - serializedName: "ApplianceNetworkConfiguration", +export const Details: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ApplianceNetworkConfiguration", + className: "Details", modelProperties: { - name: { - readOnly: true, - serializedName: "name", + code: { + serializedName: "code", + required: true, type: { name: "String" } }, - macAddress: { - readOnly: true, - serializedName: "macAddress", + message: { + serializedName: "message", + required: true, type: { name: "String" } @@ -274,29 +193,25 @@ export const ApplianceNetworkConfiguration: msRest.CompositeMapper = { } }; -export const ArmBaseObject: msRest.CompositeMapper = { - serializedName: "ArmBaseObject", +export const JobResourceList: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ArmBaseObject", + className: "JobResourceList", modelProperties: { - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, - id: { - readOnly: true, - serializedName: "id", + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobResource" + } + } } }, - type: { - readOnly: true, - serializedName: "type", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -305,253 +220,246 @@ export const ArmBaseObject: msRest.CompositeMapper = { } }; -export const AvailableSkuRequest: msRest.CompositeMapper = { - serializedName: "AvailableSkuRequest", +export const CloudError: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AvailableSkuRequest", + className: "CloudError", modelProperties: { - transferType: { - required: true, - isConstant: true, - serializedName: "transferType", - defaultValue: 'ImportToAzure', + code: { + serializedName: "code", type: { name: "String" } }, - country: { - required: true, - serializedName: "country", + message: { + serializedName: "message", type: { name: "String" } }, - location: { - required: true, - serializedName: "location", + target: { + serializedName: "target", type: { name: "String" } }, - skuNames: { - serializedName: "skuNames", + details: { + serializedName: "details", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "Enum", - allowedValues: [ - "DataBox", - "DataBoxDisk", - "DataBoxHeavy" - ] + name: "Composite", + className: "CloudError" } } } - } - } - } -}; - -export const Sku: msRest.CompositeMapper = { - serializedName: "Sku", - type: { - name: "Composite", - className: "Sku", - modelProperties: { - name: { - required: true, - serializedName: "name", - type: { - name: "Enum", - allowedValues: [ - "DataBox", - "DataBoxDisk", - "DataBoxHeavy" - ] - } - }, - displayName: { - serializedName: "displayName", - type: { - name: "String" - } }, - family: { - serializedName: "family", + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AdditionalErrorInfo" + } + } } } } } }; -export const DestinationToServiceLocationMap: msRest.CompositeMapper = { - serializedName: "DestinationToServiceLocationMap", +export const AdditionalErrorInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DestinationToServiceLocationMap", + className: "AdditionalErrorInfo", modelProperties: { - destinationLocation: { - readOnly: true, - serializedName: "destinationLocation", + type: { + serializedName: "type", type: { name: "String" } }, - serviceLocation: { - readOnly: true, - serializedName: "serviceLocation", + info: { + serializedName: "info", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "any" } } } } } } }; -export const SkuCapacity: msRest.CompositeMapper = { - serializedName: "SkuCapacity", +export const JobDetails: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SkuCapacity", + className: "JobDetails", + uberParent: "JobDetails", + polymorphicDiscriminator: { + serializedName: "jobDetailsType", + clientName: "jobDetailsType" + }, modelProperties: { - usable: { + jobStages: { + serializedName: "jobStages", readOnly: true, - serializedName: "usable", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobStages" + } + } } }, - maximum: { - readOnly: true, - serializedName: "maximum", + contactDetails: { + serializedName: "contactDetails", type: { - name: "String" + name: "Composite", + className: "ContactDetails" } - } - } - } -}; - -export const SkuCost: msRest.CompositeMapper = { - serializedName: "SkuCost", - type: { - name: "Composite", - className: "SkuCost", - modelProperties: { - meterId: { - readOnly: true, - serializedName: "meterId", + }, + shippingAddress: { + serializedName: "shippingAddress", type: { - name: "String" + name: "Composite", + className: "ShippingAddress" } }, - meterType: { - readOnly: true, - serializedName: "meterType", + deliveryPackage: { + serializedName: "deliveryPackage", type: { - name: "String" + name: "Composite", + className: "PackageShippingDetails" } - } - } - } -}; - -export const SkuInformation: msRest.CompositeMapper = { - serializedName: "SkuInformation", - type: { - name: "Composite", - className: "SkuInformation", - modelProperties: { - sku: { - readOnly: true, - serializedName: "sku", + }, + returnPackage: { + serializedName: "returnPackage", type: { name: "Composite", - className: "Sku" + className: "PackageShippingDetails" } }, - enabled: { - readOnly: true, - serializedName: "enabled", + dataImportDetails: { + serializedName: "dataImportDetails", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataImportDetails" + } + } } }, - destinationToServiceLocationMap: { - readOnly: true, - serializedName: "properties.destinationToServiceLocationMap", + dataExportDetails: { + serializedName: "dataExportDetails", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DestinationToServiceLocationMap" + className: "DataExportDetails" } } } }, - capacity: { - readOnly: true, - serializedName: "properties.capacity", + jobDetailsType: { + serializedName: "jobDetailsType", + required: true, + type: { + name: "Enum", + allowedValues: [ + "DataBox", + "DataBoxDisk", + "DataBoxHeavy", + "DataBoxCustomerDisk" + ] + } + }, + preferences: { + serializedName: "preferences", type: { name: "Composite", - className: "SkuCapacity" + className: "Preferences" } }, - costs: { + copyLogDetails: { + serializedName: "copyLogDetails", readOnly: true, - serializedName: "properties.costs", type: { name: "Sequence", element: { type: { name: "Composite", - className: "SkuCost" + className: "CopyLogDetails" } } } }, - apiVersions: { + reverseShipmentLabelSasKey: { + serializedName: "reverseShipmentLabelSasKey", + readOnly: true, + type: { + name: "String" + } + }, + chainOfCustodySasKey: { + serializedName: "chainOfCustodySasKey", + readOnly: true, + type: { + name: "String" + } + }, + keyEncryptionKey: { + serializedName: "keyEncryptionKey", + type: { + name: "Composite", + className: "KeyEncryptionKey" + } + }, + expectedDataSizeInTeraBytes: { + serializedName: "expectedDataSizeInTeraBytes", + type: { + name: "Number" + } + }, + actions: { + serializedName: "actions", readOnly: true, - serializedName: "properties.apiVersions", type: { name: "Sequence", element: { type: { - name: "String" + name: "Enum", + allowedValues: ["None", "MoveToCleanUpDevice", "Resume"] } } } }, - disabledReason: { - readOnly: true, - serializedName: "properties.disabledReason", + lastMitigationActionOnJob: { + serializedName: "lastMitigationActionOnJob", type: { - name: "Enum", - allowedValues: [ - "None", - "Country", - "Region", - "Feature", - "OfferType", - "NoSubscriptionInfo" - ] + name: "Composite", + className: "LastMitigationActionOnJob" } }, - disabledReasonMessage: { - readOnly: true, - serializedName: "properties.disabledReasonMessage", + datacenterAddress: { + serializedName: "datacenterAddress", type: { - name: "String" + name: "Composite", + className: "DatacenterAddressResponse" } }, - requiredFeature: { + dataCenterCode: { + serializedName: "dataCenterCode", readOnly: true, - serializedName: "properties.requiredFeature", type: { name: "String" } @@ -560,71 +468,80 @@ export const SkuInformation: msRest.CompositeMapper = { } }; -export const CancellationReason: msRest.CompositeMapper = { - serializedName: "CancellationReason", +export const JobStages: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CancellationReason", + className: "JobStages", modelProperties: { - reason: { - required: true, - serializedName: "reason", + stageName: { + serializedName: "stageName", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const NotificationPreference: msRest.CompositeMapper = { - serializedName: "NotificationPreference", - type: { - name: "Composite", - className: "NotificationPreference", - modelProperties: { - stageName: { - required: true, - serializedName: "stageName", + }, + displayName: { + serializedName: "displayName", + readOnly: true, + type: { + name: "String" + } + }, + stageStatus: { + serializedName: "stageStatus", + readOnly: true, type: { name: "Enum", allowedValues: [ - "DevicePrepared", - "Dispatched", - "Delivered", - "PickedUp", - "AtAzureDC", - "DataCopy" + "None", + "InProgress", + "Succeeded", + "Failed", + "Cancelled", + "Cancelling", + "SucceededWithErrors", + "WaitingForCustomerAction", + "SucceededWithWarnings", + "WaitingForCustomerActionForKek", + "WaitingForCustomerActionForCleanUp", + "CustomerActionPerformedForCleanUp" ] } }, - sendNotification: { - required: true, - serializedName: "sendNotification", + stageTime: { + serializedName: "stageTime", + readOnly: true, type: { - name: "Boolean" + name: "DateTime" + } + }, + jobStageDetails: { + serializedName: "jobStageDetails", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } } } } } } }; -export const ContactDetails: msRest.CompositeMapper = { - serializedName: "ContactDetails", +export const ContactDetails: coreClient.CompositeMapper = { type: { name: "Composite", className: "ContactDetails", modelProperties: { contactName: { - required: true, serializedName: "contactName", + required: true, type: { name: "String" } }, phone: { - required: true, serializedName: "phone", + required: true, type: { name: "String" } @@ -642,8 +559,8 @@ export const ContactDetails: msRest.CompositeMapper = { } }, emailList: { - required: true, serializedName: "emailList", + required: true, type: { name: "Sequence", element: { @@ -669,133 +586,125 @@ export const ContactDetails: msRest.CompositeMapper = { } }; -export const CopyLogDetails: msRest.CompositeMapper = { - serializedName: "CopyLogDetails", +export const NotificationPreference: coreClient.CompositeMapper = { type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "copyLogDetailsType", - clientName: "copyLogDetailsType" - }, - uberParent: "CopyLogDetails", - className: "CopyLogDetails", + className: "NotificationPreference", modelProperties: { - copyLogDetailsType: { + stageName: { + serializedName: "stageName", required: true, - serializedName: "copyLogDetailsType", type: { name: "String" } - } + }, + sendNotification: { + defaultValue: true, + serializedName: "sendNotification", + required: true, + type: { + name: "Boolean" + } + } } } }; -export const CopyProgress: msRest.CompositeMapper = { - serializedName: "CopyProgress", +export const ShippingAddress: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CopyProgress", + className: "ShippingAddress", modelProperties: { - storageAccountName: { - readOnly: true, - serializedName: "storageAccountName", + streetAddress1: { + serializedName: "streetAddress1", + required: true, type: { name: "String" } }, - dataDestinationType: { - readOnly: true, - serializedName: "dataDestinationType", - type: { - name: "Enum", - allowedValues: [ - "StorageAccount", - "ManagedDisk" - ] - } - }, - accountId: { - readOnly: true, - serializedName: "accountId", + streetAddress2: { + serializedName: "streetAddress2", type: { name: "String" } }, - bytesSentToCloud: { - readOnly: true, - serializedName: "bytesSentToCloud", + streetAddress3: { + serializedName: "streetAddress3", type: { - name: "Number" + name: "String" } }, - totalBytesToProcess: { - readOnly: true, - serializedName: "totalBytesToProcess", + city: { + serializedName: "city", type: { - name: "Number" + name: "String" } }, - filesProcessed: { - readOnly: true, - serializedName: "filesProcessed", + stateOrProvince: { + serializedName: "stateOrProvince", type: { - name: "Number" + name: "String" } }, - totalFilesToProcess: { - readOnly: true, - serializedName: "totalFilesToProcess", + country: { + serializedName: "country", + required: true, type: { - name: "Number" + name: "String" } }, - invalidFilesProcessed: { - readOnly: true, - serializedName: "invalidFilesProcessed", + postalCode: { + serializedName: "postalCode", type: { - name: "Number" + name: "String" } }, - invalidFileBytesUploaded: { - readOnly: true, - serializedName: "invalidFileBytesUploaded", + zipExtendedCode: { + serializedName: "zipExtendedCode", type: { - name: "Number" + name: "String" } }, - renamedContainerCount: { - readOnly: true, - serializedName: "renamedContainerCount", + companyName: { + serializedName: "companyName", type: { - name: "Number" + name: "String" } }, - filesErroredOut: { - readOnly: true, - serializedName: "filesErroredOut", + addressType: { + defaultValue: "None", + serializedName: "addressType", type: { - name: "Number" + name: "Enum", + allowedValues: ["None", "Residential", "Commercial"] } } } } }; -export const ValidationInputRequest: msRest.CompositeMapper = { - serializedName: "ValidationInputRequest", +export const PackageShippingDetails: coreClient.CompositeMapper = { type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "validationType", - clientName: "validationType" - }, - uberParent: "ValidationInputRequest", - className: "ValidationInputRequest", + className: "PackageShippingDetails", modelProperties: { - validationType: { - required: true, - serializedName: "validationType", + trackingUrl: { + serializedName: "trackingUrl", + readOnly: true, + type: { + name: "String" + } + }, + carrierName: { + serializedName: "carrierName", + readOnly: true, + type: { + name: "String" + } + }, + trackingId: { + serializedName: "trackingId", + readOnly: true, type: { name: "String" } @@ -804,53 +713,49 @@ export const ValidationInputRequest: msRest.CompositeMapper = { } }; -export const CreateOrderLimitForSubscriptionValidationRequest: msRest.CompositeMapper = { - serializedName: "ValidateCreateOrderLimit", +export const DataImportDetails: coreClient.CompositeMapper = { type: { name: "Composite", - polymorphicDiscriminator: ValidationInputRequest.type.polymorphicDiscriminator, - uberParent: "ValidationInputRequest", - className: "CreateOrderLimitForSubscriptionValidationRequest", + className: "DataImportDetails", modelProperties: { - ...ValidationInputRequest.type.modelProperties, - deviceType: { - required: true, - serializedName: "deviceType", + accountDetails: { + serializedName: "accountDetails", + type: { + name: "Composite", + className: "DataAccountDetails" + } + }, + logCollectionLevel: { + serializedName: "logCollectionLevel", type: { name: "Enum", - allowedValues: [ - "DataBox", - "DataBoxDisk", - "DataBoxHeavy" - ] + allowedValues: ["Error", "Verbose"] } } } } }; -export const ValidationInputResponse: msRest.CompositeMapper = { - serializedName: "ValidationInputResponse", +export const DataAccountDetails: coreClient.CompositeMapper = { type: { name: "Composite", + className: "DataAccountDetails", + uberParent: "DataAccountDetails", polymorphicDiscriminator: { - serializedName: "validationType", - clientName: "validationType" + serializedName: "dataAccountType", + clientName: "dataAccountType" }, - uberParent: "ValidationInputResponse", - className: "ValidationInputResponse", modelProperties: { - error: { - readOnly: true, - serializedName: "error", + dataAccountType: { + serializedName: "dataAccountType", + required: true, type: { - name: "Composite", - className: "ErrorModel" + name: "Enum", + allowedValues: ["StorageAccount", "ManagedDisk"] } }, - validationType: { - required: true, - serializedName: "validationType", + sharePassword: { + serializedName: "sharePassword", type: { name: "String" } @@ -859,268 +764,1809 @@ export const ValidationInputResponse: msRest.CompositeMapper = { } }; -export const CreateOrderLimitForSubscriptionValidationResponseProperties: msRest.CompositeMapper = { - serializedName: "ValidateCreateOrderLimit", +export const DataExportDetails: coreClient.CompositeMapper = { type: { name: "Composite", - polymorphicDiscriminator: ValidationInputResponse.type.polymorphicDiscriminator, - uberParent: "ValidationInputResponse", - className: "CreateOrderLimitForSubscriptionValidationResponseProperties", + className: "DataExportDetails", modelProperties: { - ...ValidationInputResponse.type.modelProperties, - status: { - readOnly: true, - serializedName: "status", + transferConfiguration: { + serializedName: "transferConfiguration", + type: { + name: "Composite", + className: "TransferConfiguration" + } + }, + logCollectionLevel: { + serializedName: "logCollectionLevel", type: { name: "Enum", - allowedValues: [ - "Valid", - "Invalid", - "Skipped" - ] + allowedValues: ["Error", "Verbose"] + } + }, + accountDetails: { + serializedName: "accountDetails", + type: { + name: "Composite", + className: "DataAccountDetails" } } } } }; -export const DataBoxAccountCopyLogDetails: msRest.CompositeMapper = { - serializedName: "DataBox", +export const TransferConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - polymorphicDiscriminator: CopyLogDetails.type.polymorphicDiscriminator, - uberParent: "CopyLogDetails", - className: "DataBoxAccountCopyLogDetails", + className: "TransferConfiguration", modelProperties: { - ...CopyLogDetails.type.modelProperties, - accountName: { - readOnly: true, - serializedName: "accountName", + transferConfigurationType: { + serializedName: "transferConfigurationType", + required: true, type: { - name: "String" + name: "Enum", + allowedValues: ["TransferAll", "TransferUsingFilter"] } }, - copyLogLink: { - readOnly: true, - serializedName: "copyLogLink", + transferFilterDetails: { + serializedName: "transferFilterDetails", type: { - name: "String" + name: "Composite", + className: "TransferConfigurationTransferFilterDetails" + } + }, + transferAllDetails: { + serializedName: "transferAllDetails", + type: { + name: "Composite", + className: "TransferConfigurationTransferAllDetails" } } } } }; -export const DataBoxDiskCopyLogDetails: msRest.CompositeMapper = { - serializedName: "DataBoxDisk", +export const TransferConfigurationTransferFilterDetails: coreClient.CompositeMapper = { type: { name: "Composite", - polymorphicDiscriminator: CopyLogDetails.type.polymorphicDiscriminator, - uberParent: "CopyLogDetails", - className: "DataBoxDiskCopyLogDetails", + className: "TransferConfigurationTransferFilterDetails", modelProperties: { - ...CopyLogDetails.type.modelProperties, - diskSerialNumber: { - readOnly: true, - serializedName: "diskSerialNumber", - type: { - name: "String" - } - }, - errorLogLink: { - readOnly: true, - serializedName: "errorLogLink", - type: { - name: "String" - } - }, - verboseLogLink: { - readOnly: true, - serializedName: "verboseLogLink", + include: { + serializedName: "include", type: { - name: "String" + name: "Composite", + className: "TransferFilterDetails" } } } } }; -export const DataBoxDiskCopyProgress: msRest.CompositeMapper = { - serializedName: "DataBoxDiskCopyProgress", +export const TransferFilterDetails: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DataBoxDiskCopyProgress", + className: "TransferFilterDetails", modelProperties: { - serialNumber: { - readOnly: true, - serializedName: "serialNumber", + dataAccountType: { + serializedName: "dataAccountType", + required: true, type: { - name: "String" + name: "Enum", + allowedValues: ["StorageAccount", "ManagedDisk"] } }, - bytesCopied: { - readOnly: true, - serializedName: "bytesCopied", + blobFilterDetails: { + serializedName: "blobFilterDetails", type: { - name: "Number" + name: "Composite", + className: "BlobFilterDetails" } }, - percentComplete: { - readOnly: true, - serializedName: "percentComplete", + azureFileFilterDetails: { + serializedName: "azureFileFilterDetails", type: { - name: "Number" + name: "Composite", + className: "AzureFileFilterDetails" } }, - status: { - readOnly: true, - serializedName: "status", + filterFileDetails: { + serializedName: "filterFileDetails", type: { - name: "Enum", - allowedValues: [ - "NotStarted", - "InProgress", - "Completed", - "CompletedWithErrors", - "Failed", - "NotReturned", - "HardwareError", - "DeviceFormatted", - "DeviceMetadataModified", - "StorageAccountNotAccessible", - "UnsupportedData" - ] + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FilterFileDetails" + } + } } } } } }; -export const JobDetails: msRest.CompositeMapper = { - serializedName: "JobDetails", +export const BlobFilterDetails: coreClient.CompositeMapper = { type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "jobDetailsType", - clientName: "jobDetailsType" - }, - uberParent: "JobDetails", - className: "JobDetails", + className: "BlobFilterDetails", modelProperties: { - expectedDataSizeInTerabytes: { - serializedName: "expectedDataSizeInTerabytes", + blobPrefixList: { + serializedName: "blobPrefixList", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - jobStages: { - readOnly: true, - serializedName: "jobStages", + blobPathList: { + serializedName: "blobPathList", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "JobStages" + name: "String" } } } }, - contactDetails: { - required: true, - serializedName: "contactDetails", + containerList: { + serializedName: "containerList", type: { - name: "Composite", + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const AzureFileFilterDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureFileFilterDetails", + modelProperties: { + filePrefixList: { + serializedName: "filePrefixList", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + filePathList: { + serializedName: "filePathList", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + fileShareList: { + serializedName: "fileShareList", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const FilterFileDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FilterFileDetails", + modelProperties: { + filterFileType: { + serializedName: "filterFileType", + required: true, + type: { + name: "Enum", + allowedValues: ["AzureBlob", "AzureFile"] + } + }, + filterFilePath: { + serializedName: "filterFilePath", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const TransferConfigurationTransferAllDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TransferConfigurationTransferAllDetails", + modelProperties: { + include: { + serializedName: "include", + type: { + name: "Composite", + className: "TransferAllDetails" + } + } + } + } +}; + +export const TransferAllDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TransferAllDetails", + modelProperties: { + dataAccountType: { + serializedName: "dataAccountType", + required: true, + type: { + name: "Enum", + allowedValues: ["StorageAccount", "ManagedDisk"] + } + }, + transferAllBlobs: { + serializedName: "transferAllBlobs", + type: { + name: "Boolean" + } + }, + transferAllFiles: { + serializedName: "transferAllFiles", + type: { + name: "Boolean" + } + } + } + } +}; + +export const Preferences: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Preferences", + modelProperties: { + preferredDataCenterRegion: { + serializedName: "preferredDataCenterRegion", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + transportPreferences: { + serializedName: "transportPreferences", + type: { + name: "Composite", + className: "TransportPreferences" + } + }, + encryptionPreferences: { + serializedName: "encryptionPreferences", + type: { + name: "Composite", + className: "EncryptionPreferences" + } + } + } + } +}; + +export const TransportPreferences: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TransportPreferences", + modelProperties: { + preferredShipmentType: { + serializedName: "preferredShipmentType", + required: true, + type: { + name: "Enum", + allowedValues: ["CustomerManaged", "MicrosoftManaged"] + } + } + } + } +}; + +export const EncryptionPreferences: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EncryptionPreferences", + modelProperties: { + doubleEncryption: { + defaultValue: "Disabled", + serializedName: "doubleEncryption", + type: { + name: "Enum", + allowedValues: ["Enabled", "Disabled"] + } + } + } + } +}; + +export const CopyLogDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CopyLogDetails", + uberParent: "CopyLogDetails", + polymorphicDiscriminator: { + serializedName: "copyLogDetailsType", + clientName: "copyLogDetailsType" + }, + modelProperties: { + copyLogDetailsType: { + serializedName: "copyLogDetailsType", + required: true, + type: { + name: "Enum", + allowedValues: [ + "DataBox", + "DataBoxDisk", + "DataBoxHeavy", + "DataBoxCustomerDisk" + ] + } + } + } + } +}; + +export const KeyEncryptionKey: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KeyEncryptionKey", + modelProperties: { + kekType: { + defaultValue: "MicrosoftManaged", + serializedName: "kekType", + required: true, + type: { + name: "Enum", + allowedValues: ["MicrosoftManaged", "CustomerManaged"] + } + }, + identityProperties: { + serializedName: "identityProperties", + type: { + name: "Composite", + className: "IdentityProperties" + } + }, + kekUrl: { + serializedName: "kekUrl", + type: { + name: "String" + } + }, + kekVaultResourceID: { + serializedName: "kekVaultResourceID", + type: { + name: "String" + } + } + } + } +}; + +export const IdentityProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IdentityProperties", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + userAssigned: { + serializedName: "userAssigned", + type: { + name: "Composite", + className: "UserAssignedProperties" + } + } + } + } +}; + +export const UserAssignedProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserAssignedProperties", + modelProperties: { + resourceId: { + serializedName: "resourceId", + type: { + name: "String" + } + } + } + } +}; + +export const LastMitigationActionOnJob: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LastMitigationActionOnJob", + modelProperties: { + actionDateTimeInUtc: { + serializedName: "actionDateTimeInUtc", + type: { + name: "DateTime" + } + }, + isPerformedByCustomer: { + serializedName: "isPerformedByCustomer", + type: { + name: "Boolean" + } + }, + customerResolution: { + serializedName: "customerResolution", + type: { + name: "Enum", + allowedValues: ["None", "MoveToCleanUpDevice", "Resume"] + } + } + } + } +}; + +export const DatacenterAddressResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatacenterAddressResponse", + uberParent: "DatacenterAddressResponse", + polymorphicDiscriminator: { + serializedName: "datacenterAddressType", + clientName: "datacenterAddressType" + }, + modelProperties: { + datacenterAddressType: { + serializedName: "datacenterAddressType", + required: true, + type: { + name: "Enum", + allowedValues: [ + "DatacenterAddressLocation", + "DatacenterAddressInstruction" + ] + } + }, + supportedCarriersForReturnShipment: { + serializedName: "supportedCarriersForReturnShipment", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + dataCenterAzureLocation: { + serializedName: "dataCenterAzureLocation", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const JobDeliveryInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobDeliveryInfo", + modelProperties: { + scheduledDateTime: { + serializedName: "scheduledDateTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + readOnly: true, + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + readOnly: true, + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + readOnly: true, + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + readOnly: true, + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + readOnly: true, + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + readOnly: true, + type: { + name: "DateTime" + } + } + } + } +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + 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" + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceIdentity" + } + } + } + } +}; + +export const Sku: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Sku", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "Enum", + allowedValues: [ + "DataBox", + "DataBoxDisk", + "DataBoxHeavy", + "DataBoxCustomerDisk" + ] + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + family: { + serializedName: "family", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceIdentity", + modelProperties: { + type: { + defaultValue: "None", + serializedName: "type", + type: { + name: "String" + } + }, + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "String" + } + }, + tenantId: { + serializedName: "tenantId", + readOnly: true, + type: { + name: "String" + } + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { name: "Composite", className: "UserAssignedIdentity" } + } + } + } + } + } +}; + +export const UserAssignedIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserAssignedIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "String" + } + }, + clientId: { + serializedName: "clientId", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const MitigateJobRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MitigateJobRequest", + modelProperties: { + customerResolutionCode: { + serializedName: "customerResolutionCode", + required: true, + type: { + name: "Enum", + allowedValues: ["None", "MoveToCleanUpDevice", "Resume"] + } + } + } + } +}; + +export const MarkDevicesShippedRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MarkDevicesShippedRequest", + modelProperties: { + deliverToDcPackageDetails: { + serializedName: "deliverToDcPackageDetails", + type: { + name: "Composite", + className: "PackageCarrierInfo" + } + } + } + } +}; + +export const PackageCarrierInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PackageCarrierInfo", + modelProperties: { + carrierName: { + serializedName: "carrierName", + type: { + name: "String" + } + }, + trackingId: { + serializedName: "trackingId", + type: { + name: "String" + } + } + } + } +}; + +export const AvailableSkuRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AvailableSkuRequest", + modelProperties: { + transferType: { + serializedName: "transferType", + required: true, + type: { + name: "Enum", + allowedValues: ["ImportToAzure", "ExportFromAzure"] + } + }, + country: { + serializedName: "country", + required: true, + type: { + name: "String" + } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + }, + skuNames: { + serializedName: "skuNames", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "DataBox", + "DataBoxDisk", + "DataBoxHeavy", + "DataBoxCustomerDisk" + ] + } + } + } + } + } + } +}; + +export const AvailableSkusResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AvailableSkusResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuInformation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const SkuInformation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SkuInformation", + modelProperties: { + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + enabled: { + serializedName: "enabled", + readOnly: true, + type: { + name: "Boolean" + } + }, + dataLocationToServiceLocationMap: { + serializedName: "properties.dataLocationToServiceLocationMap", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataLocationToServiceLocationMap" + } + } + } + }, + capacity: { + serializedName: "properties.capacity", + type: { + name: "Composite", + className: "SkuCapacity" + } + }, + costs: { + serializedName: "properties.costs", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuCost" + } + } + } + }, + apiVersions: { + serializedName: "properties.apiVersions", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + disabledReason: { + serializedName: "properties.disabledReason", + readOnly: true, + type: { + name: "Enum", + allowedValues: [ + "None", + "Country", + "Region", + "Feature", + "OfferType", + "NoSubscriptionInfo" + ] + } + }, + disabledReasonMessage: { + serializedName: "properties.disabledReasonMessage", + readOnly: true, + type: { + name: "String" + } + }, + requiredFeature: { + serializedName: "properties.requiredFeature", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const DataLocationToServiceLocationMap: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataLocationToServiceLocationMap", + modelProperties: { + dataLocation: { + serializedName: "dataLocation", + readOnly: true, + type: { + name: "String" + } + }, + serviceLocation: { + serializedName: "serviceLocation", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const SkuCapacity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SkuCapacity", + modelProperties: { + usable: { + serializedName: "usable", + readOnly: true, + type: { + name: "String" + } + }, + maximum: { + serializedName: "maximum", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const SkuCost: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SkuCost", + modelProperties: { + meterId: { + serializedName: "meterId", + readOnly: true, + type: { + name: "String" + } + }, + meterType: { + serializedName: "meterType", + readOnly: true, + type: { + name: "String" + } + }, + multiplier: { + serializedName: "multiplier", + readOnly: true, + type: { + name: "Number" + } + } + } + } +}; + +export const ValidationInputRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ValidationInputRequest", + uberParent: "ValidationInputRequest", + polymorphicDiscriminator: { + serializedName: "validationType", + clientName: "validationType" + }, + modelProperties: { + validationType: { + serializedName: "validationType", + required: true, + type: { + name: "Enum", + allowedValues: [ + "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", + "ValidatePreferences", + "ValidateCreateOrderLimit", + "ValidateSkuAvailability", + "ValidateDataTransferDetails" + ] + } + } + } + } +}; + +export const AddressValidationOutput: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AddressValidationOutput", + modelProperties: { + validationType: { + serializedName: "properties.validationType", + type: { + name: "Enum", + allowedValues: [ + "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", + "ValidatePreferences", + "ValidateCreateOrderLimit", + "ValidateSkuAvailability", + "ValidateDataTransferDetails" + ] + } + }, + error: { + serializedName: "properties.error", + type: { + name: "Composite", + className: "CloudError" + } + }, + validationStatus: { + serializedName: "properties.validationStatus", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["Valid", "Invalid", "Ambiguous"] + } + }, + alternateAddresses: { + serializedName: "properties.alternateAddresses", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ShippingAddress" + } + } + } + } + } + } +}; + +export const ValidationInputResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ValidationInputResponse", + uberParent: "ValidationInputResponse", + polymorphicDiscriminator: { + serializedName: "validationType", + clientName: "validationType" + }, + modelProperties: { + validationType: { + serializedName: "validationType", + required: true, + type: { + name: "Enum", + allowedValues: [ + "ValidateAddress", + "ValidateSubscriptionIsAllowedToCreateJob", + "ValidatePreferences", + "ValidateCreateOrderLimit", + "ValidateSkuAvailability", + "ValidateDataTransferDetails" + ] + } + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "CloudError" + } + } + } + } +}; + +export const ValidationRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ValidationRequest", + uberParent: "ValidationRequest", + polymorphicDiscriminator: { + serializedName: "validationCategory", + clientName: "validationCategory" + }, + modelProperties: { + validationCategory: { + defaultValue: "JobCreationValidation", + isConstant: true, + serializedName: "validationCategory", + type: { + name: "String" + } + }, + individualRequestDetails: { + serializedName: "individualRequestDetails", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ValidationInputRequest" + } + } + } + } + } + } +}; + +export const ValidationResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ValidationResponse", + modelProperties: { + status: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "Enum", + allowedValues: [ + "AllValidToProceed", + "InputsRevisitRequired", + "CertainInputValidationsSkipped" + ] + } + }, + individualResponseDetails: { + serializedName: "properties.individualResponseDetails", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ValidationInputResponse" + } + } + } + } + } + } +}; + +export const JobResourceUpdateParameter: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobResourceUpdateParameter", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceIdentity" + } + }, + details: { + serializedName: "properties.details", + type: { + name: "Composite", + className: "UpdateJobDetails" + } + } + } + } +}; + +export const UpdateJobDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdateJobDetails", + modelProperties: { + contactDetails: { + serializedName: "contactDetails", + type: { + name: "Composite", className: "ContactDetails" } - }, - shippingAddress: { - required: true, - serializedName: "shippingAddress", + }, + shippingAddress: { + serializedName: "shippingAddress", + type: { + name: "Composite", + className: "ShippingAddress" + } + }, + keyEncryptionKey: { + serializedName: "keyEncryptionKey", + type: { + name: "Composite", + className: "KeyEncryptionKey" + } + }, + returnToCustomerPackageDetails: { + serializedName: "returnToCustomerPackageDetails", + type: { + name: "Composite", + className: "PackageCarrierDetails" + } + } + } + } +}; + +export const PackageCarrierDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PackageCarrierDetails", + modelProperties: { + carrierAccountNumber: { + serializedName: "carrierAccountNumber", + type: { + name: "String" + } + }, + carrierName: { + serializedName: "carrierName", + type: { + name: "String" + } + }, + trackingId: { + serializedName: "trackingId", + type: { + name: "String" + } + } + } + } +}; + +export const ShipmentPickUpRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ShipmentPickUpRequest", + modelProperties: { + startTime: { + serializedName: "startTime", + required: true, + type: { + name: "DateTime" + } + }, + endTime: { + serializedName: "endTime", + required: true, + type: { + name: "DateTime" + } + }, + shipmentLocation: { + serializedName: "shipmentLocation", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ShipmentPickUpResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ShipmentPickUpResponse", + modelProperties: { + confirmationNumber: { + serializedName: "confirmationNumber", + readOnly: true, + type: { + name: "String" + } + }, + readyByTime: { + serializedName: "readyByTime", + readOnly: true, + type: { + name: "DateTime" + } + } + } + } +}; + +export const CancellationReason: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CancellationReason", + modelProperties: { + reason: { + serializedName: "reason", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const UnencryptedCredentialsList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UnencryptedCredentialsList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UnencryptedCredentials" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const UnencryptedCredentials: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UnencryptedCredentials", + modelProperties: { + jobName: { + serializedName: "jobName", + readOnly: true, + type: { + name: "String" + } + }, + jobSecrets: { + serializedName: "jobSecrets", + type: { + name: "Composite", + className: "JobSecrets" + } + } + } + } +}; + +export const JobSecrets: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobSecrets", + uberParent: "JobSecrets", + polymorphicDiscriminator: { + serializedName: "jobSecretsType", + clientName: "jobSecretsType" + }, + modelProperties: { + jobSecretsType: { + serializedName: "jobSecretsType", + required: true, + type: { + name: "Enum", + allowedValues: [ + "DataBox", + "DataBoxDisk", + "DataBoxHeavy", + "DataBoxCustomerDisk" + ] + } + }, + dcAccessSecurityCode: { + serializedName: "dcAccessSecurityCode", + type: { + name: "Composite", + className: "DcAccessSecurityCode" + } + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "CloudError" + } + } + } + } +}; + +export const DcAccessSecurityCode: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DcAccessSecurityCode", + modelProperties: { + reverseDCAccessCode: { + serializedName: "reverseDCAccessCode", + type: { + name: "String" + } + }, + forwardDCAccessCode: { + serializedName: "forwardDCAccessCode", + type: { + name: "String" + } + } + } + } +}; + +export const RegionConfigurationRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegionConfigurationRequest", + modelProperties: { + scheduleAvailabilityRequest: { + serializedName: "scheduleAvailabilityRequest", + type: { + name: "Composite", + className: "ScheduleAvailabilityRequest" + } + }, + transportAvailabilityRequest: { + serializedName: "transportAvailabilityRequest", + type: { + name: "Composite", + className: "TransportAvailabilityRequest" + } + }, + datacenterAddressRequest: { + serializedName: "datacenterAddressRequest", + type: { + name: "Composite", + className: "DatacenterAddressRequest" + } + } + } + } +}; + +export const ScheduleAvailabilityRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScheduleAvailabilityRequest", + uberParent: "ScheduleAvailabilityRequest", + polymorphicDiscriminator: { + serializedName: "skuName", + clientName: "skuName" + }, + modelProperties: { + storageLocation: { + serializedName: "storageLocation", + required: true, + type: { + name: "String" + } + }, + skuName: { + serializedName: "skuName", + required: true, + type: { + name: "Enum", + allowedValues: [ + "DataBox", + "DataBoxDisk", + "DataBoxHeavy", + "DataBoxCustomerDisk" + ] + } + }, + country: { + serializedName: "country", + type: { + name: "String" + } + } + } + } +}; + +export const TransportAvailabilityRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TransportAvailabilityRequest", + modelProperties: { + skuName: { + serializedName: "skuName", + type: { + name: "Enum", + allowedValues: [ + "DataBox", + "DataBoxDisk", + "DataBoxHeavy", + "DataBoxCustomerDisk" + ] + } + } + } + } +}; + +export const DatacenterAddressRequest: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatacenterAddressRequest", + modelProperties: { + storageLocation: { + serializedName: "storageLocation", + required: true, + type: { + name: "String" + } + }, + skuName: { + serializedName: "skuName", + required: true, + type: { + name: "Enum", + allowedValues: [ + "DataBox", + "DataBoxDisk", + "DataBoxHeavy", + "DataBoxCustomerDisk" + ] + } + } + } + } +}; + +export const RegionConfigurationResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegionConfigurationResponse", + modelProperties: { + scheduleAvailabilityResponse: { + serializedName: "scheduleAvailabilityResponse", + type: { + name: "Composite", + className: "ScheduleAvailabilityResponse" + } + }, + transportAvailabilityResponse: { + serializedName: "transportAvailabilityResponse", + type: { + name: "Composite", + className: "TransportAvailabilityResponse" + } + }, + datacenterAddressResponse: { + serializedName: "datacenterAddressResponse", + type: { + name: "Composite", + className: "DatacenterAddressResponse" + } + } + } + } +}; + +export const ScheduleAvailabilityResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScheduleAvailabilityResponse", + modelProperties: { + availableDates: { + serializedName: "availableDates", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "DateTime" + } + } + } + } + } + } +}; + +export const TransportAvailabilityResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TransportAvailabilityResponse", + modelProperties: { + transportAvailabilityDetails: { + serializedName: "transportAvailabilityDetails", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TransportAvailabilityDetails" + } + } + } + } + } + } +}; + +export const TransportAvailabilityDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TransportAvailabilityDetails", + modelProperties: { + shipmentType: { + serializedName: "shipmentType", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["CustomerManaged", "MicrosoftManaged"] + } + } + } + } +}; + +export const AccountCredentialDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccountCredentialDetails", + modelProperties: { + accountName: { + serializedName: "accountName", + readOnly: true, type: { - name: "Composite", - className: "ShippingAddress" + name: "String" } }, - deliveryPackage: { + dataAccountType: { + serializedName: "dataAccountType", readOnly: true, - serializedName: "deliveryPackage", type: { - name: "Composite", - className: "PackageShippingDetails" + name: "Enum", + allowedValues: ["StorageAccount", "ManagedDisk"] } }, - returnPackage: { + accountConnectionString: { + serializedName: "accountConnectionString", readOnly: true, - serializedName: "returnPackage", type: { - name: "Composite", - className: "PackageShippingDetails" + name: "String" } }, - destinationAccountDetails: { - required: true, - serializedName: "destinationAccountDetails", + shareCredentialDetails: { + serializedName: "shareCredentialDetails", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "DestinationAccountDetails" + className: "ShareCredentialDetails" } } } + } + } + } +}; + +export const ShareCredentialDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ShareCredentialDetails", + modelProperties: { + shareName: { + serializedName: "shareName", + readOnly: true, + type: { + name: "String" + } }, - errorDetails: { + shareType: { + serializedName: "shareType", readOnly: true, - serializedName: "errorDetails", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JobErrorDetails" - } - } + name: "Enum", + allowedValues: [ + "UnknownType", + "HCS", + "BlockBlob", + "PageBlob", + "AzureFile", + "ManagedDisk" + ] } }, - preferences: { - serializedName: "preferences", + userName: { + serializedName: "userName", + readOnly: true, type: { - name: "Composite", - className: "Preferences" + name: "String" } }, - copyLogDetails: { + password: { + serializedName: "password", + readOnly: true, + type: { + name: "String" + } + }, + supportedAccessProtocols: { + serializedName: "supportedAccessProtocols", readOnly: true, - serializedName: "copyLogDetails", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "CopyLogDetails" + name: "Enum", + allowedValues: ["SMB", "NFS"] } } } - }, - reverseShipmentLabelSasKey: { + } + } + } +}; + +export const ApplianceNetworkConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApplianceNetworkConfiguration", + modelProperties: { + name: { + serializedName: "name", readOnly: true, - serializedName: "reverseShipmentLabelSasKey", type: { name: "String" } }, - chainOfCustodySasKey: { + macAddress: { + serializedName: "macAddress", readOnly: true, - serializedName: "chainOfCustodySasKey", - type: { - name: "String" - } - }, - jobDetailsType: { - required: true, - serializedName: "jobDetailsType", type: { name: "String" } @@ -1129,53 +2575,28 @@ export const JobDetails: msRest.CompositeMapper = { } }; -export const DataBoxDiskJobDetails: msRest.CompositeMapper = { - serializedName: "DataBoxDisk", +export const ArmBaseObject: coreClient.CompositeMapper = { type: { name: "Composite", - polymorphicDiscriminator: JobDetails.type.polymorphicDiscriminator, - uberParent: "JobDetails", - className: "DataBoxDiskJobDetails", + className: "ArmBaseObject", modelProperties: { - ...JobDetails.type.modelProperties, - preferredDisks: { - serializedName: "preferredDisks", - type: { - name: "Dictionary", - value: { - type: { - name: "Number" - } - } - } - }, - copyProgress: { + name: { + serializedName: "name", readOnly: true, - serializedName: "copyProgress", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataBoxDiskCopyProgress" - } - } + name: "String" } }, - disksAndSizeDetails: { + id: { + serializedName: "id", readOnly: true, - serializedName: "disksAndSizeDetails", type: { - name: "Dictionary", - value: { - type: { - name: "Number" - } - } + name: "String" } }, - passkey: { - serializedName: "passkey", + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } @@ -1184,51 +2605,151 @@ export const DataBoxDiskJobDetails: msRest.CompositeMapper = { } }; -export const DiskSecret: msRest.CompositeMapper = { - serializedName: "DiskSecret", +export const CopyProgress: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiskSecret", + className: "CopyProgress", modelProperties: { - diskSerialNumber: { + storageAccountName: { + serializedName: "storageAccountName", readOnly: true, - serializedName: "diskSerialNumber", type: { name: "String" } }, - bitLockerKey: { + transferType: { + serializedName: "transferType", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["ImportToAzure", "ExportFromAzure"] + } + }, + dataAccountType: { + serializedName: "dataAccountType", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["StorageAccount", "ManagedDisk"] + } + }, + accountId: { + serializedName: "accountId", readOnly: true, - serializedName: "bitLockerKey", type: { name: "String" } + }, + bytesProcessed: { + serializedName: "bytesProcessed", + readOnly: true, + type: { + name: "Number" + } + }, + totalBytesToProcess: { + serializedName: "totalBytesToProcess", + readOnly: true, + type: { + name: "Number" + } + }, + filesProcessed: { + serializedName: "filesProcessed", + readOnly: true, + type: { + name: "Number" + } + }, + totalFilesToProcess: { + serializedName: "totalFilesToProcess", + readOnly: true, + type: { + name: "Number" + } + }, + invalidFilesProcessed: { + serializedName: "invalidFilesProcessed", + readOnly: true, + type: { + name: "Number" + } + }, + invalidFileBytesUploaded: { + serializedName: "invalidFileBytesUploaded", + readOnly: true, + type: { + name: "Number" + } + }, + renamedContainerCount: { + serializedName: "renamedContainerCount", + readOnly: true, + type: { + name: "Number" + } + }, + filesErroredOut: { + serializedName: "filesErroredOut", + readOnly: true, + type: { + name: "Number" + } + }, + directoriesErroredOut: { + serializedName: "directoriesErroredOut", + readOnly: true, + type: { + name: "Number" + } + }, + invalidDirectoriesProcessed: { + serializedName: "invalidDirectoriesProcessed", + readOnly: true, + type: { + name: "Number" + } + }, + isEnumerationInProgress: { + serializedName: "isEnumerationInProgress", + readOnly: true, + type: { + name: "Boolean" + } } } } }; -export const JobSecrets: msRest.CompositeMapper = { - serializedName: "JobSecrets", +export const ImportDiskDetails: coreClient.CompositeMapper = { type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "jobSecretsType", - clientName: "jobSecretsType" - }, - uberParent: "JobSecrets", - className: "JobSecrets", + className: "ImportDiskDetails", modelProperties: { - dcAccessSecurityCode: { - serializedName: "dcAccessSecurityCode", + manifestFile: { + serializedName: "manifestFile", + required: true, type: { - name: "Composite", - className: "DcAccessSecurityCode" + name: "String" } }, - jobSecretsType: { + manifestHash: { + serializedName: "manifestHash", required: true, - serializedName: "jobSecretsType", + type: { + name: "String" + } + }, + bitLockerKey: { + serializedName: "bitLockerKey", + required: true, + type: { + name: "String" + } + }, + backupManifestCloudPath: { + serializedName: "backupManifestCloudPath", + readOnly: true, type: { name: "String" } @@ -1237,102 +2758,88 @@ export const JobSecrets: msRest.CompositeMapper = { } }; -export const DataBoxDiskJobSecrets: msRest.CompositeMapper = { - serializedName: "DataBoxDisk", +export const ExportDiskDetails: coreClient.CompositeMapper = { type: { name: "Composite", - polymorphicDiscriminator: JobSecrets.type.polymorphicDiscriminator, - uberParent: "JobSecrets", - className: "DataBoxDiskJobSecrets", + className: "ExportDiskDetails", modelProperties: { - ...JobSecrets.type.modelProperties, - diskSecrets: { + manifestFile: { + serializedName: "manifestFile", readOnly: true, - serializedName: "diskSecrets", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiskSecret" - } - } + name: "String" } }, - passKey: { + manifestHash: { + serializedName: "manifestHash", readOnly: true, - serializedName: "passKey", type: { name: "String" } }, - isPasskeyUserDefined: { + backupManifestCloudPath: { + serializedName: "backupManifestCloudPath", readOnly: true, - serializedName: "isPasskeyUserDefined", type: { - name: "Boolean" + name: "String" } } } } }; -export const DataBoxHeavyAccountCopyLogDetails: msRest.CompositeMapper = { - serializedName: "DataBoxHeavy", +export const DiskSecret: coreClient.CompositeMapper = { type: { name: "Composite", - polymorphicDiscriminator: CopyLogDetails.type.polymorphicDiscriminator, - uberParent: "CopyLogDetails", - className: "DataBoxHeavyAccountCopyLogDetails", + className: "DiskSecret", modelProperties: { - ...CopyLogDetails.type.modelProperties, - accountName: { + diskSerialNumber: { + serializedName: "diskSerialNumber", readOnly: true, - serializedName: "accountName", type: { name: "String" } }, - copyLogLink: { + bitLockerKey: { + serializedName: "bitLockerKey", readOnly: true, - serializedName: "copyLogLink", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } } } } }; -export const DataBoxHeavyJobDetails: msRest.CompositeMapper = { - serializedName: "DataBoxHeavy", +export const DataBoxDiskCopyProgress: coreClient.CompositeMapper = { type: { name: "Composite", - polymorphicDiscriminator: JobDetails.type.polymorphicDiscriminator, - uberParent: "JobDetails", - className: "DataBoxHeavyJobDetails", + className: "DataBoxDiskCopyProgress", modelProperties: { - ...JobDetails.type.modelProperties, - copyProgress: { + serialNumber: { + serializedName: "serialNumber", readOnly: true, - serializedName: "copyProgress", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CopyProgress" - } - } + name: "String" } }, - devicePassword: { - serializedName: "devicePassword", + bytesCopied: { + serializedName: "bytesCopied", + readOnly: true, + type: { + name: "Number" + } + }, + percentComplete: { + serializedName: "percentComplete", + readOnly: true, + type: { + name: "Number" + } + }, + status: { + serializedName: "status", + readOnly: true, type: { name: "String" } @@ -1341,29 +2848,28 @@ export const DataBoxHeavyJobDetails: msRest.CompositeMapper = { } }; -export const DataBoxHeavySecret: msRest.CompositeMapper = { - serializedName: "DataBoxHeavySecret", +export const DataBoxHeavySecret: coreClient.CompositeMapper = { type: { name: "Composite", className: "DataBoxHeavySecret", modelProperties: { deviceSerialNumber: { - readOnly: true, serializedName: "deviceSerialNumber", + readOnly: true, type: { name: "String" } }, devicePassword: { - readOnly: true, serializedName: "devicePassword", + readOnly: true, type: { name: "String" } }, networkConfigurations: { - readOnly: true, serializedName: "networkConfigurations", + readOnly: true, type: { name: "Sequence", element: { @@ -1375,110 +2881,51 @@ export const DataBoxHeavySecret: msRest.CompositeMapper = { } }, encodedValidationCertPubKey: { - readOnly: true, serializedName: "encodedValidationCertPubKey", + readOnly: true, type: { name: "String" } }, accountCredentialDetails: { - readOnly: true, serializedName: "accountCredentialDetails", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AccountCredentialDetails" - } - } - } - } - } - } -}; - -export const DataBoxHeavyJobSecrets: msRest.CompositeMapper = { - serializedName: "DataBoxHeavy", - type: { - name: "Composite", - polymorphicDiscriminator: JobSecrets.type.polymorphicDiscriminator, - uberParent: "JobSecrets", - className: "DataBoxHeavyJobSecrets", - modelProperties: { - ...JobSecrets.type.modelProperties, - cabinetPodSecrets: { - readOnly: true, - serializedName: "cabinetPodSecrets", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataBoxHeavySecret" - } - } - } - } - } - } -}; - -export const DataBoxJobDetails: msRest.CompositeMapper = { - serializedName: "DataBox", - type: { - name: "Composite", - polymorphicDiscriminator: JobDetails.type.polymorphicDiscriminator, - uberParent: "JobDetails", - className: "DataBoxJobDetails", - modelProperties: { - ...JobDetails.type.modelProperties, - copyProgress: { readOnly: true, - serializedName: "copyProgress", type: { name: "Sequence", element: { type: { name: "Composite", - className: "CopyProgress" + className: "AccountCredentialDetails" } } } - }, - devicePassword: { - serializedName: "devicePassword", - type: { - name: "String" - } } } } }; -export const DataBoxSecret: msRest.CompositeMapper = { - serializedName: "DataBoxSecret", +export const DataBoxSecret: coreClient.CompositeMapper = { type: { name: "Composite", className: "DataBoxSecret", modelProperties: { deviceSerialNumber: { - readOnly: true, serializedName: "deviceSerialNumber", + readOnly: true, type: { name: "String" } }, devicePassword: { - readOnly: true, serializedName: "devicePassword", + readOnly: true, type: { name: "String" } }, networkConfigurations: { - readOnly: true, serializedName: "networkConfigurations", + readOnly: true, type: { name: "Sequence", element: { @@ -1490,15 +2937,15 @@ export const DataBoxSecret: msRest.CompositeMapper = { } }, encodedValidationCertPubKey: { - readOnly: true, serializedName: "encodedValidationCertPubKey", + readOnly: true, type: { name: "String" } }, accountCredentialDetails: { - readOnly: true, serializedName: "accountCredentialDetails", + readOnly: true, type: { name: "Sequence", element: { @@ -1513,132 +2960,107 @@ export const DataBoxSecret: msRest.CompositeMapper = { } }; -export const DataboxJobSecrets: msRest.CompositeMapper = { - serializedName: "DataBox", +export const DataBoxCustomerDiskJobDetails: coreClient.CompositeMapper = { + serializedName: "DataBoxCustomerDisk", type: { name: "Composite", - polymorphicDiscriminator: JobSecrets.type.polymorphicDiscriminator, - uberParent: "JobSecrets", - className: "DataboxJobSecrets", + className: "DataBoxCustomerDiskJobDetails", + uberParent: "JobDetails", + polymorphicDiscriminator: JobDetails.type.polymorphicDiscriminator, modelProperties: { - ...JobSecrets.type.modelProperties, - podSecrets: { - serializedName: "podSecrets", + ...JobDetails.type.modelProperties, + importDiskDetailsCollection: { + serializedName: "importDiskDetailsCollection", + type: { + name: "Dictionary", + value: { type: { name: "Composite", className: "ImportDiskDetails" } } + } + }, + exportDiskDetailsCollection: { + serializedName: "exportDiskDetailsCollection", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "Composite", className: "ExportDiskDetails" } } + } + }, + copyProgress: { + serializedName: "copyProgress", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "DataBoxSecret" + className: "DataBoxCustomerDiskCopyProgress" } } - } - } - } - } -}; - -export const ScheduleAvailabilityRequest: msRest.CompositeMapper = { - serializedName: "ScheduleAvailabilityRequest", - type: { - name: "Composite", - polymorphicDiscriminator: { - serializedName: "skuName", - clientName: "skuName" - }, - uberParent: "ScheduleAvailabilityRequest", - className: "ScheduleAvailabilityRequest", - modelProperties: { - storageLocation: { - required: true, - serializedName: "storageLocation", - type: { - name: "String" - } - }, - skuName: { - required: true, - serializedName: "skuName", - type: { - name: "String" - } - } - } - } -}; - -export const DataBoxScheduleAvailabilityRequest: msRest.CompositeMapper = { - serializedName: "DataBox", - type: { - name: "Composite", - polymorphicDiscriminator: ScheduleAvailabilityRequest.type.polymorphicDiscriminator, - uberParent: "ScheduleAvailabilityRequest", - className: "DataBoxScheduleAvailabilityRequest", - modelProperties: { - ...ScheduleAvailabilityRequest.type.modelProperties - } - } -}; - -export const DestinationAccountDetails: msRest.CompositeMapper = { - serializedName: "DestinationAccountDetails", - type: { - name: "Composite", - polymorphicDiscriminator: { - serializedName: "dataDestinationType", - clientName: "dataDestinationType" - }, - uberParent: "DestinationAccountDetails", - className: "DestinationAccountDetails", - modelProperties: { - accountId: { - serializedName: "accountId", + } + }, + deliverToDcPackageDetails: { + serializedName: "deliverToDcPackageDetails", type: { - name: "String" + name: "Composite", + className: "PackageCarrierInfo" } }, - sharePassword: { - serializedName: "sharePassword", + returnToCustomerPackageDetails: { + serializedName: "returnToCustomerPackageDetails", type: { - name: "String" + name: "Composite", + className: "PackageCarrierDetails" } }, - dataDestinationType: { - required: true, - serializedName: "dataDestinationType", + enableManifestBackup: { + defaultValue: false, + serializedName: "enableManifestBackup", type: { - name: "String" + name: "Boolean" } } } } }; -export const DataDestinationDetailsValidationRequest: msRest.CompositeMapper = { - serializedName: "ValidateDataDestinationDetails", +export const DataBoxDiskJobDetails: coreClient.CompositeMapper = { + serializedName: "DataBoxDisk", type: { name: "Composite", - polymorphicDiscriminator: ValidationInputRequest.type.polymorphicDiscriminator, - uberParent: "ValidationInputRequest", - className: "DataDestinationDetailsValidationRequest", + className: "DataBoxDiskJobDetails", + uberParent: "JobDetails", + polymorphicDiscriminator: JobDetails.type.polymorphicDiscriminator, modelProperties: { - ...ValidationInputRequest.type.modelProperties, - destinationAccountDetails: { - required: true, - serializedName: "destinationAccountDetails", + ...JobDetails.type.modelProperties, + preferredDisks: { + serializedName: "preferredDisks", + type: { + name: "Dictionary", + value: { type: { name: "Number" } } + } + }, + copyProgress: { + serializedName: "copyProgress", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "DestinationAccountDetails" + className: "DataBoxDiskCopyProgress" } } } }, - location: { - required: true, - serializedName: "location", + disksAndSizeDetails: { + serializedName: "disksAndSizeDetails", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "Number" } } + } + }, + passkey: { + serializedName: "passkey", type: { name: "String" } @@ -1647,45 +3069,62 @@ export const DataDestinationDetailsValidationRequest: msRest.CompositeMapper = { } }; -export const DataDestinationDetailsValidationResponseProperties: msRest.CompositeMapper = { - serializedName: "ValidateDataDestinationDetails", +export const DataBoxHeavyJobDetails: coreClient.CompositeMapper = { + serializedName: "DataBoxHeavy", type: { name: "Composite", - polymorphicDiscriminator: ValidationInputResponse.type.polymorphicDiscriminator, - uberParent: "ValidationInputResponse", - className: "DataDestinationDetailsValidationResponseProperties", + className: "DataBoxHeavyJobDetails", + uberParent: "JobDetails", + polymorphicDiscriminator: JobDetails.type.polymorphicDiscriminator, modelProperties: { - ...ValidationInputResponse.type.modelProperties, - status: { + ...JobDetails.type.modelProperties, + copyProgress: { + serializedName: "copyProgress", readOnly: true, - serializedName: "status", type: { - name: "Enum", - allowedValues: [ - "Valid", - "Invalid", - "Skipped" - ] + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CopyProgress" + } + } + } + }, + devicePassword: { + serializedName: "devicePassword", + type: { + name: "String" } } } } }; -export const DcAccessSecurityCode: msRest.CompositeMapper = { - serializedName: "DcAccessSecurityCode", +export const DataBoxJobDetails: coreClient.CompositeMapper = { + serializedName: "DataBox", type: { name: "Composite", - className: "DcAccessSecurityCode", + className: "DataBoxJobDetails", + uberParent: "JobDetails", + polymorphicDiscriminator: JobDetails.type.polymorphicDiscriminator, modelProperties: { - forwardDcAccessCode: { - serializedName: "forwardDcAccessCode", + ...JobDetails.type.modelProperties, + copyProgress: { + serializedName: "copyProgress", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CopyProgress" + } + } } }, - reverseDcAccessCode: { - serializedName: "reverseDcAccessCode", + devicePassword: { + serializedName: "devicePassword", type: { name: "String" } @@ -1694,25 +3133,25 @@ export const DcAccessSecurityCode: msRest.CompositeMapper = { } }; -export const DestinationManagedDiskDetails: msRest.CompositeMapper = { +export const ManagedDiskDetails: coreClient.CompositeMapper = { serializedName: "ManagedDisk", type: { name: "Composite", - polymorphicDiscriminator: DestinationAccountDetails.type.polymorphicDiscriminator, - uberParent: "DestinationAccountDetails", - className: "DestinationManagedDiskDetails", + className: "ManagedDiskDetails", + uberParent: "DataAccountDetails", + polymorphicDiscriminator: DataAccountDetails.type.polymorphicDiscriminator, modelProperties: { - ...DestinationAccountDetails.type.modelProperties, + ...DataAccountDetails.type.modelProperties, resourceGroupId: { - required: true, serializedName: "resourceGroupId", + required: true, type: { name: "String" } }, stagingStorageAccountId: { - required: true, serializedName: "stagingStorageAccountId", + required: true, type: { name: "String" } @@ -1721,62 +3160,18 @@ export const DestinationManagedDiskDetails: msRest.CompositeMapper = { } }; -export const DestinationStorageAccountDetails: msRest.CompositeMapper = { +export const StorageAccountDetails: coreClient.CompositeMapper = { serializedName: "StorageAccount", type: { name: "Composite", - polymorphicDiscriminator: DestinationAccountDetails.type.polymorphicDiscriminator, - uberParent: "DestinationAccountDetails", - className: "DestinationStorageAccountDetails", + className: "StorageAccountDetails", + uberParent: "DataAccountDetails", + polymorphicDiscriminator: DataAccountDetails.type.polymorphicDiscriminator, modelProperties: { - ...DestinationAccountDetails.type.modelProperties, + ...DataAccountDetails.type.modelProperties, storageAccountId: { - required: true, serializedName: "storageAccountId", - type: { - name: "String" - } - } - } - } -}; - -export const DiskScheduleAvailabilityRequest: msRest.CompositeMapper = { - serializedName: "DataBoxDisk", - type: { - name: "Composite", - polymorphicDiscriminator: ScheduleAvailabilityRequest.type.polymorphicDiscriminator, - uberParent: "ScheduleAvailabilityRequest", - className: "DiskScheduleAvailabilityRequest", - modelProperties: { - ...ScheduleAvailabilityRequest.type.modelProperties, - expectedDataSizeInTerabytes: { required: true, - serializedName: "expectedDataSizeInTerabytes", - type: { - name: "Number" - } - } - } - } -}; - -export const ErrorModel: msRest.CompositeMapper = { - serializedName: "Error", - type: { - name: "Composite", - className: "ErrorModel", - modelProperties: { - code: { - readOnly: true, - serializedName: "code", - type: { - name: "String" - } - }, - message: { - readOnly: true, - serializedName: "message", type: { name: "String" } @@ -1785,65 +3180,32 @@ export const ErrorModel: msRest.CompositeMapper = { } }; -export const HeavyScheduleAvailabilityRequest: msRest.CompositeMapper = { - serializedName: "DataBoxHeavy", - type: { - name: "Composite", - polymorphicDiscriminator: ScheduleAvailabilityRequest.type.polymorphicDiscriminator, - uberParent: "ScheduleAvailabilityRequest", - className: "HeavyScheduleAvailabilityRequest", - modelProperties: { - ...ScheduleAvailabilityRequest.type.modelProperties - } - } -}; - -export const JobDeliveryInfo: msRest.CompositeMapper = { - serializedName: "JobDeliveryInfo", - type: { - name: "Composite", - className: "JobDeliveryInfo", - modelProperties: { - scheduledDateTime: { - serializedName: "scheduledDateTime", - type: { - name: "DateTime" - } - } - } - } -}; - -export const JobErrorDetails: msRest.CompositeMapper = { - serializedName: "JobErrorDetails", +export const DataBoxAccountCopyLogDetails: coreClient.CompositeMapper = { + serializedName: "DataBox", type: { name: "Composite", - className: "JobErrorDetails", + className: "DataBoxAccountCopyLogDetails", + uberParent: "CopyLogDetails", + polymorphicDiscriminator: CopyLogDetails.type.polymorphicDiscriminator, modelProperties: { - errorMessage: { + ...CopyLogDetails.type.modelProperties, + accountName: { + serializedName: "accountName", readOnly: true, - serializedName: "errorMessage", type: { name: "String" } }, - errorCode: { - readOnly: true, - serializedName: "errorCode", - type: { - name: "Number" - } - }, - recommendedAction: { + copyLogLink: { + serializedName: "copyLogLink", readOnly: true, - serializedName: "recommendedAction", type: { name: "String" } }, - exceptionMessage: { + copyVerboseLogLink: { + serializedName: "copyVerboseLogLink", readOnly: true, - serializedName: "exceptionMessage", type: { name: "String" } @@ -1852,151 +3214,93 @@ export const JobErrorDetails: msRest.CompositeMapper = { } }; -export const JobStages: msRest.CompositeMapper = { - serializedName: "JobStages", +export const DataBoxCustomerDiskCopyLogDetails: coreClient.CompositeMapper = { + serializedName: "DataBoxCustomerDisk", type: { name: "Composite", - className: "JobStages", + className: "DataBoxCustomerDiskCopyLogDetails", + uberParent: "CopyLogDetails", + polymorphicDiscriminator: CopyLogDetails.type.polymorphicDiscriminator, modelProperties: { - stageName: { - readOnly: true, - serializedName: "stageName", - type: { - name: "Enum", - allowedValues: [ - "DeviceOrdered", - "DevicePrepared", - "Dispatched", - "Delivered", - "PickedUp", - "AtAzureDC", - "DataCopy", - "Completed", - "CompletedWithErrors", - "Cancelled", - "Failed_IssueReportedAtCustomer", - "Failed_IssueDetectedAtAzureDC", - "Aborted", - "CompletedWithWarnings", - "ReadyToDispatchFromAzureDC", - "ReadyToReceiveAtAzureDC" - ] - } - }, - displayName: { + ...CopyLogDetails.type.modelProperties, + serialNumber: { + serializedName: "serialNumber", readOnly: true, - serializedName: "displayName", type: { name: "String" } }, - stageStatus: { - readOnly: true, - serializedName: "stageStatus", - type: { - name: "Enum", - allowedValues: [ - "None", - "InProgress", - "Succeeded", - "Failed", - "Cancelled", - "Cancelling", - "SucceededWithErrors" - ] - } - }, - stageTime: { - readOnly: true, - serializedName: "stageTime", - type: { - name: "DateTime" - } - }, - jobStageDetails: { + errorLogLink: { + serializedName: "errorLogLink", readOnly: true, - serializedName: "jobStageDetails", type: { - name: "Object" + name: "String" } }, - errorDetails: { + verboseLogLink: { + serializedName: "verboseLogLink", readOnly: true, - serializedName: "errorDetails", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JobErrorDetails" - } - } + name: "String" } } } } }; -export const PackageShippingDetails: msRest.CompositeMapper = { - serializedName: "PackageShippingDetails", +export const DataBoxDiskCopyLogDetails: coreClient.CompositeMapper = { + serializedName: "DataBoxDisk", type: { name: "Composite", - className: "PackageShippingDetails", + className: "DataBoxDiskCopyLogDetails", + uberParent: "CopyLogDetails", + polymorphicDiscriminator: CopyLogDetails.type.polymorphicDiscriminator, modelProperties: { - carrierName: { - readOnly: true, - serializedName: "carrierName", - type: { - name: "String" - } - }, - trackingId: { + ...CopyLogDetails.type.modelProperties, + diskSerialNumber: { + serializedName: "diskSerialNumber", readOnly: true, - serializedName: "trackingId", type: { name: "String" } }, - trackingUrl: { + errorLogLink: { + serializedName: "errorLogLink", readOnly: true, - serializedName: "trackingUrl", type: { - name: "String" - } - } - } - } -}; - -export const TransportPreferences: msRest.CompositeMapper = { - serializedName: "TransportPreferences", - type: { - name: "Composite", - className: "TransportPreferences", - modelProperties: { - preferredShipmentType: { - required: true, - serializedName: "preferredShipmentType", + name: "String" + } + }, + verboseLogLink: { + serializedName: "verboseLogLink", + readOnly: true, type: { - name: "Enum", - allowedValues: [ - "CustomerManaged", - "MicrosoftManaged" - ] + name: "String" } } } } }; -export const Preferences: msRest.CompositeMapper = { - serializedName: "Preferences", +export const DataBoxHeavyAccountCopyLogDetails: coreClient.CompositeMapper = { + serializedName: "DataBoxHeavy", type: { name: "Composite", - className: "Preferences", + className: "DataBoxHeavyAccountCopyLogDetails", + uberParent: "CopyLogDetails", + polymorphicDiscriminator: CopyLogDetails.type.polymorphicDiscriminator, modelProperties: { - preferredDataCenterRegion: { - serializedName: "preferredDataCenterRegion", + ...CopyLogDetails.type.modelProperties, + accountName: { + serializedName: "accountName", + readOnly: true, + type: { + name: "String" + } + }, + copyLogLink: { + serializedName: "copyLogLink", + readOnly: true, type: { name: "Sequence", element: { @@ -2006,176 +3310,140 @@ export const Preferences: msRest.CompositeMapper = { } } }, - transportPreferences: { - serializedName: "transportPreferences", + copyVerboseLogLink: { + serializedName: "copyVerboseLogLink", + readOnly: true, type: { - name: "Composite", - className: "TransportPreferences" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const Resource: msRest.CompositeMapper = { - serializedName: "Resource", +export const DatacenterAddressInstructionResponse: coreClient.CompositeMapper = { + serializedName: "DatacenterAddressInstruction", type: { name: "Composite", - className: "Resource", + className: "DatacenterAddressInstructionResponse", + uberParent: "DatacenterAddressResponse", + polymorphicDiscriminator: + DatacenterAddressResponse.type.polymorphicDiscriminator, modelProperties: { - location: { - required: true, - serializedName: "location", + ...DatacenterAddressResponse.type.modelProperties, + communicationInstruction: { + serializedName: "communicationInstruction", + readOnly: true, type: { name: "String" } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - sku: { - required: true, - serializedName: "sku", - type: { - name: "Composite", - className: "Sku" - } } } } }; -export const JobResource: msRest.CompositeMapper = { - serializedName: "JobResource", +export const DatacenterAddressLocationResponse: coreClient.CompositeMapper = { + serializedName: "DatacenterAddressLocation", type: { name: "Composite", - className: "JobResource", + className: "DatacenterAddressLocationResponse", + uberParent: "DatacenterAddressResponse", + polymorphicDiscriminator: + DatacenterAddressResponse.type.polymorphicDiscriminator, modelProperties: { - ...Resource.type.modelProperties, - isCancellable: { + ...DatacenterAddressResponse.type.modelProperties, + contactPersonName: { + serializedName: "contactPersonName", readOnly: true, - serializedName: "properties.isCancellable", type: { - name: "Boolean" + name: "String" } }, - isDeletable: { + company: { + serializedName: "company", readOnly: true, - serializedName: "properties.isDeletable", type: { - name: "Boolean" + name: "String" } }, - isShippingAddressEditable: { + street1: { + serializedName: "street1", readOnly: true, - serializedName: "properties.isShippingAddressEditable", type: { - name: "Boolean" + name: "String" } }, - status: { + street2: { + serializedName: "street2", readOnly: true, - serializedName: "properties.status", type: { - name: "Enum", - allowedValues: [ - "DeviceOrdered", - "DevicePrepared", - "Dispatched", - "Delivered", - "PickedUp", - "AtAzureDC", - "DataCopy", - "Completed", - "CompletedWithErrors", - "Cancelled", - "Failed_IssueReportedAtCustomer", - "Failed_IssueDetectedAtAzureDC", - "Aborted", - "CompletedWithWarnings", - "ReadyToDispatchFromAzureDC", - "ReadyToReceiveAtAzureDC" - ] + name: "String" } }, - startTime: { + street3: { + serializedName: "street3", readOnly: true, - serializedName: "properties.startTime", type: { - name: "DateTime" + name: "String" } }, - error: { + city: { + serializedName: "city", readOnly: true, - serializedName: "properties.error", - type: { - name: "Composite", - className: "ErrorModel" - } - }, - details: { - serializedName: "properties.details", type: { - name: "Composite", - className: "JobDetails" + name: "String" } }, - cancellationReason: { + state: { + serializedName: "state", readOnly: true, - serializedName: "properties.cancellationReason", type: { name: "String" } }, - deliveryType: { - serializedName: "properties.deliveryType", + zip: { + serializedName: "zip", + readOnly: true, type: { - name: "Enum", - allowedValues: [ - "NonScheduled", - "Scheduled" - ] + name: "String" } }, - deliveryInfo: { - serializedName: "properties.deliveryInfo", + country: { + serializedName: "country", + readOnly: true, type: { - name: "Composite", - className: "JobDeliveryInfo" + name: "String" } }, - isCancellableWithoutFee: { + phone: { + serializedName: "phone", readOnly: true, - serializedName: "properties.isCancellableWithoutFee", type: { - name: "Boolean" + name: "String" } }, - name: { + phoneExtension: { + serializedName: "phoneExtension", readOnly: true, - serializedName: "name", type: { name: "String" } }, - id: { + addressType: { + serializedName: "addressType", readOnly: true, - serializedName: "id", type: { name: "String" } }, - type: { + additionalShippingInformation: { + serializedName: "additionalShippingInformation", readOnly: true, - serializedName: "type", type: { name: "String" } @@ -2184,214 +3452,198 @@ export const JobResource: msRest.CompositeMapper = { } }; -export const UpdateJobDetails: msRest.CompositeMapper = { - serializedName: "UpdateJobDetails", +export const JobResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UpdateJobDetails", + className: "JobResource", modelProperties: { - contactDetails: { - serializedName: "contactDetails", + ...Resource.type.modelProperties, + name: { + serializedName: "name", + readOnly: true, type: { - name: "Composite", - className: "ContactDetails" + name: "String" } }, - shippingAddress: { - serializedName: "shippingAddress", + id: { + serializedName: "id", + readOnly: true, type: { - name: "Composite", - className: "ShippingAddress" + name: "String" } - } - } - } -}; - -export const JobResourceUpdateParameter: msRest.CompositeMapper = { - serializedName: "JobResourceUpdateParameter", - type: { - name: "Composite", - className: "JobResourceUpdateParameter", - modelProperties: { - details: { - serializedName: "properties.details", + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", type: { name: "Composite", - className: "UpdateJobDetails" + className: "SystemData" } }, - destinationAccountDetails: { - serializedName: "properties.destinationAccountDetails", + transferType: { + serializedName: "properties.transferType", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DestinationAccountDetails" - } - } + name: "Enum", + allowedValues: ["ImportToAzure", "ExportFromAzure"] } }, - tags: { - serializedName: "tags", + isCancellable: { + serializedName: "properties.isCancellable", + readOnly: true, type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "Boolean" } - } - } - } -}; - -export const OperationDisplay: msRest.CompositeMapper = { - serializedName: "OperationDisplay", - type: { - name: "Composite", - className: "OperationDisplay", - modelProperties: { - provider: { - serializedName: "provider", + }, + isDeletable: { + serializedName: "properties.isDeletable", + readOnly: true, type: { - name: "String" + name: "Boolean" } }, - resource: { - serializedName: "resource", + isShippingAddressEditable: { + serializedName: "properties.isShippingAddressEditable", + readOnly: true, type: { - name: "String" + name: "Boolean" } }, - operation: { - serializedName: "operation", + isPrepareToShipEnabled: { + serializedName: "properties.isPrepareToShipEnabled", + readOnly: true, type: { - name: "String" + name: "Boolean" } }, - description: { - serializedName: "description", + status: { + serializedName: "properties.status", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", - type: { - name: "Composite", - className: "Operation", - modelProperties: { - name: { + }, + startTime: { + serializedName: "properties.startTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + error: { + serializedName: "properties.error", + type: { + name: "Composite", + className: "CloudError" + } + }, + details: { + serializedName: "properties.details", + type: { + name: "Composite", + className: "JobDetails" + } + }, + cancellationReason: { + serializedName: "properties.cancellationReason", readOnly: true, - serializedName: "name", type: { name: "String" } }, - display: { - readOnly: true, - serializedName: "display", + deliveryType: { + defaultValue: "NonScheduled", + serializedName: "properties.deliveryType", type: { - name: "Composite", - className: "OperationDisplay" + name: "Enum", + allowedValues: ["NonScheduled", "Scheduled"] } }, - properties: { - readOnly: true, - serializedName: "properties", + deliveryInfo: { + serializedName: "properties.deliveryInfo", type: { - name: "Object" + name: "Composite", + className: "JobDeliveryInfo" } }, - origin: { + isCancellableWithoutFee: { + serializedName: "properties.isCancellableWithoutFee", readOnly: true, - serializedName: "origin", type: { - name: "String" + name: "Boolean" } } } } }; -export const PreferencesValidationRequest: msRest.CompositeMapper = { - serializedName: "ValidatePreferences", +export const ValidateAddress: coreClient.CompositeMapper = { + serializedName: "ValidateAddress", type: { name: "Composite", - polymorphicDiscriminator: ValidationInputRequest.type.polymorphicDiscriminator, + className: "ValidateAddress", uberParent: "ValidationInputRequest", - className: "PreferencesValidationRequest", + polymorphicDiscriminator: + ValidationInputRequest.type.polymorphicDiscriminator, modelProperties: { ...ValidationInputRequest.type.modelProperties, - preference: { - serializedName: "preference", + shippingAddress: { + serializedName: "shippingAddress", type: { name: "Composite", - className: "Preferences" + className: "ShippingAddress" } }, deviceType: { - required: true, serializedName: "deviceType", + required: true, type: { name: "Enum", allowedValues: [ "DataBox", "DataBoxDisk", - "DataBoxHeavy" + "DataBoxHeavy", + "DataBoxCustomerDisk" ] } - } - } - } -}; - -export const PreferencesValidationResponseProperties: msRest.CompositeMapper = { - serializedName: "ValidatePreferences", - type: { - name: "Composite", - polymorphicDiscriminator: ValidationInputResponse.type.polymorphicDiscriminator, - uberParent: "ValidationInputResponse", - className: "PreferencesValidationResponseProperties", - modelProperties: { - ...ValidationInputResponse.type.modelProperties, - status: { - readOnly: true, - serializedName: "status", + }, + transportPreferences: { + serializedName: "transportPreferences", type: { - name: "Enum", - allowedValues: [ - "Valid", - "Invalid", - "Skipped" - ] + name: "Composite", + className: "TransportPreferences" } } } } }; -export const TransportAvailabilityRequest: msRest.CompositeMapper = { - serializedName: "TransportAvailabilityRequest", +export const CreateOrderLimitForSubscriptionValidationRequest: coreClient.CompositeMapper = { + serializedName: "ValidateCreateOrderLimit", type: { name: "Composite", - className: "TransportAvailabilityRequest", + className: "CreateOrderLimitForSubscriptionValidationRequest", + uberParent: "ValidationInputRequest", + polymorphicDiscriminator: + ValidationInputRequest.type.polymorphicDiscriminator, modelProperties: { - skuName: { - serializedName: "skuName", + ...ValidationInputRequest.type.modelProperties, + deviceType: { + serializedName: "deviceType", + required: true, type: { name: "Enum", allowedValues: [ "DataBox", "DataBoxDisk", - "DataBoxHeavy" + "DataBoxHeavy", + "DataBoxCustomerDisk" ] } } @@ -2399,507 +3651,436 @@ export const TransportAvailabilityRequest: msRest.CompositeMapper = { } }; -export const RegionConfigurationRequest: msRest.CompositeMapper = { - serializedName: "RegionConfigurationRequest", - type: { - name: "Composite", - className: "RegionConfigurationRequest", - modelProperties: { - scheduleAvailabilityRequest: { - serializedName: "scheduleAvailabilityRequest", - type: { - name: "Composite", - className: "ScheduleAvailabilityRequest" - } - }, - transportAvailabilityRequest: { - serializedName: "transportAvailabilityRequest", - type: { - name: "Composite", - className: "TransportAvailabilityRequest" - } - } - } - } -}; - -export const ScheduleAvailabilityResponse: msRest.CompositeMapper = { - serializedName: "ScheduleAvailabilityResponse", +export const DataTransferDetailsValidationRequest: coreClient.CompositeMapper = { + serializedName: "ValidateDataTransferDetails", type: { name: "Composite", - className: "ScheduleAvailabilityResponse", + className: "DataTransferDetailsValidationRequest", + uberParent: "ValidationInputRequest", + polymorphicDiscriminator: + ValidationInputRequest.type.polymorphicDiscriminator, modelProperties: { - availableDates: { - readOnly: true, - serializedName: "availableDates", + ...ValidationInputRequest.type.modelProperties, + dataExportDetails: { + serializedName: "dataExportDetails", type: { name: "Sequence", element: { type: { - name: "DateTime" + name: "Composite", + className: "DataExportDetails" } } } - } - } - } -}; - -export const TransportAvailabilityDetails: msRest.CompositeMapper = { - serializedName: "TransportAvailabilityDetails", - type: { - name: "Composite", - className: "TransportAvailabilityDetails", - modelProperties: { - shipmentType: { - readOnly: true, - serializedName: "shipmentType", - type: { - name: "Enum", - allowedValues: [ - "CustomerManaged", - "MicrosoftManaged" - ] - } - } - } - } -}; - -export const TransportAvailabilityResponse: msRest.CompositeMapper = { - serializedName: "TransportAvailabilityResponse", - type: { - name: "Composite", - className: "TransportAvailabilityResponse", - modelProperties: { - transportAvailabilityDetails: { - readOnly: true, - serializedName: "transportAvailabilityDetails", + }, + dataImportDetails: { + serializedName: "dataImportDetails", type: { name: "Sequence", element: { type: { name: "Composite", - className: "TransportAvailabilityDetails" + className: "DataImportDetails" } } } - } - } - } -}; - -export const RegionConfigurationResponse: msRest.CompositeMapper = { - serializedName: "RegionConfigurationResponse", - type: { - name: "Composite", - className: "RegionConfigurationResponse", - modelProperties: { - scheduleAvailabilityResponse: { - readOnly: true, - serializedName: "scheduleAvailabilityResponse", - type: { - name: "Composite", - className: "ScheduleAvailabilityResponse" - } - }, - transportAvailabilityResponse: { - readOnly: true, - serializedName: "transportAvailabilityResponse", - type: { - name: "Composite", - className: "TransportAvailabilityResponse" - } - } - } - } -}; - -export const ShipmentPickUpRequest: msRest.CompositeMapper = { - serializedName: "ShipmentPickUpRequest", - type: { - name: "Composite", - className: "ShipmentPickUpRequest", - modelProperties: { - startTime: { - required: true, - serializedName: "startTime", - type: { - name: "DateTime" - } }, - endTime: { + deviceType: { + serializedName: "deviceType", required: true, - serializedName: "endTime", type: { - name: "DateTime" + name: "Enum", + allowedValues: [ + "DataBox", + "DataBoxDisk", + "DataBoxHeavy", + "DataBoxCustomerDisk" + ] } }, - shipmentLocation: { + transferType: { + serializedName: "transferType", required: true, - serializedName: "shipmentLocation", type: { - name: "String" + name: "Enum", + allowedValues: ["ImportToAzure", "ExportFromAzure"] } } } } }; -export const ShipmentPickUpResponse: msRest.CompositeMapper = { - serializedName: "ShipmentPickUpResponse", +export const PreferencesValidationRequest: coreClient.CompositeMapper = { + serializedName: "ValidatePreferences", type: { name: "Composite", - className: "ShipmentPickUpResponse", + className: "PreferencesValidationRequest", + uberParent: "ValidationInputRequest", + polymorphicDiscriminator: + ValidationInputRequest.type.polymorphicDiscriminator, modelProperties: { - confirmationNumber: { - readOnly: true, - serializedName: "confirmationNumber", + ...ValidationInputRequest.type.modelProperties, + preference: { + serializedName: "preference", type: { - name: "String" + name: "Composite", + className: "Preferences" } }, - readyByTime: { - readOnly: true, - serializedName: "readyByTime", + deviceType: { + serializedName: "deviceType", + required: true, type: { - name: "DateTime" + name: "Enum", + allowedValues: [ + "DataBox", + "DataBoxDisk", + "DataBoxHeavy", + "DataBoxCustomerDisk" + ] } } } } }; -export const SkuAvailabilityValidationRequest: msRest.CompositeMapper = { +export const SkuAvailabilityValidationRequest: coreClient.CompositeMapper = { serializedName: "ValidateSkuAvailability", type: { name: "Composite", - polymorphicDiscriminator: ValidationInputRequest.type.polymorphicDiscriminator, - uberParent: "ValidationInputRequest", className: "SkuAvailabilityValidationRequest", + uberParent: "ValidationInputRequest", + polymorphicDiscriminator: + ValidationInputRequest.type.polymorphicDiscriminator, modelProperties: { ...ValidationInputRequest.type.modelProperties, deviceType: { - required: true, serializedName: "deviceType", + required: true, type: { name: "Enum", allowedValues: [ "DataBox", "DataBoxDisk", - "DataBoxHeavy" + "DataBoxHeavy", + "DataBoxCustomerDisk" ] } }, transferType: { - required: true, - isConstant: true, serializedName: "transferType", - defaultValue: 'ImportToAzure', + required: true, type: { - name: "String" + name: "Enum", + allowedValues: ["ImportToAzure", "ExportFromAzure"] } }, country: { - required: true, serializedName: "country", + required: true, type: { name: "String" } }, location: { - required: true, serializedName: "location", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const SubscriptionIsAllowedToCreateJobValidationRequest: coreClient.CompositeMapper = { + serializedName: "ValidateSubscriptionIsAllowedToCreateJob", + type: { + name: "Composite", + className: "SubscriptionIsAllowedToCreateJobValidationRequest", + uberParent: "ValidationInputRequest", + polymorphicDiscriminator: + ValidationInputRequest.type.polymorphicDiscriminator, + modelProperties: { + ...ValidationInputRequest.type.modelProperties + } + } +}; + +export const AddressValidationProperties: coreClient.CompositeMapper = { + serializedName: "ValidateAddress", + type: { + name: "Composite", + className: "AddressValidationProperties", + uberParent: "ValidationInputResponse", + polymorphicDiscriminator: + ValidationInputResponse.type.polymorphicDiscriminator, + modelProperties: { + ...ValidationInputResponse.type.modelProperties, + validationStatus: { + serializedName: "validationStatus", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["Valid", "Invalid", "Ambiguous"] + } + }, + alternateAddresses: { + serializedName: "alternateAddresses", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ShippingAddress" + } + } } } } } }; -export const SkuAvailabilityValidationResponseProperties: msRest.CompositeMapper = { - serializedName: "ValidateSkuAvailability", +export const CreateOrderLimitForSubscriptionValidationResponseProperties: coreClient.CompositeMapper = { + serializedName: "ValidateCreateOrderLimit", type: { name: "Composite", - polymorphicDiscriminator: ValidationInputResponse.type.polymorphicDiscriminator, + className: "CreateOrderLimitForSubscriptionValidationResponseProperties", uberParent: "ValidationInputResponse", - className: "SkuAvailabilityValidationResponseProperties", + polymorphicDiscriminator: + ValidationInputResponse.type.polymorphicDiscriminator, modelProperties: { ...ValidationInputResponse.type.modelProperties, status: { - readOnly: true, serializedName: "status", + readOnly: true, type: { name: "Enum", - allowedValues: [ - "Valid", - "Invalid", - "Skipped" - ] + allowedValues: ["Valid", "Invalid", "Skipped"] } } } } }; -export const SubscriptionIsAllowedToCreateJobValidationRequest: msRest.CompositeMapper = { - serializedName: "ValidateSubscriptionIsAllowedToCreateJob", - type: { - name: "Composite", - polymorphicDiscriminator: ValidationInputRequest.type.polymorphicDiscriminator, - uberParent: "ValidationInputRequest", - className: "SubscriptionIsAllowedToCreateJobValidationRequest", - modelProperties: { - ...ValidationInputRequest.type.modelProperties - } - } -}; - -export const SubscriptionIsAllowedToCreateJobValidationResponseProperties: msRest.CompositeMapper = { - serializedName: "ValidateSubscriptionIsAllowedToCreateJob", +export const DataTransferDetailsValidationResponseProperties: coreClient.CompositeMapper = { + serializedName: "ValidateDataTransferDetails", type: { name: "Composite", - polymorphicDiscriminator: ValidationInputResponse.type.polymorphicDiscriminator, + className: "DataTransferDetailsValidationResponseProperties", uberParent: "ValidationInputResponse", - className: "SubscriptionIsAllowedToCreateJobValidationResponseProperties", + polymorphicDiscriminator: + ValidationInputResponse.type.polymorphicDiscriminator, modelProperties: { ...ValidationInputResponse.type.modelProperties, status: { - readOnly: true, serializedName: "status", + readOnly: true, type: { name: "Enum", - allowedValues: [ - "Valid", - "Invalid", - "Skipped" - ] + allowedValues: ["Valid", "Invalid", "Skipped"] } } } } }; -export const UnencryptedCredentials: msRest.CompositeMapper = { - serializedName: "UnencryptedCredentials", +export const PreferencesValidationResponseProperties: coreClient.CompositeMapper = { + serializedName: "ValidatePreferences", type: { name: "Composite", - className: "UnencryptedCredentials", + className: "PreferencesValidationResponseProperties", + uberParent: "ValidationInputResponse", + polymorphicDiscriminator: + ValidationInputResponse.type.polymorphicDiscriminator, modelProperties: { - jobName: { - readOnly: true, - serializedName: "jobName", - type: { - name: "String" - } - }, - jobSecrets: { + ...ValidationInputResponse.type.modelProperties, + status: { + serializedName: "status", readOnly: true, - serializedName: "jobSecrets", type: { - name: "Composite", - className: "JobSecrets" + name: "Enum", + allowedValues: ["Valid", "Invalid", "Skipped"] } } } } }; -export const ValidateAddress: msRest.CompositeMapper = { - serializedName: "ValidateAddress", +export const SkuAvailabilityValidationResponseProperties: coreClient.CompositeMapper = { + serializedName: "ValidateSkuAvailability", type: { name: "Composite", - polymorphicDiscriminator: ValidationInputRequest.type.polymorphicDiscriminator, - uberParent: "ValidationInputRequest", - className: "ValidateAddress", + className: "SkuAvailabilityValidationResponseProperties", + uberParent: "ValidationInputResponse", + polymorphicDiscriminator: + ValidationInputResponse.type.polymorphicDiscriminator, modelProperties: { - ...ValidationInputRequest.type.modelProperties, - shippingAddress: { - required: true, - serializedName: "shippingAddress", - type: { - name: "Composite", - className: "ShippingAddress" - } - }, - deviceType: { - required: true, - serializedName: "deviceType", + ...ValidationInputResponse.type.modelProperties, + status: { + serializedName: "status", + readOnly: true, type: { name: "Enum", - allowedValues: [ - "DataBox", - "DataBoxDisk", - "DataBoxHeavy" - ] - } - }, - transportPreferences: { - serializedName: "transportPreferences", - type: { - name: "Composite", - className: "TransportPreferences" + allowedValues: ["Valid", "Invalid", "Skipped"] } } } } }; -export const ValidationRequest: msRest.CompositeMapper = { - serializedName: "ValidationRequest", +export const SubscriptionIsAllowedToCreateJobValidationResponseProperties: coreClient.CompositeMapper = { + serializedName: "ValidateSubscriptionIsAllowedToCreateJob", type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "validationCategory", - clientName: "validationCategory" - }, - uberParent: "ValidationRequest", - className: "ValidationRequest", + className: "SubscriptionIsAllowedToCreateJobValidationResponseProperties", + uberParent: "ValidationInputResponse", + polymorphicDiscriminator: + ValidationInputResponse.type.polymorphicDiscriminator, modelProperties: { - individualRequestDetails: { - required: true, - serializedName: "individualRequestDetails", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ValidationInputRequest" - } - } - } - }, - validationCategory: { - required: true, - serializedName: "validationCategory", + ...ValidationInputResponse.type.modelProperties, + status: { + serializedName: "status", + readOnly: true, type: { - name: "String" + name: "Enum", + allowedValues: ["Valid", "Invalid", "Skipped"] } } } } }; -export const CreateJobValidations: msRest.CompositeMapper = { +export const CreateJobValidations: coreClient.CompositeMapper = { serializedName: "JobCreationValidation", type: { name: "Composite", - polymorphicDiscriminator: ValidationRequest.type.polymorphicDiscriminator, - uberParent: "ValidationRequest", className: "CreateJobValidations", + uberParent: "ValidationRequest", + polymorphicDiscriminator: ValidationRequest.type.polymorphicDiscriminator, modelProperties: { ...ValidationRequest.type.modelProperties } } }; -export const ValidationResponse: msRest.CompositeMapper = { - serializedName: "ValidationResponse", +export const CustomerDiskJobSecrets: coreClient.CompositeMapper = { + serializedName: "DataBoxCustomerDisk", type: { name: "Composite", - className: "ValidationResponse", + className: "CustomerDiskJobSecrets", + uberParent: "JobSecrets", + polymorphicDiscriminator: JobSecrets.type.polymorphicDiscriminator, modelProperties: { - status: { - readOnly: true, - serializedName: "properties.status", - type: { - name: "Enum", - allowedValues: [ - "AllValidToProceed", - "InputsRevisitRequired", - "CertainInputValidationsSkipped" - ] - } - }, - individualResponseDetails: { + ...JobSecrets.type.modelProperties, + diskSecrets: { + serializedName: "diskSecrets", readOnly: true, - serializedName: "properties.individualResponseDetails", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ValidationInputResponse" + className: "DiskSecret" } } } + }, + carrierAccountNumber: { + serializedName: "carrierAccountNumber", + readOnly: true, + type: { + name: "String" + } } } } }; -export const OperationList: msRest.CompositeMapper = { - serializedName: "OperationList", +export const DataBoxDiskJobSecrets: coreClient.CompositeMapper = { + serializedName: "DataBoxDisk", type: { name: "Composite", - className: "OperationList", + className: "DataBoxDiskJobSecrets", + uberParent: "JobSecrets", + polymorphicDiscriminator: JobSecrets.type.polymorphicDiscriminator, modelProperties: { - value: { + ...JobSecrets.type.modelProperties, + diskSecrets: { + serializedName: "diskSecrets", readOnly: true, - serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Operation" + className: "DiskSecret" } } } }, - nextLink: { - serializedName: "nextLink", + passKey: { + serializedName: "passKey", + readOnly: true, type: { name: "String" } + }, + isPasskeyUserDefined: { + serializedName: "isPasskeyUserDefined", + readOnly: true, + type: { + name: "Boolean" + } } } } }; -export const JobResourceList: msRest.CompositeMapper = { - serializedName: "JobResourceList", +export const DataBoxHeavyJobSecrets: coreClient.CompositeMapper = { + serializedName: "DataBoxHeavy", type: { name: "Composite", - className: "JobResourceList", + className: "DataBoxHeavyJobSecrets", + uberParent: "JobSecrets", + polymorphicDiscriminator: JobSecrets.type.polymorphicDiscriminator, modelProperties: { - value: { - serializedName: "", + ...JobSecrets.type.modelProperties, + cabinetPodSecrets: { + serializedName: "cabinetPodSecrets", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "JobResource" + className: "DataBoxHeavySecret" } } } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } } } } }; -export const UnencryptedCredentialsList: msRest.CompositeMapper = { - serializedName: "UnencryptedCredentialsList", +export const DataboxJobSecrets: coreClient.CompositeMapper = { + serializedName: "DataBox", type: { name: "Composite", - className: "UnencryptedCredentialsList", + className: "DataboxJobSecrets", + uberParent: "JobSecrets", + polymorphicDiscriminator: JobSecrets.type.polymorphicDiscriminator, modelProperties: { - value: { - serializedName: "", + ...JobSecrets.type.modelProperties, + podSecrets: { + serializedName: "podSecrets", type: { name: "Sequence", element: { type: { name: "Composite", - className: "UnencryptedCredentials" + className: "DataBoxSecret" } } } @@ -2908,27 +4089,71 @@ export const UnencryptedCredentialsList: msRest.CompositeMapper = { } }; -export const AvailableSkusResult: msRest.CompositeMapper = { - serializedName: "AvailableSkusResult", +export const DataBoxScheduleAvailabilityRequest: coreClient.CompositeMapper = { + serializedName: "DataBox", type: { name: "Composite", - className: "AvailableSkusResult", + className: "DataBoxScheduleAvailabilityRequest", + uberParent: "ScheduleAvailabilityRequest", + polymorphicDiscriminator: + ScheduleAvailabilityRequest.type.polymorphicDiscriminator, modelProperties: { - value: { + ...ScheduleAvailabilityRequest.type.modelProperties + } + } +}; + +export const DiskScheduleAvailabilityRequest: coreClient.CompositeMapper = { + serializedName: "DataBoxDisk", + type: { + name: "Composite", + className: "DiskScheduleAvailabilityRequest", + uberParent: "ScheduleAvailabilityRequest", + polymorphicDiscriminator: + ScheduleAvailabilityRequest.type.polymorphicDiscriminator, + modelProperties: { + ...ScheduleAvailabilityRequest.type.modelProperties, + expectedDataSizeInTeraBytes: { + serializedName: "expectedDataSizeInTeraBytes", + required: true, + type: { + name: "Number" + } + } + } + } +}; + +export const HeavyScheduleAvailabilityRequest: coreClient.CompositeMapper = { + serializedName: "DataBoxHeavy", + type: { + name: "Composite", + className: "HeavyScheduleAvailabilityRequest", + uberParent: "ScheduleAvailabilityRequest", + polymorphicDiscriminator: + ScheduleAvailabilityRequest.type.polymorphicDiscriminator, + modelProperties: { + ...ScheduleAvailabilityRequest.type.modelProperties + } + } +}; + +export const DataBoxCustomerDiskCopyProgress: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataBoxCustomerDiskCopyProgress", + modelProperties: { + ...CopyProgress.type.modelProperties, + serialNumber: { + serializedName: "serialNumber", readOnly: true, - serializedName: "", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SkuInformation" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + copyStatus: { + serializedName: "copyStatus", + readOnly: true, type: { name: "String" } @@ -2937,40 +4162,46 @@ export const AvailableSkusResult: msRest.CompositeMapper = { } }; -export const discriminators = { - 'CopyLogDetails' : CopyLogDetails, - 'ValidationInputRequest.ValidateCreateOrderLimit' : CreateOrderLimitForSubscriptionValidationRequest, - 'ValidationInputResponse.ValidateCreateOrderLimit' : CreateOrderLimitForSubscriptionValidationResponseProperties, - 'CopyLogDetails.DataBox' : DataBoxAccountCopyLogDetails, - 'CopyLogDetails.DataBoxDisk' : DataBoxDiskCopyLogDetails, - 'JobDetails.DataBoxDisk' : DataBoxDiskJobDetails, - 'JobSecrets.DataBoxDisk' : DataBoxDiskJobSecrets, - 'CopyLogDetails.DataBoxHeavy' : DataBoxHeavyAccountCopyLogDetails, - 'JobDetails.DataBoxHeavy' : DataBoxHeavyJobDetails, - 'JobSecrets.DataBoxHeavy' : DataBoxHeavyJobSecrets, - 'JobDetails.DataBox' : DataBoxJobDetails, - 'JobSecrets.DataBox' : DataboxJobSecrets, - 'ScheduleAvailabilityRequest.DataBox' : DataBoxScheduleAvailabilityRequest, - 'DestinationAccountDetails' : DestinationAccountDetails, - 'ValidationInputRequest.ValidateDataDestinationDetails' : DataDestinationDetailsValidationRequest, - 'ValidationInputResponse.ValidateDataDestinationDetails' : DataDestinationDetailsValidationResponseProperties, - 'DestinationAccountDetails.ManagedDisk' : DestinationManagedDiskDetails, - 'DestinationAccountDetails.StorageAccount' : DestinationStorageAccountDetails, - 'ScheduleAvailabilityRequest.DataBoxDisk' : DiskScheduleAvailabilityRequest, - 'ScheduleAvailabilityRequest.DataBoxHeavy' : HeavyScheduleAvailabilityRequest, - 'JobDetails' : JobDetails, - 'JobSecrets' : JobSecrets, - 'ValidationInputRequest.ValidatePreferences' : PreferencesValidationRequest, - 'ValidationInputResponse.ValidatePreferences' : PreferencesValidationResponseProperties, - 'ScheduleAvailabilityRequest' : ScheduleAvailabilityRequest, - 'ValidationInputRequest.ValidateSkuAvailability' : SkuAvailabilityValidationRequest, - 'ValidationInputResponse.ValidateSkuAvailability' : SkuAvailabilityValidationResponseProperties, - 'ValidationInputRequest.ValidateSubscriptionIsAllowedToCreateJob' : SubscriptionIsAllowedToCreateJobValidationRequest, - 'ValidationInputResponse.ValidateSubscriptionIsAllowedToCreateJob' : SubscriptionIsAllowedToCreateJobValidationResponseProperties, - 'ValidationInputRequest.ValidateAddress' : ValidateAddress, - 'ValidationInputRequest' : ValidationInputRequest, - 'ValidationInputResponse' : ValidationInputResponse, - 'ValidationRequest' : ValidationRequest, - 'ValidationRequest.JobCreationValidation' : CreateJobValidations - +export let discriminators = { + JobDetails: JobDetails, + DataAccountDetails: DataAccountDetails, + CopyLogDetails: CopyLogDetails, + DatacenterAddressResponse: DatacenterAddressResponse, + ValidationInputRequest: ValidationInputRequest, + ValidationInputResponse: ValidationInputResponse, + ValidationRequest: ValidationRequest, + JobSecrets: JobSecrets, + ScheduleAvailabilityRequest: ScheduleAvailabilityRequest, + "JobDetails.DataBoxCustomerDisk": DataBoxCustomerDiskJobDetails, + "JobDetails.DataBoxDisk": DataBoxDiskJobDetails, + "JobDetails.DataBoxHeavy": DataBoxHeavyJobDetails, + "JobDetails.DataBox": DataBoxJobDetails, + "DataAccountDetails.ManagedDisk": ManagedDiskDetails, + "DataAccountDetails.StorageAccount": StorageAccountDetails, + "CopyLogDetails.DataBox": DataBoxAccountCopyLogDetails, + "CopyLogDetails.DataBoxCustomerDisk": DataBoxCustomerDiskCopyLogDetails, + "CopyLogDetails.DataBoxDisk": DataBoxDiskCopyLogDetails, + "CopyLogDetails.DataBoxHeavy": DataBoxHeavyAccountCopyLogDetails, + "DatacenterAddressResponse.DatacenterAddressInstruction": DatacenterAddressInstructionResponse, + "DatacenterAddressResponse.DatacenterAddressLocation": DatacenterAddressLocationResponse, + "ValidationInputRequest.ValidateAddress": ValidateAddress, + "ValidationInputRequest.ValidateCreateOrderLimit": CreateOrderLimitForSubscriptionValidationRequest, + "ValidationInputRequest.ValidateDataTransferDetails": DataTransferDetailsValidationRequest, + "ValidationInputRequest.ValidatePreferences": PreferencesValidationRequest, + "ValidationInputRequest.ValidateSkuAvailability": SkuAvailabilityValidationRequest, + "ValidationInputRequest.ValidateSubscriptionIsAllowedToCreateJob": SubscriptionIsAllowedToCreateJobValidationRequest, + "ValidationInputResponse.ValidateAddress": AddressValidationProperties, + "ValidationInputResponse.ValidateCreateOrderLimit": CreateOrderLimitForSubscriptionValidationResponseProperties, + "ValidationInputResponse.ValidateDataTransferDetails": DataTransferDetailsValidationResponseProperties, + "ValidationInputResponse.ValidatePreferences": PreferencesValidationResponseProperties, + "ValidationInputResponse.ValidateSkuAvailability": SkuAvailabilityValidationResponseProperties, + "ValidationInputResponse.ValidateSubscriptionIsAllowedToCreateJob": SubscriptionIsAllowedToCreateJobValidationResponseProperties, + "ValidationRequest.JobCreationValidation": CreateJobValidations, + "JobSecrets.DataBoxCustomerDisk": CustomerDiskJobSecrets, + "JobSecrets.DataBoxDisk": DataBoxDiskJobSecrets, + "JobSecrets.DataBoxHeavy": DataBoxHeavyJobSecrets, + "JobSecrets.DataBox": DataboxJobSecrets, + "ScheduleAvailabilityRequest.DataBox": DataBoxScheduleAvailabilityRequest, + "ScheduleAvailabilityRequest.DataBoxDisk": DiskScheduleAvailabilityRequest, + "ScheduleAvailabilityRequest.DataBoxHeavy": HeavyScheduleAvailabilityRequest }; diff --git a/sdk/databox/arm-databox/src/models/operationsMappers.ts b/sdk/databox/arm-databox/src/models/operationsMappers.ts deleted file mode 100644 index 786d9130f59f..000000000000 --- a/sdk/databox/arm-databox/src/models/operationsMappers.ts +++ /dev/null @@ -1,15 +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, - Operation, - OperationDisplay, - OperationList -} from "../models/mappers"; diff --git a/sdk/databox/arm-databox/src/models/parameters.ts b/sdk/databox/arm-databox/src/models/parameters.ts index fd0c31593682..71e340c9765a 100644 --- a/sdk/databox/arm-databox/src/models/parameters.ts +++ b/sdk/databox/arm-databox/src/models/parameters.ts @@ -1,124 +1,214 @@ /* - * 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 { + MarkDevicesShippedRequest as MarkDevicesShippedRequestMapper, + JobResource as JobResourceMapper, + JobResourceUpdateParameter as JobResourceUpdateParameterMapper, + ShipmentPickUpRequest as ShipmentPickUpRequestMapper, + CancellationReason as CancellationReasonMapper, + MitigateJobRequest as MitigateJobRequestMapper, + AvailableSkuRequest as AvailableSkuRequestMapper, + ValidateAddress as ValidateAddressMapper, + ValidationRequest as ValidationRequestMapper, + RegionConfigurationRequest as RegionConfigurationRequestMapper +} 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-08-01-preview", + isConstant: true, serializedName: "api-version", type: { name: "String" } } }; -export const expand: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "expand" - ], + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", mapper: { - serializedName: "$expand", + serializedName: "nextLink", + required: true, type: { name: "String" } - } + }, + skipEncoding: true }; -export const ifMatch: msRest.OperationParameter = { - parameterPath: [ - "options", - "ifMatch" - ], + +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", mapper: { - serializedName: "If-Match", + serializedName: "subscriptionId", + required: true, type: { name: "String" } } }; -export const jobName: msRest.OperationURLParameter = { - parameterPath: "jobName", + +export const skipToken: OperationQueryParameter = { + parameterPath: ["options", "skipToken"], mapper: { - required: true, - serializedName: "jobName", - constraints: { - MaxLength: 24, - MinLength: 3, - Pattern: /^[-\w\.]+$/ - }, + serializedName: "$skipToken", type: { name: "String" } } }; -export const location: msRest.OperationURLParameter = { - parameterPath: "location", + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], mapper: { - required: true, - serializedName: "location", + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", type: { name: "String" } } }; -export const nextPageLink: msRest.OperationURLParameter = { - parameterPath: "nextPageLink", + +export const markDevicesShippedRequest: OperationParameter = { + parameterPath: "markDevicesShippedRequest", + mapper: MarkDevicesShippedRequestMapper +}; + +export const jobName: OperationURLParameter = { + parameterPath: "jobName", mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\.]+$"), + MaxLength: 24, + MinLength: 3 + }, + serializedName: "jobName", required: true, - serializedName: "nextLink", type: { name: "String" } - }, - skipEncoding: true + } }; -export const resourceGroupName: msRest.OperationURLParameter = { + +export const resourceGroupName: OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { - required: true, serializedName: "resourceGroupName", + required: true, type: { name: "String" } } }; -export const skipToken: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "skipToken" - ], + +export const expand: OperationQueryParameter = { + parameterPath: ["options", "expand"], mapper: { - serializedName: "$skipToken", + serializedName: "$expand", type: { name: "String" } } }; -export const subscriptionId: msRest.OperationURLParameter = { - parameterPath: "subscriptionId", + +export const jobResource: OperationParameter = { + parameterPath: "jobResource", + mapper: JobResourceMapper +}; + +export const jobResourceUpdateParameter: OperationParameter = { + parameterPath: "jobResourceUpdateParameter", + mapper: JobResourceUpdateParameterMapper +}; + +export const ifMatch: OperationParameter = { + parameterPath: ["options", "ifMatch"], + mapper: { + serializedName: "If-Match", + type: { + name: "String" + } + } +}; + +export const shipmentPickUpRequest: OperationParameter = { + parameterPath: "shipmentPickUpRequest", + mapper: ShipmentPickUpRequestMapper +}; + +export const cancellationReason: OperationParameter = { + parameterPath: "cancellationReason", + mapper: CancellationReasonMapper +}; + +export const mitigateJobRequest: OperationParameter = { + parameterPath: "mitigateJobRequest", + mapper: MitigateJobRequestMapper +}; + +export const availableSkuRequest: OperationParameter = { + parameterPath: "availableSkuRequest", + mapper: AvailableSkuRequestMapper +}; + +export const location: OperationURLParameter = { + parameterPath: "location", mapper: { + serializedName: "location", required: true, - serializedName: "subscriptionId", type: { name: "String" } } }; + +export const validateAddress: OperationParameter = { + parameterPath: "validateAddress", + mapper: ValidateAddressMapper +}; + +export const validationRequest: OperationParameter = { + parameterPath: "validationRequest", + mapper: ValidationRequestMapper +}; + +export const regionConfigurationRequest: OperationParameter = { + parameterPath: "regionConfigurationRequest", + mapper: RegionConfigurationRequestMapper +}; diff --git a/sdk/databox/arm-databox/src/models/serviceMappers.ts b/sdk/databox/arm-databox/src/models/serviceMappers.ts deleted file mode 100644 index 42db69bd2f00..000000000000 --- a/sdk/databox/arm-databox/src/models/serviceMappers.ts +++ /dev/null @@ -1,53 +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, - AddressValidationOutput, - AvailableSkuRequest, - AvailableSkusResult, - CloudError, - CreateJobValidations, - CreateOrderLimitForSubscriptionValidationRequest, - CreateOrderLimitForSubscriptionValidationResponseProperties, - DataBoxScheduleAvailabilityRequest, - DataDestinationDetailsValidationRequest, - DataDestinationDetailsValidationResponseProperties, - DestinationAccountDetails, - DestinationManagedDiskDetails, - DestinationStorageAccountDetails, - DestinationToServiceLocationMap, - DiskScheduleAvailabilityRequest, - ErrorModel, - HeavyScheduleAvailabilityRequest, - Preferences, - PreferencesValidationRequest, - PreferencesValidationResponseProperties, - RegionConfigurationRequest, - RegionConfigurationResponse, - ScheduleAvailabilityRequest, - ScheduleAvailabilityResponse, - ShippingAddress, - Sku, - SkuAvailabilityValidationRequest, - SkuAvailabilityValidationResponseProperties, - SkuCapacity, - SkuCost, - SkuInformation, - SubscriptionIsAllowedToCreateJobValidationRequest, - SubscriptionIsAllowedToCreateJobValidationResponseProperties, - TransportAvailabilityDetails, - TransportAvailabilityRequest, - TransportAvailabilityResponse, - TransportPreferences, - ValidateAddress, - ValidationInputRequest, - ValidationInputResponse, - ValidationRequest, - ValidationResponse -} from "../models/mappers"; diff --git a/sdk/databox/arm-databox/src/operations/index.ts b/sdk/databox/arm-databox/src/operations/index.ts index 795e0da39869..954ec72f6d68 100644 --- a/sdk/databox/arm-databox/src/operations/index.ts +++ b/sdk/databox/arm-databox/src/operations/index.ts @@ -1,11 +1,9 @@ /* - * 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"; diff --git a/sdk/databox/arm-databox/src/operations/jobs.ts b/sdk/databox/arm-databox/src/operations/jobs.ts index e54ed30dd8b2..b87c104294d2 100644 --- a/sdk/databox/arm-databox/src/operations/jobs.ts +++ b/sdk/databox/arm-databox/src/operations/jobs.ts @@ -1,688 +1,910 @@ /* - * 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/jobsMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Jobs } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { DataBoxManagementClientContext } from "../dataBoxManagementClientContext"; +import { DataBoxManagementClient } from "../dataBoxManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + JobResource, + JobsListNextOptionalParams, + JobsListOptionalParams, + JobsListByResourceGroupNextOptionalParams, + JobsListByResourceGroupOptionalParams, + UnencryptedCredentials, + JobsListCredentialsOptionalParams, + JobsListResponse, + MarkDevicesShippedRequest, + JobsMarkDevicesShippedOptionalParams, + JobsListByResourceGroupResponse, + JobsGetOptionalParams, + JobsGetResponse, + JobsCreateOptionalParams, + JobsCreateResponse, + JobsDeleteOptionalParams, + JobResourceUpdateParameter, + JobsUpdateOptionalParams, + JobsUpdateResponse, + ShipmentPickUpRequest, + JobsBookShipmentPickUpOptionalParams, + JobsBookShipmentPickUpResponse, + CancellationReason, + JobsCancelOptionalParams, + JobsListCredentialsResponse, + JobsListNextResponse, + JobsListByResourceGroupNextResponse +} from "../models"; -/** Class representing a Jobs. */ -export class Jobs { - private readonly client: DataBoxManagementClientContext; +/// +/** Class containing Jobs operations. */ +export class JobsImpl implements Jobs { + private readonly client: DataBoxManagementClient; /** - * Create a Jobs. - * @param {DataBoxManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Jobs class. + * @param client Reference to the service client */ - constructor(client: DataBoxManagementClientContext) { + constructor(client: DataBoxManagementClient) { this.client = client; } /** * Lists all the jobs available under the subscription. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - list(options?: Models.JobsListOptionalParams): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: Models.JobsListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.JobsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options + public list( + options?: JobsListOptionalParams + ): 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?: JobsListOptionalParams + ): 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?: JobsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } } /** * Lists all the jobs available under the given resource group. * @param resourceGroupName The Resource Group Name - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: Models.JobsListByResourceGroupOptionalParams): 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.JobsListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: Models.JobsListByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - options + public listByResourceGroup( + resourceGroupName: string, + options?: JobsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; }, - listByResourceGroupOperationSpec, - callback) as Promise; + byPage: () => { + return this.listByResourceGroupPagingPage(resourceGroupName, options); + } + }; } - /** - * Gets information about the specified job. - * @param resourceGroupName The Resource Group Name - * @param jobName The name of the job Resource within the specified resource group. job names must - * be between 3 and 24 characters in length and use any alphanumeric and underscore only - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, jobName: string, options?: Models.JobsGetOptionalParams): Promise; - /** - * @param resourceGroupName The Resource Group Name - * @param jobName The name of the job Resource within the specified resource group. job names must - * be between 3 and 24 characters in length and use any alphanumeric and underscore only - * @param callback The callback - */ - get(resourceGroupName: string, jobName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The Resource Group Name - * @param jobName The name of the job Resource within the specified resource group. job names must - * be between 3 and 24 characters in length and use any alphanumeric and underscore only - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, jobName: string, options: Models.JobsGetOptionalParams, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, jobName: string, options?: Models.JobsGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: JobsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listByResourceGroup(resourceGroupName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByResourceGroupNext( resourceGroupName, - jobName, + continuationToken, options - }, - getOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } } - /** - * Creates a new job with the specified parameters. Existing job cannot be updated with this API - * and should instead be updated with the Update job API. - * @param resourceGroupName The Resource Group Name - * @param jobName The name of the job Resource within the specified resource group. job names must - * be between 3 and 24 characters in length and use any alphanumeric and underscore only - * @param jobResource Job details from request body. - * @param [options] The optional parameters - * @returns Promise - */ - create(resourceGroupName: string, jobName: string, jobResource: Models.JobResource, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreate(resourceGroupName,jobName,jobResource,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: JobsListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } } /** - * Deletes a job. + * This method gets the unencrypted secrets related to the job. * @param resourceGroupName The Resource Group Name - * @param jobName The name of the job Resource within the specified resource group. job names must - * be between 3 and 24 characters in length and use any alphanumeric and underscore only - * @param [options] The optional parameters - * @returns Promise + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param options The options parameters. */ - deleteMethod(resourceGroupName: string, jobName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,jobName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + public listCredentials( + resourceGroupName: string, + jobName: string, + options?: JobsListCredentialsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listCredentialsPagingAll( + resourceGroupName, + jobName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listCredentialsPagingPage( + resourceGroupName, + jobName, + options + ); + } + }; } - /** - * Updates the properties of an existing job. - * @param resourceGroupName The Resource Group Name - * @param jobName The name of the job Resource within the specified resource group. job names must - * be between 3 and 24 characters in length and use any alphanumeric and underscore only - * @param jobResourceUpdateParameter Job update parameters from request body. - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, jobName: string, jobResourceUpdateParameter: Models.JobResourceUpdateParameter, options?: Models.JobsUpdateOptionalParams): Promise { - return this.beginUpdate(resourceGroupName,jobName,jobResourceUpdateParameter,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + private async *listCredentialsPagingPage( + resourceGroupName: string, + jobName: string, + options?: JobsListCredentialsOptionalParams + ): AsyncIterableIterator { + let result = await this._listCredentials( + resourceGroupName, + jobName, + options + ); + yield result.value || []; + } + + private async *listCredentialsPagingAll( + resourceGroupName: string, + jobName: string, + options?: JobsListCredentialsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listCredentialsPagingPage( + resourceGroupName, + jobName, + options + )) { + yield* page; + } } /** - * Book shipment pick up. - * @param resourceGroupName The Resource Group Name - * @param jobName The name of the job Resource within the specified resource group. job names must - * be between 3 and 24 characters in length and use any alphanumeric and underscore only - * @param shipmentPickUpRequest Details of shipment pick up request. - * @param [options] The optional parameters - * @returns Promise - */ - bookShipmentPickUp(resourceGroupName: string, jobName: string, shipmentPickUpRequest: Models.ShipmentPickUpRequest, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The Resource Group Name - * @param jobName The name of the job Resource within the specified resource group. job names must - * be between 3 and 24 characters in length and use any alphanumeric and underscore only - * @param shipmentPickUpRequest Details of shipment pick up request. - * @param callback The callback + * Lists all the jobs available under the subscription. + * @param options The options parameters. */ - bookShipmentPickUp(resourceGroupName: string, jobName: string, shipmentPickUpRequest: Models.ShipmentPickUpRequest, callback: msRest.ServiceCallback): void; + private _list(options?: JobsListOptionalParams): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + /** + * Request to mark devices for a given job as shipped + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only * @param resourceGroupName The Resource Group Name - * @param jobName The name of the job Resource within the specified resource group. job names must - * be between 3 and 24 characters in length and use any alphanumeric and underscore only - * @param shipmentPickUpRequest Details of shipment pick up request. - * @param options The optional parameters - * @param callback The callback + * @param markDevicesShippedRequest Mark Devices Shipped Request + * @param options The options parameters. */ - bookShipmentPickUp(resourceGroupName: string, jobName: string, shipmentPickUpRequest: Models.ShipmentPickUpRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - bookShipmentPickUp(resourceGroupName: string, jobName: string, shipmentPickUpRequest: Models.ShipmentPickUpRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + markDevicesShipped( + jobName: string, + resourceGroupName: string, + markDevicesShippedRequest: MarkDevicesShippedRequest, + options?: JobsMarkDevicesShippedOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - jobName, - shipmentPickUpRequest, - options - }, - bookShipmentPickUpOperationSpec, - callback) as Promise; + { jobName, resourceGroupName, markDevicesShippedRequest, options }, + markDevicesShippedOperationSpec + ); } /** - * CancelJob. - * @param resourceGroupName The Resource Group Name - * @param jobName The name of the job Resource within the specified resource group. job names must - * be between 3 and 24 characters in length and use any alphanumeric and underscore only - * @param reason Reason for cancellation. - * @param [options] The optional parameters - * @returns Promise - */ - cancel(resourceGroupName: string, jobName: string, reason: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The Resource Group Name - * @param jobName The name of the job Resource within the specified resource group. job names must - * be between 3 and 24 characters in length and use any alphanumeric and underscore only - * @param reason Reason for cancellation. - * @param callback The callback - */ - cancel(resourceGroupName: string, jobName: string, reason: string, callback: msRest.ServiceCallback): void; - /** + * Lists all the jobs available under the given resource group. * @param resourceGroupName The Resource Group Name - * @param jobName The name of the job Resource within the specified resource group. job names must - * be between 3 and 24 characters in length and use any alphanumeric and underscore only - * @param reason Reason for cancellation. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - cancel(resourceGroupName: string, jobName: string, reason: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - cancel(resourceGroupName: string, jobName: string, reason: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listByResourceGroup( + resourceGroupName: string, + options?: JobsListByResourceGroupOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - jobName, - reason, - options - }, - cancelOperationSpec, - callback); + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); } /** - * This method gets the unencrypted secrets related to the job. + * Gets information about the specified job. * @param resourceGroupName The Resource Group Name - * @param jobName The name of the job Resource within the specified resource group. job names must - * be between 3 and 24 characters in length and use any alphanumeric and underscore only - * @param [options] The optional parameters - * @returns Promise + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param options The options parameters. */ - listCredentials(resourceGroupName: string, jobName: string, options?: msRest.RequestOptionsBase): Promise; + get( + resourceGroupName: string, + jobName: string, + options?: JobsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, jobName, options }, + getOperationSpec + ); + } + /** + * Creates a new job with the specified parameters. Existing job cannot be updated with this API and + * should instead be updated with the Update job API. * @param resourceGroupName The Resource Group Name - * @param jobName The name of the job Resource within the specified resource group. job names must - * be between 3 and 24 characters in length and use any alphanumeric and underscore only - * @param callback The callback + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param jobResource Job details from request body. + * @param options The options parameters. */ - listCredentials(resourceGroupName: string, jobName: string, callback: msRest.ServiceCallback): void; + async beginCreate( + resourceGroupName: string, + jobName: string, + jobResource: JobResource, + options?: JobsCreateOptionalParams + ): Promise< + PollerLike, JobsCreateResponse> + > { + 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, + { resourceGroupName, jobName, jobResource, options }, + createOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + } + /** + * Creates a new job with the specified parameters. Existing job cannot be updated with this API and + * should instead be updated with the Update job API. * @param resourceGroupName The Resource Group Name - * @param jobName The name of the job Resource within the specified resource group. job names must - * be between 3 and 24 characters in length and use any alphanumeric and underscore only - * @param options The optional parameters - * @param callback The callback + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param jobResource Job details from request body. + * @param options The options parameters. */ - listCredentials(resourceGroupName: string, jobName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listCredentials(resourceGroupName: string, jobName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - jobName, - options - }, - listCredentialsOperationSpec, - callback) as Promise; + async beginCreateAndWait( + resourceGroupName: string, + jobName: string, + jobResource: JobResource, + options?: JobsCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + jobName, + jobResource, + options + ); + return poller.pollUntilDone(); } /** - * Creates a new job with the specified parameters. Existing job cannot be updated with this API - * and should instead be updated with the Update job API. + * Deletes a job. * @param resourceGroupName The Resource Group Name - * @param jobName The name of the job Resource within the specified resource group. job names must - * be between 3 and 24 characters in length and use any alphanumeric and underscore only - * @param jobResource Job details from request body. - * @param [options] The optional parameters - * @returns Promise + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param options The options parameters. */ - beginCreate(resourceGroupName: string, jobName: string, jobResource: Models.JobResource, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - jobName, - jobResource, - options - }, - beginCreateOperationSpec, - options); + async beginDelete( + resourceGroupName: string, + jobName: string, + options?: JobsDeleteOptionalParams + ): 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, + { resourceGroupName, jobName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** * Deletes a job. * @param resourceGroupName The Resource Group Name - * @param jobName The name of the job Resource within the specified resource group. job names must - * be between 3 and 24 characters in length and use any alphanumeric and underscore only - * @param [options] The optional parameters - * @returns Promise + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param options The options parameters. */ - beginDeleteMethod(resourceGroupName: string, jobName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - jobName, - options - }, - beginDeleteMethodOperationSpec, - options); + async beginDeleteAndWait( + resourceGroupName: string, + jobName: string, + options?: JobsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete(resourceGroupName, jobName, options); + return poller.pollUntilDone(); } /** * Updates the properties of an existing job. * @param resourceGroupName The Resource Group Name - * @param jobName The name of the job Resource within the specified resource group. job names must - * be between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only * @param jobResourceUpdateParameter Job update parameters from request body. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - beginUpdate(resourceGroupName: string, jobName: string, jobResourceUpdateParameter: Models.JobResourceUpdateParameter, options?: Models.JobsBeginUpdateOptionalParams): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - jobName, - jobResourceUpdateParameter, - options - }, - beginUpdateOperationSpec, - options); + async beginUpdate( + resourceGroupName: string, + jobName: string, + jobResourceUpdateParameter: JobResourceUpdateParameter, + options?: JobsUpdateOptionalParams + ): Promise< + PollerLike, JobsUpdateResponse> + > { + 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, + { resourceGroupName, jobName, jobResourceUpdateParameter, options }, + updateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); } /** - * Lists all the jobs available under the subscription. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise + * Updates the properties of an existing job. + * @param resourceGroupName The Resource Group Name + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param jobResourceUpdateParameter Job update parameters from request body. + * @param options The options parameters. */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + async beginUpdateAndWait( + resourceGroupName: string, + jobName: string, + jobResourceUpdateParameter: JobResourceUpdateParameter, + options?: JobsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + jobName, + jobResourceUpdateParameter, + options + ); + return poller.pollUntilDone(); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * Book shipment pick up. + * @param resourceGroupName The Resource Group Name + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param shipmentPickUpRequest Details of shipment pick up request. + * @param options The options parameters. */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + bookShipmentPickUp( + resourceGroupName: string, + jobName: string, + shipmentPickUpRequest: ShipmentPickUpRequest, + options?: JobsBookShipmentPickUpOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, jobName, shipmentPickUpRequest, options }, + bookShipmentPickUpOperationSpec + ); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback + * CancelJob. + * @param resourceGroupName The Resource Group Name + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param cancellationReason Reason for cancellation. + * @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 { + cancel( + resourceGroupName: string, + jobName: string, + cancellationReason: CancellationReason, + options?: JobsCancelOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; + { resourceGroupName, jobName, cancellationReason, options }, + cancelOperationSpec + ); } /** - * Lists all the jobs available under the given resource group. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise + * This method gets the unencrypted secrets related to the job. + * @param resourceGroupName The Resource Group Name + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param options The options parameters. */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + private _listCredentials( + resourceGroupName: string, + jobName: string, + options?: JobsListCredentialsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, jobName, options }, + listCredentialsOperationSpec + ); + } + /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. */ - listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + private _listNext( + nextLink: string, + options?: JobsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } + /** - * @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?: JobsListByResourceGroupNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNextOperationSpec, - callback) as Promise; + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs", httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.skipToken - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.JobResourceList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, + queryParameters: [Parameters.apiVersion, Parameters.skipToken], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], serializer }; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs", +const markDevicesShippedOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/markDevicesShipped", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + requestBody: Parameters.markDevicesShippedRequest, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, + Parameters.jobName, Parameters.resourceGroupName ], - queryParameters: [ - Parameters.apiVersion, - Parameters.skipToken - ], - headerParameters: [ - Parameters.acceptLanguage - ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.JobResourceList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}", + queryParameters: [Parameters.apiVersion, Parameters.skipToken], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.jobName - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.expand - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.resourceGroupName ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.JobResource }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, - serializer -}; - -const bookShipmentPickUpOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/bookShipmentPickUp", + queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.jobName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.jobName, + Parameters.resourceGroupName ], - requestBody: { - parameterPath: "shipmentPickUpRequest", - mapper: { - ...Mappers.ShipmentPickUpRequest, - required: true - } - }, + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}", + httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.ShipmentPickUpResponse + bodyMapper: Mappers.JobResource + }, + 201: { + bodyMapper: Mappers.JobResource + }, + 202: { + bodyMapper: Mappers.JobResource + }, + 204: { + bodyMapper: Mappers.JobResource }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, - serializer -}; - -const cancelOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/cancel", + requestBody: Parameters.jobResource, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.jobName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.jobName, + Parameters.resourceGroupName ], - requestBody: { - parameterPath: { - reason: "reason" - }, - mapper: { - ...Mappers.CancellationReason, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}", + httpMethod: "DELETE", responses: { + 200: {}, + 201: {}, + 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, - serializer -}; - -const listCredentialsOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/listCredentials", + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.jobName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.jobName, + Parameters.resourceGroupName ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}", + httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.UnencryptedCredentialsList + bodyMapper: Mappers.JobResource + }, + 201: { + bodyMapper: Mappers.JobResource + }, + 202: { + bodyMapper: Mappers.JobResource + }, + 204: { + bodyMapper: Mappers.JobResource }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, - serializer -}; - -const beginCreateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}", + requestBody: Parameters.jobResourceUpdateParameter, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.jobName - ], - queryParameters: [ - Parameters.apiVersion + Parameters.jobName, + Parameters.resourceGroupName ], headerParameters: [ - Parameters.acceptLanguage + Parameters.accept, + Parameters.contentType, + Parameters.ifMatch ], - requestBody: { - parameterPath: "jobResource", - mapper: { - ...Mappers.JobResource, - required: true - } - }, + mediaType: "json", + serializer +}; +const bookShipmentPickUpOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/bookShipmentPickUp", + httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.JobResource + bodyMapper: Mappers.ShipmentPickUpResponse }, - 202: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}", + requestBody: Parameters.shipmentPickUpRequest, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.jobName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage + Parameters.jobName, + Parameters.resourceGroupName ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const cancelOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/cancel", + httpMethod: "POST", responses: { - 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}", + requestBody: Parameters.cancellationReason, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.jobName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.ifMatch, - Parameters.acceptLanguage + Parameters.jobName, + Parameters.resourceGroupName ], - requestBody: { - parameterPath: "jobResourceUpdateParameter", - mapper: { - ...Mappers.JobResourceUpdateParameter, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listCredentialsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/listCredentials", + httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.JobResource + bodyMapper: Mappers.UnencryptedCredentialsList }, - 202: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.jobName, + Parameters.resourceGroupName + ], + 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.JobResourceList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, + queryParameters: [Parameters.apiVersion, Parameters.skipToken], + 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.JobResourceList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, + queryParameters: [Parameters.apiVersion, Parameters.skipToken], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/databox/arm-databox/src/operations/operations.ts b/sdk/databox/arm-databox/src/operations/operations.ts index 800bafca8a60..6e959b38032c 100644 --- a/sdk/databox/arm-databox/src/operations/operations.ts +++ b/sdk/databox/arm-databox/src/operations/operations.ts @@ -1,123 +1,137 @@ /* - * 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 { DataBoxManagementClientContext } from "../dataBoxManagementClientContext"; +import { DataBoxManagementClient } from "../dataBoxManagementClient"; +import { + Operation, + OperationsListNextOptionalParams, + OperationsListOptionalParams, + OperationsListResponse, + OperationsListNextResponse +} from "../models"; -/** Class representing a Operations. */ -export class Operations { - private readonly client: DataBoxManagementClientContext; +/// +/** Class containing Operations operations. */ +export class OperationsImpl implements Operations { + private readonly client: DataBoxManagementClient; /** - * Create a Operations. - * @param {DataBoxManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Operations class. + * @param client Reference to the service client */ - constructor(client: DataBoxManagementClientContext) { + constructor(client: DataBoxManagementClient) { this.client = client; } /** * This method gets all the operations. - * @param [options] The optional parameters - * @returns Promise + * @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; + } } /** * This method gets all the 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 + * @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.DataBox/operations", httpMethod: "GET", - path: "providers/Microsoft.DataBox/operations", - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { bodyMapper: Mappers.OperationList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, + 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.OperationList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.nextLink], + headerParameters: [Parameters.accept], serializer }; diff --git a/sdk/databox/arm-databox/src/operations/service.ts b/sdk/databox/arm-databox/src/operations/service.ts index 8ccece21381d..6e303fd26572 100644 --- a/sdk/databox/arm-databox/src/operations/service.ts +++ b/sdk/databox/arm-databox/src/operations/service.ts @@ -1,61 +1,131 @@ /* - * 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/serviceMappers"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { Service } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { DataBoxManagementClientContext } from "../dataBoxManagementClientContext"; +import { DataBoxManagementClient } from "../dataBoxManagementClient"; +import { + SkuInformation, + AvailableSkuRequest, + ServiceListAvailableSkusByResourceGroupNextOptionalParams, + ServiceListAvailableSkusByResourceGroupOptionalParams, + ServiceListAvailableSkusByResourceGroupResponse, + ValidateAddress, + ServiceValidateAddressOptionalParams, + ServiceValidateAddressResponse, + ValidationRequestUnion, + ServiceValidateInputsByResourceGroupOptionalParams, + ServiceValidateInputsByResourceGroupResponse, + ServiceValidateInputsOptionalParams, + ServiceValidateInputsResponse, + RegionConfigurationRequest, + ServiceRegionConfigurationOptionalParams, + ServiceRegionConfigurationResponse, + ServiceRegionConfigurationByResourceGroupOptionalParams, + ServiceRegionConfigurationByResourceGroupResponse, + ServiceListAvailableSkusByResourceGroupNextResponse +} from "../models"; -/** Class representing a Service. */ -export class Service { - private readonly client: DataBoxManagementClientContext; +/// +/** Class containing Service operations. */ +export class ServiceImpl implements Service { + private readonly client: DataBoxManagementClient; /** - * Create a Service. - * @param {DataBoxManagementClientContext} client Reference to the service client. + * Initialize a new instance of the class Service class. + * @param client Reference to the service client */ - constructor(client: DataBoxManagementClientContext) { + constructor(client: DataBoxManagementClient) { this.client = client; } /** - * This method provides the list of available skus for the given subscription and location. - * @param location The location of the resource - * @param availableSkuRequest Filters for showing the available skus. - * @param [options] The optional parameters - * @returns Promise - */ - listAvailableSkus(location: string, availableSkuRequest: Models.AvailableSkuRequest, options?: msRest.RequestOptionsBase): Promise; - /** - * @param location The location of the resource - * @param availableSkuRequest Filters for showing the available skus. - * @param callback The callback - */ - listAvailableSkus(location: string, availableSkuRequest: Models.AvailableSkuRequest, callback: msRest.ServiceCallback): void; - /** + * This method provides the list of available skus for the given subscription, resource group and + * location. + * @param resourceGroupName The Resource Group Name * @param location The location of the resource * @param availableSkuRequest Filters for showing the available skus. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - listAvailableSkus(location: string, availableSkuRequest: Models.AvailableSkuRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listAvailableSkus(location: string, availableSkuRequest: Models.AvailableSkuRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { + public listAvailableSkusByResourceGroup( + resourceGroupName: string, + location: string, + availableSkuRequest: AvailableSkuRequest, + options?: ServiceListAvailableSkusByResourceGroupOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listAvailableSkusByResourceGroupPagingAll( + resourceGroupName, + location, + availableSkuRequest, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listAvailableSkusByResourceGroupPagingPage( + resourceGroupName, + location, + availableSkuRequest, + options + ); + } + }; + } + + private async *listAvailableSkusByResourceGroupPagingPage( + resourceGroupName: string, + location: string, + availableSkuRequest: AvailableSkuRequest, + options?: ServiceListAvailableSkusByResourceGroupOptionalParams + ): AsyncIterableIterator { + let result = await this._listAvailableSkusByResourceGroup( + resourceGroupName, + location, + availableSkuRequest, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listAvailableSkusByResourceGroupNext( + resourceGroupName, location, availableSkuRequest, + continuationToken, options - }, - listAvailableSkusOperationSpec, - callback) as Promise; + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listAvailableSkusByResourceGroupPagingAll( + resourceGroupName: string, + location: string, + availableSkuRequest: AvailableSkuRequest, + options?: ServiceListAvailableSkusByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listAvailableSkusByResourceGroupPagingPage( + resourceGroupName, + location, + availableSkuRequest, + options + )) { + yield* page; + } } /** @@ -64,71 +134,36 @@ export class Service { * @param resourceGroupName The Resource Group Name * @param location The location of the resource * @param availableSkuRequest Filters for showing the available skus. - * @param [options] The optional parameters - * @returns Promise - */ - listAvailableSkusByResourceGroup(resourceGroupName: string, location: string, availableSkuRequest: Models.AvailableSkuRequest, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The Resource Group Name - * @param location The location of the resource - * @param availableSkuRequest Filters for showing the available skus. - * @param callback The callback - */ - listAvailableSkusByResourceGroup(resourceGroupName: string, location: string, availableSkuRequest: Models.AvailableSkuRequest, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The Resource Group Name - * @param location The location of the resource - * @param availableSkuRequest Filters for showing the available skus. - * @param options The optional parameters - * @param callback The callback + * @param options The options parameters. */ - listAvailableSkusByResourceGroup(resourceGroupName: string, location: string, availableSkuRequest: Models.AvailableSkuRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listAvailableSkusByResourceGroup(resourceGroupName: string, location: string, availableSkuRequest: Models.AvailableSkuRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listAvailableSkusByResourceGroup( + resourceGroupName: string, + location: string, + availableSkuRequest: AvailableSkuRequest, + options?: ServiceListAvailableSkusByResourceGroupOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - location, - availableSkuRequest, - options - }, - listAvailableSkusByResourceGroupOperationSpec, - callback) as Promise; + { resourceGroupName, location, availableSkuRequest, options }, + listAvailableSkusByResourceGroupOperationSpec + ); } /** - * [DEPRECATED NOTICE: This operation will soon be removed] This method validates the customer + * [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer * shipping address and provide alternate addresses if any. * @param location The location of the resource * @param validateAddress Shipping address of the customer. - * @param [options] The optional parameters - * @deprecated This operation is deprecated. Please do not use it any longer. - * @returns Promise + * @param options The options parameters. */ - validateAddressMethod(location: string, validateAddress: Models.ValidateAddress, options?: msRest.RequestOptionsBase): Promise; - /** - * @param location The location of the resource - * @param validateAddress Shipping address of the customer. - * @param callback The callback - * @deprecated This operation is deprecated. Please do not use it any longer. - */ - validateAddressMethod(location: string, validateAddress: Models.ValidateAddress, callback: msRest.ServiceCallback): void; - /** - * @param location The location of the resource - * @param validateAddress Shipping address of the customer. - * @param options The optional parameters - * @param callback The callback - * @deprecated This operation is deprecated. Please do not use it any longer. - */ - validateAddressMethod(location: string, validateAddress: Models.ValidateAddress, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - validateAddressMethod(location: string, validateAddress: Models.ValidateAddress, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + validateAddress( + location: string, + validateAddress: ValidateAddress, + options?: ServiceValidateAddressOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - validateAddress, - options - }, - validateAddressMethodOperationSpec, - callback) as Promise; + { location, validateAddress, options }, + validateAddressOperationSpec + ); } /** @@ -136,392 +171,260 @@ export class Service { * @param resourceGroupName The Resource Group Name * @param location The location of the resource * @param validationRequest Inputs of the customer. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - validateInputsByResourceGroup(resourceGroupName: string, location: string, validationRequest: Models.ValidationRequestUnion, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The Resource Group Name - * @param location The location of the resource - * @param validationRequest Inputs of the customer. - * @param callback The callback - */ - validateInputsByResourceGroup(resourceGroupName: string, location: string, validationRequest: Models.ValidationRequestUnion, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The Resource Group Name - * @param location The location of the resource - * @param validationRequest Inputs of the customer. - * @param options The optional parameters - * @param callback The callback - */ - validateInputsByResourceGroup(resourceGroupName: string, location: string, validationRequest: Models.ValidationRequestUnion, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - validateInputsByResourceGroup(resourceGroupName: string, location: string, validationRequest: Models.ValidationRequestUnion, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + validateInputsByResourceGroup( + resourceGroupName: string, + location: string, + validationRequest: ValidationRequestUnion, + options?: ServiceValidateInputsByResourceGroupOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - location, - validationRequest, - options - }, - validateInputsByResourceGroupOperationSpec, - callback) as Promise; + { resourceGroupName, location, validationRequest, options }, + validateInputsByResourceGroupOperationSpec + ); } /** * This method does all necessary pre-job creation validation under subscription. * @param location The location of the resource * @param validationRequest Inputs of the customer. - * @param [options] The optional parameters - * @returns Promise + * @param options The options parameters. */ - validateInputs(location: string, validationRequest: Models.ValidationRequestUnion, options?: msRest.RequestOptionsBase): Promise; - /** - * @param location The location of the resource - * @param validationRequest Inputs of the customer. - * @param callback The callback - */ - validateInputs(location: string, validationRequest: Models.ValidationRequestUnion, callback: msRest.ServiceCallback): void; - /** - * @param location The location of the resource - * @param validationRequest Inputs of the customer. - * @param options The optional parameters - * @param callback The callback - */ - validateInputs(location: string, validationRequest: Models.ValidationRequestUnion, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - validateInputs(location: string, validationRequest: Models.ValidationRequestUnion, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + validateInputs( + location: string, + validationRequest: ValidationRequestUnion, + options?: ServiceValidateInputsOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - validationRequest, - options - }, - validateInputsOperationSpec, - callback) as Promise; + { location, validationRequest, options }, + validateInputsOperationSpec + ); } /** - * This API provides configuration details specific to given region/location. + * This API provides configuration details specific to given region/location at Subscription level. * @param location The location of the resource - * @param [options] The optional parameters - * @returns Promise + * @param regionConfigurationRequest Request body to get the configuration for the region. + * @param options The options parameters. */ - regionConfiguration(location: string, options?: Models.ServiceRegionConfigurationOptionalParams): Promise; - /** - * @param location The location of the resource - * @param callback The callback - */ - regionConfiguration(location: string, callback: msRest.ServiceCallback): void; - /** - * @param location The location of the resource - * @param options The optional parameters - * @param callback The callback - */ - regionConfiguration(location: string, options: Models.ServiceRegionConfigurationOptionalParams, callback: msRest.ServiceCallback): void; - regionConfiguration(location: string, options?: Models.ServiceRegionConfigurationOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + regionConfiguration( + location: string, + regionConfigurationRequest: RegionConfigurationRequest, + options?: ServiceRegionConfigurationOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - location, - options - }, - regionConfigurationOperationSpec, - callback) as Promise; + { location, regionConfigurationRequest, options }, + regionConfigurationOperationSpec + ); } /** - * This method provides the list of available skus for the given subscription and location. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listAvailableSkusNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listAvailableSkusNext(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 + * This API provides configuration details specific to given region/location at Resource group level. + * @param resourceGroupName The Resource Group Name + * @param location The location of the resource + * @param regionConfigurationRequest Request body to get the configuration for the region at resource + * group level. + * @param options The options parameters. */ - listAvailableSkusNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listAvailableSkusNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + regionConfigurationByResourceGroup( + resourceGroupName: string, + location: string, + regionConfigurationRequest: RegionConfigurationRequest, + options?: ServiceRegionConfigurationByResourceGroupOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listAvailableSkusNextOperationSpec, - callback) as Promise; + { resourceGroupName, location, regionConfigurationRequest, options }, + regionConfigurationByResourceGroupOperationSpec + ); } /** - * This method provides the list of available skus for the given subscription, resource group and - * location. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listAvailableSkusByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listAvailableSkusByResourceGroupNext(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 + * ListAvailableSkusByResourceGroupNext + * @param resourceGroupName The Resource Group Name + * @param location The location of the resource + * @param availableSkuRequest Filters for showing the available skus. + * @param nextLink The nextLink from the previous successful call to the + * ListAvailableSkusByResourceGroup method. + * @param options The options parameters. */ - listAvailableSkusByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listAvailableSkusByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + private _listAvailableSkusByResourceGroupNext( + resourceGroupName: string, + location: string, + availableSkuRequest: AvailableSkuRequest, + nextLink: string, + options?: ServiceListAvailableSkusByResourceGroupNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listAvailableSkusByResourceGroupNextOperationSpec, - callback) as Promise; + { resourceGroupName, location, availableSkuRequest, nextLink, options }, + listAvailableSkusByResourceGroupNextOperationSpec + ); } } - // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listAvailableSkusOperationSpec: msRest.OperationSpec = { +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listAvailableSkusByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/availableSkus", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/availableSkus", - urlParameters: [ - Parameters.subscriptionId, - Parameters.location - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "availableSkuRequest", - mapper: { - ...Mappers.AvailableSkuRequest, - required: true - } - }, responses: { 200: { bodyMapper: Mappers.AvailableSkusResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, - serializer -}; - -const listAvailableSkusByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/availableSkus", + requestBody: Parameters.availableSkuRequest, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.location ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "availableSkuRequest", - mapper: { - ...Mappers.AvailableSkuRequest, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.AvailableSkusResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const validateAddressMethodOperationSpec: msRest.OperationSpec = { +const validateAddressOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress", httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress", - urlParameters: [ - Parameters.subscriptionId, - Parameters.location - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "validateAddress", - mapper: { - ...Mappers.ValidateAddress, - required: true - } - }, responses: { 200: { bodyMapper: Mappers.AddressValidationOutput }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, - serializer -}; - -const validateInputsByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/validateInputs", + requestBody: Parameters.validateAddress, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.location ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "validationRequest", - mapper: { - ...Mappers.ValidationRequest, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const validateInputsByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/validateInputs", + httpMethod: "POST", responses: { 200: { bodyMapper: Mappers.ValidationResponse }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, - serializer -}; - -const validateInputsOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateInputs", + requestBody: Parameters.validationRequest, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, + Parameters.resourceGroupName, Parameters.location ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "validationRequest", - mapper: { - ...Mappers.ValidationRequest, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const validateInputsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateInputs", + httpMethod: "POST", responses: { 200: { bodyMapper: Mappers.ValidationResponse }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, - serializer -}; - -const regionConfigurationOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration", + requestBody: Parameters.validationRequest, + queryParameters: [Parameters.apiVersion], urlParameters: [ + Parameters.$host, Parameters.subscriptionId, Parameters.location ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: { - scheduleAvailabilityRequest: [ - "options", - "scheduleAvailabilityRequest" - ], - transportAvailabilityRequest: [ - "options", - "transportAvailabilityRequest" - ] - }, - mapper: { - ...Mappers.RegionConfigurationRequest, - required: true - } - }, + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const regionConfigurationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration", + httpMethod: "POST", responses: { 200: { bodyMapper: Mappers.RegionConfigurationResponse }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, + requestBody: Parameters.regionConfigurationRequest, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const listAvailableSkusNextOperationSpec: msRest.OperationSpec = { +const regionConfigurationByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration", httpMethod: "POST", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], responses: { 200: { - bodyMapper: Mappers.AvailableSkusResult + bodyMapper: Mappers.RegionConfigurationResponse }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, + requestBody: Parameters.regionConfigurationRequest, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.location + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; - -const listAvailableSkusByResourceGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - baseUrl: "https://management.azure.com", +const listAvailableSkusByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.AvailableSkusResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.nextLink, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.location + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; diff --git a/sdk/databox/arm-databox/src/operationsInterfaces/index.ts b/sdk/databox/arm-databox/src/operationsInterfaces/index.ts new file mode 100644 index 000000000000..954ec72f6d68 --- /dev/null +++ b/sdk/databox/arm-databox/src/operationsInterfaces/index.ts @@ -0,0 +1,11 @@ +/* + * 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 "./jobs"; +export * from "./service"; diff --git a/sdk/databox/arm-databox/src/operationsInterfaces/jobs.ts b/sdk/databox/arm-databox/src/operationsInterfaces/jobs.ts new file mode 100644 index 000000000000..df0e74ebd795 --- /dev/null +++ b/sdk/databox/arm-databox/src/operationsInterfaces/jobs.ts @@ -0,0 +1,205 @@ +/* + * 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 { + JobResource, + JobsListOptionalParams, + JobsListByResourceGroupOptionalParams, + UnencryptedCredentials, + JobsListCredentialsOptionalParams, + MarkDevicesShippedRequest, + JobsMarkDevicesShippedOptionalParams, + JobsGetOptionalParams, + JobsGetResponse, + JobsCreateOptionalParams, + JobsCreateResponse, + JobsDeleteOptionalParams, + JobResourceUpdateParameter, + JobsUpdateOptionalParams, + JobsUpdateResponse, + ShipmentPickUpRequest, + JobsBookShipmentPickUpOptionalParams, + JobsBookShipmentPickUpResponse, + CancellationReason, + JobsCancelOptionalParams +} from "../models"; + +/// +/** Interface representing a Jobs. */ +export interface Jobs { + /** + * Lists all the jobs available under the subscription. + * @param options The options parameters. + */ + list( + options?: JobsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Lists all the jobs available under the given resource group. + * @param resourceGroupName The Resource Group Name + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: JobsListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * This method gets the unencrypted secrets related to the job. + * @param resourceGroupName The Resource Group Name + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param options The options parameters. + */ + listCredentials( + resourceGroupName: string, + jobName: string, + options?: JobsListCredentialsOptionalParams + ): PagedAsyncIterableIterator; + /** + * Request to mark devices for a given job as shipped + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param resourceGroupName The Resource Group Name + * @param markDevicesShippedRequest Mark Devices Shipped Request + * @param options The options parameters. + */ + markDevicesShipped( + jobName: string, + resourceGroupName: string, + markDevicesShippedRequest: MarkDevicesShippedRequest, + options?: JobsMarkDevicesShippedOptionalParams + ): Promise; + /** + * Gets information about the specified job. + * @param resourceGroupName The Resource Group Name + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param options The options parameters. + */ + get( + resourceGroupName: string, + jobName: string, + options?: JobsGetOptionalParams + ): Promise; + /** + * Creates a new job with the specified parameters. Existing job cannot be updated with this API and + * should instead be updated with the Update job API. + * @param resourceGroupName The Resource Group Name + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param jobResource Job details from request body. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + jobName: string, + jobResource: JobResource, + options?: JobsCreateOptionalParams + ): Promise< + PollerLike, JobsCreateResponse> + >; + /** + * Creates a new job with the specified parameters. Existing job cannot be updated with this API and + * should instead be updated with the Update job API. + * @param resourceGroupName The Resource Group Name + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param jobResource Job details from request body. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + jobName: string, + jobResource: JobResource, + options?: JobsCreateOptionalParams + ): Promise; + /** + * Deletes a job. + * @param resourceGroupName The Resource Group Name + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + jobName: string, + options?: JobsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a job. + * @param resourceGroupName The Resource Group Name + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + jobName: string, + options?: JobsDeleteOptionalParams + ): Promise; + /** + * Updates the properties of an existing job. + * @param resourceGroupName The Resource Group Name + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param jobResourceUpdateParameter Job update parameters from request body. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + jobName: string, + jobResourceUpdateParameter: JobResourceUpdateParameter, + options?: JobsUpdateOptionalParams + ): Promise< + PollerLike, JobsUpdateResponse> + >; + /** + * Updates the properties of an existing job. + * @param resourceGroupName The Resource Group Name + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param jobResourceUpdateParameter Job update parameters from request body. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + jobName: string, + jobResourceUpdateParameter: JobResourceUpdateParameter, + options?: JobsUpdateOptionalParams + ): Promise; + /** + * Book shipment pick up. + * @param resourceGroupName The Resource Group Name + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param shipmentPickUpRequest Details of shipment pick up request. + * @param options The options parameters. + */ + bookShipmentPickUp( + resourceGroupName: string, + jobName: string, + shipmentPickUpRequest: ShipmentPickUpRequest, + options?: JobsBookShipmentPickUpOptionalParams + ): Promise; + /** + * CancelJob. + * @param resourceGroupName The Resource Group Name + * @param jobName The name of the job Resource within the specified resource group. job names must be + * between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param cancellationReason Reason for cancellation. + * @param options The options parameters. + */ + cancel( + resourceGroupName: string, + jobName: string, + cancellationReason: CancellationReason, + options?: JobsCancelOptionalParams + ): Promise; +} diff --git a/sdk/databox/arm-databox/src/operationsInterfaces/operations.ts b/sdk/databox/arm-databox/src/operationsInterfaces/operations.ts new file mode 100644 index 000000000000..e6bd69e113f7 --- /dev/null +++ b/sdk/databox/arm-databox/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 { + /** + * This method gets all the operations. + * @param options The options parameters. + */ + list( + options?: OperationsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/databox/arm-databox/src/operationsInterfaces/service.ts b/sdk/databox/arm-databox/src/operationsInterfaces/service.ts new file mode 100644 index 000000000000..69b30a23e1d2 --- /dev/null +++ b/sdk/databox/arm-databox/src/operationsInterfaces/service.ts @@ -0,0 +1,107 @@ +/* + * 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 { + SkuInformation, + AvailableSkuRequest, + ServiceListAvailableSkusByResourceGroupOptionalParams, + ValidateAddress, + ServiceValidateAddressOptionalParams, + ServiceValidateAddressResponse, + ValidationRequestUnion, + ServiceValidateInputsByResourceGroupOptionalParams, + ServiceValidateInputsByResourceGroupResponse, + ServiceValidateInputsOptionalParams, + ServiceValidateInputsResponse, + RegionConfigurationRequest, + ServiceRegionConfigurationOptionalParams, + ServiceRegionConfigurationResponse, + ServiceRegionConfigurationByResourceGroupOptionalParams, + ServiceRegionConfigurationByResourceGroupResponse +} from "../models"; + +/// +/** Interface representing a Service. */ +export interface Service { + /** + * This method provides the list of available skus for the given subscription, resource group and + * location. + * @param resourceGroupName The Resource Group Name + * @param location The location of the resource + * @param availableSkuRequest Filters for showing the available skus. + * @param options The options parameters. + */ + listAvailableSkusByResourceGroup( + resourceGroupName: string, + location: string, + availableSkuRequest: AvailableSkuRequest, + options?: ServiceListAvailableSkusByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer + * shipping address and provide alternate addresses if any. + * @param location The location of the resource + * @param validateAddress Shipping address of the customer. + * @param options The options parameters. + */ + validateAddress( + location: string, + validateAddress: ValidateAddress, + options?: ServiceValidateAddressOptionalParams + ): Promise; + /** + * This method does all necessary pre-job creation validation under resource group. + * @param resourceGroupName The Resource Group Name + * @param location The location of the resource + * @param validationRequest Inputs of the customer. + * @param options The options parameters. + */ + validateInputsByResourceGroup( + resourceGroupName: string, + location: string, + validationRequest: ValidationRequestUnion, + options?: ServiceValidateInputsByResourceGroupOptionalParams + ): Promise; + /** + * This method does all necessary pre-job creation validation under subscription. + * @param location The location of the resource + * @param validationRequest Inputs of the customer. + * @param options The options parameters. + */ + validateInputs( + location: string, + validationRequest: ValidationRequestUnion, + options?: ServiceValidateInputsOptionalParams + ): Promise; + /** + * This API provides configuration details specific to given region/location at Subscription level. + * @param location The location of the resource + * @param regionConfigurationRequest Request body to get the configuration for the region. + * @param options The options parameters. + */ + regionConfiguration( + location: string, + regionConfigurationRequest: RegionConfigurationRequest, + options?: ServiceRegionConfigurationOptionalParams + ): Promise; + /** + * This API provides configuration details specific to given region/location at Resource group level. + * @param resourceGroupName The Resource Group Name + * @param location The location of the resource + * @param regionConfigurationRequest Request body to get the configuration for the region at resource + * group level. + * @param options The options parameters. + */ + regionConfigurationByResourceGroup( + resourceGroupName: string, + location: string, + regionConfigurationRequest: RegionConfigurationRequest, + options?: ServiceRegionConfigurationByResourceGroupOptionalParams + ): Promise; +} diff --git a/sdk/databox/arm-databox/test/sampleTest.ts b/sdk/databox/arm-databox/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/databox/arm-databox/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/databox/arm-databox/tsconfig.json b/sdk/databox/arm-databox/tsconfig.json index 422b584abd5e..6e3251194117 100644 --- a/sdk/databox/arm-databox/tsconfig.json +++ b/sdk/databox/arm-databox/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/databox/ci.yml b/sdk/databox/ci.yml new file mode 100644 index 000000000000..c191b07b8958 --- /dev/null +++ b/sdk/databox/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/databox/ + +pr: + branches: + include: + - main + - release/* + - hotfix/* + paths: + include: + - sdk/databox/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: databox + Artifacts: + - name: azure-arm-databox + safeName: azurearmdatabox + \ No newline at end of file